README.md 1.91 KB
Newer Older
yinchimaoliang's avatar
yinchimaoliang committed
1
### Prepare SUN RGB-D Data
2
We follow the procedure in [votenet](https://github.com/facebookresearch/votenet/).
yinchimaoliang's avatar
yinchimaoliang committed
3

liyinhao's avatar
liyinhao committed
4
1. Download SUNRGBD v2 data [HERE](http://rgbd.cs.princeton.edu/data/). Then, move SUNRGBD.zip, SUNRGBDMeta2DBB_v2.mat, SUNRGBDMeta3DBB_v2.mat and SUNRGBDtoolbox.zip to the OFFICIAL_SUNRGBD folder, unzip the zip files.
yinchimaoliang's avatar
yinchimaoliang committed
5

liyinhao's avatar
liyinhao committed
6
2. Enter the `matlab` folder, Extract point clouds and annotations by running `extract_split.m`, `extract_rgbd_data_v2.m` and `extract_rgbd_data_v1.m`.
yinchimaoliang's avatar
yinchimaoliang committed
7

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

liyinhao's avatar
liyinhao committed
13
14
15
16
17
18
The overall process could be achieved through the following script
```bash
cd matlab
matlab -nosplash -nodesktop -r 'extract_split;quit;'
matlab -nosplash -nodesktop -r 'extract_rgbd_data_v2;quit;'
matlab -nosplash -nodesktop -r 'extract_rgbd_data_v1;quit;'
19
20
cd ../../..
python tools/create_data.py sunrgbd --root-path ./data/sunrgbd  --out-dir ./data/sunrgbd --extra-tag sunrgbd
liyinhao's avatar
liyinhao committed
21
```
yinchimaoliang's avatar
yinchimaoliang committed
22
23

NOTE: SUNRGBDtoolbox.zip should have MD5 hash `18d22e1761d36352f37232cba102f91f` (you can check the hash with `md5 SUNRGBDtoolbox.zip` on Mac OS or `md5sum SUNRGBDtoolbox.zip` on Linux)
liyinhao's avatar
liyinhao committed
24

25
The directory structure after pre-processing should be as below
liyinhao's avatar
liyinhao committed
26
27
28
29
30
31
32
33
34
35
36
```
sunrgbd
├── README.md
├── matlab
│   ├── extract_rgbd_data_v1.m
│   ├── extract_rgbd_data_v2.m
│   ├── extract_split.m
├── OFFICIAL_SUNRGBD
│   ├── SUNRGBD
│   ├── SUNRGBDMeta2DBB_v2.mat
│   ├── SUNRGBDMeta3DBB_v2.mat
liyinhao's avatar
liyinhao committed
37
│   ├── SUNRGBDtoolbox
38
39
40
41
42
43
44
45
46
47
48
49
├── sunrgbd_trainval
│   ├── calib
│   ├── image
│   ├── label_v1
│   ├── train_data_idx.txt
│   ├── depth
│   ├── label
│   ├── seg_label
│   ├── val_data_idx.txt
├── points
├── sunrgbd_infos_train.pkl
├── sunrgbd_infos_val.pkl
liyinhao's avatar
liyinhao committed
50
51

```