Spaces:
Runtime error
Runtime error
extra
Browse files
app.py
CHANGED
|
@@ -68,7 +68,7 @@ def process_image_and_plot(image,iou_threshold=0.5, threshold=0.4):
|
|
| 68 |
print("transformed_image")
|
| 69 |
transformed_image = transforms(image=image)["image"].unsqueeze(0)
|
| 70 |
print("transformed_image 2")
|
| 71 |
-
output = model(transformed_image)
|
| 72 |
|
| 73 |
|
| 74 |
|
|
@@ -80,7 +80,7 @@ def process_image_and_plot(image,iou_threshold=0.5, threshold=0.4):
|
|
| 80 |
|
| 81 |
|
| 82 |
with torch.no_grad():
|
| 83 |
-
outputs = model(
|
| 84 |
outputs = non_max_suppression(outputs, conf_thres=iou_threshold, iou_thres=threshold)
|
| 85 |
# sample_metrics = get_batch_statistics(outputs, targets, iou_threshold=threshold)
|
| 86 |
|
|
|
|
| 68 |
print("transformed_image")
|
| 69 |
transformed_image = transforms(image=image)["image"].unsqueeze(0)
|
| 70 |
print("transformed_image 2")
|
| 71 |
+
# output = model(transformed_image)
|
| 72 |
|
| 73 |
|
| 74 |
|
|
|
|
| 80 |
|
| 81 |
|
| 82 |
with torch.no_grad():
|
| 83 |
+
outputs = model(transformed_image)
|
| 84 |
outputs = non_max_suppression(outputs, conf_thres=iou_threshold, iou_thres=threshold)
|
| 85 |
# sample_metrics = get_batch_statistics(outputs, targets, iou_threshold=threshold)
|
| 86 |
|