Closed shammmmmless closed 5 years ago
I haven't meet this issue before, could you try to change the line
calib, alpha, dim, box_left, cls_kpts[detect_idx])
to
calib, alpha, dim, box_left, cls_kpts[detect_idx].cpu().numpy())
It work, but I got a new type error about dense_align now,
Traceback (most recent call last):
File "demo.py", line 277, in
what the version of torchvision should I use?
Change f and bl to float Tensor.
According to my experience, this error only happens when using pytorch1.0 but not for pytorch0.3.0.post4.
Can you print your torch.__version__
?
Thanks a lot! The problem is the version of pytorch, the demo was running in the env of conda, but got the pytorch of system, it fixed.
when I run demo in mono version, the error is shown as following:
Traceback (most recent call last): File "demo.py", line 261, in
calib, alpha, dim, box_left, cls_kpts[detect_idx])
File "/home/user/Cworkspace/Stereo-RCNN-mono/lib/model/utils/box_estimator.py", line 212, in solve_x_y_z_theta_from_kpt
alpha = kpt2alpha(kpt_pos, kpt_type, box_left)
File "/home/user/Cworkspace/Stereo-RCNN-mono/lib/model/utils/box_estimator.py", line 159, in kpt2alpha
alpha = -m.pi/2 - m.asin(clamp((kpt_pos-box[0])/box_width,-1,1)) # 0 -> -90, 1 -> -180
TypeError: sub() received an invalid combination of arguments - got (numpy.float32), but expected one of:
It was running with python=2.7.6 and pytorch=0.3.0.