AICPS/hydrafusion

IndexError: too many indices for tensor of dimension 1

Opened this issue · 0 comments

TPSohz commented

Hi sir,

Sorry to bother you.
I am also trying to train radiate's dataset using your model.
I followed one of your closed issues, 'We used the radiate sdk function get_from_timestamp to get the sensor data for each input modality and corresponding annotations. https://github.com/marcelsheeny/radiate_sdk/blob/master/radiate.py#L187. We used annotations['radar_cartesian'] as the radar_y and annotations['camera_right_rect'] as cam_y. However, since Faster R-CNN is a 2D bounding box predictor, we flatten the pseudo-3D camera annotations for cam_y into 2D boxes.'
I tried using this way but it does not seem to work.
Right now, I am passing in this 'data[iteration][instance].gt_box', code below

with EventStorage(start_iter) as storage:
for data, iteration in zip(data_loader, range(start_iter, max_iter)):
storage.iter = iteration
print("Printing Data")
#print(data[iteration]['image'])
print(iteration)
print(data[iteration]['instances'].gt_boxes)
loss_dict = model(None, None, data[iteration]['image'], None, None, None, data[iteration]['instances'].gt_boxes, None)

However, I am getting this error 'IndexError: too many indices for tensor of dimension 1'.
Could you give me some pointers on what I may be passing in wrong and what should be correct way to pass into the forward function?
Thank you.

Best Regards