Merge pull request #1 from iperov/master

Identity is not the same thing as equality in Python (#291)
This commit is contained in:
haiyang 2019-07-12 13:29:20 +08:00 committed by GitHub
commit b4b65bd4d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -291,7 +291,7 @@ def nms(boxes, threshold, method):
w = np.maximum(0.0, xx2-xx1+1)
h = np.maximum(0.0, yy2-yy1+1)
inter = w * h
if method is 'Min':
if method == 'Min':
o = inter / np.minimum(area[i], area[idx])
else:
o = inter / (area[i] + area[idx] - inter)