Spaces:
Sleeping
Sleeping
Update gradcam.py
Browse files- gradcam.py +1 -1
gradcam.py
CHANGED
|
@@ -66,7 +66,7 @@ def apply_heatmap(image_pil, heatmap, min_contour_area=100, threshold=0.3):
|
|
| 66 |
for contour in contours:
|
| 67 |
if cv2.contourArea(contour) > min_contour_area:
|
| 68 |
x, y, w, h = cv2.boundingRect(contour)
|
| 69 |
-
cv2.rectangle(image_cv, (x, y), (x + w, y + h), (0,
|
| 70 |
|
| 71 |
# Apply heatmap overlay
|
| 72 |
heatmap_colored = cv2.applyColorMap(blurred, cv2.COLORMAP_JET)
|
|
|
|
| 66 |
for contour in contours:
|
| 67 |
if cv2.contourArea(contour) > min_contour_area:
|
| 68 |
x, y, w, h = cv2.boundingRect(contour)
|
| 69 |
+
cv2.rectangle(image_cv, (x, y), (x + w, y + h), (0, 255, 0), 4) # Green box
|
| 70 |
|
| 71 |
# Apply heatmap overlay
|
| 72 |
heatmap_colored = cv2.applyColorMap(blurred, cv2.COLORMAP_JET)
|