You have an error in your non-max suppression implementation. You need to clamp your calculated dimensions of the bbox intersection at 0 (so they can't be negative) or else you can end up with a positive iou resulting from multiplying two negative dimensions. The positive iou may exceed the threshold even when the boxes don't intersect at all. This would happen if one bounding box fully sits both to the right and below another.
I think this should fix the problems referenced in #40 and #78. Going to submit a PR
You have an error in your non-max suppression implementation. You need to clamp your calculated dimensions of the bbox intersection at 0 (so they can't be negative) or else you can end up with a positive iou resulting from multiplying two negative dimensions. The positive iou may exceed the threshold even when the boxes don't intersect at all. This would happen if one bounding box fully sits both to the right and below another. I think this should fix the problems referenced in #40 and #78. Going to submit a PR