MCPcopy Index your code
hub / github.com/cxmomo/RaCFormer

github.com/cxmomo/RaCFormer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
437 symbols 1,168 edges 59 files 131 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RaCFormer: Towards High-Quality 3D Object Detection via Query-based Radar-Camera Fusion (CVPR 2025)

Xiaomeng Chu, Jiajun Deng, Guoliang You, Yifan Duan, Houqiang Li, Yanyong Zhang

arXiv checkpoint

@inproceedings{chu2025racformer,
  title={RaCFormer: Towards High-Quality 3D Object Detection via Query-based Radar-Camera Fusion},
  author={Chu, Xiaomeng and Deng, Jiajun and You, Guoliang and Duan, Yifan and Li, Houqiang and Zhang, Yanyong},
  booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
  pages={17081--17091},
  year={2025}
}

Overview

This repository is an official implementation of RaCFormer, an innovative query-based 3D object detection method through cross-perspective radar-camera fusion.

<img src="https://github.com/cxmomo/RaCFormer/raw/main/arch.jpg" alt="Dialogue_Teaser" width=100% >

Environment

Install PyTorch 2.0 + CUDA 11.8:

conda create -n racformer python=3.8
conda activate racformer
conda install pytorch==2.0.0 torchvision==0.15.0 pytorch-cuda=11.8 -c pytorch -c nvidia

Install other dependencies:

pip install openmim
mim install mmcv-full==1.6.0
mim install mmdet==2.28.2
mim install mmsegmentation==0.30.0
mim install mmdet3d==1.0.0rc6
pip install setuptools==59.5.0
pip install numpy==1.23.5

Install turbojpeg and pillow-simd to speed up data loading (optional but important):

sudo apt-get update
sudo apt-get install -y libturbojpeg
pip install pyturbojpeg
pip uninstall pillow
pip install pillow-simd==9.0.0.post1

Compile CUDA extensions:

cd models/csrc
python setup.py build_ext --inplace

Prepare Dataset

  1. Download nuScenes from https://www.nuscenes.org/nuscenes and put it in data/nuscenes.
  2. Download the generated info files from Google Drive or generate the files by yourself using tools/gen_sweep_info.py.
  3. Folder structure:
data/nuscenes
├── maps
├── nuscenes_infos_test_sweep.pkl
├── nuscenes_infos_train_sweep.pkl
├── samples
├── sweeps
├── v1.0-test
└── v1.0-trainval

Training

Download pretrained ResNet-50 and put it in directory pretrain/:

pretrain
├── cascade_mask_rcnn_r50_fpn_coco-20e_20e_nuim_20201009_124951-40963960.pth

Train RaCFormer with 8 GPUs:

torchrun --nproc_per_node 8 train.py --config configs/racformer_r50_nuimg_704x256_f8.py

Evaluation

Download the model weights.

Single-GPU evaluation:

export CUDA_VISIBLE_DEVICES=0
python val.py --config configs/racformer_r50_nuimg_704x256_f8.py --weights checkpoints/racformer_r50_f8.pth

Multi-GPU evaluation:

export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
torchrun --nproc_per_node 8 val.py --config configs/racformer_r50_nuimg_704x256_f8.py --weights checkpoints/racformer_r50_f8.pth

Acknowledgements

Many thanks to these excellent open-source projects:

Core symbols most depended-on inside this repo

update
called by 11
models/hook/ema.py
init_weights
called by 8
models/racformer_transformer.py
theta_d2xy_coods
called by 6
models/bbox/utils.py
is_parallel
called by 6
models/hook/utils.py
log
called by 5
utils.py
xy2theta_d_coods
called by 5
models/bbox/utils.py
bev_pool_v2
called by 5
models/csrc/bev_pool_v2/bev_pool.py
add_sweep_info
called by 4
tools/gen_sweep_info.py

Shape

Method 274
Class 81
Function 81
Route 1

Languages

Python97%
C++3%

Modules by API surface

models/racformer_transformer.py45 symbols
loaders/pipelines/loading.py41 symbols
loaders/pipelines/transforms.py38 symbols
models/necks/view_transformer_racformer.py37 symbols
models/backbones/vovnet.py21 symbols
models/checkpoint.py18 symbols
models/utils.py15 symbols
models/racformer_head.py15 symbols
models/racformer.py15 symbols
models/csrc/wrapper.py13 symbols
models/bbox/match_costs/match_cost.py12 symbols
loaders/vod_mono_dataset.py12 symbols

For agents

$ claude mcp add RaCFormer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact