range error correction - #26
Conversation
Updated the cpp code for the detection function since some users where having issues with the for loop going out of range.
IkrameBeggar
commented
May 18, 2023
Hello, I updated the for loop but still getting the same error. Vector subscript out of range |
Riczap
commented
May 18, 2023
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. |
IkrameBeggar
commented
May 18, 2023
Hello, I just modified the part you mentioned |
IkrameBeggar
commented
May 18, 2023
I just downloaded your file but still getting the same error 😓 |
doleron
commented
May 18, 2023
Hi, thank you for the PF! |
IkrameBeggar
commented
May 18, 2023
I will check |
I'll also verify that the code I uploaded is working well once I get home. |
IkrameBeggar
commented
May 18, 2023
It worked when I used opencv version 4.5.4 |
Riczap
commented
May 18, 2023
Good to know! No problem. |
IkrameBeggar
commented
May 19, 2023
@Riczap Hello again, I am having a problem with the output and don't know what the issue is. Can you help with that? |
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 |
IkrameBeggar
commented
May 19, 2023
Alright I will do that |
It works, thank you so much |
Riczap
commented
May 19, 2023
Good to know! You can use that as a template to use your model. |
IkrameBeggar
commented
May 19, 2023
I will, Thank you so much for your help |


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