DetAny3D
December 14, 2025 ยท View on GitHub
Important
๐ Stay up to date at opendrivelab.com!
DetAny3D
This is the official repository for the Detect Anything 3D in the Wild, a promptable 3D detection foundation model capable of detecting any novel object under arbitrary camera configurations using only monocular inputs.
๐ Table of Contents
- ๐ TODO
- ๐ Getting Started
- ๐ฆ Checkpoints
- ๐ Dataset Preparation
- ๐๏ธโโ๏ธ Training
- ๐ Inference
- ๐ Launch Online Demo
- ๐ Citation
๐ TODO
โ Done
- Release full code
- Provide training and inference scripts
- Release the model weights
๐ ๏ธ In Progress
- TODO: Provide full conversion scripts for constructing DA3D locally
- TODO: Simplify the inference process
- TODO: Provide a tutorial for creating customized datasets and finetuning
๐ Getting Started
Step 1: Create Environment
conda create -n detany3d python=3.8
conda activate detany3d
Step 2: Install Dependencies
โ (1) Install Segment Anything (SAM)
Follow the official instructions to install SAM and download its checkpoints.
โ (2) Install UniDepth
Follow the UniDepth setup guide to compile and install all necessary packages.
โ (3) Clone and configure GroundingDINO
git clone https://github.com/IDEA-Research/GroundingDINO.git
cd GroundingDINO
pip install -e .
๐ The exact dependency versions are listed in our
requirements.txt
๐ฆ Checkpoints
Please download third-party checkpoints from the following sources:
- SAM checkpoint: Please download
sam_vit_h.pthfrom the official SAM GitHub Releases - UniDepth / DINO checkpoints: Available via Google Drive
detany3d_private/
โโโ checkpoints/
โ โโโ sam_ckpts/
โ โ โโโ sam_vit_h.pth
โ โโโ unidepth_ckpts/
โ โ โโโ unidepth.pth
โ โโโ dino_ckpts/
โ โ โโโ dino_swin_large.pth
โ โโโ detany3d_ckpts/
โ โโโ detany3d.pth
GroundingDINO's checkpoint should be downloaded from its official repo and placed as instructed in their documentation.
๐ Dataset Preparation
The data/ directory should follow the structure below:
data/
โโโ DA3D_pkls/ # DA3D processed pickle files
โโโ kitti/
โ โโโ test_depth_front/
โ โโโ ImageSets/
โ โโโ training/
โ โโโ testing/
โโโ nuscenes/
| โโโ nuscenes_depth/
โ โโโ samples/
โโโ 3RScan/
โ โโโ <token folders>/ # e.g., 10b17940-3938-...
โโโ hypersim/
| โโโ depth_in_meter/
โ โโโ ai_XXX_YYY/ # e.g., ai_055_009
โโโ waymo/
โ โโโ kitti_format/ # KITTI-format data for Waymo
โ โโโ validation_depth_front/
โ โโโ ImageSets/
โ โโโ training/
โ โโโ testing/
โโโ objectron/
โ โโโ train/
โ โโโ test/
โโโ ARKitScenes/
โ โโโ Training/
โ โโโ Validation/
โโโ cityscapes3d/
โ โโโ depth/
โ โโโ leftImg8bit/
โโโ SUNRGBD/
โ โโโ realsense/
โ โโโ xtion/
| โโโ kv1/
โ โโโ kv2/
The download for
kitti,nuscenes,hypersim,objectron,arkitscenes, andsunrgbdfollow the Omni3D convention. Please refer to the Omni3D repository for details on how to organize and preprocess these datasets.
๐๏ธ The
DA3D_pkls(minimal metadata for inference) can be downloaded from Google Drive.
๐งฉ Note: This release currently supports a minimal inference-only version. The conversion scripts of full dataset + all depth-related files will be provided later.
โ ๏ธ Depth files are not required for inference. You can safely set
depth_path = Nonein detany3d_dataset.py to bypass depth loading.
๐๏ธโโ๏ธ Training
torchrun \
--nproc_per_node=8 \
--master_addr=${MASTER_ADDR} \
--master_port=${MASTER_PORT} \
--nnodes=8 \
--node_rank=${RANK} \
./train.py \
--config_path \
./detect_anything/configs/train.yaml
๐ Inference
torchrun \
--nproc_per_node=8 \
--master_addr=${MASTER_ADDR} \
--master_port=${MASTER_PORT} \
--nnodes=1 \
--node_rank=${RANK} \
./train.py \
--config_path \
./detect_anything/configs/inference_indomain_gt_prompt.yaml
After inference, a file named {dataset}_output_results.json will be generated in the exps/<your_exp_dir>/ directory.
โ ๏ธ Due to compatibility issues between
pytorch3dand the current environment, we recommend copying the output JSON file into the evaluation script of repositories like Omni3D or OVMono3D for standardized metric evaluation.
TODO: Evaluation for zero-shot datasets currently requires manual modification of the Omni3D or OVMono3D repositories and is not yet fully supported here.
We plan to release a merged evaluation script in this repository to make direct evaluation more convenient in the future.
๐ Launch Online Demo
python ./deploy.py
๐ Citation
If you find this repository useful, please consider citing:
@article{zhang2025detect,
title={Detect Anything 3D in the Wild},
author={Zhang, Hanxue and Jiang, Haoran and Yao, Qingsong and Sun, Yanan and Zhang, Renrui and Zhao, Hao and Li, Hongyang and Zhu, Hongzi and Yang, Zetong},
journal={arXiv preprint arXiv:2504.07958},
year={2025}
}