README.md 1.85 KB
Newer Older
1
### Prepare ScanNet Data for Indoor Detection or Segmentation Task
2
We follow the procedure in [votenet](https://github.com/facebookresearch/votenet/).
liyinhao's avatar
liyinhao committed
3

4
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
5

6
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.
7

8
9
10
11
3. Enter the project root directory, generate training data by running
```bash
python tools/create_data.py scannet --root-path ./data/scannet --out-dir ./data/scannet --extra-tag scannet
```
liyinhao's avatar
liyinhao committed
12

liyinhao's avatar
liyinhao committed
13
14
15
16
17
18
19
The overall process could be achieved through the following script
```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
```

20
The directory structure after pre-processing should be as below
liyinhao's avatar
liyinhao committed
21
22
23
```
scannet
├── scannet_utils.py
24
├── batch_load_scannet_data.py
liyinhao's avatar
liyinhao committed
25
├── load_scannet_data.py
26
├── scannet_utils.py
liyinhao's avatar
liyinhao committed
27
28
├── README.md
├── scans
29
30
├── scans_test
├── scannet_instance_data
31
├── points
twang's avatar
twang committed
32
│   ├── xxxxx.bin
33
├── instance_mask
twang's avatar
twang committed
34
│   ├── xxxxx.bin
35
├── semantic_mask
twang's avatar
twang committed
36
│   ├── xxxxx.bin
37
38
39
40
41
├── seg_info
│   ├── train_label_weight.npy
│   ├── train_resampled_scene_idxs.npy
│   ├── val_label_weight.npy
│   ├── val_resampled_scene_idxs.npy
42
43
├── scannet_infos_train.pkl
├── scannet_infos_val.pkl
44
├── scannet_infos_test.pkl
liyinhao's avatar
liyinhao committed
45
46

```