Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- 3d-occupancy-prediction
|
| 5 |
+
- autonomous-driving
|
| 6 |
+
- self-supervised
|
| 7 |
+
- nuscenes
|
| 8 |
+
library_name: pytorch
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# QueryOcc: Query-based Self-Supervision for 3D Semantic Occupancy
|
| 12 |
+
|
| 13 |
+
Weights for [QueryOcc](https://arxiv.org/abs/2511.17221) (Lilja, Lan, Fu, Hammarstrand).
|
| 14 |
+
Code: [github.com/LiljaAdam/queryocc](https://github.com/LiljaAdam/queryocc).
|
| 15 |
+
|
| 16 |
+
QueryOcc learns continuous 3D semantic occupancy from multi-view camera images by supervising
|
| 17 |
+
directly in 4D space-time: positive and negative queries are sampled along rays from point
|
| 18 |
+
clouds observed in adjacent frames — no rendering losses, no voxelized lidar aggregation. No
|
| 19 |
+
human annotation is used at any stage. This checkpoint is the **lidar-supervised** arm, where
|
| 20 |
+
the supervising point clouds are real lidar sweeps with per-point pseudo-semantics.
|
| 21 |
+
|
| 22 |
+
## Files
|
| 23 |
+
|
| 24 |
+
| File | Preset | Supervision | Sem. RayIoU | Dyn. RayIoU | Occ. RayIoU | Sem. IoU | Occ. IoU |
|
| 25 |
+
|---|---|---|---|---|---|---|---|
|
| 26 |
+
| `queryocc-lidar-nusc.pth` | `queryocc-lidar-nusc` | real lidar | 23.2 | 19.5 | 48.8 | 20.4 | 56.9 |
|
| 27 |
+
|
| 28 |
+
Occ3D-nuScenes validation split, self-supervised protocol. 112.1 M parameters, 449 MB.
|
| 29 |
+
`sha256 561112071f8c1417b466798353dadaf5c54175b2107d25f8434839145c9d9dcc`
|
| 30 |
+
|
| 31 |
+
For reference, the paper's headline camera-only model (`queryocc-nusc`, supervised by pseudo
|
| 32 |
+
point clouds from a vision foundation model) reports 23.6 / 21.7 / 45.2 / 21.3 / 55.0 on the
|
| 33 |
+
same columns: lidar supervision trades a little semantic accuracy for better occupancy, which
|
| 34 |
+
is what its accurate depth would predict.
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
+
git clone https://github.com/LiljaAdam/queryocc && cd queryocc
|
| 40 |
+
./setup_uv_env.sh && source .venv/bin/activate
|
| 41 |
+
|
| 42 |
+
python queryocc/train.py queryocc-lidar-nusc --no-train --test \
|
| 43 |
+
--load_ckpt_from=hf://QueryOcc/queryocc
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
The checkpoint is downloaded and cached automatically, and records the preset it belongs to —
|
| 47 |
+
loading it into a different preset is an error rather than a silent partial load. To use a
|
| 48 |
+
manually downloaded file, pass its path instead.
|
| 49 |
+
|
| 50 |
+
Evaluation additionally requires nuScenes, the Occ3D-nuScenes labels and a CUDA toolkit (the
|
| 51 |
+
RayIoU raycaster is JIT-compiled on first use); the repository README covers the setup. Nothing
|
| 52 |
+
else is needed — in particular, evaluating these weights does **not** require the gated DINOv3
|
| 53 |
+
backbone checkpoint that training uses.
|
| 54 |
+
|
| 55 |
+
Add `--allow_visualization --visualizer.f_viz_occ_3d_bev --visualizer.f_viz_bev_features` to log
|
| 56 |
+
BEV predictions and a PCA projection of the BEV features to Weights & Biases.
|
| 57 |
+
|
| 58 |
+
## Loading the weights directly
|
| 59 |
+
|
| 60 |
+
The file is a plain `torch.save` payload containing only tensors and primitives, so it needs no
|
| 61 |
+
trust in the publisher:
|
| 62 |
+
|
| 63 |
+
```python
|
| 64 |
+
import torch
|
| 65 |
+
|
| 66 |
+
payload = torch.load("queryocc-lidar-nusc.pth", map_location="cpu", weights_only=True)
|
| 67 |
+
payload["preset"] # 'queryocc-lidar-nusc'
|
| 68 |
+
payload["metrics"] # the numbers in the table above
|
| 69 |
+
payload["state_dict"] # 'net.'-prefixed network weights
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## Training data and intended use
|
| 73 |
+
|
| 74 |
+
Trained on nuScenes trainval: multi-view camera images, supervised by lidar sweeps carrying
|
| 75 |
+
offline per-point pseudo-semantics. Research artifact: a demonstration of self-supervised
|
| 76 |
+
occupancy learning, not a validated driving component. Its outputs reflect the geometry, sensor
|
| 77 |
+
suite and geographies of nuScenes (Boston and Singapore) and should not be relied on for
|
| 78 |
+
safety-critical decisions. Use is subject to the
|
| 79 |
+
[nuScenes terms](https://www.nuscenes.org/terms-of-use) as well as the license below.
|
| 80 |
+
|
| 81 |
+
## License
|
| 82 |
+
|
| 83 |
+
Apache 2.0, matching the code.
|
| 84 |
+
|
| 85 |
+
## Citation
|
| 86 |
+
|
| 87 |
+
```bibtex
|
| 88 |
+
@article{lilja2025queryocc,
|
| 89 |
+
title={QueryOcc: Query-based Self-Supervision for 3D Semantic Occupancy},
|
| 90 |
+
author={Lilja, Adam and Lan, Ji and Fu, Junsheng and Hammarstrand, Lars},
|
| 91 |
+
journal={arXiv preprint arXiv:2511.17221},
|
| 92 |
+
year={2025}
|
| 93 |
+
}
|
| 94 |
+
```
|