Spaces:
Running
Running
BhumikaMak
commited on
Update yolov5.py
Browse files
yolov5.py
CHANGED
@@ -213,7 +213,7 @@ def dff_nmf(image, target_lyr, n_components):
|
|
213 |
boxes = boxes[confidence_mask] # Filter boxes by confidence mask
|
214 |
fig, ax = plt.subplots(1, figsize=(8, 8))
|
215 |
ax.axis("off")
|
216 |
-
ax.imshow(torch.tensor(batch_explanations[0][indx]).cpu().numpy(), cmap="
|
217 |
top_score_idx = scores.argmax(dim=0) # Get the index of the max score
|
218 |
top_score = scores[top_score_idx].item()
|
219 |
top_class_id = class_ids[top_score_idx].item()
|
|
|
213 |
boxes = boxes[confidence_mask] # Filter boxes by confidence mask
|
214 |
fig, ax = plt.subplots(1, figsize=(8, 8))
|
215 |
ax.axis("off")
|
216 |
+
ax.imshow(torch.tensor(batch_explanations[0][indx]).cpu().numpy(), cmap="plasma") # Display image
|
217 |
top_score_idx = scores.argmax(dim=0) # Get the index of the max score
|
218 |
top_score = scores[top_score_idx].item()
|
219 |
top_class_id = class_ids[top_score_idx].item()
|