OmniParser
OmniParser copied to clipboard
Where I can get 'weights/omniparser/icon_caption_blip2/best.pt'
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.
You need to create the file path manually, and go to huggingface to download the best.pt
Clone the HF repo and change the yolo model path in gradio_demo.py
yolo_model = get_yolo_model(model_path='<path>/best.pt')
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?
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.
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).
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