-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Description
Hello,
I’ve trained a YOLOv7 single-class model for rodent detection (class: rat) and I’m exporting to ONNX for use in Frigate with OpenVINO.
Export command:
python3 export.py --weights best.pt \
--grid --end2end --simplify \
--topk-all 100 --iou-thres 0.45 --conf-thres 0.25 \
--img-size 320 320 --max-wh 320
Issue:
- The exported ONNX runs, but confidence scores are raw logits instead of probabilities.
- In Frigate, this shows up as huge scores (e.g.
score=248.0(logs) or 20000% (Explore view)) and can crash tracking with NaNs. - When I try
--include-nms, the export succeeds but ONNX contains EfficientNMS_TRT nodes, which OpenVINO does not support.
What I tried:
- Suggested by AIs (ChatGPT, Gemini), attempted to patch
export.pyorDetect.forward_exportto applysigmoid()to objectness. - Also tried modifying
models/yolo.pyso that objectness and class scores go through sigmoid before export. - Still struggling to get a clean ONNX that:
- has normalized confidences [0–1],
- does not depend on TensorRT-specific ops.
Questions:
- Is there an officially recommended way to export YOLOv7 for single-class use cases, ensuring objectness is normalized in ONNX?
- Has anyone tested ONNX + OpenVINO pipelines (without EfficientNMS) for YOLOv7?
Thanks for any guidance.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels