From dd8282ff3c0a1ef8e6418f5ec0cb3a88cba199dc Mon Sep 17 00:00:00 2001 From: Bart Nagel Date: Tue, 24 Feb 2026 06:38:04 -0800 Subject: [PATCH] Docs: fix YOLOv9 onnx export (#22107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Docs: fix missing dependency in YOLOv9 build script I had this command fail because it didn't have cmake available. This change fixes that problem. * Docs: avoid failure in YOLOv9 build script Pinning to 0.4.36 avoids this error: ``` 10.58 Downloading onnx 12.87 Building onnxsim==0.5.0 1029.4 × Failed to download and build `onnxsim==0.5.0` 1029.4 ╰─▶ Package metadata version `0.4.36` does not match given version `0.5.0` 1029.4 help: `onnxsim` (v0.5.0) was included because `onnx-simplifier` (v0.5.0) 1029.4 depends on `onnxsim` ``` * Update Dockerfile instructions for object detectors --------- Co-authored-by: Nicolas Mowen --- docs/docs/configuration/object_detectors.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index 7016bf4b6..5db813d29 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -1057,12 +1057,12 @@ YOLOv9 model can be exported as ONNX using the command below. You can copy and p ```sh docker build . --build-arg MODEL_SIZE=t --build-arg IMG_SIZE=320 --output . -f- <<'EOF' FROM python:3.11 AS build -RUN apt-get update && apt-get install --no-install-recommends -y libgl1 && rm -rf /var/lib/apt/lists/* -COPY --from=ghcr.io/astral-sh/uv:0.8.0 /uv /bin/ +RUN apt-get update && apt-get install --no-install-recommends -y cmake libgl1 && rm -rf /var/lib/apt/lists/* +COPY --from=ghcr.io/astral-sh/uv:0.10.4 /uv /bin/ WORKDIR /yolov9 ADD https://github.com/WongKinYiu/yolov9.git . RUN uv pip install --system -r requirements.txt -RUN uv pip install --system onnx==1.18.0 onnxruntime onnx-simplifier>=0.4.1 onnxscript +RUN uv pip install --system onnx==1.18.0 onnxruntime onnx-simplifier==0.4.* onnxscript ARG MODEL_SIZE ARG IMG_SIZE ADD https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-${MODEL_SIZE}-converted.pt yolov9-${MODEL_SIZE}.pt