mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 05:22:06 -07:00
Identity is not the same thing as equality in Python (#291)
Use ==/!= to compare str, bytes, and int literals $ python ```python >>> method = 'Mi' >>> method += 'n' >>> method == 'Min' True >>> method is 'Min' False ```
This commit is contained in:
parent
8484060e01
commit
93ee889597
1 changed files with 1 additions and 1 deletions
|
@ -291,7 +291,7 @@ def nms(boxes, threshold, method):
|
||||||
w = np.maximum(0.0, xx2-xx1+1)
|
w = np.maximum(0.0, xx2-xx1+1)
|
||||||
h = np.maximum(0.0, yy2-yy1+1)
|
h = np.maximum(0.0, yy2-yy1+1)
|
||||||
inter = w * h
|
inter = w * h
|
||||||
if method is 'Min':
|
if method == 'Min':
|
||||||
o = inter / np.minimum(area[i], area[idx])
|
o = inter / np.minimum(area[i], area[idx])
|
||||||
else:
|
else:
|
||||||
o = inter / (area[i] + area[idx] - inter)
|
o = inter / (area[i] + area[idx] - inter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue