Multitarget-tracker icon indicating copy to clipboard operation
Multitarget-tracker copied to clipboard

Opencv DNN Can't load d-fine?

Open matakk opened this issue 7 months ago • 3 comments

thank you for you beautiful architecture code! I have compile and run on windows with cudn.

use this: MultitargetTracker.exe -e=4-s=g:\dl\Multitarget-tracker\data\settings_dfine.ini

to run opencv dnn ,parser onnx error, I read this on main readme.md:

OpenCV DNN module (tracking::DNN_OCV) with models from [chuanqi305](https://github.com/chuanqi305/MobileNet-SSD) and [pjreddie](https://pjreddie.com/darknet/yolo/)

So I understood that ,this code is not work with this pipe. I want use this pipeline on the huawei CANN platform, the opencv dnn module is support this hardware.

Is no way to implment this ?

matakk avatar May 06 '25 14:05 matakk

Hi! Thank you for your attention to this project.

Just now, the opencv_dnn module can be used with all YOLO models (from YOLOv4 to YOLOv12). If it doesn't work for you — let me know, and I'll fix it.

However, we have another issue with vision transformer-based models (RF-DETR, D-FINE, etc): opencv_dnn does not yet support some required features: https://github.com/opencv/opencv/issues/26919 I'm waiting for a fix from the OpenCV team.

Nuzhny007 avatar May 07 '25 08:05 Nuzhny007

in this req https://github.com/sunsmarterjie/yolov12

I test yolov12 with opencv dnn cuda, the turbo version is not work, load net is fine ,but hasn't detect result ,i use the v1.0 version yolov12 ,is work . thank you

matakk avatar May 09 '25 15:05 matakk

I'm testing with both yolov12m and yolov12_turbo and opencv_dnn backend works fine. You can check the models that I've used (yolov12m.onnx and yolov12_turbo.onnx): https://drive.google.com/drive/folders/1aSph8Nhs-qeYVK-etiMFbScHTQ7xNO2H?usp=sharing

I'm testing on Win x86 + GeForce 4070 with different options:

  • DNN_TARGET_CPU - DNN_BACKEND_DEFAULT
  • DNN_TARGET_CPU - DNN_BACKEND_INFERENCE_ENGINE
  • DNN_TARGET_CUDA - DNN_BACKEND_CUDA
  • DNN_TARGET_CUDA_FP16 - DNN_BACKEND_CUDA

Everything is working as expected.

Nuzhny007 avatar May 10 '25 05:05 Nuzhny007