You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## InternImage-based Baseline for CVPR23 Occupancy Prediction Challenge!!!!
25
3
26
4
We improve our baseline with a more powerful image backbone: **InaternImage**, which shows its excellent ability within a series of leaderboards and benchmarks, such as *COCO* and *nuScenes*.
27
5
28
6
29
-
#### openmmlab packages requirements
7
+
#### 1. Requirements
30
8
```bash
9
+
python>=3.8
31
10
torch==1.12 # recommend
32
11
mmcv-full>=1.5.0
33
12
mmdet==2.24.0
34
13
mmsegmentation==0.24.0
35
14
timm
36
15
numpy==1.22
16
+
mmdet3d==0.18.1 # recommend
37
17
```
38
18
39
-
### Install DCNv3 for InternImage
19
+
20
+
### 2. Install DCNv3 for InternImage
40
21
```bash
41
22
cd projects/mmdet3d_plugin/bevformer/backbones/ops_dcnv3
42
23
bash make.sh # requires torch>=1.10
43
24
```
44
25
45
-
### Train with InternImage-Small
26
+
### 3. Train with InternImage-Small
46
27
47
28
```bash
48
29
./tools/dist_train.sh projects/configs/bevformer/bevformer_intern-s_occ.py 8 # consumes less than 14G memory
-[Rules for Occupancy Challenge](#rules-for-occupancy-challenge)
66
-
-[Evaluation Metrics](#evaluation-metrics)
67
-
-[mIoU](#miou)
68
-
-[F Score](#f-score)
69
-
-[Data](#data)
70
-
-[Basic Information](#basic-information)
71
-
-[Download](#download)
72
-
-[Hierarchy](#hierarchy)
73
-
-[Known Issues](#known-issues)
74
-
-[Getting Started](#getting-started)
75
-
-[Timeline](#challenge-timeline)
76
-
-[Leaderboard](#leaderboard)
77
-
-[License](#license)
78
-
79
-
80
-
## Introduction
81
-
Understanding the 3D surroundings including the background stuffs and foreground objects is important for autonomous driving. In the traditional 3D object detection task, a foreground object is represented by the 3D bounding box. However, the geometrical shape of the object is complex, which can not be represented by a simple 3D box, and the perception of the background is absent. The goal of this task is to predict the 3D occupancy of the scene. In this task, we provide a large-scale occupancy benchmark based on the nuScenes dataset. The benchmark is a voxelized representation of the 3D space, and the occupancy state and semantics of the voxel in 3D space are jointly estimated in this task. The complexity of this task lies in the dense prediction of 3D space given the surround-view image.
82
-
83
-
<palign="right">(<ahref="#top">back to top</a>)</p>
84
-
85
-
## Task Definition
86
-
Given images from multiple cameras, the goal is to predict the current occupancy state and semantics of each voxel grid in the scene. The voxel state is predicted to be either free or occupied. If a voxel is occupied, its semantic class needs to be predicted, as well. Besides, we also provide a binary observed/unobserved mask for each frame. An observed voxel is defined as an invisible grid in the current camera observation, which is ignored in the evaluation stage.
87
-
88
-
### Rules for Occupancy Challenge
89
-
* We allow using annotations provided in the nuScenes dataset, and during inference, the input modality of the model should be camera only.
90
-
* Other public/private datasets are not allowed in the challenge in any form (except ImageNet or MS-COCO pre-trained image backbone).
91
-
* No future frame is allowed during inference.
92
-
* In order to check the compliance, we will ask the participants to provide technical reports to the challenge committee and the participant will be asked to provide a public talk about the method after winning the award.
93
-
94
-
<palign="right">(<ahref="#top">back to top</a>)</p>
95
-
96
-
## Evaluation Metrics
97
-
Leaderboard ranking for this challenge is by the intersection-over-union (mIoU) over all classes.
where $P_a$ is the percentage of predicted voxels that are within a distance threshold to the ground truth voxels, and $P_c$ is the percentage of ground truth voxels that are within a distance threshold to the predicted voxels.
116
-
117
-
<palign="right">(<ahref="#top">back to top</a>)</p>
118
-
119
-
120
-
## Data
121
-
<divid="top"align="center">
122
-
<imgsrc="./figs/mask.jpg">
123
-
</div>
124
-
<divid="top"align="center">
125
-
Figure 1. Semantic labels (left), visibility masks in the LiDAR (middle) and the camera (right) view. Grey voxels are unobserved in LiDAR view and white voxels are observed in the accumulative LiDAR view but unobserved in the current camera view.
126
-
</div>
127
-
128
-
### Basic Information
129
-
<divalign="center">
130
-
131
-
| Type | Info |
132
-
| :----: | :----: |
133
-
| mini | 404 |
134
-
| train | 28,130 |
135
-
| val | 6,019 |
136
-
| test | 6,006 |
137
-
| cameras | 6 |
138
-
| voxel size | 0.4m |
139
-
| range |[-40m, -40m, -1m, 40m, 40m, 5.4m]|
140
-
| volume size |[200, 200, 16]|
141
-
| #classes | 0 - 17 |
142
-
143
-
</div>
144
-
145
-
- The dataset contains 18 classes. The definition of classes from 0 to 16 is the same as the [nuScenes-lidarseg](https://github.com/nutonomy/nuscenes-devkit/blob/fcc41628d41060b3c1a86928751e5a571d2fc2fa/python-sdk/nuscenes/eval/lidarseg/README.md) dataset. The label 17 category represents voxels that are not occupied by anything, which is named as `free`. Voxel semantics for each sample frame is given as `[semantics]` in the labels.npz.
146
-
147
-
- <strong>How are the labels annotated?</strong> The ground truth labels of occupancy derive from accumulative LiDAR scans with human annotations.
148
-
- If a voxel reflects a LiDAR point, then it is assigned as the same semantic label as the LiDAR point;
149
-
- If a LiDAR beam passes through a voxel in the air, the voxel is set to be `free`;
150
-
- Otherwise, we set the voxel to be unknown, or unobserved. This happens due to the sparsity of the LiDAR or the voxel is occluded, e.g. by a wall. In the dataset, `[mask_lidar]` is a 0-1 binary mask, where 0's represent unobserved voxels. As shown in Fig.1(b), grey voxels are unobserved. Due to the limitation of the visualization tool, we only show unobserved voxels at the same height as the ground.
151
-
152
-
- <strong>Camera visibility.</strong> Note that the installation positions of LiDAR and cameras are different, therefore, some observed voxels in the LiDAR view are not seen by the cameras. Since we focus on a vision-centric task, we provide a binary voxel mask `[mask_camera]`, indicating whether the voxels are observed or not in the current camera view. As shown in Fig.1(c), white voxels are observed in the accumulative LiDAR view but unobserved in the current camera view.
153
-
154
-
- Both `[mask_lidar]` and `[mask_camera]` masks are optional for training. Participants do not need to predict the masks. Only `[mask_camera]` is used for evaluation; the unobserved voxels are not involved during calculating the F-score and mIoU.
155
-
156
-
157
-
### Download
158
-
The files mentioned below can also be downloaded via <imgsrc="https://user-images.githubusercontent.com/29263416/222076048-21501bac-71df-40fa-8671-2b5f8013d2cd.png"alt="OpenDataLab"width="18"/>[OpenDataLab](https://opendatalab.com/CVPR2023-3D-Occupancy/download).It is recommended to use provided [command line interface](https://opendatalab.com/CVPR2023-3D-Occupancy/cli) for acceleration.
* Mini and trainval data contain three parts -- `imgs`, `gts` and `annotations`. The `imgs` datas have the same hierarchy with the image samples in the original nuScenes dataset.
167
-
168
-
169
-
### Hierarchy
170
-
The hierarchy of folder `Occpancy3D-nuScenes-V1.0/` is described below:
-`imgs/` contains images captured by various cameras.
201
-
-`gts/` contains the ground truth of each sample. `[scene_name]` specifies a sequence of frames, and `[frame_token]` specifies a single frame in a sequence.
202
-
-`annotations.json` contains meta infos of the dataset.
203
-
-`labels.npz` contains `[semantics]`, `[mask_lidar]`, and `[mask_camera]` for each frame.
204
-
205
-
```
206
-
annotations {
207
-
"train_split": ["scene-0001", ...], <list> -- training dataset split by scene_name
208
-
"val_split": list ["scene-0003", ...], <list> -- validation dataset split by scene_name
209
-
"scene_infos" { <dict> -- meta infos of the scenes
210
-
[scene_name]: { <str> -- name of the scene.
211
-
[frame_token]: { <str> -- samples in a scene, ordered by time
212
-
"timestamp": <str> -- timestamp (or token), unique by sample
213
-
"camera_sensor": { <dict> -- meta infos of the camera sensor
"intrinsic": <float> [3, 3] -- intrinsic camera calibration
217
-
"extrinsic":{ <dict> -- extrinsic parameters of the camera
218
-
"translation": <float> [3] -- coordinate system origin in meters
219
-
"rotation": <float> [4] -- coordinate system orientation as quaternion
220
-
}
221
-
"ego_pose": { <dict> -- vehicle pose of the camera
222
-
"translation": <float> [3] -- coordinate system origin in meters
223
-
"rotation": <float> [4] -- coordinate system orientation as quaternion
224
-
}
225
-
},
226
-
...
227
-
},
228
-
"ego_pose": { <dict> -- vehicle pose
229
-
"translation": <float> [3] -- coordinate system origin in meters
230
-
"rotation": <float> [4] -- coordinate system orientation as quaternion
231
-
},
232
-
"gt_path": <str> -- corresponding 3D voxel gt path, *.npz
233
-
"next": <str> -- frame_token of the previous keyframe in the scene
234
-
"prev": <str> -- frame_token of the next keyframe in the scene
235
-
}
236
-
]
237
-
}
238
-
}
239
-
}
240
-
```
241
-
242
-
### Known Issues
243
-
- Nuscene ([issues-721](https://github.com/nutonomy/nuscenes-devkit/issues/721)) lacks translation in the z-axis, which makes it hard to recover accurate 6d localization and would lead to the misalignment of point clouds while accumulating them over whole scenes. Ground stratification occurs in several data.
244
-
245
-
<palign="right">(<ahref="#top">back to top</a>)</p>
246
-
247
-
## Getting Started
248
-
249
-
We provide a baseline model based on [BEVFormer](https://github.com/fundamentalvision/BEVFormer).
250
-
251
-
Please refer to [getting_started](docs/getting_started.md) for details.
252
-
253
-
<palign="right">(<ahref="#top">back to top</a>)</p>
0 commit comments