README.md 1.85 KB
Newer Older
1
### Prepare ScanNet Data for Indoor Detection or Segmentation Task
Ziyi Wu's avatar
Ziyi Wu committed
2

3
We follow the procedure in [votenet](https://github.com/facebookresearch/votenet/).
liyinhao's avatar
liyinhao committed
4

5
1. Download ScanNet v2 data [HERE](https://github.com/ScanNet/ScanNet). Link or move the 'scans' folder to this level of directory. If you are performing segmentation tasks and want to upload the results to its official [benchmark](http://kaldir.vc.in.tum.de/scannet_benchmark/), please also link or move the 'scans_test' folder to this directory.
liyinhao's avatar
liyinhao committed
6

7
2. In this directory, extract point clouds and annotations by running `python batch_load_scannet_data.py`. Add the `--max_num_point 50000` flag if you only use the ScanNet data for the detection task. It will downsample the scenes to less points.
8

9
3. Enter the project root directory, generate training data by running
Ziyi Wu's avatar
Ziyi Wu committed
10

11
12
13
```bash
python tools/create_data.py scannet --root-path ./data/scannet --out-dir ./data/scannet --extra-tag scannet
```
liyinhao's avatar
liyinhao committed
14

liyinhao's avatar
liyinhao committed
15
The overall process could be achieved through the following script
Ziyi Wu's avatar
Ziyi Wu committed
16

liyinhao's avatar
liyinhao committed
17
18
19
20
21
22
```bash
python batch_load_scannet_data.py
cd ../..
python tools/create_data.py scannet --root-path ./data/scannet --out-dir ./data/scannet --extra-tag scannet
```

23
The directory structure after pre-processing should be as below
Ziyi Wu's avatar
Ziyi Wu committed
24

liyinhao's avatar
liyinhao committed
25
26
27
```
scannet
├── scannet_utils.py
28
├── batch_load_scannet_data.py
liyinhao's avatar
liyinhao committed
29
├── load_scannet_data.py
30
├── scannet_utils.py
liyinhao's avatar
liyinhao committed
31
32
├── README.md
├── scans
33
34
├── scans_test
├── scannet_instance_data
35
├── points
twang's avatar
twang committed
36
│   ├── xxxxx.bin
37
├── instance_mask
twang's avatar
twang committed
38
│   ├── xxxxx.bin
39
├── semantic_mask
twang's avatar
twang committed
40
│   ├── xxxxx.bin
41
42
43
44
45
├── seg_info
│   ├── train_label_weight.npy
│   ├── train_resampled_scene_idxs.npy
│   ├── val_label_weight.npy
│   ├── val_resampled_scene_idxs.npy
46
47
├── scannet_infos_train.pkl
├── scannet_infos_val.pkl
48
├── scannet_infos_test.pkl
liyinhao's avatar
liyinhao committed
49
50

```