yolov5-opencv-cpp-python icon indicating copy to clipboard operation
yolov5-opencv-cpp-python copied to clipboard

range error correction

Open Riczap opened this issue 2 years ago • 15 comments

Updated the cpp code for the detection function since some users where having issues with the for loop going out of range.

Riczap avatar Mar 05 '23 22:03 Riczap

Hello, I updated the for loop but still getting the same error. Vector subscript out of range

IkrameBeggar avatar May 18 '23 10:05 IkrameBeggar

Hello, I updated the for loop but still getting the same error. Vector subscript out of range

Hi! Did you try downloading the changed file just in case you missed something? If that doesn't work I'll se what I can do.

Riczap avatar May 18 '23 12:05 Riczap

Hello, I just modified the part you mentioned

IkrameBeggar avatar May 18 '23 13:05 IkrameBeggar

I just downloaded your file but still getting the same error 😓

IkrameBeggar avatar May 18 '23 13:05 IkrameBeggar

Hi, thank you for the PF! Did you check if this code runs with OpenCV 4.5.4?

doleron avatar May 18 '23 13:05 doleron

I will check

IkrameBeggar avatar May 18 '23 13:05 IkrameBeggar

I will check

I'll also verify that the code I uploaded is working well once I get home. Can you post a screenshot with the specific error that you are getting?

Riczap avatar May 18 '23 15:05 Riczap

I will check

I'll also verify that the code I uploaded is working well once I get home. Can you post a screenshot with the specific error that you are getting?

It worked when I used opencv version 4.5.4 Thank you so much

IkrameBeggar avatar May 18 '23 19:05 IkrameBeggar

I will check

I'll also verify that the code I uploaded is working well once I get home. Can you post a screenshot with the specific error that you are getting?

It worked when I used opencv version 4.5.4 Thank you so much

Good to know! No problem.

Riczap avatar May 18 '23 21:05 Riczap

I will check

I'll also verify that the code I uploaded is working well once I get home. Can you post a screenshot with the specific error that you are getting?

It worked when I used opencv version 4.5.4 Thank you so much

Good to know! No problem.

@Riczap Hello again, I am having a problem with the output and don't know what the issue is. Can you help with that? Screenshot (46)

IkrameBeggar avatar May 19 '23 13:05 IkrameBeggar

It looks like the model is properly detecting the objects but either the NMS (Non-Maximun Supression) part of the code (for loop section that was modified) isn't working well or the model is having problems.

I have a cpp file just to test if everything is working properly based on this repo it just loads an image and displays the results. Can you try downloading the files testing it? https://github.com/Riczap/YOLOv5-ObjectDetection-Cpp

Riczap avatar May 19 '23 13:05 Riczap

It looks like the model is properly detecting the objects but either the NMS (Non-Maximun Supression) part of the code (for loop section that was modified) isn't working well or the model is having problems.

I have a cpp file just to test if everything is working properly based on this repo it just loads an image and displays the results. Can you try downloading the files testing it? https://github.com/Riczap/YOLOv5-ObjectDetection-Cpp

Alright I will do that

IkrameBeggar avatar May 19 '23 13:05 IkrameBeggar

It looks like the model is properly detecting the objects but either the NMS (Non-Maximun Supression) part of the code (for loop section that was modified) isn't working well or the model is having problems.

I have a cpp file just to test if everything is working properly based on this repo it just loads an image and displays the results. Can you try downloading the files testing it? https://github.com/Riczap/YOLOv5-ObjectDetection-Cpp

image

It works, thank you so much

IkrameBeggar avatar May 19 '23 13:05 IkrameBeggar

Good to know! You can use that as a template to use your model.

Riczap avatar May 19 '23 13:05 Riczap

Good to know! You can use that as a template to use your model.

I will, Thank you so much for your help

IkrameBeggar avatar May 19 '23 13:05 IkrameBeggar