-
Notifications
You must be signed in to change notification settings - Fork 491
Noise in NMS threshold filtering (GetMaxScoreIndex) #261
base: master
Are you sure you want to change the base?
Conversation
This is definitely a good bug fix to merge. @hshen14 is there any reason it's not merged? |
thanks for the reminder, we will merge this update to next release. |
@MinhazPalasara @matt-ny I just reviewed the fix. I have a question about it: the default pair values in the vector are all 0. why using .at() has problem? for example: after sorting, they should all get same output. do I miss something? |
Thanks for looking into this! We appreciate it. Let's say there are Then the sorted Then, at line 2444, after the first Another way to fix is to count the number of above-threshold detections |
Thanks for your elaboration, the idx 0 is used wrongly with original code. I will merge your fix to our repo. |
@matt-ny this fix would make unit test fail. you can reproduce it by "cmake .. && make test.testbin && ./test/test.testbin --gtest_filter=*NMS*". |
Thanks for your reply. I ran the tests as you described, but they did not fail (See attached log). Is there anything else I need to do besides |
I think I have known what happened after debugging. we combined vector push_back() with openmp parallel for primitive without protect, it will bring issue at line 2266.(or wrong value or free an unallocate buffer) we should add openmp critical primitive on push_back(). |
I'm afraid I'm not familiar with openmp and what you're describing here; is the fix to protect push_back() something you will do, or can you make a suggestion how? |
What needs to be done to move forward @ftian1 ? thanks very much! |
I have made corresponding changes in local to pass test. your PR will be merged to next release. Thanks |
Threshold driven filtering in a fixed-size array leads to noisy (default) pair values at the end of a vector which results in low confidence noisy output.