mlsanityData to 14 Oct 2026

Automatically Generating UI Code from Screenshot: A Divide-and-Conquer-Based Approach

arXiv 2406.16386 ↗First posted 24 Jun 2024cs.SE cs.AIcited by 24

Not on the map. Why?

Abstract (arXiv)

Websites are critical in today's digital world, with over 1.11 billion currently active and approximately 252,000 new sites launched daily. Converting website layout design into functional UI code is a time-consuming yet indispensable step of website development. Manual methods of converting visual designs into functional code present significant challenges, especially for non-experts. To explore automatic design-to-code solutions, we first conduct a motivating study on GPT-4o and identify three types of issues in generating UI code: element omission, element distortion, and element misarrangement. We further reveal that a focus on smaller visual segments can help multimodal large language models (MLLMs) mitigate these failures in the generation process. In this paper, we propose DCGen, a divide-and-conquer-based approach to automate the translation of webpage design to UI code. DCGen starts by dividing screenshots into manageable segments, generating code for each segment, and then reassembling them into complete UI code for the entire screenshot. We conduct extensive testing with a dataset comprised of real-world websites and various MLLMs and demonstrate that DCGen achieves up to a 15% improvement in visual similarity and 8% in code similarity for large input images. Human evaluations show that DCGen can help developers implement webpages significantly faster and more similar to the UI designs. To the best of our knowledge, DCGen is the first segment-aware MLLM-based approach for generating UI code directly from screenshots.

Key facts. Cited by 24 papers in the map (data through 14 Oct 2026). Builds on 38 of its 75 references that are in the map. First posted on arXiv 24 Jun 2024.

Builds on

38 of 75 references.

References · 38

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
  4. 2023InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuningcited by 2,876
  5. 2023PaLM-E: An Embodied Multimodal Language Modelcited by 2,071
  6. 2023LIMA: Less Is More for Alignmentcited by 1,100
  7. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  8. 2023Teaching Large Language Models to Self-Debugcited by 988
  9. 2023A Survey on Multimodal Large Language Modelscited by 909
  10. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  11. 2023AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedbackcited by 748
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
26 more
  1. 2024Eyes Wide Shut? Exploring the Visual Shortcomings of Multimodal LLMscited by 735
  2. 2023The Dawn of LMMs: Preliminary Explorations with GPT-4V(ision)cited by 681
  3. 2021Multimodal Few-Shot Learning with Frozen Language Modelscited by 661
  4. 2020Image Segmentation Using Deep Learning: A Surveycited by 660
  5. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  6. 2023Self-collaboration Code Generation via ChatGPTcited by 258
  7. 2021VisualGPT: Data-efficient Adaptation of Pretrained Language Models for Image Captioningcited by 191
  8. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 168
  9. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  10. 2024Unlocking the conversion of Web Screenshots into HTML Code with the WebSight Datasetcited by 129
  11. 2017pix2code: Generating Code from a Graphical User Interface Screenshotcited by 114
  12. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  13. 2018Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulationcited by 63
  14. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  15. 2018Machine Learning-Based Prototyping of Graphical User Interfaces for Mobile Appscited by 36
  16. 2022CCTEST: Testing and Repairing Code Completion Systemscited by 35
  17. 2021Screen Parsing: Towards Reverse Engineering of UI Models from Screenshotscited by 32
  18. 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
  19. 2023Nuances are the Key: Unlocking ChatGPT to Find Failure-Inducing Tests with Differential Promptingcited by 23
  20. 2024Language Models as Compilers: Simulating Pseudocode Execution Improves Algorithmic Reasoning in Language Modelscited by 20
  21. 2022Using Deep Learning to Generate Complete Log Statementscited by 17
  22. 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
  23. 2023Semantic Compression With Large Language Modelscited by 17
  24. 2018Automated Reporting of GUI Design Violations for Mobile Appscited by 15
  25. 2023Exploring Distributional Shifts in Large Language Models for Code Analysiscited by 14
  26. 2017Classifying and Qualifying GUI Defectscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 4; 2025: 13; 2026: 7.

24 papers.

Sort:

By area:

  1. 2024InternLM-XComposer-2.5: A Versatile Large Vision Language Model Supporting Long-Contextual Input and Outputcited by 195
  2. 2024Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototypingcited by 51
  3. 2025DesignBench: A Comprehensive Benchmark for MLLM-based Front-end Code Generationcited by 45
  4. 2024MRWeb: An Exploration of Generating Multi-Page Resource-Aware Web Code from UI Designscited by 24
  5. 2025Can't See the Forest for the Trees: Benchmarking Multimodal Safety Awareness for Multimodal LLMscited by 23
  6. 2025VinciCoder: Unifying Multimodal Code Generation via Coarse-to-fine Visual Reinforcement Learningcited by 21
  7. 2024Image2Struct: Benchmarking Structure Extraction for Vision-Language Modelscited by 19
  8. 2025P2P: Automated Paper-to-Poster Generation and Fine-Grained Benchmarkcited by 17
  9. 2025Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Fixingcited by 12
  10. 2025WebVIA: A Web-based Vision-Language Agentic Framework for Interactive and Verifiable UI-to-Code Generationcited by 10
  11. 2025LaTCoder: Converting Webpage Design to Code with Layout-as-Thoughtcited by 9
  12. 2025EfficientUICoder: A Bidirectional Token Compression Framework for Efficient MLLM-Based UI Code Generationcited by 5
12 more
  1. 2025UI-UG: A Unified MLLM for UI Understanding and Generationcited by 5
  2. 20253D Software Synthesis Driven by Constraint-Expressive Intermediate Representationcited by 4
  3. 2025PixelWeb: The First Web GUI Dataset with Pixel-Wise Labelscited by 3
  4. 2025Paper2Web: Let's Make Your Paper Alive!cited by 1
  5. 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
  6. 2026Video2Code: Generating Interactive Webpages from UI Videos via Action-Aware Revisitcited by 1
  7. 2026Still Manual? Automated Linter Configuration via DSL-Based LLM Compilation of Coding Standardscited by 0
  8. 2026DOne: Decoupling Structure and Rendering for High-Fidelity Design-to-Code Generationcited by 0
  9. 2026SPRITE: From Static Mockups to Engine-Ready Game UIcited by 0
  10. 2026ProductWebGen: Benchmarking Multimodal Product Webpage Generationcited by 0
  11. 2026How Well Can AI Generate Backlogs from App Mockups?cited by 0
  12. 2026Pattern over Pixels: Measuring Pattern Completion Bias in Multimodal Code Generationcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024WebCode2M: A Real-World Dataset for Code Generation from Webpage Designs
  2. 2025MLLM-Based UI2Code Automation Guided by UI Layout Information
  3. 2025WebRenderBench: Enhancing Web Interface Generation through Layout-Style Consistency and Reinforcement Learning
  4. 2025WebGen-V Bench: Structured Representation for Enhancing Visual Design in LLM-based Web Generation and Evaluation
  5. 20261D-Bench: A Benchmark for Iterative UI Code Generation with Visual Feedback in Real-World
  6. 2024VASCAR: Content-Aware Layout Generation via Visual-Aware Self-Correction
  7. 2025ArtifactsBench: Bridging the Visual-Interactive Gap in LLM Code Generation Evaluation
  8. 2025FullFront: Benchmarking MLLMs Across the Full Front-End Engineering Workflow