YOLO-World
YOLO-World copied to clipboard
Updated Dependencies, Better Docker Support, and Segmentation Demo
This PR introduces several significant improvements and updates to code surrounding the core YOLO-World project, addressing multiple issues and enhancing overall functionality and ease of use. When I finally got out of dependency hell, I decided to put down a ladder!
Key Changes
-
Dependency Updates:
- Updated dependencies to match the latest recommended versions from issue #364, including torch >2.0.0 (phew!).
- Upgraded to CUDA 12.1 to ensure compatibility with the latest GPU architectures and because thank god it works.
-
Docker Support:
- Took the existing Docker demo system under my wing and cleaned it right up: it automatically handles the mm* dependency issues everyone has run into, as well as torch and others required for the demo.
- Added a
build_and_run.shscript for easy building and running of Docker containers with different model configurations, matching configs to models, so no one else needs the headache I have.
-
Segmentation Demo:
- Added
demo/segmentation_demo.pyto showcase YOLO-World's open vocabulary segmentation capabilities. The guts of which was stolen shamelessly form @onuralpszr 's excellent hugginface space, https://huggingface.co/spaces/onuralpszr/YOLO-World-Seg, which did not work but showed me enough to get this running. - Integrated segmentation support into the Docker container, allowing for easy testing and demonstration of this feature.
- Added
-
Issue Resolutions:
-
Tested Configurations:
- Verified functionality with
pretrain-x-1280ft, which performs excellently. - Tested
seg-landseg-l-segheadconfigurations, which show good performance but really work well with my use case ( :/ )
- Verified functionality with
Detailed Improvements
- Refactored the Dockerfile for better efficiency and clarity.
- Updated
pyproject.tomlandrequirementsfiles with pinned dependency versions. - Minor changes to configuration files, there were some local paths that needed to be removed.
- Documentation the Docker-based demo workflow.
How to Use
Users can now easily run YOLO-World demos, including the new segmentation demo, using the provided Docker build system. For example:
./build_and_run.sh pretrain-x-1280ft # For gradio object detection demo
./build_and_run.sh seg-l # For segmentation demo
(note, while this is in MR, the fixes are not on master. So you have to replace this line in the dockerfile:
RUN git clone --recursive https://github.com/AILab-CVC/YOLO-World /yolo/
With this line:
RUN git clone --recursive https://github.com/tim-win/YOLO-World /yolo/
Hopefully this PR will save the people who come after me significant amounts of time. Feedback and further testing is welcome!