OmniParser README

The project's README from github.com/microsoft/OmniParser. As one markdown file: README.md.

OmniParser: Screen Parsing tool for Pure Vision Based GUI Agent

Logo

arXiv License

📢 [Project Page] [V2 Blog Post] [Models V2] [Models V1.5] [HuggingFace Space Demo]

OmniParser is a comprehensive method for parsing user interface screenshots into structured and easy-to-understand elements, which significantly enhances the ability of GPT-4V to generate actions that can be accurately grounded in the corresponding regions of the interface.

News

Install

First clone the repo, and then install environment:

cd OmniParser
conda create -n "omni" python==3.12
conda activate omni
pip install -r requirements.txt

Until Hugging Face PR #37 is merged, download the latest YOLOv9-E detector from the PR:

huggingface-cli download microsoft/OmniParser-v2.0 icon_detect_v3/model.pt \
  --revision refs/pr/37 --local-dir weights

OmniParser prefers this local weight. After the PR is merged, it will download the same weight automatically on first use. Download the caption weights into the weights folder:

   for f in icon_caption/{config.json,generation_config.json,model.safetensors}; do huggingface-cli download microsoft/OmniParser-v2.0 "$f" --local-dir weights; done
   mv weights/icon_caption weights/icon_caption_florence

Examples:

We put together a few simple examples in the demo.ipynb.

Gradio Demo

To run gradio demo, simply run:

python gradio_demo.py

Model Weights License

icon_detect_v3 is based on the MIT-licensed YOLOv9 implementation. Earlier Ultralytics-based icon detectors retain their original AGPL license. The caption models are under the MIT license.

📚 Citation

Our technical report can be found here. If you find our work useful, please consider citing our work:

@misc{lu2024omniparserpurevisionbased,
      title={OmniParser for Pure Vision Based GUI Agent}, 
      author={Yadong Lu and Jianwei Yang and Yelong Shen and Ahmed Awadallah},
      year={2024},
      eprint={2408.00203},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2408.00203}, 
}

OmniParser (microsoft/OmniParser)

Searching Database…

这是什么?OmniParser 会把图形界面截图解析成结构化的带标签元素(图标、文字、可交互区域),让 GPT-4V 这类视觉模型能够准确判断该在屏幕上点击或输入哪里。
这是现成的智能体应用,还是可以接入我自己智能体的工具包?它是一个感知工具包(基于 YOLOv9 的区域检测器加上图标描述模型),你可以在 notebook、Gradio 演示或 'OmniTool' 中调用它。OmniTool 会把它与视觉模型连接起来,用来操控一台虚拟机。
我该怎么把它跑起来?克隆代码仓库,安装运行环境,然后把检测器和描述模型的权重下载到 weights 文件夹中;仓库里还附带了 Gradio 演示和 demo.ipynb 作为示例。
通过 OmniTool 可以搭配哪些视觉模型?OmniTool 开箱即用,支持 OpenAI(4o/o1/o3-mini)、DeepSeek(R1)、Qwen(2.5VL)或 Anthropic Computer Use。
模型权重的许可证方面有什么需要注意的吗?有。较新的 icondetectv3 检测器和描述模型采用 MIT 许可,但早期基于 Ultralytics 的图标检测器仍保留其原有的 AGPL 许可,所以拉取权重时要确认所用的版本。
OmniParser V2 有什么新东西?V2 增强了对小图标的更精细检测,并能预测每个界面元素是否可交互;它在 Screen Spot Pro 定位基准上达到 39.5%,创下新的最优成绩。
什么是 OmniTool?OmniTool 是一款配套应用,让你借助 OmniParser 的屏幕解析能力,搭配你选择的视觉模型(如 GPT-4o 或 Claude Computer Use)来控制 Windows 11 虚拟机。
有哪些基准测试结果能佐证这一点?OmniParser 在 Windows Agent Arena 排行榜上位居榜首,使用 V2 版本后在较新的 Screen Spot Pro 定位基准上达到 39.5%。
Creator
microsoft
Size
50.8 MB
Stars
25.5K
Age
2y
Commits · 90 Days