Journal Home Online First Current Issue Archive For Authors Journal Information 中文版

Frontiers of Information Technology & Electronic Engineering >> 2023, Volume 24, Issue 3 doi: 10.1631/FITEE.2200099

UI layers merger: merging UI layers via visual learning and boundary prior

Affiliation(s): School of Software Technology, Zhejiang University, Hangzhou 310027, China; College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China; Alibaba-Zhejiang University Joint Research Institute of Frontier Technologies, Hangzhou 310027, China; Alibaba Group, Hangzhou 311121, China; Zhejiang-Singapore Innovation and AI Joint Research Lab, Hangzhou 310027, China; less

Received: 2022-03-15 Accepted: 2023-03-25 Available online: 2023-03-25

Next Previous

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.

Related Research