PriorOcc is an enhanced 3D occupancy prediction framework based on FlashOCC. It introduces an Explicit 2D Semantic Prior Injection mechanism ("Scheme C") to guide the learning of 3D voxel representations using dense 2D semantic supervision.
loss_2d_seg) to explicitly supervise the backbone.Please refer to the original FlashOCC Installation Guide for environment setup.
Additional Requirements:
pip install transformers # For pseudo-label generation
PriorOcc requires 2D semantic segmentation labels for the nuScenes dataset. We provide a script to generate these using a pretrained SegFormer model.
# Generate labels (saved to data/nuscenes/seg_2d_labels)
python tools/generate_2d_seg_labels.py \
--data-root data/nuscenes \
--output-dir data/nuscenes/seg_2d_labels \
--split trainval \
--device cuda:0
For more details, see doc/generate_2d_seg_labels.md.
Ensure your dataset info files are generated as per standard FlashOCC/BEVDet procedures.
To train PriorOcc with the ResNet-50 backbone:
./tools/dist_train.sh projects/configs/flashocc/flashocc-r50.py 8
The configuration has been updated to:
LoadSemanticSeg2D.SemanticInjector.loss_2d_seg.We provide an integration test script to verify the pipeline and tensor shapes before training:
python tools/integration_test.py
The SemanticInjector is inserted after the image backbone/neck and before the view transformer.
This project is built upon the excellent work of FlashOCC by Yzichen. We thank the authors for their contribution to the community.
Python
95.0%
Cuda
3.3%
C++
1.2%
PriorOcc is an enhanced 3D occupancy prediction framework based on FlashOCC. It introduces an Explicit 2D Semantic Prior Injection mechanism ("Scheme C") to guide the learning of 3D voxel representations using dense 2D semantic supervision.
loss_2d_seg) to explicitly supervise the backbone.Please refer to the original FlashOCC Installation Guide for environment setup.
Additional Requirements:
pip install transformers # For pseudo-label generation
PriorOcc requires 2D semantic segmentation labels for the nuScenes dataset. We provide a script to generate these using a pretrained SegFormer model.
# Generate labels (saved to data/nuscenes/seg_2d_labels)
python tools/generate_2d_seg_labels.py \
--data-root data/nuscenes \
--output-dir data/nuscenes/seg_2d_labels \
--split trainval \
--device cuda:0
For more details, see doc/generate_2d_seg_labels.md.
Ensure your dataset info files are generated as per standard FlashOCC/BEVDet procedures.
To train PriorOcc with the ResNet-50 backbone:
./tools/dist_train.sh projects/configs/flashocc/flashocc-r50.py 8
The configuration has been updated to:
LoadSemanticSeg2D.SemanticInjector.loss_2d_seg.We provide an integration test script to verify the pipeline and tensor shapes before training:
python tools/integration_test.py
The SemanticInjector is inserted after the image backbone/neck and before the view transformer.
This project is built upon the excellent work of FlashOCC by Yzichen. We thank the authors for their contribution to the community.
Python
95.0%
Cuda
3.3%
C++
1.2%