Skip to content

bigggs/MonoPRIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonoPRIO: Monocular 3D Object Detection with Query-Adaptive Prior Conditioning

This repository hosts the official implementation of MonoPRIO, a model for monocular 3D detection with query-adaptive prior conditioning for robust size estimation under size-depth ambiguity. MonoPRIO builds upon MonoDETR and MonoDGP.

Our core idea is to stabilise ambiguous monocular size estimation with class-aware offline prior banks, query-level routed mixture priors, uncertainty-aware log-space size conditioning, and CAP regularisation in the size pathway.

KITTI Validation Results

The table below reports per seed validation results (R40) for our unified model and median of 5 values used in our paper. For baseline results of MonoDGP and MonoCLUE please refer here.

Run Car APBEV|R40 Car AP3D|R40 Ped. AP3D|R40 Cyc. AP3D|R40 Log Checkpoint
EMH EMH EMH EMH
Seed 444 37.738527.448824.7231 30.413021.927418.7024 12.40759.65237.4288 10.25455.34195.0021 log ckpt
Seed 445 40.323128.734325.1377 31.052321.963519.5214 12.23329.36087.1981 14.96687.98817.0977 log ckpt
Seed 446 38.390328.538024.7171 30.163621.700118.9655 10.90287.98906.3868 12.40205.98815.8987 log ckpt
Seed 447 35.844326.655823.4343 27.473720.867218.0712 13.17529.98967.7053 10.90325.89345.1463 log ckpt
Seed 448 40.697928.815125.0044 31.397921.856019.2577 12.73539.17607.3320 13.56286.79146.2966 log ckpt
Median of 5 (paper) 38.39028.53824.723 30.41321.85618.965 12.4089.3617.332 12.4025.9885.899 - -

KITTI Official Test Results

We also provide test set checkpoints and prediction files for direct verification on the KITTI 3D object detection benchmark.

Unified model

Model Car APBEV|R40 Car AP3D|R40 Ped. AP3D|R40 Cyc. AP3D|R40 Checkpoint Predictions
EMH EMH EMH EMH
MonoPRIO 35.5024.6621.54 26.8318.9316.25 16.3110.749.08 7.724.323.61 ckpt pred

Car-only model

Model Car APBEV|R40 Car AP3D|R40 Checkpoint Predictions
EMH EMH
MonoPRIO 35.7426.0522.90 28.1219.8516.93 ckpt pred

Test results submitted to the official KITTI Benchmark:

Car category:

All categories:

Baseline Validation Logs

For fairness and reproducibility, we also release the exact local validation logs used for the 5-seed median comparisons against MonoDGP and MonoCLUE.

MonoCLUE references:

Method Car APBEV|R40 Car AP3D|R40 Ped. AP3D|R40 Cyc. AP3D|R40
EasyMod.Hard EasyMod.Hard EasyMod.Hard EasyMod.Hard
MonoDGP
Pu et al. (2025)
37.45126.93824.416 29.53621.13618.802 12.3119.2707.268 9.8134.9214.422
MonoCLUE
Yang et al. (2025)
38.24928.11924.656 29.34421.41618.495 11.6588.5797.043 11.1805.7415.259
MonoPRIO 38.39028.53824.723 30.41321.85618.965 12.4089.3617.332 12.4025.9885.899

MonoDGP seed logs:

MonoCLUE seed logs:

Installation

  1. Clone this project and create a conda environment:

    git clone https://github.com/bigggs/MonoPRIO.git
    cd MonoPRIO
    
    conda create -n monoprio python=3.10 -y
    conda activate monoprio
  2. Install pytorch and torchvision matching your CUDA version:

    pip install torch==2.10.0 torchvision==0.25.0 --index-url https://download.pytorch.org/whl/cu130
    
  3. Install requirements and compile the deformable attention:

    pip install -r requirements.txt
    
    cd lib/models/monoprio/ops/
    bash make.sh
    
    cd ../../../..
  4. Download KITTI datasets and prepare the directory structure as:

    │MonoPRIO/
    ├──...
    │data/kitti/
    ├──ImageSets/
    ├──training/
    │   ├──image_2
    │   ├──label_2
    │   ├──calib
    ├──testing/
    │   ├──image_2
    │   ├──calib
  5. Prepare prior banks

    Option A: download and use our priors

    Place downloaded files under MonoPRIO/priors/ then set model/prior_path in your config.

    Setup Bank Link
    Validation Unified Download
    Validation Car-only Download
    Test Unified Download
    Test Car-only Download

    Option B: generate priors locally from KITTI labels/images

    Install CLIP:

    pip install git+https://github.com/openai/CLIP.git

    Generate priors from the config split (defaults to dataset.train_split in configs/monoprio.yaml):

    python tools/build_priors.py --config configs/monoprio.yaml --out-dir priors

    To split a unified bank into per-class banks (ped/car/cyclist) (for if you want to just train on the car class):

    python tools/split_banks.py --input priors/priors_unified.npz --out-dir priors/individual_banks

    By default, training uses:

    model:
      prior_path: 'priors/priors_unified.npz'

    Update this path in your config if you want to use a different bank file.

Get Started

Train

You can modify the settings of models and training in configs/monoprio.yaml and indicate the GPU in train.sh:

bash train.sh configs/monoprio.yaml > logs/monoprio.log

Test

The best checkpoint will be evaluated as default. You can change it at "tester/checkpoint" in configs/monoprio.yaml:

bash test.sh configs/monoprio.yaml

You can test the inference time on your own device:

python tools/test_runtime.py

Citation

If you find our work useful in your research, please consider giving us a star and citing:

@misc{davies2026monoprioadaptivepriorconditioning,
      title={MonoPRIO: Adaptive Prior Conditioning for Unified Monocular 3D Object Detection}, 
      author={Leon Davies and Qinggang Meng and Mohamad Saada and Baihua Li and Simon Sølvsten},
      year={2026},
      eprint={2605.14781},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2605.14781}, 
}

Acknowlegment

This repo benefits from the excellent work MonoDETR, and MonoDGP. If you find this work useful, please also consider checking out and citing their work.

About

The offical implementation of 'MonoPRIO: Adaptive Prior Conditioning for Unified Monocular 3D Detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors