|
--- |
|
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 |
|
``` |
|
|
|
2. Swith to `v1.3.0` version. |
|
|
|
```bash |
|
cd ISO |
|
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/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/data/completescannet/CompleteScanNet_GT`. |
|
|
|
6. Reformulate *CompleteScanNet* |
|
|
|
```bash |
|
python preprocess_gt.py |
|
``` |
|
|
|
The resulted directory is `ISO/data/completescannet/CompleteScanNet_preprocessed_GT`. |
|
|
|
Now, we obtained the following directory structure. |
|
|
|
``` |
|
completescannet |
|
βββ CompleteScanNet_GT |
|
β βββ scenexxxx_xx.ply |
|
βββ CompleteScanNet_preprocessed_GT |
|
β βββ 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/data/occscannet`. |
|
|
|
```bash |
|
python generate_gt.py |
|
``` |
|
|
|
``` |
|
occscannet |
|
βββ preprocessed_voxels |
|
βββ gathered_data |
|
βββ generate_gt.py |
|
βββ not_aligns.txt |
|
βββ wrong_scenes.txt |
|
βββ bad_scenes.txt |
|
βββ used_scannames.txt |
|
``` |
|
|
|
Step can be indicated sequentially to make sure each step run correctly. |
|
|
|
### OccScanNet-mini |
|
|
|
The scenes we used in OccScanNet-mini is reflected in the config file. |