I have set up a custom model, but Frigate cannot recognize people #20703
Replies: 2 comments 2 replies
-
|
Your custom ONNX model appears to work correctly outside Frigate (based on your test image), so the issue is likely in how Frigate is configured to use it. Here are the key areas to check: 1. Verify Model Configuration Matches Your ONNX ModelFor YOLO models with the ONNX detector, your configuration should match what your model expects(1): detectors:
onnx_cpu:
type: onnx
model:
model_type: yolo-generic
width: 320
height: 320
input_tensor: nchw
input_dtype: float
path: /config/helmet_head_person_s.onnx
labelmap_path: /config/labelmap.txtImportant: Verify that your model actually expects model:
input_pixel_format: bgr # Try this instead of rgb2. Check Your Labelmap FormatYour labelmap should have one label per line with the index matching your model's output classes(2). Since your model outputs person/helmet/head, your This looks correct, but ensure there are no extra spaces or blank lines. 3. Review Detection ThresholdsYou've set extremely low thresholds for debugging, which is good: objects:
filters:
person:
threshold: 0.1
min_area: 100However, check the Frigate debug logs to see:
4. Common ONNX Model IssuesThe ONNX detector supports YOLO models, but there are specific requirements(1):
Since your model works in your test code but not in Frigate, the most likely issues are:
5. Enable Debug LoggingYour logger configuration is already set to debug, which is good(2). Check the Frigate logs specifically for: These will show if the model is loading correctly and what detections (if any) are being produced. Next Steps
objects:
track:
- person
# Remove filters temporarily for debuggingIf you continue to have issues, share the relevant debug log output showing what happens when Frigate processes a frame with your model. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
Note that in the labelmap, labels with numeric IDs preceding them require special attention. Refer to the labelmap of this project for reference. https://github.com/blakeblackshear/frigate/blob/dev/labelmap.txt 以及你应该想问的是person,但是你的翻译软件把他翻译为了people :( 同时顺带一提,detect里的长宽不需要和模型大小设置为一样,Frigate会裁剪画面发送给检测器。详细信息可以见中文文档:https://docs.frigate-cn.video/frigate/camera_setup#%E9%80%89%E6%8B%A9%E6%A3%80%E6%B5%8B%E5%88%86%E8%BE%A8%E7%8E%87 欢迎进入中文社群,我们可以提供中文支持 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My yml file content is:
He has been unable to recognize the person.
My labelmap.txt is:
My onnx model has tried code execution recognition:
Beta Was this translation helpful? Give feedback.
All reactions