Cargando…

A novel code generator for graphical user interfaces

Graphical user interfaces (GUIs) are widely used in human–computer interaction, providing a convenient interface for operation. Automating the conversion of GUI design images into source code can significantly reduce the coding workload for front-end developers. Detecting elements in GUI images is a...

Descripción completa

Detalles Bibliográficos
Autores principales: Cai, Bo, Luo, Jian, Feng, Zhen
Formato: Online Artículo Texto
Lenguaje:English
Publicado: Nature Publishing Group UK 2023
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10663585/
https://www.ncbi.nlm.nih.gov/pubmed/37989851
http://dx.doi.org/10.1038/s41598-023-46500-6
_version_ 1785148667766767616
author Cai, Bo
Luo, Jian
Feng, Zhen
author_facet Cai, Bo
Luo, Jian
Feng, Zhen
author_sort Cai, Bo
collection PubMed
description Graphical user interfaces (GUIs) are widely used in human–computer interaction, providing a convenient interface for operation. Automating the conversion of GUI design images into source code can significantly reduce the coding workload for front-end developers. Detecting elements in GUI images is a key challenge in achieving automatic GUI code generation and is crucial for tasks such as GUI automation and testing. However, current state-of-the-art methods do not fully consider the unique characteristics of GUI images and elements, and they lack the required high localization accuracy, resulting in low detection accuracy for GUI element boxes. In this paper, we propose GUICG, an automatic GUI code generator that combines deep neural networks with image processing techniques to efficiently detect GUI elements from GUI images and generate front-end code. We empirically investigate various deep learning approaches and image processing methods for GUI component detection. Based on a comprehensive understanding of their performance and characteristics, we design GUICG by fusing image processing with a deep learning-based target detection model, achieving state-of-the-art performance. GUICG outperforms existing methods in accuracy and F1 score for component detection tasks, while producing human-readable code with a logical structure. Furthermore, we conduct an ablation study to quantitatively assess the impact of each key element in GUICG.
format Online
Article
Text
id pubmed-10663585
institution National Center for Biotechnology Information
language English
publishDate 2023
publisher Nature Publishing Group UK
record_format MEDLINE/PubMed
spelling pubmed-106635852023-11-21 A novel code generator for graphical user interfaces Cai, Bo Luo, Jian Feng, Zhen Sci Rep Article Graphical user interfaces (GUIs) are widely used in human–computer interaction, providing a convenient interface for operation. Automating the conversion of GUI design images into source code can significantly reduce the coding workload for front-end developers. Detecting elements in GUI images is a key challenge in achieving automatic GUI code generation and is crucial for tasks such as GUI automation and testing. However, current state-of-the-art methods do not fully consider the unique characteristics of GUI images and elements, and they lack the required high localization accuracy, resulting in low detection accuracy for GUI element boxes. In this paper, we propose GUICG, an automatic GUI code generator that combines deep neural networks with image processing techniques to efficiently detect GUI elements from GUI images and generate front-end code. We empirically investigate various deep learning approaches and image processing methods for GUI component detection. Based on a comprehensive understanding of their performance and characteristics, we design GUICG by fusing image processing with a deep learning-based target detection model, achieving state-of-the-art performance. GUICG outperforms existing methods in accuracy and F1 score for component detection tasks, while producing human-readable code with a logical structure. Furthermore, we conduct an ablation study to quantitatively assess the impact of each key element in GUICG. Nature Publishing Group UK 2023-11-21 /pmc/articles/PMC10663585/ /pubmed/37989851 http://dx.doi.org/10.1038/s41598-023-46500-6 Text en © The Author(s) 2023 https://creativecommons.org/licenses/by/4.0/Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ (https://creativecommons.org/licenses/by/4.0/) .
spellingShingle Article
Cai, Bo
Luo, Jian
Feng, Zhen
A novel code generator for graphical user interfaces
title A novel code generator for graphical user interfaces
title_full A novel code generator for graphical user interfaces
title_fullStr A novel code generator for graphical user interfaces
title_full_unstemmed A novel code generator for graphical user interfaces
title_short A novel code generator for graphical user interfaces
title_sort novel code generator for graphical user interfaces
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10663585/
https://www.ncbi.nlm.nih.gov/pubmed/37989851
http://dx.doi.org/10.1038/s41598-023-46500-6
work_keys_str_mv AT caibo anovelcodegeneratorforgraphicaluserinterfaces
AT luojian anovelcodegeneratorforgraphicaluserinterfaces
AT fengzhen anovelcodegeneratorforgraphicaluserinterfaces
AT caibo novelcodegeneratorforgraphicaluserinterfaces
AT luojian novelcodegeneratorforgraphicaluserinterfaces
AT fengzhen novelcodegeneratorforgraphicaluserinterfaces