|
Frontiers of Information Technology & Electronic Engineering
ISSN 2095-9184 (print), ISSN 2095-9230 (online)
2023 Vol.24 No.3 P.373-387
UI layers merger: merging UI layers via visual learning and boundary prior
Abstract: With the fast-growing graphical user interface (GUI) development workload in the Internet industry, some work attempted to generate maintainable front-end code from GUI screenshots. It can be more suitable for using user interface (UI) design drafts that contain UI metadata. However, fragmented layers inevitably appear in the UI design drafts, which greatly reduces the quality of the generated code. None of the existing automated GUI techniques detects and merges the fragmented layers to improve the accessibility of generated code. In this paper, we propose UI layers merger (UILM), a vision-based method that can automatically detect and merge fragmented layers into UI components. Our UILM contains the merging area detector (MAD) and a layer merging algorithm. The MAD incorporates the boundary prior knowledge to accurately detect the boundaries of UI components. Then, the layer merging algorithm can search for the associated layers within the components' boundaries and merge them into a whole. We present a dynamic data augmentation approach to boost the performance of MAD. We also construct a large-scale UI dataset for training the MAD and testing the performance of UILM. Experimental results show that the proposed method outperforms the best baseline regarding merging area detection and achieves decent layer merging accuracy. A user study on a real application also confirms the effectiveness of our UILM.
Key words: User interface (UI) to code; UI design lint; UI layer merging; Object detection
1浙江大学软件学院,中国杭州市,310027
2浙江大学计算机科学与技术学院,中国杭州市,310027
3阿里巴巴-浙江大学前沿技术联合研究中心,中国杭州市,310027
4阿里巴巴集团,中国杭州市,311121
5浙江-新加坡人工智能与创新设计联合实验室,中国杭州市,310027
摘要:随着互联网行业图形用户界面(GUI)开发工作量的快速增长,国内外学者试图从GUI图片生成可维护的前端代码。该任务更适合从包含有用户界面元数据的UI设计稿来实现代码生成。然而,碎片图层不可避免地会出现在UI设计稿中,这大大降低了生成代码的质量。目前尚未有自动化GUI技术来检测并合并碎片图层以提高生成代码的可维护性。本文提出UI图层合并器(UILM),一种基于计算机视觉的方法,可以自动检测并合并碎片图层为完整的UI组件。本文提出的UILM包含合并区域检测器和碎片图层合并算法。合并区域检测器结合边界先验知识来准确地检测出UI组件的边界。基于此,碎片图层合并算法可以搜索出边界内的相关碎片层并将其合并为整体。此外,我们提出一种动态数据增强算法来提高合并区域检测器的性能。我们还构建了用于训练合并区域检测器和测试UILM的大规模UI数据集。实验结果表明,本文提出的方法在合并区域检测方面优于最佳基线,并达到了有效的图层合并准确率。最后,对真实应用程序的用户研究也证实了本文方法的有效性。
关键词组:
References:
Open peer comments: Debate/Discuss/Question/Opinion
<1>
DOI:
10.1631/FITEE.2200099
CLC number:
TP39
Download Full Text:
Downloaded:
3636
Download summary:
<Click Here>Downloaded:
488Clicked:
2148
Cited:
0
On-line Access:
2024-08-27
Received:
2023-10-17
Revision Accepted:
2024-05-08
Crosschecked:
2022-08-31