argoverse-kitti-adapter
argoverse-kitti-adapter copied to clipboard
The rotation of bounding boxes for angled cars appears incorrect.
I tried to convert from Argoverse dataset to Kitti using this adapter.py. My code uses only one camera 'ring_front_center' . However when I check the conversion result, the rotation seems off to me. I made sure that I didn't change any math when calculating alpha . I'm getting the bounding box correct for Straight cars after adding the highlighted line.
if 0 < center_cam_frame[0][2] < max_d and 0 < image_bbox[0] < 1920 and 0 < image_bbox[1] < 1200 and 0 < image_bbox[2] < 1920 and 0 < image_bbox[3] < 1200:
# Adjust the center position (y-coordinate)
**_**center_cam_frame[0][1] += 0.5 * height**_**
# Compute orientation angle (alpha) and adjust by pi/2
angle = ext_rot * quat
angle = angle.as_euler('zyx')[1]
angle = (angle + np.pi) % (2 * np.pi) - np.pi
beta = math.atan2(center_cam_frame[0][2], center_cam_frame[0][0])
alpha = (angle - beta + np.pi) % (2 * np.pi) - np.pi
but the bounding boxes for angled cars are incorrect.
I would appreciate if some one can suggest a fix for this problem,Thanks in advance.
Output: