| ### Prepare ScanNet Data for Indoor Detection or Segmentation Task | |
| We follow the procedure in [votenet](https://github.com/facebookresearch/votenet/). | |
| 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. | |
| 2. In this directory, extract point clouds and annotations by running `python batch_load_scannet_data.py`. Add the `--scannet200` flag if you want to get markup for the ScanNet200 dataset. | |
| 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 | |
| ``` | |
| or for ScanNet200: | |
| ```bash | |
| mkdir data/scannet200 | |
| python tools/create_data.py scannet200 --root-path ./data/scannet --out-dir ./data/scannet200 --extra-tag scannet200 | |
| ``` | |
| The overall process for ScanNet 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 | |
| ``` | |
| Or for ScanNet200: | |
| ```bash | |
| python batch_load_scannet_data.py --scannet200 | |
| cd ../.. | |
| mkdir data/scannet200 | |
| python tools/create_data.py scannet200 --root-path ./data/scannet --out-dir ./data/scannet200 --extra-tag scannet200 | |
| ``` | |
| The directory structure after pre-processing should be as below | |
| ``` | |
| scannet | |
| βββ meta_data | |
| βββ batch_load_scannet_data.py | |
| βββ load_scannet_data.py | |
| βββ scannet_utils.py | |
| βββ README.md | |
| βββ scans | |
| βββ scans_test | |
| βββ scannet_instance_data | |
| βββ points | |
| β βββ xxxxx.bin | |
| βββ instance_mask | |
| β βββ xxxxx.bin | |
| βββ semantic_mask | |
| β βββ xxxxx.bin | |
| βββ super_points | |
| β βββ xxxxx.bin | |
| βββ seg_info | |
| β βββ train_label_weight.npy | |
| β βββ train_resampled_scene_idxs.npy | |
| β βββ val_label_weight.npy | |
| β βββ val_resampled_scene_idxs.npy | |
| βββ scannet_oneformer3d_infos_train.pkl | |
| βββ scannet_oneformer3d_infos_val.pkl | |
| βββ scannet_oneformer3d_infos_test.pkl | |
| ``` | |