HongxinLi commited on
Commit
833cc78
Β·
verified Β·
1 Parent(s): 4cc3a82

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +144 -0
README.md ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model:
4
+ - microsoft/Florence-2-large
5
+ library_name: transformers
6
+ tags:
7
+ - GUI
8
+ - VLM
9
+ - Agent
10
+ - GUI-Grounding
11
+ ---
12
+
13
+
14
+ # 🎯 GoClick-Large: Super Fast Lightweight GUI Grounding Expert
15
+
16
+
17
+ <div align="center">
18
+
19
+ [![GitHub](https://img.shields.io/badge/GitHub-Repo-black?logo=github)](https://github.com/ZJULiHongxin/GoClick)
20
+ [![Paper](https://img.shields.io/badge/Paper-GoClick-blue?logo=adobeacrobatreader)](https://arxiv.org/abs/2604.23941)
21
+ [![HuggingFace](https://img.shields.io/badge/πŸ€—%20HuggingFace-Model-yellow)](https://huggingface.co/datasets/HongxinLi/GoClick-Large)
22
+ [![HuggingFace](https://img.shields.io/badge/πŸ€—%20HuggingFace-Dataset-yellow)](https://huggingface.co/datasets/HongxinLi/GoClick_Coreset_3814k)
23
+ [![HuggingFace](https://img.shields.io/badge/πŸ€—%20HuggingFace-SFTData-yellow)](https://huggingface.co/datasets/HongxinLi/GoClick_sft_data)
24
+
25
+ </div>
26
+
27
+
28
+ GoClick is a state-of-the-art two-stage framework for precise UI element grounding. Built on the Florence-2 architecture, it bridges the gap between high-level intent and low-level pixel coordinates by separating the Planning and Grounding tasks.
29
+
30
+ ## πŸ—οΈ Agent Architecture Overview
31
+
32
+ 1. Stage 1 (Planning): Analyze UI screenshot + Goal -> Output Function Description.
33
+ 2. Stage 2 (Grounding): Screenshot + Function Description -> Output Precise Coordinates.Note: This model is the specialized Stage 2 Grounder, fine-tuned for extreme precision in locating elements based on their described functionality.
34
+
35
+ ## πŸš€ Quick Start (Inference of The Model)
36
+
37
+ Prerequisites
38
+
39
+ ```
40
+ pip install transformers==4.45.0
41
+ ```
42
+
43
+ Note: The version of Transformers should not be too high. Adjust the version if model loading fails.
44
+
45
+ ### Usage Example
46
+
47
+ ```
48
+ from transformers import AutoModelForCausalLM, AutoProcessor
49
+ from PIL import Image
50
+
51
+
52
+ def postprocess(text: str, image_size: tuple[int]):
53
+ """Function that decodes model's generation into action json.
54
+
55
+ Args:
56
+ text: single generated sample
57
+ image_size: corresponding image size
58
+ """
59
+ point_pattern = r"<loc_(\d+)>,<loc_(\d+)>"
60
+
61
+ try:
62
+ location = re.findall(point_pattern, text)[0]
63
+ if len(location) > 0:
64
+ point = [int(loc) for loc in location]
65
+
66
+ except Exception:
67
+ point = (0, 0)
68
+
69
+ return point
70
+
71
+ # Load model and processor
72
+ model = AutoModelForCausalLM.from_pretrained("HongxinLi/GoClick-Large")
73
+ processor = AutoProcessor.from_pretrained("HongxinLi/GoClick-Large")
74
+
75
+ # Load UI screenshot
76
+ image = Image.open("ui_screenshot.png")
77
+
78
+ # Stage 1: Planning
79
+
80
+ # Functionality Grounding (For AutoGUI FuncPred Benchmark)
81
+ planning_prompt = f"Locate the element according to its detailed functionality description. {goal_info} (Output the center coordinates of the target)"
82
+
83
+ # Intent Grounding (For RefExp, MOTIF, and VisualWebBench Action Grounding)
84
+ planning_prompt = f"I want to {goal_info}. Please locate the target element I should interact with. (Output the center coordinates of the target)"
85
+
86
+ # Description Grounding (For ScreenSpot/v2 and VisualWebBench Element Grounding))
87
+ planning_prompt = f"Where is the {goal_info} element? (Output the center coordinates of the target)"
88
+
89
+
90
+ inputs = processor(
91
+ images=image,
92
+ text=prompt,
93
+ return_tensors="pt",
94
+ do_resize=True,
95
+ ).to(model.device, dtype=model.dtype)
96
+
97
+ outputs = model.generate(
98
+ **inputs,
99
+ do_sample= False,
100
+ max_new_tokens=max_new_tokens,
101
+ use_cache=True
102
+ )
103
+
104
+ text_output = processor.tokenizer.batch_decode(outputs, skip_special_tokens=False)[0]
105
+ text_output = postprocess(text_output, img_size)
106
+
107
+ ```
108
+
109
+ ### πŸ“Š Benchmarks
110
+
111
+ GoClick-Large achieves state-of-the-art tradeoff between GUI element grounding accuracy and inference latency:
112
+
113
+ | Model | Size | TTFT ↓ (ms) | TPOT ↓ (ms/token) | FuncPred (F; M, W) | ScreenSpot (B; M, W, D) | ScreenSpot-v2 (B; M, W, D) | MOTIF (I; M) | RefExp (I; M) | VWB EG (T; W) | VWB AG (I; W) |
114
+ |-------|------|-------------|-------------------|--------------------|-------------------------|---------------------------|--------------|---------------|---------------|---------------|
115
+ | GPT-4o | - | - | - | 9.8 | 17.8 | 20.4 | 30.5 | 21.8 | 5.6 | 6.8 |
116
+ | Qwen2VL-7B | 8B | 118.9 | 21.2 | 38.7 | 66.4 | 66.9 | 75.1 | 64.8 | 55.9 | 62.1 |
117
+ | CogAgent | 18B | 1253.2 | 208.8 | 29.3 | 47.4 | 49.2 | 46.7 | 35.0 | 55.7 | 59.2 |
118
+ | SeeClick | 10B | 160.4 | 184.4 | 19.8 | 53.4 | 54.0 | 11.1 | 58.1 | 39.2 | 27.2 |
119
+ | Ferret-UI | 8B | 152.5 | 22.9 | 1.2 | 7.1 | 7.8 | 15.9 | 5.5 | 3.9 | 1.9 |
120
+ | UGround | 7B | 1034.6 | 27.9 | 48.8 | 74.8 | 76.5 | 72.4 | 73.6 | 85.2 | 63.1 |
121
+ | OS-ATLAS-8B | 8B | 137.5 | 19.9 | 52.1 | 82.5 | 84.1 | 78.8 | 66.5 | 82.6 | 69.9 |
122
+ | Aguvis | 8B | 119.7 | 21.2 | 52.0 | 83.8 | 85.6 | 73.8 | 80.9 | 91.3 | 68.0 |
123
+ | Qwen2-VL | 2B | 58.8 | 16.4 | 7.1 | 17.9 | 18.6 | 28.8 | 29.2 | 17.9 | 17.5 |
124
+ | OS-ATLAS-4B | 4B | 137.3 | 31.4 | 44.6 | 66.8 | 68.7 | 75.4 | 77.1 | 47.7 | 58.3 |
125
+ | Ferret-UI | 3B | 69.5 | 9.8 | 1.3 | 2.1 | 1.9 | 5.5 | 1.1 | 0.7 | 1.0 |
126
+ | ShowUI | 2B | 79.7 | 14.7 | 39.9 | 76.1 | 77.4 | 72.3 | 58.4 | 64.2 | 55.3 |
127
+ | **GoClick-L (ours)** | 0.8B | 91.1 | 8.3 | **69.5** | **78.5** | **81.1** | **80.4** | **78.2** | **90.3** | **68.0** |
128
+ | **GoClick-B (ours)** | 0.2B | **37.7** | **4.1** | 64.4 | 74.1 | 75.2 | 76.8 | 71.9 | 90.3 | 61.2 |
129
+
130
+
131
+ ## πŸ“ Citation
132
+ If you use GoClick in your research, please cite our paper:
133
+
134
+ ```
135
+ @misc{li2026goclicklightweightelementgrounding,
136
+ title={GoClick: Lightweight Element Grounding Model for Autonomous GUI Interaction},
137
+ author={Hongxin Li and Yuntao Chen and Zhaoxiang Zhang},
138
+ year={2026},
139
+ eprint={2604.23941},
140
+ archivePrefix={arXiv},
141
+ primaryClass={cs.CV},
142
+ url={https://arxiv.org/abs/2604.23941},
143
+ }
144
+ ```