-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate a multiple saliency map for different objects at once #3
Comments
For D-RISE, since the feedback is global, the saliency map corresponding to an object should also be global, not in-box. You can refer the file drise-yolov3.ipynb. target_box = np.array([354, 177, 390, 235])
target_box = target_box.astype(int)
saliency_map = generate_saliency_map(image,
target_class_index=1,
target_box=target_box,
prob_thresh=0.5,
grid_size=(16, 16),
n_masks=1000)
image_with_bbox = image.copy()
cv2.rectangle(image_with_bbox, tuple(target_box[:2]), tuple(target_box[2:]),
(0, 255, 0), 5)
plt.figure(figsize=(7, 7))
plt.imshow(image_with_bbox[:, :, ::-1])
plt.imshow(saliency_map, cmap='jet', alpha=0.5)
plt.axis('off')
plt.show() you can use detector to detect multi boxes, and input these detection boxes into the calculation in turn. |
thanks , I will try it. |
I just release the Grad-CAM of Faster R-CNN, you can have a look, it may closer to what you describe. |
Hello ,
I am interested to know how can i generate the saliency map for multiple object in one image.
I know how to find a saliency map only for one object in the image , but i don't know how to make that for multiple objects (either from same category or different categories) .
I noticed that you mentioned that you can do it on this repository , Can you help me please?
The text was updated successfully, but these errors were encountered: