-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random Failures #12
Comments
I have further isolated this down to being purely dependent on the fact that there are 3 class ids leveraged. In the case that all detections have the same class id, this is NOT an issue and the number of detections returned from nms is correct. |
Hello, thank you for your issue. Line 387 in 62139e6
Let me know |
Hello, Sorry for my previous answer which was not so on point. I managed to find the bug, even if I fail to completely understand where that randomness comes from (which I witnessed, regardless of the class labels). Thank you very much for reporting this issue which unfortunately hid under my radars ! |
I took some time to dig into the randomness thing, and I have no explanation of the phenomenon. Basically it seems Numba rather returns random bits when trying to slice arrays out-of-index, (which happened before the fix) when there were more scores than boxes after the score thresholding. Something as simple as this shows this faulty behaviour. @njit
def f(x, i):
return x[i]
x = np.arange(10)
>>> f(x, 10) # Works fine
>>> f(x, 11) # Will throw random garbage, while it should raise IndexError Without this weird bug, Edit: this is an expected behaviour of Numba, see bounds checking |
Awesome! thanks for digging in Remy! Any idea on when your next release will be? |
I will try to merge and release 0.3.2 in the coming days. |
- Fixed issue #12, by masking scores as well as boxes. - Added torch and torchvision as proper dev dependencies - Fixed Pillow version (dev dep) to 9.3.0 in dev dependencies because 9.4.0 does not compile on my mbp (see python-pillow/Pillow#6862) - Removed deprecated arguments: `cutoff_distance` and `tree`. Removed associated tests. - Added sanity check to ensure `leaf_size` is strictly positive.
0.3.2 should fix the issue and is released on pypi. |
Hello!
I have been experiencing this random error with your code. If I run this code multiple times (this was cut from a pytest), it will randomly fail due to the len of keep being 0. Here are my fixed values:
Is there some randomness to how the tree is generated? Here is why I am confused. For this specific example:
I am wondering if something is off in your offset_bboxes code that would create boxes where these examples would be overlapping. Regardless, based on the chosen score threshold alone, it seems I should always have a singular detection kept, regardless of the associated bboxes and their associated categories. It would be weird to have a singular detection make it successfully through the scores check of your code on
lsnms/lsnms/nms.py
Line 23 in 62139e6
Do you have any insights into what I might be failing to consider in this scenario?
Thanks!
Taylor Chott.
The text was updated successfully, but these errors were encountered: