OSU-NLP-Group/UGround

[ICLR'25 Oral] UGround: Universal GUI Visual Grounding for GUI Agents

🎯 什麼是 UGround

UGround 是一個開源研究專案,專注於解決圖形使用者介面(GUI)代理的 視覺定位 問題。給定一張截圖與一段自然語言描述(例如:「點擊 傳送 按鈕」),模型會預測所指 UI 元素的 (x, y) 座標。程式碼、預訓練權重、訓練資料與評估套件皆已公開,且該工作已被 ICLR 2025 接受為口頭論文。


📚 主要貢獻

組件 提供內容
模型家族 基於 Qwen2-VL 的三種尺寸視覺語言模型(2B、7B、72B),經微調用於 GUI 定位(命名為 UGround-V1)。
訓練資料 超過 100 萬張帶有邊界框標註的 GUI 截圖(UGround-V1 資料集),托管於 Hugging Face。另提供「僅框」版本。
評估套件 四個成熟 GUI 定位基準(ScreenSpot、Multimodal-Mind2Web、OmniAct、AndroidControl)的即用型評估腳本,以及一個即時代理基準(Mind2Web-Live-SeeAct-V、AndroidWorld-SeeAct-V)。
示範 一個 Hugging Face Spaces 網頁示範,支援上傳圖片與描述,並返回預測座標。
論文與結果 ICLR 2025 完整論文、arXiv 預印本,以及展示最尖端性能的排行榜(例如,72B 模型在 ScreenSpot 上平均得分 89.4%)。

🚀 快速上手(推論)

1. 安裝所需 Python 套件

pip install "git+https://github.com/huggingface/transformers@21fac7abba2a37fae86106f87fcf9974fd1e3830"
pip install accelerate qwen-vl-utils "vllm==0.6.1"

2. 使用 vLLM 執行模型(高吞吐量服務)

# 7B 檢查點範例
vllm serve osunlp/UGround-V1-7B \
    --api-key <your-token> \
    --dtype float16

倉儲建議使用 float16 以獲得更穩定的解碼。

3. 建構定位提示

def format_openai_template(description, base64_image):
    return [{
        "role": "user",
        "content": [
            {"type": "image_url",
             "image_url": {"url": f"data:image/jpeg;base64,{base64_image}"}},
            {"type": "text",
             "text": f"""你的任務是根據描述,協助使用者識別螢幕上特定區域/元素/物件的精確座標 (x, y)。

- 回傳單一字串 "x, y",指向描述元素的中心。
- 若描述模糊,請選擇最合理的元素。
- 模型輸出座標範圍為 [0, 1000);請透過 (寬度/1000, 高度/1000) 進行縮放以取得像素值。

描述: {description}

回答:"""
        ]
    }]

messages 列表以 temperature=0 發送到 vLLM 的 OpenAI 相容端點,即可獲得決定性座標。


📂 倉儲結構(概覽)

  • train/ – 在 UGround 資料上微調 Qwen2-VL 的腳本。
  • offline_evaluation/ – 四個靜態基準(ScreenSpot、Multimodal-Mind2Web、OmniACT、AndroidControl)的程式碼與結果。
  • online_experiments/ – 外部倉儲連結,用於在互動環境中執行模型(Mind2Web-Live-SeeAct-V、AndroidWorld-SeeAct-V)。
  • README.md – 本概述、權重、資料、示範與引用連結。

📊 性能亮點(ScreenSpot 基準)

模型 大小 平均得分
UGround-V1-2B (Qwen2-VL) 2B 77.7
UGround-V1-7B (Qwen2-VL) 7B 86.3
UGround-V1-72B (Qwen2-VL) 72B 89.4
Claude (Computer-Use) 82.9

72B 檢查點在 標準 ScreenSpot 設定中超越所有先前模型,並在搭配 GPT-4o 作為規劃器時,於 代理 設定中達到最佳得分。


🌐 資源與連結


📜 引用

@inproceedings{gou2024uground,
  title={Navigating the Digital World as Humans Do: Universal Visual Grounding for GUI Agents},
  author={Boyu Gou and Ruohan Wang and Boyuan Zheng and Yanan Xie and Cheng Chang and Yiheng Shu and Huan Sun and Yu Su},
  booktitle={International Conference on Learning Representations},
  year={2025},
  url={https://openreview.net/forum?id=kxnoqaisCT}
}

TL;DR: UGround 提供一個即開即用、高性能量的視覺語言模型,可從自然語言中定位 UI 元素,包含資料、權重、基準與即時示範——是任何需要 GUI 感知代理的研究或產品開發的堅實基礎。

相關

  • 專案
  • 專案
  • 專案
  • 專案