Please wait a minute...
Frontiers of Information Technology & Electronic Engineering

ISSN 2095-9184

Frontiers of Information Technology & Electronic Engineering  2023, Vol. 24 Issue (3): 373-387   https://doi.org/10.1631/FITEE.2200099
  本期目录
UI图层合并器:基于计算机视觉与边界先验的UI图层合并方法
陈云农1,5, 甄焱鲲4, 施楚宁2, 李佳智2, 陈柳青2,3,5(), 李泽健1,3,5, 孙凌云2,3,5, 周婷婷4, 常艳芳4
1. 浙江大学软件学院, 中国杭州市, 310027
2. 浙江大学计算机科学与技术学院, 中国杭州市, 310027
3. 阿里巴巴-浙江大学前沿技术联合研究中心, 中国杭州市, 310027
4. 阿里巴巴集团, 中国杭州市, 311121
5. 浙江-新加坡人工智能与创新设计联合实验室, 中国杭州市, 310027
UI layers merger: merging UI layers via visual learning and boundary prior
Yunnong CHEN1,5, Yankun ZHEN4, Chuning SHI2, Jiazhi LI2, Liuqing CHEN2,3,5(), Zejian LI1,3,5, Lingyun SUN2,3,5, Tingting ZHOU4, Yanfang CHANG4
1. School of Software Technology, Zhejiang University, Hangzhou 310027, China
2. College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China
3. Alibaba-Zhejiang University Joint Research Institute of Frontier Technologies, Hangzhou 310027, China
4. Alibaba Group, Hangzhou 311121, China
5. Zhejiang-Singapore Innovation and AI Joint Research Lab, Hangzhou 310027, China
 全文: PDF(1311 KB)  
摘要:

随着互联网行业图形用户界面(GUI)开发工作量的快速增长,国内外学者试图从GUI图片生成可维护的前端代码。该任务更适合从包含有用户界面元数据的UI设计稿来实现代码生成。然而,碎片图层不可避免地会出现在UI设计稿中,这大大降低了生成代码的质量。目前尚未有自动化GUI技术来检测并合并碎片图层以提高生成代码的可维护性。本文提出UI图层合并器(UILM),一种基于计算机视觉的方法,可以自动检测并合并碎片图层为完整的UI组件。本文提出的UILM包含合并区域检测器和碎片图层合并算法。合并区域检测器结合边界先验知识来准确地检测出UI组件的边界。基于此,碎片图层合并算法可以搜索出边界内的相关碎片层并将其合并为整体。此外,我们提出一种动态数据增强算法来提高合并区域检测器的性能。我们还构建了用于训练合并区域检测器和测试UILM的大规模UI数据集。实验结果表明,本文提出的方法在合并区域检测方面优于最佳基线,并达到了有效的图层合并准确率。最后,对真实应用程序的用户研究也证实了本文方法的有效性。

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 wordsUser interface (UI) to code    UI design lint    UI layer merging    Object detection
收稿日期: 2022-03-15      出版日期: 2023-07-05
通讯作者: 陈柳青     E-mail: chenlq@zju.edu.cn
Corresponding Author(s): Liuqing CHEN   
 引用本文:   
陈云农, 甄焱鲲, 施楚宁, 李佳智, 陈柳青, 李泽健, 孙凌云, 周婷婷, 常艳芳. UI图层合并器:基于计算机视觉与边界先验的UI图层合并方法[J]. Frontiers of Information Technology & Electronic Engineering, 2023, 24(3): 373-387.
Yunnong CHEN, Yankun ZHEN, Chuning SHI, Jiazhi LI, Liuqing CHEN, Zejian LI, Lingyun SUN, Tingting ZHOU, Yanfang CHANG. UI layers merger: merging UI layers via visual learning and boundary prior. Front. Inform. Technol. Electron. Eng, 2023, 24(3): 373-387.
 链接本文:  
https://academic.hep.com.cn/fitee/CN/10.1631/FITEE.2200099
https://academic.hep.com.cn/fitee/CN/Y2023/V24/I3/373
[1] FITEE-0373-23003-YNC_suppl_1 Download
[2] FITEE-0373-23003-YNC_suppl_2 Download
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed