ScreenCoder  by leigest519

Screenshot to HTML/CSS code generation

created 2 weeks ago

New!

1,571 stars

Top 26.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

ScreenCoder is an intelligent system designed to convert UI screenshots and design mockups into editable HTML and CSS code. It targets front-end developers and designers seeking to automate the process of translating visual designs into functional web interfaces, offering a faster and more accurate alternative to manual coding.

How It Works

ScreenCoder employs a modular multi-agent architecture that integrates visual understanding, layout planning, and adaptive code synthesis. This approach allows it to accurately detect UI elements, plan their arrangement, and generate semantically faithful HTML/CSS, enabling easier customization and deployment.

Quick Start & Requirements

  • Install: Clone the repository, create a virtual environment, and install dependencies via pip install -r requirements.txt.
  • Prerequisites: Python 3.x, API keys for chosen generation models (Doubao, Qwen, GPT, Gemini).
  • Usage: The workflow involves multiple steps including block detection, placeholder generation, UI element detection, mapping, and placeholder replacement, culminating in python main.py for final HTML.
  • Demo: A Hugging Face demo is available, with local demo instructions provided.

Highlighted Details

  • Transforms UI screenshots into production-ready HTML/CSS.
  • Modular multi-agent architecture for visual understanding, layout planning, and code synthesis.
  • Supports customized modifications to layout and styling.
  • Qualitative comparisons show improved accuracy and visual alignment over baseline methods.

Maintenance & Community

The project is associated with CUHK MMLab and CUHK ARISE Lab. Links to demo videos and related projects (WebPAI, Awesome-Multimodal-LLM-for-Code) are provided.

Licensing & Compatibility

The repository does not explicitly state a license. Users should verify compatibility for commercial use or closed-source linking.

Limitations & Caveats

The project requires specific API keys for different generation models, and the setup involves a multi-step execution process rather than a single command for end-to-end generation. The license status requires clarification for commercial applications.

Health Check
Last commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
8
Star History
1,613 stars in the last 19 days

Explore Similar Projects

Feedback? Help us improve.