OmniParser icon indicating copy to clipboard operation
OmniParser copied to clipboard

Where I can get 'weights/omniparser/icon_caption_blip2/best.pt'

Open binchen1998 opened this issue 1 year ago • 6 comments

Hi,

When I ran the example, it said:

FileNotFoundError: [Errno 2] No such file or directory: 'weights/omniparser/icon_caption_blip2/best.pt' How to get these files?

Thanks a lot.

binchen1998 avatar Oct 25 '24 01:10 binchen1998

You need to create the file path manually, and go to huggingface to download the best.pt

runshengdu avatar Oct 25 '24 03:10 runshengdu

Clone the HF repo and change the yolo model path in gradio_demo.py

yolo_model = get_yolo_model(model_path='<path>/best.pt')

rwtnb avatar Oct 25 '24 03:10 rwtnb

Clone the HF repo and change the yolo model path in gradio_demo.py

yolo_model = get_yolo_model(model_path='<path>/best.pt')

Thanks for your reply!

But I noticed that the best.pt in HF repo is under icon_detect/ directory, but the code refers to icon_caption_blip2/ directory, is the best.pt in icon_detect/ usable?

binchen1998 avatar Oct 25 '24 05:10 binchen1998

Hi @binchen1998 , we removed the .pt file with model safetensor file in the HF repo. Please try the updated readme, and see if you have any issue.

yadong-lu avatar Oct 28 '24 18:10 yadong-lu

See https://github.com/microsoft/OmniParser/pull/52 for a download.py script that automates downloading the weights (used in this Dockerfile in the same PR).

abrichr avatar Oct 29 '24 19:10 abrichr

Create respective folder:

mkdir -p weights/icon_detect weights/icon_caption_florence

Download the OmniParser v2 models' weight:

huggingface-cli download microsoft/OmniParser-v2.0 icon_detect/train_args.yaml icon_detect/model.pt icon_detect/model.yaml icon_caption/config.json icon_caption/generation_config.json icon_caption/model.safetensors --local-dir weights

agn-7 avatar May 23 '25 09:05 agn-7