Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -240,7 +240,7 @@ def display_gradcam(img, heatmap, alpha=0.4):
|
|
| 240 |
return base64.b64encode(img_byte_arr).decode('utf-8')
|
| 241 |
|
| 242 |
|
| 243 |
-
def calculate_activation_ratio(heatmap, threshold=0.
|
| 244 |
"""Calculates the ratio of activated to non-activated pixels in a heatmap.
|
| 245 |
|
| 246 |
Args:
|
|
|
|
| 240 |
return base64.b64encode(img_byte_arr).decode('utf-8')
|
| 241 |
|
| 242 |
|
| 243 |
+
def calculate_activation_ratio(heatmap, threshold=0.2):
|
| 244 |
"""Calculates the ratio of activated to non-activated pixels in a heatmap.
|
| 245 |
|
| 246 |
Args:
|