Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,8 +43,8 @@ def predict(pilimg,Threshold):
|
|
| 43 |
|
| 44 |
if isnull(Threshold) or Threshold == 0:
|
| 45 |
Threshold=0.88
|
| 46 |
-
else:
|
| 47 |
-
|
| 48 |
|
| 49 |
return predict2(image_np,Threshold),predict3(image_np,Threshold),Threshold
|
| 50 |
|
|
@@ -66,7 +66,7 @@ def predict2(image_np,Threshold):
|
|
| 66 |
category_index,
|
| 67 |
use_normalized_coordinates=True,
|
| 68 |
max_boxes_to_draw=20,
|
| 69 |
-
min_score_thresh=0.38,
|
| 70 |
agnostic_mode=False,
|
| 71 |
line_thickness=2)
|
| 72 |
|
|
@@ -93,7 +93,7 @@ def predict3(image_np,Threshold):
|
|
| 93 |
category_index,
|
| 94 |
use_normalized_coordinates=True,
|
| 95 |
max_boxes_to_draw=20,
|
| 96 |
-
min_score_thresh
|
| 97 |
agnostic_mode=False,
|
| 98 |
line_thickness=2)
|
| 99 |
|
|
|
|
| 43 |
|
| 44 |
if isnull(Threshold) or Threshold == 0:
|
| 45 |
Threshold=0.88
|
| 46 |
+
# else:
|
| 47 |
+
# Threshold= float(Threshold)
|
| 48 |
|
| 49 |
return predict2(image_np,Threshold),predict3(image_np,Threshold),Threshold
|
| 50 |
|
|
|
|
| 66 |
category_index,
|
| 67 |
use_normalized_coordinates=True,
|
| 68 |
max_boxes_to_draw=20,
|
| 69 |
+
min_score_thresh=threshold_d,#0.38,
|
| 70 |
agnostic_mode=False,
|
| 71 |
line_thickness=2)
|
| 72 |
|
|
|
|
| 93 |
category_index,
|
| 94 |
use_normalized_coordinates=True,
|
| 95 |
max_boxes_to_draw=20,
|
| 96 |
+
min_score_thresh=threshold_d,#.38,
|
| 97 |
agnostic_mode=False,
|
| 98 |
line_thickness=2)
|
| 99 |
|