dnn: expose only float variant of NMSBoxes for bindings
the float variant was always shadowed by the int version as Rect2d is implicitly convertible to Rect. This swaps things which is fine, as the vector of boxes was always copied and the computation was done in double.
This commit is contained in:
@@ -230,6 +230,12 @@ class dnn_test(NewOpenCVTests):
|
||||
self.assertTrue(ret)
|
||||
normAssert(self, refs[i], result, 'Index: %d' % i, 1e-10)
|
||||
|
||||
def test_nms(self):
|
||||
confs = (1, 1)
|
||||
rects = ((0, 0, 0.4, 0.4), (0, 0, 0.2, 0.4)) # 0.5 overlap
|
||||
|
||||
self.assertTrue(all(cv.dnn.NMSBoxes(rects, confs, 0, 0.6).ravel() == (0, 1)))
|
||||
|
||||
def test_custom_layer(self):
|
||||
class CropLayer(object):
|
||||
def __init__(self, params, blobs):
|
||||
|
||||
Reference in New Issue
Block a user