Official code release for our CVPR 2026 paper, NexusFlow: Unifying Disparate Tasks under Partial Supervision via Invertible Flow Networks.
- 2026.02 NexusFlow is accepted to CVPR 2026. 🎉
- 2025.12 arXiv preprint released: arXiv:2512.06251.
When you train a multi-task BEV perception model and each sample only carries labels for some tasks (e.g. dense mapping labels here, sparse tracking labels there), the partial-supervision signal can drag the shared representation apart. NexusFlow is a lightweight, plug-and-play module that sits alongside the main model: two surrogate networks read the shared BEV feature, squash it with deformable attention, push it through an invertible RealNVP-style coupling layer, and align the two outputs with a simple MSE loss. No architectural change to your main model, no extra labels required.
See materials/readme.md for the architecture and
pseudo-code, and materials/NexusFlow.py for a
standalone runnable implementation.
Each sample carries labels for only a subset of tasks. Without intervention, the
partial-supervision signal pulls the shared BEV representation in incompatible
directions; NexusFlow aligns the per-task views of the feature without requiring
any additional labels. A higher-resolution version is available as
nexusflow_probsetup.pdf.
| Baseline (UniAD) | Ours (UniAD + NexusFlow) |
|---|---|
materials/Baseline_with_map.avi |
materials/Ours_with_map.avi |
opensource_code/
├── README.md # this file
├── nexusflow_probsetup.png # problem-setup figure (rasterized)
├── nexusflow_probsetup.pdf # problem-setup figure (vector)
├── base.py # → mmdet/.../detectors/base.py
├── builder.py # → mmdet3d/datasets/builder.py
├── dataset_wrappers.py # → mmdet3d/datasets/dataset_wrappers.py
├── epoch_based_runner.py # → mmcv/runner/epoch_based_runner.py
├── mmdet_train.py # → UniAD/.../uniad/apis/mmdet_train.py
├── nuscenes_e2e_dataset.py # → UniAD/.../datasets/nuscenes_e2e_dataset.py
├── data_classes.py # → nuscenes/eval/detection/data_classes.py
├── evaluate_single_city_eval.py # → nuscenes/eval/tracking/evaluate.py
└── materials/
├── NexusFlow.py # standalone NexusFlow module + demo
├── readme.md # standalone NexusFlow doc
├── Baseline_with_map.avi # qualitative video — baseline
└── Ours_with_map.avi # qualitative video — ours
The whole stack is built on top of UniAD.
We do not repackage UniAD's environment here — please first follow the
upstream UniAD installation guide
to set up the conda environment (we use Python 3.9, env name uniad2.0) and
clone UniAD to /root/UniAD. Once that works, drop the files in this folder
into the paths listed below.
Each file in this folder is a modified copy of an upstream file. Replace the file at the target path with the one here.
| File in this repo | Drop-in target path |
|---|---|
base.py |
/root/miniconda3/envs/uniad2.0/lib/python3.9/site-packages/mmdet/models/detectors/base.py |
builder.py |
/root/miniconda3/envs/uniad2.0/lib/python3.9/site-packages/mmdet3d/datasets/builder.py |
dataset_wrappers.py |
/root/miniconda3/envs/uniad2.0/lib/python3.9/site-packages/mmdet3d/datasets/dataset_wrappers.py |
epoch_based_runner.py |
/root/mmcv/mmcv/runner/epoch_based_runner.py |
mmdet_train.py |
/root/UniAD/projects/mmdet3d_plugin/uniad/apis/mmdet_train.py |
nuscenes_e2e_dataset.py |
/root/UniAD/projects/mmdet3d_plugin/datasets/nuscenes_e2e_dataset.py |
data_classes.py |
/root/miniconda3/envs/uniad2.0/lib/python3.9/site-packages/nuscenes/eval/detection/data_classes.py |
evaluate_single_city_eval.py |
/root/miniconda3/envs/uniad2.0/lib/python3.9/site-packages/nuscenes/eval/tracking/evaluate.py |
The two /root/UniAD/... paths live inside the UniAD repo itself; the
mmdet / mmdet3d / nuscenes paths live inside your conda env's
site-packages; mmcv is a source-installed clone at /root/mmcv. Adjust the
/root/miniconda3/envs/uniad2.0/... prefix to wherever your own environment
lives.
evaluate_single_city_eval.pyrestricts the nuScenes tracking eval to a single city. Look for the block marked# <<< MOD: filter both pred & gt to only samples in target city(around line 106) and changetarget_city(defaultsingapore) for a different split.data_classes.pymirrors the nuScenes detection eval data classes; it is included because the eval stack imports from it.
pip install torch deformable-attention-pytorch
python materials/NexusFlow.pyThis builds the module, runs a forward/backward pass on a random BEV feature, and prints the alignment loss.
If you find this work useful, please cite:
@article{lin2025nexusflow,
title={NexusFlow: Unifying Disparate Tasks under Partial Supervision via Invertible Flow Networks},
author={Lin, Fangzhou and Wang, Yuping and Guo, Yuliang and Huang, Zixun and Huang, Xinyu and Zhang, Haichong and Yamada, Kazunori and Tu, Zhengzhong and Ren, Liu and Zhang, Ziming},
journal={arXiv preprint arXiv:2512.06251},
year={2025}
}This repository builds directly on UniAD, mmdetection3d, mmcv, and the nuScenes devkit. We thank the authors for releasing their code.
