Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -114,6 +114,8 @@ def non_maximum_supression(outputs, min_confidence):
|
|
114 |
"""
|
115 |
Function to apply non-maximum suppression.
|
116 |
"""
|
|
|
|
|
117 |
boxes = outputs[0][0]
|
118 |
confidences = boxes[4]
|
119 |
max_confidence_index = np.argmax(confidences)
|
|
|
114 |
"""
|
115 |
Function to apply non-maximum suppression.
|
116 |
"""
|
117 |
+
if min_confidence is None:
|
118 |
+
min_confidence = 0.5
|
119 |
boxes = outputs[0][0]
|
120 |
confidences = boxes[4]
|
121 |
max_confidence_index = np.argmax(confidences)
|