Graphic User Interface (GUI) is facing great demand with the popularization and prosperity of mobile apps. Automatic UI code generation from UI design draft dramatically simplifies the development process. However, the nesting layer structure in the design draft affects the quality and usability of the generated code. Few existing GUI automated techniques detect and group the nested layers to improve the accessibility of generated code. In this paper, we proposed our UI Layers Group Detector as a vision-based method that automatically detects images (i.e., basic shapes and visual elements) and text layers that present the same semantic meanings. We propose two plug-in components, text fusion and box attention, that utilize text information from design drafts as a priori information for group localization. We construct a large-scale UI dataset for training and testing, and present a data augmentation approach to boost the detection performance. The experiment shows that the proposed method achieves a decent accuracy regarding layers grouping.
翻译:由于移动应用程序的普及和繁荣,用户界面(GUI)面临着巨大的需求。UI设计草案中的自动界面代码生成大大简化了开发过程。但是,设计草案中的嵌套层结构影响了生成代码的质量和可用性。现有的图形界面自动技术很少检测和组合嵌套层以改善生成代码的可访问性。在本文中,我们提议将我们的UI图层组检测器作为一种基于愿景的方法,自动检测图像(即基本形状和视觉元素)和文本层,这些图像具有相同的语义含义。我们提议了两个插件,即文本聚合和框关注,将设计草案中的文本信息用作群体本地化的先行信息。我们为培训和测试建立一个大型的界面数据集,并展示一种数据增强方法,以提升检测性能。实验表明,拟议的方法在层分组方面实现了体面的准确性。