# AutoGUI: Scaling GUI Grounding with Autonomous Functionality Annotations from LLMs

[](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
[]()
This repo opensources the training and evaluation code for AutoGUI, an automatic and scalable GUI annotation pipeline
TODO:
1. AutoGUI-v2 data collected on thousands of mobile apps is coming soon.
2. Functionality-grounding-assisted GUI agents are coming soon.
***
## AutoGUI pipeline - Revolutionizing Large-Scale GUI Data Annotation
Existing UI annotation methods typically collect data from static UIs, focusing on describing either the visual appearance (e.g., a button beside
30 the navigation bar), element categories (e.g., “menu button”), or brief functions weakly related to the UI context (e.g., “show more information”).
Here, we are thrilled to unveil **AutoGUI**, a groundbreaking and scalable UI annotation pipeline. AutoGUI can autonomously annotate the contextual functionalities of diverse UI elements at scale, entirely eliminating the need for human experts. This innovation not only accelerates the data collection process but also enhances the depth and accuracy of UI functionality descriptions, opening a new path in the field of UI annotation.
**AutoGUI** initiates by collecting interaction trajectories on Common Crawl websites. Each trajectory step captures all interactable elements and the accessibility tree (AXTree) that briefly outlines the UI structure. The content changes in the AXTrees before and after interaction will be used by an open-source LLM (e.g., Llama-3-70B) to predict functionality annotations of the interacted elements.
This annotation process provides rich functional semantics in the generated annotations, thereby allowing for curating a GUI dataset that can potentially enhance the GUI understanding capabilities of GUI agents.
### Reproducing the annotation pipeline
A clean, self-contained reimplementation of the Web and Mobile annotation
pipeline (reject → annotate/describe → verify → task generation) lives in the
[`autogui_anno/`](autogui_anno/README.md) package, along with an offline
visualizer that walks through the pipeline stage by stage on a handful of
samples. It talks to any OpenAI-compatible endpoint through a model-registry
YAML and reads its API key from `AUTOGUI_LLM_API_KEY`. See
[`autogui_anno/README.md`](autogui_anno/README.md) for installation, configuration,
and usage.
## Installation
You can install the AutoGUI package by cloning the repository and running the following command:
```
git clone https://github.com/BraveGroup/AutoGUI
cd AutoGUI
pip install -e .
```
### Optional Packages
Please also follow the installation instructions of [LLaVA](https://github.com/haotian-liu/LLaVA), [vLLM==0.7.3](https://vllm.readthedocs.io) and [SGLang](https://github.com/sgl-project/sglang) to install them for evaluation of LLaVA.
Note that Qwen2-VL needs `transformers >= 4.47.1` to avoid the MROPE bugs while `Qwen2.5-VL` needs `transformers >= 4.49.0`.
## AutoGUI Dataset
### Training Set
We provide 702k functionality grounding/captioning tasks that are generated by populating task templates with the collected element-functionality pairs. To mitigate the gap between various device types, the screenshots are rendered at various resolutions to mimic web browsers and mobile devices.
Please view the training data [here]([https://huggingface.co/datasets/WebAgent/AutoGUI-v1](https://huggingface.co/datasets/AutoGUI/AutoGUI-v1-702k)).
**A functionality grounding example:**