| --- |
| license: apache-2.0 |
| --- |
| |
| # Preparing ISO |
|
|
| ## Datasets |
|
|
| We provide the OccScanNet dataset files [here](https://huggingface.co/datasets/hongxiaoy/OccScanNet/tree/main), but you should agree the term of use of *ScanNet*, *CompleteScanNet* dataset. |
|
|
| For **a simplified way** to prepare the dataset, you **just** download the `preprocessed_data` to `ISO/data/occscannet` as `gathered_data` and download the `posed_images` to `ISO/data/scannet`. |
|
|
| However, the *complete dataset generating process* is provided as followed: |
|
|
| ### OccScanNet |
|
|
| 1. Clone the official MMDetection3D repository. |
|
|
| ```bash |
| git clone https://github.com/open-mmlab/mmdetection3d.git ISO_mm |
| ``` |
|
|
| 2. Swith to `v1.3.0` version. |
|
|
| ```bash |
| cd ISO_mm |
| git checkout v1.3.0 |
| ``` |
|
|
| 3. Download the *ScanNet* dataset following [instructions](https://github.com/open-mmlab/mmdetection3d/tree/v1.3.0/data/scannet) and place `scans` directory as `ISO_mm/data/scannet/scans`. |
|
|
| > :bulb: Note |
| > |
| > Recommend you create a `posed_images` directory at data disk and link the `scans` directory and `posed_images` directory to `data/scannet`, then run the following command. |
|
|
| 4. In this directory, extract RGB image with poses by running |
|
|
| ```bash |
| python extract_posed_images.py --max-images-per-scene 100 |
| ``` |
|
|
| > :bulb: Note |
| > |
| > Add `--max-images-per-scene -1` to disable limiting number of images per scene. ScanNet scenes contain up to 5000+ frames per each. After extraction, all the .jpg images require 2 Tb disk space. The recommended 300 images per scene require less then 100 Gb. For example multi-view 3d detector ImVoxelNet samples 50 and 100 images per training and test scene. |
|
|
| Then obtained the following directory structure. |
|
|
| ``` |
| scannet |
| ├── meta_data |
| ├── posed_images |
| │ ├── scenexxxx_xx |
| │ │ ├── xxxxxx.txt |
| │ │ ├── xxxxxx.jpg |
| │ │ ├── intrinsic.txt |
| ├── scans |
| ├── batch_load_scannet_data.py |
| ├── extract_posed_images.py |
| ├── load_scannet_data.py |
| ├── README.md |
| ├── scannet_utils.py |
| ``` |
|
|
| 5. Download original *CompleteScanNet* |
|
|
| The ground truth labels we used are from [SCFusion](https://github.com/ShunChengWu/SCFusion#generate-gt). Ground truth is available at [here](https://github.com/ShunChengWu/SCFusion#generate-gt). |
|
|
| The ground truth label should be placed as `ISO_mm/data/completescannet/gt`. |
|
|
| 6. Reformulate *CompleteScanNet* |
|
|
| ```bash |
| python preprocess_gt.py |
| ``` |
|
|
| The resulted directory is `ISO_mm/data/completescannet/preprocessed`. |
|
|
| Now, we obtained the following directory structure. |
|
|
| ``` |
| completescannet |
| ├── gt |
| │ ├── scenexxxx_xx.ply |
| ├── preprocessed |
| │ ├── scenexxxx_xx.npy |
| ├── preprocess_gt.py |
| ├── visualization.py |
| ``` |
|
|
| 7. Create the *OccScanNet* |
|
|
| First, you should create a directories with name `preprocessed_voxels` and `gathered_data` in data disk and link them to the `ISO_mm/data/occscannet`. |
|
|
| ```bash |
| python generate_gt.py |
| ``` |
|
|
| Now, we obtained the following directory structure. |
|
|
| ``` |
| occscannet |
| ├── preprocessed_voxels |
| ├── gathered_data |
| ├── generate_gt.py |
| ├── not_aligns.txt |
| ├── wrong_scenes.txt |
| ├── bad_scenes.txt |
| ├── used_scannames.txt |
| ``` |
|
|
| ### OccScanNet-mini |
|
|
| The scenes we used in OccScanNet-mini is reflected in the config file. |