cskkxjk / MonoNeRD

(ICCV2023) MonoNeRD: NeRF-like Representations for Monocular 3D Object Detection
MIT License
81 stars 3 forks source link

How to run inference on a single gpu? #6

Closed Hongbin98 closed 1 year ago

Hongbin98 commented 1 year ago

When I try to run ./scripts/dist_test_ckpt.sh ${NUM_GPUS=1} ./configs/stereo/kitti_models/mononerd.yaml ./ckpt/pretrained_mononerd.pth

It still runs the cmd python -m torch.distributed.launch --nproc_per_node=8 tools/test.py --launcher pytorch --save_to_file --cfg_file pretrained-config.yaml --ckpt checkpoint.pth

Besides, the code fails when I run python -m torch.distributed.launch --nproc_per_node=1 tools/test.py --launcher pytorch --save_to_file --cfg_file pretrained-config.yaml --ckpt checkpoint.pth or python tools/test.py --save_to_file --cfg_file pretrained-config.yaml --ckpt checkpoint.pth

Looking forward for your reply!

cskkxjk commented 1 year ago

If you run the training or test code on an multi-GPU device, the following code can help which only use GPU 0: CUDA_VISIBLE_DEVICES=0 ./scripts/dist_test_ckpt.sh 1 ./configs/stereo/kitti_models/mononerd.yaml ./ckpt/pretrained_mononerd.pth

Hongbin98 commented 1 year ago

Thanks for your reply! :)