fudan-zvg / PolarFormer

[AAAI 2023] PolarFormer: Multi-camera 3D Object Detection with Polar Transformers
MIT License
160 stars 15 forks source link

Train on 3090 #9

Closed iris0329 closed 1 year ago

iris0329 commented 1 year ago

Hi! Thanks for opening source this great work!

I use the provided command to train the method on 3090, it will raise RuntimeError: CUDA out of memory error

tools/dist_train.sh projects/configs/polarformer/polarformer_r101.py 8 --work-dir work_dirs/polarformer_r101/

I didn't find how to change the batch size. Could you give me some ideas?

yanqinJiang commented 1 year ago

Sorry, there is no batch_size option in config, you have to do some modifications to the code to change the batch_size. Currently, the r101 version of PolarFormer takes up about 29G GPU memory under the setting of batch_size = 1, so I'm afraid it cannot be trained on 3090. But you can change the backbone from r101 to r50/r34 in configs, and that will work on 3090. Do remember to modify fpn_cfg: in_channels according to the backbone you choose.

iris0329 commented 1 year ago

Ah, I see, I will try to use r50/r34 to have a test, many thanks!

sinsin1998 commented 1 year ago

Ah, I see, I will try to use r50/r34 to have a test, many thanks!

hello? Could you tell me how to modify the in_channel? I change it to

image

but got wrong

iris0329 commented 1 year ago

@sinsin1998 Hi, if you only want to play this repo, an easier way is you can try to decrease the input image number, say the input of the original code uses 6 images per batch, and you can try to use 3 images.