fix: making YOLO weights actually work and improve setup docs - #19
fix: making YOLO weights actually work and improve setup docs#19Santosh69 wants to merge 3 commits into
Conversation
- Update code to use model.pt (matches OmniParser release) - Add .gitignore patterns for model weight files - Remove *.rst from .gitignore - Add Prerequisites section to README with download instructions - Fix verify_model_load.py to use model.pt Sub-issue of MVP demo preparation. Fixes FileNotFoundError for contributors.
There was a problem hiding this comment.
Pull request overview
This PR fixes a FileNotFoundError that blocks server startup for new contributors by updating the YOLO model filename from best.pt to model.pt to match Microsoft OmniParser's actual release naming. The changes also improve repository safety by adding proper .gitignore patterns for model weights and restore documentation visibility by removing overly broad markdown file exclusions.
Changes:
- Updated YOLO model path to use correct filename (
model.ptinstead ofbest.pt) - Added setup documentation with wget command for downloading OmniParser weights
- Fixed
.gitignoreto allow markdown/RST files and prevent committing large model files
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/services/omniparser_client.py | Updated YOLO model path to use model.pt matching OmniParser's release naming |
| README.md | Added prerequisites section with instructions for downloading model weights |
| .gitignore | Removed overly broad *.md and *.rst patterns; added specific patterns for model weight files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| # Create weights directory | ||
| mkdir -p weights/icon_detect | ||
|
|
||
| # Download using wget | ||
| wget https://huggingface.co/microsoft/OmniParser/resolve/main/icon_detect/model.pt \ | ||
| -O weights/icon_detect/model.pt |
There was a problem hiding this comment.
The bash code block is missing a closing triple backtick (```). This causes the code block to extend into the "Manual Setup" section below, which will break the markdown formatting.
| ### Prerequisites: Download Model Weights | ||
|
|
||
| This project uses **Microsoft OmniParser** for UI element detection, which requires downloading a custom YOLO model (~40MB). | ||
|
|
||
| **Download the model:** | ||
|
|
||
| ```bash | ||
| # Create weights directory | ||
| mkdir -p weights/icon_detect | ||
|
|
||
| # Download using wget | ||
| wget https://huggingface.co/microsoft/OmniParser/resolve/main/icon_detect/model.pt \ | ||
| -O weights/icon_detect/model.pt |
There was a problem hiding this comment.
The "Prerequisites: Download Model Weights" section is placed after the "Using the Development Script" section. This means users will attempt to run the start-dev.sh script before knowing they need to download the model weights first, which will result in the FileNotFoundError this PR is trying to fix. The prerequisites section should be moved before the "Using the Development Script" section to ensure users download the weights before attempting to start the service.
🐛 Problem
Contributors encounter
FileNotFoundErrorwhen starting the server.Impact: Critical
Server startup blocked for new contributors, preventing run the app
🔍 Root Cause
best.pt, but Microsoft OmniParser releases asmodel.pt.gitignorepatterns risk committing 40MB+ files.gitignorehad*.mdand*.rstblocking docs✅ Solution
Code: Updated to use
model.pt(matches OmniParser naming)Repository Safety: Added
.gitignorepatterns: