MCPcopy Index your code
hub / github.com/antonioo-c/PiMAE

github.com/antonioo-c/PiMAE @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,559 symbols 4,391 edges 117 files 398 documented · 26%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PiMAE: Point cloud and Image Interactive Masked Autoencoders for 3D Object Detecion

Accepted to CVPR2023. 🔥

Paper | BibTeX | Webpage

Pytorch pretraining & downstream-training code for PiMAE. We propose a MAE-based self-supervised pre-training framework that promotes 3D and 2D interaction to improve model performance on downstream object detection tasks.

PiMAE Pipeline

📣 check out another lattest work from us, I2P-MAE, which obtains superior 3D representations from 2D pre-trained models via Image-to-Point Masked Autoencoders. 📣

Model Zoo

We provide our pretrained weights (on SUNRGBD) and finetuned transformer-based baseline models (on SUNRGBD, ScanNetV2, KITTI), including 3DETR, DETR, MonoDETR.

task name Dataset AP(gain) download
0 Pretrain PiMAE SUNRGBD - model | 
1 3D Object Detection 3DETR SUNRGBD [AP25] 59.4(+1.4) model | logs
2 3D Object Detection 3DETR ScanNetV2 [AP25] 62.6(+0.5) model | logs
5 Monocular 3D Object Detection MonoDETR KITTI [Easy] 26.6(+3.5) model | logs
6 2D Object Detection DETR ScanNetV2 [AP50] 46.5(+6.7) model | logs

Easy-Usage

We have provided a easy tutorial to use PiMAE's pre-trained 3D extractor. You can easily modify the code to fit in your model.

Get our pretrained models from here and place it as ./Pretrain/pimae.pth.

Install minimum required dependencies then simply run the tutorial code by:

pip install torch torchvision

python Pretrain/tutorial_load.py

Pretraining

Install

First, clone this repository into your local machine.

git clone https://github.com/BLVLab/PiMAE.git

Next, install required dependencies.

cd Pretrain

sh install.sh

Data Preparation

We follow the VoteNet to preprocess our data. The instructions for preparing SUN RGB-D are here. Remember to Edit the dataset paths in Pretrain/datasets/sunrgbd.py.

Training

python main.py --config cfgs/pretrain_JD_pc2img.yaml --exp_name pimae

Visualization

To get reconstruction visualization like this.

python main_vis.py \
    --test \
    --ckpts ./experiments/pretrain/cfgs/pimae/ckpt-last.pth \
    --config ./experiments/pretrain/cfgs/pimae/config.yaml \
    --exp_name vis_pimae \

Downstream

3DETR

Follow 3DETR codebase to prepare the training data (SUNRGBD & ScanNetV2).

Install required dependencies by

cd Downstream/3detr

sh install.sh

Run the training code (you can specify training configure in the script)

sh run.sh

MonoDETR

Follow MonoDETR codebase to prepare the training data (KITTI). Install required dependencies by

cd Downstream/MonoDETR

sh install.sh

Run the code for training and testing (remember to check monodetr.yaml where we specify path to pimae weights).

bash train.sh configs/monodetr.yaml > logs/monodetr.log # training

bash test.sh configs/monodetr.yaml # testing

DETR

Follow DETR to prepare data and required dependencies. Then train it by

cd Downstream/detr/d2

python train_net.py --config configs/detr_256_6_6_torchvision.yaml --num-gpus 8

Acknowledgement

This repository is based on 3DETR, MonoDETR, DETR, timm, MAE repositories, we thank them for their great work.

Citation

If you find this repository helpful, please consider citing our work:

@inproceedings{chen2023pimae,
  title={PiMAE: Point Cloud and Image Interactive Masked Autoencoders for 3D Object Detection},
  author = {Chen, Anthony and Zhang, Kevin and Zhang, Renrui and Wang, Zihan and Lu, Yuheng and Guo, Yandong and Zhang, Shanghang},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2023}
}

Core symbols most depended-on inside this repo

print
called by 117
Downstream/3detr/utils/dist.py
print
called by 53
Pretrain/utils_detr/dist.py
max
called by 52
Pretrain/utils_detr/misc.py
max
called by 50
Downstream/3detr/utils/misc.py
to
called by 47
Downstream/detr/util/misc.py
print_log
called by 33
Pretrain/utils/logger.py
print
called by 31
Downstream/detr/util/misc.py
is_primary
called by 26
Downstream/3detr/utils/dist.py

Shape

Function 863
Method 534
Class 161
Enum 1

Languages

Python75%
C24%
C++1%

Modules by API surface

Pretrain/utils_detr/box_intersection.c381 symbols
Downstream/MonoDETR/utils/misc.py42 symbols
Downstream/detr/util/misc.py41 symbols
Pretrain/models/Point_MAE.py39 symbols
Downstream/detr/datasets/transforms.py39 symbols
Pretrain/utils_detr/box_ops3d.py31 symbols
Downstream/3detr/utils/box_ops3d.py31 symbols
Pretrain/utils/sunrgbd_utils.py30 symbols
Pretrain/datasets/sunrgbd_utils.py30 symbols
Pretrain/utils_detr/box_util.py29 symbols
Pretrain/models/transformer.py29 symbols
Downstream/3detr/utils/box_util.py29 symbols

For agents

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

⬇ download graph artifact