Spaces:
Sleeping
Sleeping
Fixed bug
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def detect_objects(image: np.ndarray, iou_thresh: float = 0.5, thresh: float = 0
|
|
47 |
if not enable_grad_cam:
|
48 |
return [plot_img_with_bboxes]
|
49 |
|
50 |
-
grayscale_cam =
|
51 |
img = cv2.resize(image, (416, 416))
|
52 |
img = np.float32(img) / 255
|
53 |
grad_cam_image = show_cam_on_image(img, grayscale_cam, use_rgb=True, image_weight=transparency)
|
|
|
47 |
if not enable_grad_cam:
|
48 |
return [plot_img_with_bboxes]
|
49 |
|
50 |
+
grayscale_cam = yolo_grad_cam(transformed_image, scaled_anchors)[0, :, :]
|
51 |
img = cv2.resize(image, (416, 416))
|
52 |
img = np.float32(img) / 255
|
53 |
grad_cam_image = show_cam_on_image(img, grayscale_cam, use_rgb=True, image_weight=transparency)
|