Spaces:
Running
on
Zero
Running
on
Zero
Enhanced YOLOv11 SAHI Demo with Dynamic Model Loading, UI Controls and MCP Compatibility
#5
by
atalaydenknalbant
- opened
This pull request introduces several significant enhancements to the SAHI + YOLOv11 Gradio demonstration. Key changes include:
- Dynamic Model Selection: Added a dropdown menu allowing users to select between various YOLOv11 models (
yolo11n.pt,yolo11s.pt,yolo11m.pt,yolo11l.pt,yolo11x.pt), enabling flexible experimentation with different model scales. - Intuitive UI Controls: Converted
confidence_threshold,overlap_width_ratio,overlap_height_ratio, andpostprocess_match_thresholdfrom numerical inputs to user-friendly sliders, improving interactive control. - Max Detections Control: Introduced a new slider for
max_detections, allowing users to limit the number of displayed bounding box predictions for both standard and sliced inference. - Code Refactoring and Robustness:
- Transitioned the Gradio interface from
gr.Interfacetogr.Blocksfor more structured UI management. - Implemented a dedicated
load_yolo_modelfunction to handle dynamic model loading, centralizing model initialization. - Added Google-style docstrings to
load_yolo_modelandsahi_yolo_inferencefor enhanced code readability and maintainability.
- Transitioned the Gradio interface from
- MCP Compatibility: Configured the application launch with
mcp_server=Truefor seamless integration into Multi-Container Pod (MCP) environments.
fcakyon
changed pull request status to
merged
enabled zeroGPU for space, tried to implement support in this commit: https://huggingface.co/spaces/fcakyon/sahi-yolo11/commit/a203767664a31937032eba7138630aa178d235b5