OmniParser V2 在 Windows 系统上的详细安装与运行指南

OmniParser V2 在 Windows 系统上的详细安装与运行指南

一、环境准备

1. 硬件要求

  • CPU: 最低 i5-11400F(推荐多核处理器)
  • 内存: 16GB 起步
  • 显卡: NVIDIA RTX 3060 或更高(需支持 CUDA 加速)

2. 软件依赖

# 安装 Python 3.12
winget install Python.Python.3.12

二、安装本体程序

1. 克隆仓库与虚拟环境

git clone https://github.com/microsoft/OmniParser.git
cd OmniParser
conda create -n "omni_agent" python==3.12 -y
conda activate omni_agent
pip install -r requirements.txt

2. GPU 加速支持

pip uninstall torch torchvision torchaudio -y
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

三、模型权重与 OCR 配置

1. 下载预训练模型

huggingface-cli login
huggingface-cli download microsoft/OmniParser-v2.0 --local-dir weights
mv weights/icon_caption weights/icon_caption_florence

2. 安装 Tesseract OCR

# PowerShell 命令
choco install tesseract --params '"/AdditionalLanguages:chi_sim"'

四、验证与运行

1. 启动 Gradio 界面

python gradio_demo.py

2. 代码调用示例

from omniparser import OmniParser
agent = OmniParser()
result = agent.parse_file("screenshot.png", parser_type="ImageParser", lang="chi_sim+eng")
print(result)

五、常见问题

GPU 加速失败验证

import torch
print(torch.cuda.is_available())  # 应输出 True

相关资讯

阿里云通义灵码 AI 编程助手上线微软 Visual Studio 插件市场,个人专业版限时免费

通义灵码是阿里云出品的一款基于通义大模型的智能编码辅助工具,提供行级 / 函数级实时续写、自然语言生成代码、单元测试生成、代码优化、注释生成、代码解释、研发智能问答、异常报错排查等能力,支持 Java、Python、Go、C 等 200 多种编程语言。通义灵码 6 月 20 日宣布上线了微软 Visual Studio 插件市场,该工具此前已上线了 Visual Studio Code、JetBrains IDEs 等主流编程工具,全渠道下载量超 350 万。Visual Studio(VS)是微软推出的一款集

三分钟部署自己的 DeepSeek R1 满血版,彻底告别服务器繁忙!

Hello,大家好,我是 Sunday。 网上有很多教大家部署 DeepSeek 的教程,但是大多数都是 小模型 部署,参数最多也就给你打到 14b。 这样的小模型相比满血版的 R1 简直 弱爆了。

控制电脑手机的智能体人人都能造,微软开源OmniParser

大模型控制计算机果真就是未来方向? 最近这几天,让大模型具备控制计算机(包括电脑和手机)的相关研究和应用如雨后春笋般不断涌现。 先是 Anthropic 发布了能控制计算机的新版 Claude 3.5 Sonnet,之后荣耀 MagicOS 9.0 来了个全局智能体,再然后,昨天智谱发布了具备「全栈式工具使用能力」的 AutoGLM,同时华为也公布了一项可让 AI 像人类一样操作手机的新研究成果 LiMAC。