Repository navigation
|
I want to have a high detector resolution so I can catch wildlife in my backyard where I typically could not and it works just fine at 40-50ms of latency, I just wanted to check if this could be improved or if anyone had tips on model export options. Frigate Config: detectors:
coreml:
type: coreml
inference_backend: ane # "ane" (default) | "gpu"
model:
path: /Users/jemcats/FrigateCONF/model_cache/yolov26-s-1024-nonms-15opset.onnx
model_type: yolo-generic
width: 1024
height: 1024
input_tensor: nchw
input_pixel_format: rgb
input_dtype: float
labelmap_path: /Users/jemcats/FrigateCONF/model_cache/coco-80.txt
cameras:
backyard:
detect:
enabled: true
width: 1920
height: 1080
min_initialized: 2
fps: 8Model export: docker build . \
--platform linux/amd64 \
--build-arg MODEL_SIZE=s \
--build-arg IMG_SIZE="1024" \
--output . \
-f- <<'EOF'
FROM python:3.11 AS build
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 /model
RUN uv pip install --system \
ultralytics \
onnx==1.18.0 \
onnxruntime \
"onnxslim>=0.1.82" \
onnxscript
ARG MODEL_SIZE
ARG IMG_SIZE
RUN python3 - <<PY
from ultralytics import YOLO
model = YOLO("yolo26${MODEL_SIZE}.pt")
model.export(
format="onnx",
imgsz=${IMG_SIZE},
simplify=True,
opset=15,
end2end=False,
batch=1,
dynamic=False,
nms=False,
)
PY
FROM scratch
ARG MODEL_SIZE
ARG IMG_SIZE
COPY --from=build /model/yolo26${MODEL_SIZE}.onnx \
/yolov26-${MODEL_SIZE}-${IMG_SIZE}-nonms-15opset.onnx
EOFStartup logs I think may be useful: |
Replies: 1 comment 9 replies
|
@JEMcats we plan to do more testing with yolov26 large 1024x1024 models like this tomorrow and I can provide a more detailed response then, but if you want to try something tonight, from what I'm seeing in the Apple Core ML documentation, using a max I'm not sure if 864x864 would be suitable for your needs with wildlife, though. But it might be worth a shot. |

Models with large input sizes such as 1024x1024 are now fully supported in v0.17.2.5 and v0.18.0-beta3