You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following issue when running any of the demo example on retinanet.
May you please advise in this
self.anchor_idxs tensor([], dtype=torch.int64) tensor([], dtype=torch.int64)
Traceback (most recent call last):
File "detection/demo_retinanet.py", line 185, in
main(arguments)
File "detection/demo_retinanet.py", line 147, in main
mask, box, class_id = grad_cam(inputs) # cam mask
File "/content/Grad-CAM.pytorch/detection/grad_cam_retinanet.py", line 61, in call
output = self.net.predict([inputs])
File "/content/detectron2_repo/detectron2/modeling/meta_arch/retinanet.py", line 531, in predict
results = self.inference(box_cls, box_delta, anchors, images.image_sizes)
File "/content/detectron2_repo/detectron2/modeling/meta_arch/retinanet.py", line 422, in inference
anchors, pred_logits_per_image, deltas_per_image, image_size
File "/content/detectron2_repo/detectron2/modeling/meta_arch/retinanet.py", line 477, in inference_single_image
predicted_boxes = self.box2box_transform.apply_deltas(box_reg_i, anchors_i.tensor)
File "/content/detectron2_repo/detectron2/modeling/box_regression.py", line 101, in apply_deltas
pred_ctr_x = dx * widths[:, None] + ctr_x[:, None]
RuntimeError: The size of tensor a (25) must match the size of tensor b (0) at non-singleton dimension 1
Thanks.
The text was updated successfully, but these errors were encountered:
lower down the confidence. It worked for me.
Also remove predict function in grad-cam, instead of self.net.predict([inputs]) use self.net([inputs]). It will work. My detectron version is 2-0.3 and torch is 1.7.
Hello,
I have the following issue when running any of the demo example on retinanet.
May you please advise in this
self.anchor_idxs tensor([], dtype=torch.int64) tensor([], dtype=torch.int64)
Traceback (most recent call last):
File "detection/demo_retinanet.py", line 185, in
main(arguments)
File "detection/demo_retinanet.py", line 147, in main
mask, box, class_id = grad_cam(inputs) # cam mask
File "/content/Grad-CAM.pytorch/detection/grad_cam_retinanet.py", line 61, in call
output = self.net.predict([inputs])
File "/content/detectron2_repo/detectron2/modeling/meta_arch/retinanet.py", line 531, in predict
results = self.inference(box_cls, box_delta, anchors, images.image_sizes)
File "/content/detectron2_repo/detectron2/modeling/meta_arch/retinanet.py", line 422, in inference
anchors, pred_logits_per_image, deltas_per_image, image_size
File "/content/detectron2_repo/detectron2/modeling/meta_arch/retinanet.py", line 477, in inference_single_image
predicted_boxes = self.box2box_transform.apply_deltas(box_reg_i, anchors_i.tensor)
File "/content/detectron2_repo/detectron2/modeling/box_regression.py", line 101, in apply_deltas
pred_ctr_x = dx * widths[:, None] + ctr_x[:, None]
RuntimeError: The size of tensor a (25) must match the size of tensor b (0) at non-singleton dimension 1
Thanks.
The text was updated successfully, but these errors were encountered: