zhangyp15 / MonoFlex

Released code for Objects are Different: Flexible Monocular 3D Object Detection, CVPR21
MIT License
215 stars 40 forks source link

Have anybody tried resizing images into model training? #42

Open Mandylove1993 opened 2 years ago

Mandylove1993 commented 2 years ago

My self data set image resolution is too high to train the model --- "cuda out of memory".....So I want to resize images,I modify kitti.py to resize image,but when train datas, it will come the error in "if torch.isinf(v).sum() > 0: pdb.set_trace()" and "combined_MAE = torch.cat((depth_MAE.unsqueeze(1), keypoint_MAE), dim=1) ", the reason is “ num_reg_2D ” not > 0, but I can't find out the root cases.Have anyone else can share the changes for resize?,thanks!

ruhyadi commented 2 years ago

I had the same experience with resizing images on RTM3D and had an error (though not the same). Each image is associated with its own label. When you resize an image, you have to change the value in the label as well. This will become more complicated. Maybe you can try lowering the batch size so that the memory is not full. Hope this help.

clw5180 commented 2 years ago

just resize the img, 2d_bbox and cam_intrinsic