Codex commited on
Commit
ff5496d
·
1 Parent(s): 41b0fb0

Add CARMA model card

Browse files
Files changed (1) hide show
  1. README.md +199 -0
README.md CHANGED
@@ -1,3 +1,202 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ library_name: pytorch
4
+ datasets:
5
+ - nuscenes
6
+ tags:
7
+ - object-detection
8
+ - 3d-object-detection
9
+ - autonomous-driving
10
+ - camera-radar-fusion
11
+ - bev
12
+ - nuscenes
13
+ - pytorch
14
+ - research
15
+ - multi-task-learning
16
+ model-index:
17
+ - name: CARMA
18
+ results:
19
+ - task:
20
+ type: object-detection
21
+ name: BEV 3D object detection
22
+ dataset:
23
+ type: nuscenes
24
+ name: nuScenes v1.0 trainval validation
25
+ metrics:
26
+ - type: custom_map_2m
27
+ name: Custom mAP at 2 m center distance
28
+ value: 0.4922
29
+ - type: precision_2m
30
+ name: Precision at 2 m center distance
31
+ value: 0.7970
32
+ - type: recall_2m
33
+ name: Recall at 2 m center distance
34
+ value: 0.5736
35
+ - type: f1_2m
36
+ name: F1 at 2 m center distance
37
+ value: 0.6671
38
  ---
39
+
40
+ # CARMA
41
+
42
+ CARMA is a PyTorch checkpoint for camera and radar BEV object detection on nuScenes. The model uses six surround cameras and radar sweeps at inference time, then predicts object centers and 3D boxes in a bird's eye view representation.
43
+
44
+ This repository currently contains the trained checkpoint:
45
+
46
+ ```text
47
+ CARMA_map0.4922.pth
48
+ ```
49
+
50
+ The checkpoint is intended for research, dissertation experiments, qualitative visualization, and reproducibility of the CARMA detector. It is not a standalone Hugging Face Transformers model and is not configured for hosted Inference API deployment.
51
+
52
+ ## Model Overview
53
+
54
+ CARMA combines image and radar information in a BEV detection pipeline:
55
+
56
+ - Camera branch: six nuScenes RGB cameras are encoded and lifted into a BEV representation.
57
+ - Radar branch: radar points and sweeps are encoded into BEV features.
58
+ - Fusion module: modality projection, deformable alignment, bidirectional cross attention, and gated residual fusion combine camera and radar features.
59
+ - Detection head: a center based heatmap predicts object centers, while regression channels decode 3D box geometry, orientation, and velocity.
60
+ - Auxiliary training heads: LiDAR derived supervision is used during training for depth, camera BEV, and related auxiliary branches. These LiDAR derived targets are not required at inference time.
61
+
62
+ Final inference inputs:
63
+
64
+ - Six camera images.
65
+ - Camera intrinsics and extrinsics.
66
+ - Radar points or radar BEV tensors.
67
+
68
+ Not required at inference time:
69
+
70
+ - LiDAR point clouds.
71
+ - LiDAR occupancy maps.
72
+ - LiDAR derived depth supervision targets.
73
+
74
+ ## Classes
75
+
76
+ The checkpoint predicts the standard 10 nuScenes detection classes used by this project:
77
+
78
+ ```text
79
+ car, truck, construction_vehicle, bus, trailer,
80
+ barrier, motorcycle, bicycle, pedestrian, traffic_cone
81
+ ```
82
+
83
+ ## Evaluation
84
+
85
+ The checkpoint was selected using the project validation metric at a 2 m center distance threshold.
86
+
87
+ Important note: the metrics below are from the CARMA project validation script. They are custom center distance metrics and should not be reported as the official nuScenes detection benchmark, NDS, or official nuScenes mAP unless the official nuScenes evaluation protocol is run separately.
88
+
89
+ ### nuScenes v1.0 trainval validation
90
+
91
+ Validation configuration:
92
+
93
+ - Dataset: nuScenes v1.0 trainval validation split.
94
+ - Decode setting: raw heatmap at score threshold 0.4.
95
+ - Main matching threshold: 2 m center distance.
96
+ - Selected checkpoint: `CARMA_map0.4922.pth`.
97
+
98
+ | Metric | Value |
99
+ | --- | ---: |
100
+ | Precision at 2 m | 0.7970 |
101
+ | Recall at 2 m | 0.5736 |
102
+ | F1 at 2 m | 0.6671 |
103
+ | mAP at 0.5 m | 0.1892 |
104
+ | mAP at 1 m | 0.3573 |
105
+ | mAP at 2 m | 0.4922 |
106
+ | mAP at 4 m | 0.5548 |
107
+ | Mean localization distance | 0.526 m |
108
+ | True positives | 89969 |
109
+ | False positives | 22909 |
110
+ | False negatives | 66877 |
111
+
112
+ ### Per Class Results
113
+
114
+ | Class | AP | Precision | Recall | F1 | Mean error |
115
+ | --- | ---: | ---: | ---: | ---: | ---: |
116
+ | car | 0.629 | 0.855 | 0.645 | 0.736 | 0.46 m |
117
+ | truck | 0.517 | 0.672 | 0.598 | 0.633 | 0.67 m |
118
+ | construction_vehicle | 0.389 | 0.653 | 0.444 | 0.529 | 0.83 m |
119
+ | bus | 0.560 | 0.610 | 0.679 | 0.643 | 0.88 m |
120
+ | trailer | 0.347 | 0.546 | 0.488 | 0.516 | 1.01 m |
121
+ | barrier | 0.582 | 0.830 | 0.611 | 0.704 | 0.58 m |
122
+ | motorcycle | 0.503 | 0.731 | 0.521 | 0.608 | 0.53 m |
123
+ | bicycle | 0.453 | 0.745 | 0.471 | 0.577 | 0.51 m |
124
+ | pedestrian | 0.364 | 0.779 | 0.386 | 0.516 | 0.54 m |
125
+ | traffic_cone | 0.578 | 0.761 | 0.615 | 0.680 | 0.43 m |
126
+
127
+ ### nuScenes Mini Validation Sanity Check
128
+
129
+ The same checkpoint was also evaluated on the nuScenes mini validation split as a quick sanity check.
130
+
131
+ | Metric | Value |
132
+ | --- | ---: |
133
+ | Precision at 2 m | 0.7783 |
134
+ | Recall at 2 m | 0.5729 |
135
+ | F1 at 2 m | 0.6600 |
136
+ | mAP at 0.5 m | 0.2830 |
137
+ | mAP at 1 m | 0.4804 |
138
+ | mAP at 2 m | 0.5707 |
139
+ | mAP at 4 m | 0.6278 |
140
+ | Mean localization distance | 0.524 m |
141
+
142
+ ## Usage
143
+
144
+ Install Git LFS before cloning the model repository:
145
+
146
+ ```bash
147
+ git lfs install
148
+ git clone https://huggingface.co/AdrianNaziru/CARMA
149
+ ```
150
+
151
+ The checkpoint can be inspected with PyTorch:
152
+
153
+ ```python
154
+ import torch
155
+
156
+ checkpoint = torch.load("CARMA/CARMA_map0.4922.pth", map_location="cpu")
157
+ print(checkpoint.keys() if isinstance(checkpoint, dict) else type(checkpoint))
158
+ ```
159
+
160
+ To run inference, use the CARMA project code that defines the model architecture, preprocessing, nuScenes dataset loading, and decoding utilities. The checkpoint file alone is not sufficient without the matching source code and configuration.
161
+
162
+ Typical local commands from the CARMA source tree:
163
+
164
+ ```powershell
165
+ python realtime_bev_inference_pro_fast.py
166
+ python save_random_sample_visualizations.py --num-samples 20
167
+ ```
168
+
169
+ Expected local data layout:
170
+
171
+ ```text
172
+ data/nuscenes/v1.0-trainval
173
+ ```
174
+
175
+ The main runtime settings used for this checkpoint are:
176
+
177
+ ```text
178
+ NUSCENES_VERSION=v1.0-trainval
179
+ BEV grid=192 x 192
180
+ point cloud range=[-51.2, -51.2, -5.0, 51.2, 51.2, 3.0]
181
+ image size=256 x 704
182
+ radar sweeps=13
183
+ decode heat=raw
184
+ score threshold=0.4 for the reported validation metrics
185
+ ```
186
+
187
+ ## Limitations
188
+
189
+ - This checkpoint is for research and academic analysis only.
190
+ - It is not validated for safety critical autonomous driving deployment.
191
+ - It depends on the exact CARMA source code, nuScenes preprocessing, calibration handling, and decoding logic used during training.
192
+ - Reported metrics are custom project metrics and are not official nuScenes leaderboard metrics.
193
+ - Performance may degrade outside the nuScenes sensor setup, camera calibration, weather, geography, or object distribution.
194
+ - LiDAR supervision improves training signals, but LiDAR is not used during final inference.
195
+
196
+ ## Citation
197
+
198
+ If you use this checkpoint, please cite the CARMA dissertation or the associated project repository when available.
199
+
200
+ ## License
201
+
202
+ This model repository is released under the Apache 2.0 license.