LiDAR sensors are widely used in 3D object detection due to their precise distance measurements and robustness to lighting conditions. However, LiDAR often captures only a sparse set of points on distant object surfaces, while RGB cameras can capture hundreds of pixels for the same region.
To compensate for this sparsity, a common practice is to project image pixels into 3D space as pseudo points, enriching the LiDAR point cloud. Nevertheless, this introduces two key challenges:
-
High computational cost: The large number of pseudo points leads to slow and inefficient preprocessing.
-
Noisy depth estimation: Pseudo points generated from depth completion networks often lack accurate local geometry—especially at object boundaries—introducing noise that can degrade detection performance.
SQD is designed to address these issues by selecting informative pseudo points in a sparse-yet-effective manner.
Tested under the following environment:
- Ubuntu 18.04
- Python 3.9
- PyTorch 1.10.1
- CUDA 11.1
spconv v2.x
export CUDA_HOME=/usr/local/cuda-11.1/
export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64/
conda env create -f env.yaml
conda activate sqd
If this fails, try manual installation:
conda install cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
pip install spconv-cu111
Or follow spconv manual installation.
cd SQD/
python setup.py develop
cd pcdet/ops/iou3d/cuda_op/
python setup.py develop
cd ../../../..
- Download KITTI dataset and organize it following OpenPCDet instructions.
- Generate sparse depth maps:
- Project LiDAR points from 3D to 2D images
cd SQD/
python lidar_to_depth_to.py
- Generate dense depth maps:
- Convert depth maps to pseudo point clouds:
cd SQD/
python depth_to_lidar.py
-
(Optional) Use preprocessed files:
-
Directory structure:
SQD/
├── data/
│ └── kitti_sfd_seguv_twise/
│ ├── ImageSets/
│ ├── training/
│ │ ├── calib, velodyne, label_2, image_2, planes (optional)
│ │ ├── depth_dense_kbnet/
│ │ └── depth_pseudo_rgbseguv_dense_kbnet/
│ ├── testing/
│ │ ├── calib, velodyne, image_2, depth_dense_kbnet, ...
│ ├── gt_database/
│ ├── gt_database_pseudo_seguv/
│ ├── kitti_infos_*.pkl
- Create KITTI infos:
cd pcdet/datasets/kitti/
python kitti_dataset_sfd.py create_kitti_infos
- Modify
DATA_PATH
incfgs/kitti_models/sqd.yaml
to your dataset path. - Modify
_BASE_CONFIG_
in the config if necessary.
cd SQD/tools/
python -m torch.distributed.launch --nproc_per_node=3 train.py \
--launcher pytorch \
--cfg_file cfgs/kitti_models/sqd.yaml \
--gpu_id 1,2,3 \
--batch_size 24 \
--epochs 100 \
--extra_tag test \
--workers 3
# Single checkpoint
python -m torch.distributed.launch --nproc_per_node=2 test.py \
--launcher pytorch \
--cfg_file cfgs/kitti_models/sqd.yaml \
--ckpt /path/to/checkpoint_epoch_40.pth \
--gpu_id 1,2 \
--batch_size 40 \
--extra_tag test_eval_all \
--save_to_file \
--workers 2
# Evaluate all checkpoints
python -m torch.distributed.launch --nproc_per_node=2 test.py \
--launcher pytorch \
--cfg_file cfgs/kitti_models/sqd.yaml \
--ckpt_dir /path/to/ckpt/ \
--gpu_id 1,2 \
--batch_size 40 \
--eval_all \
--extra_tag test_eval_all \
--workers 2
- File:
pcdet/datasets/kitti/kitti_dataset_sfd.py
- Function:
process_data_sqd_sample
- Pseudo points are downsampled using a separate GPU.
- File:
pcdet/models/backbones_3d/spconv_backbone.py
- Function:
VoxelBackBone8x
We thank the following repositories:
Feel free to open issues or pull requests. Happy detecting!
If you find this project useful, please consider citing our paper:
@inproceedings{10.1145/3664647.3681420,
author = {Mo, Yujian and Wu, Yan and Zhao, Junqiao and Hou, Zhenjie and Huang, Weiquan and Hu, Yinghao and Wang, Jijun and Yan, Jun},
title = {Sparse Query Dense: Enhancing 3D Object Detection with Pseudo Points},
booktitle = {Proceedings of the 32nd ACM International Conference on Multimedia},
year = {2024},
pages = {409--418},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
doi = {10.1145/3664647.3681420},
url = {https://doi.org/10.1145/3664647.3681420}
}
Future work can explore the following aspects to further improve SQD:
- Reduce hyperparameter dependency: Make the pseudo point querying and selection process more adaptive and efficient.
- Category generalization: Extend SQD from vehicle class to other categories to improve performance in diverse scenes.
- Improve occlusion handling: Develop better strategies for pseudo point completion in occluded regions.
- Robustness validation: Test SQD on more challenging datasets to evaluate its generalizability and robustness.