-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup MR so its a little more professional
- Loading branch information
Showing
12 changed files
with
117 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,63 @@ | ||
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS DEPENDENCIES | ||
# Base image with CUDA support | ||
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS base | ||
|
||
ARG MODEL="yolo_world_l_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py" | ||
ARG WEIGHT="yolo_world_l_clip_base_dual_vlpan_2e-3adamw_32xb16_100e_o365_goldg_train_pretrained-0e566235.pth" | ||
|
||
ENV FORCE_CUDA="1" | ||
ENV MMCV_WITH_OPS=1 | ||
# Set environment variables | ||
ENV FORCE_CUDA="1" \ | ||
MMCV_WITH_OPS=1 \ | ||
DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3-pip \ | ||
python3-pip \ | ||
libgl1-mesa-glx \ | ||
libsm6 \ | ||
libxext6 \ | ||
libxrender-dev \ | ||
libglib2.0-0 \ | ||
git \ | ||
python3-dev \ | ||
python3-wheel \ | ||
curl | ||
|
||
# Uncomment the following if you want to download a specific set of weights | ||
# RUN mkdir weights | ||
# RUN curl -o weights/$WEIGHT -L https://huggingface.co/wondervictor/YOLO-World/resolve/main/$WEIGHT | ||
|
||
RUN pip3 install --upgrade pip \ | ||
&& pip3 install wheel \ | ||
&& pip3 install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu121 \ | ||
&& pip3 install \ | ||
libsm6 \ | ||
libxext6 \ | ||
libxrender-dev \ | ||
libglib2.0-0 \ | ||
git \ | ||
python3-dev \ | ||
python3-wheel \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Python dependencies | ||
FROM base AS python_deps | ||
|
||
RUN pip3 install --upgrade pip wheel \ | ||
&& pip3 install --no-cache-dir torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu121 \ | ||
&& pip3 install --no-cache-dir \ | ||
gradio==4.16.0 \ | ||
opencv-python==4.9.0.80 \ | ||
supervision \ | ||
mmengine==0.10.4 \ | ||
setuptools \ | ||
openmim \ | ||
onnx \ | ||
onnxsim \ | ||
&& mim install mmcv==2.1.0 \ | ||
&& mim install mmdet==3.3.0 \ | ||
&& pip install git+https://github.com/onuralpszr/mmyolo.git | ||
&& pip3 install --no-cache-dir git+https://github.com/onuralpszr/mmyolo.git | ||
|
||
# Clone and install YOLO-World | ||
FROM python_deps AS yolo_world | ||
|
||
FROM DEPENDENCIES as INSTALLING_YOLO | ||
RUN git clone --recursive https://github.com/tim-win/YOLO-World /yolo/ | ||
#COPY . /yolo | ||
RUN git clone --recursive https://github.com/AILab-CVC/YOLO-World /yolo/ | ||
WORKDIR /yolo | ||
|
||
RUN pip3 install -e .[demo] | ||
|
||
RUN pip3 install onnx onnxsim | ||
# Final stage | ||
FROM yolo_world AS final | ||
|
||
ARG MODEL="yolo_world_l_dual_vlpan_l2norm_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py" | ||
ARG WEIGHT="yolo_world_l_clip_base_dual_vlpan_2e-3adamw_32xb16_100e_o365_goldg_train_pretrained-0e566235.pth" | ||
|
||
FROM INSTALLING_YOLO as OK_THIS_PART_IS_TRICKY_DONT_HATE | ||
# Create weights directory and set permissions | ||
RUN mkdir /weights/ \ | ||
&& chmod a+rwx /yolo/configs/*/* | ||
|
||
RUN mkdir /weights/ | ||
RUN chmod a+rwx /yolo/configs/*/* | ||
# Optionally download weights (commented out by default) | ||
# RUN curl -o /weights/$WEIGHT -L https://huggingface.co/wondervictor/YOLO-World/resolve/main/$WEIGHT | ||
|
||
CMD [ "bash" ] | ||
# Set the default command | ||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ We recommend that everyone **use English to communicate on issues**, as this hel | |
For business licensing and other related inquiries, don't hesitate to contact `[email protected]`. | ||
|
||
## 🔥 Updates | ||
`[2024-8-31]`: Segmentation demo added to the demo/ folder. Try it out in docker with `./build_and_run.sh seg-l`! | ||
`[2024-7-8]`: YOLO-World now has been integrated into [ComfyUI](https://github.com/StevenGrove/ComfyUI-YOLOWorld)! Come and try adding YOLO-World to your workflow now! You can access it at [StevenGrove/ComfyUI-YOLOWorld](https://github.com/StevenGrove/ComfyUI-YOLOWorld)! | ||
`[2024-5-18]:` YOLO-World models have been [integrated with the FiftyOne computer vision toolkit](https://docs.voxel51.com/integrations/ultralytics.html#open-vocabulary-detection) for streamlined open-vocabulary inference across image and video datasets. | ||
`[2024-5-16]:` Hey guys! Long time no see! This update contains (1) [fine-tuning guide](https://github.com/AILab-CVC/YOLO-World?#highlights--introduction) and (2) [TFLite Export](./docs/tflite_deploy.md) with INT8 Quantization. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters