Open shaharzuler opened 3 years ago
Thanks for the pull request, I will check this out when I can find the time. Meanwhile, could you provide the edge case here please?
sure. box_a = [[278.5549 353.25702 323.6288 459.951 ] [129.14798 10.8454895 370.7251 330.6273 ] [185.53943 154.68863 467.73505 480. ]] box_b = [[232. 353. 326. 457.]]
causes: inter = [[[ 45.073914 103.74298 ]] [[ 94. -22.372711]] [[ 94. 104. ]]]
which returns: [[ 4676.102] [-2103.035] [ 9776. ]]
Hey, using np.clip() doesnt verify a_min<a_max. That caused negative intersection calculations when max_diff was negative. I noticed it when I got IoU values above 1. I replaced np.clip() with separate minimum and maximum calculations.