Spaces:
Sleeping
Sleeping
Commit ·
da9824e
1
Parent(s): 231fd74
Minor fix
Browse files
app.py
CHANGED
|
@@ -112,7 +112,7 @@ def inference(input_img, conf_thres, iou_thres, is_false_detection_images=True,
|
|
| 112 |
|
| 113 |
cam = EigenCAM(model, target_layers)
|
| 114 |
grayscale_cam = cam(tensor)[0, :, :]
|
| 115 |
-
cam_image = show_cam_on_image(
|
| 116 |
|
| 117 |
return img0, cam_image, misclassified_images
|
| 118 |
|
|
@@ -136,7 +136,7 @@ demo = gr.Interface(inference,
|
|
| 136 |
gr.Checkbox(label="Show False Detection"),
|
| 137 |
gr.Slider(5, 35, value=10, step=5, label="Number of False Detection")],
|
| 138 |
outputs= [gr.Image(width=640, height=640, label="Output"),
|
| 139 |
-
gr.Plot("EigenCAM"),
|
| 140 |
gr.Plot(label="False Detection")],
|
| 141 |
title=title,
|
| 142 |
description=description,
|
|
|
|
| 112 |
|
| 113 |
cam = EigenCAM(model, target_layers)
|
| 114 |
grayscale_cam = cam(tensor)[0, :, :]
|
| 115 |
+
cam_image = show_cam_on_image(img_GC, grayscale_cam, use_rgb=True)
|
| 116 |
|
| 117 |
return img0, cam_image, misclassified_images
|
| 118 |
|
|
|
|
| 136 |
gr.Checkbox(label="Show False Detection"),
|
| 137 |
gr.Slider(5, 35, value=10, step=5, label="Number of False Detection")],
|
| 138 |
outputs= [gr.Image(width=640, height=640, label="Output"),
|
| 139 |
+
gr.Plot(label="EigenCAM"),
|
| 140 |
gr.Plot(label="False Detection")],
|
| 141 |
title=title,
|
| 142 |
description=description,
|