JustasBart/yolov8_CPP_Inference_OpenCV_ONNX

The inference results do not match the expectations.

lurz01 opened this issue · 3 comments

lurz01 commented

Hi, @JustasBart
I am using [https://github.com/JustasBart/yolov8_CPP_Inference_OpenCV_ONNX] for compilation and encountering the following issues during runtime:
The observed results are inconsistent with expectations.

  • During the inference process, only the maxClassScore value for the target object is normal, while other variables (x, z, w, h) are all 0.

screenshot-20231206-094448

Environment Information

  • Operating System: Ubuntu 20.04.5 LTS
  • Compiler Version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
  • Dependencies: opencv4.8.0 cuda 11

"I suspect that the issue is caused by the version of OpenCV. Could you please provide the version of OpenCV?
Thank you for your assistance!

Hi @mohun895119883 we've seen something similar here #15 with OpenCV version 4.8.0 it appears that going back to 4.7.0 might resolve your issue.

As for the OpenCV build please follow this:
OpenCV build

Note that since I no longer work in a Computer Vision field due to a new job opportunity I don't actively research or dwell into this sort of topic anymore and thus I've never had the change to figure this out for the latest version (4.8.0) of OpenCV...

I hope you can figure it out from here, good luck! 🚀

lurz01 commented

Hi @mohun895119883 we've seen something similar here #15 with OpenCV version 4.8.0 it appears that going back to 4.7.0 might resolve your issue.

As for the OpenCV build please follow this: OpenCV build

Note that since I no longer work in a Computer Vision field due to a new job opportunity I don't actively research or dwell into this sort of topic anymore and thus I've never had the change to figure this out for the latest version (4.8.0) of OpenCV...

I hope you can figure it out from here, good luck! 🚀

Hi @JustasBart ! 😊Thank you for providing the version and configuration. Following your advice, I successfully resolved this issue. Wishing you all the best!

That's good to hear @mohun895119883 did you rebuild your OpenCV to 4.7.0? Or did you have to do anything else to it?

All the best! 🚀