Open renlicheng opened 5 years ago
可能是crop的时候没有越过图片边界了吧
我也遇到了同样的问题,能具体指导一下吗?
我也是。。。
我也是!
过去太久了,不太能回忆细节了,可以调试一下bug。 可以在 File "/home/rlc/H_R-Siamese-RPN/lib/utils.py", line 131, in get_instance_image 这个错误的地方使用try,except,embed停一下,看看具体错误的(img, cx, cy, size_x, s_x, img_mean)是什么。
have you solved? I guess there is something wrong with the pre-train model 'siamrpn_38.pth', because the bbox output from the 2nd-image is Nan.
I have this problem:
/home/rlc/anaconda3/envs/H_R-Siamese-RPN/bin/python /home/rlc/H_R-Siamese-RPN/bin/test_OTB.py -ms /home/rlc/H_R-Siamese-RPN/imagenet_pretrain/siamrpn_38.pth -v tb100 0%| | 0/3 [00:00<?, ?it/s] 0%| | 0/98 [00:00<?, ?it/s]
0%| | 0/725 [00:00<?, ?it/s]
0%| | 1/725 [00:00<02:00, 6.02it/s]/home/rlc/H_R-Siamese-RPN/lib/utils.py:165: RuntimeWarning: overflow encountered in multiply box_w = anchor_w np.exp(offset_w) /home/rlc/H_R-Siamese-RPN/net/tracker.py:106: RuntimeWarning: overflow encountered in add sz2 = (w + pad) (h + pad) /home/rlc/H_R-Siamese-RPN/net/tracker.py:106: RuntimeWarning: overflow encountered in multiply sz2 = (w + pad) * (h + pad) /home/rlc/H_R-Siamese-RPN/net/tracker.py:102: RuntimeWarning: divide by zero encountered in true_divide return np.maximum(r, 1. / r) /home/rlc/H_R-Siamese-RPN/net/tracker.py:115: RuntimeWarning: divide by zero encountered in true_divide r_c = change((self.target_sz[0] / self.target_sz[1]) / (box_pred[:, 2] / box_pred[:, 3])) # ratio penalty /home/rlc/H_R-Siamese-RPN/net/tracker.py:115: RuntimeWarning: invalid value encountered in true_divide r_c = change((self.target_sz[0] / self.target_sz[1]) / (box_pred[:, 2] / box_pred[:, 3])) # ratio penalty 0%| | 1/725 [00:00<02:08, 5.62it/s] 0%| | 0/98 [00:02<?, ?it/s] 0%| | 0/3 [00:02<?, ?it/s] Traceback (most recent call last): File "/home/rlc/H_R-Siamese-RPN/bin/test_OTB.py", line 149, in
result = run_SiamRPN(video_path, model_path, boxes[0])
File "/home/rlc/H_R-Siamese-RPN/net/run_SiamRPN.py", line 44, in run_SiamRPN
bbox, score = tracker.update(frame) # x,y,w,h
File "/home/rlc/H_R-Siamese-RPN/net/tracker.py", line 86, in update
config.context_amount, self.img_mean)
File "/home/rlc/H_R-Siamese-RPN/lib/utils.py", line 131, in get_instance_image
instance_img, scale_x = crop_and_pad(img, cx, cy, size_x, s_x, img_mean)
File "/home/rlc/H_R-Siamese-RPN/lib/utils.py", line 86, in crop_and_pad
xmin = int(round_up(xmin + left))
ValueError: cannot convert float NaN to integer
ANYONE CAN HELP ME!!!!