Skip to content

Commit e4d9cb5

Browse files
Update README.md
1 parent 7b5f739 commit e4d9cb5

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

README.md

+27-7
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,48 @@ We convert [ScanNet](http://www.scan-net.org/) data to *.tfrecords* files for tr
2525
### Training
2626
To train the network from the pretrained DeepLab network, please first download the DeepLab model [here](https://github.com/DrSleep/tensorflow-deeplab-resnet) (under the Caffe to TensorFlow conversion), and then run the following command.
2727
```bash
28-
python train_planenet.py --restore=0 --modelPathDeepLab="path to the deep lab model" --rootFolder="folder which contains tfrecords files"
28+
python train_planenet.py --restore=0 --modelPathDeepLab="path to the deep lab model" --dataFolder="folder which contains tfrecords files"
2929
```
3030

3131
### Evaluation
3232
Please first download our trained network from [here](https://mega.nz/#!sjpT2DiQ!Uo-6hxyldmtnPoKk3TTdUHKZADRGy6nIPlmAeVzJs_8) and put the uncompressed folder under ./checkpoint folder.
3333

3434
To evaluate the performance against existing methods, please run:
3535
```bash
36-
python evaluate.py --rootFolder="folder which contains tfrecords files"
36+
python evaluate.py --dataFolder="folder which contains tfrecords files"
3737
```
3838

3939
### Applications
40-
Please first download our trained network (see [Evaluation](### Evaluation) section for details). Script *predict.py* and *predict_custom.py* are for ScanNet testing images and custom images respectively. To predict and visualize ScanNet testing images, please run:
40+
Please first download our trained network (see [Evaluation](### Evaluation) section for details). Script *predict.py* predicts and visualizes custom images (if "customImageFolder" is specified) or ScanNet testing images (if "dataFolder" is specified).
4141

4242
```bash
43-
python predict.py --rootFolder="folder which contains tfrecords files" [--startIndex=0] [--numImages=30]
43+
python predict.py --customImageFolder="folder which contains custom images"
44+
python predict.py --dataFolder="folder which contains tfrecords files" [--startIndex=0] [--numImages=30]
4445
```
4546

46-
This will generate visualization images, a webpage containing all the visualization, as well as cache files under folder "predict". Similarly, the following command can be used to predict and visualize custom images:
47+
This will generate visualization images, a webpage containing all the visualization, as well as cache files under folder "predict/".
4748

49+
Same commands can be used for various applications by providing optional arguments, *applicationType*, *imageIndex*, *textureImageFilename*, and some application-specific arguments. The following commands are used to generate visualizations in the submission. (The TV application needs more manual specification for better visualization.)
50+
51+
```bash
52+
python predict.py --dataFolder=/mnt/vision/Data/PlaneNet/ --textureImageFilename=texture_images/CVPR.jpg --imageIndex=118 --applicationType=logo_texture --startIndex=118 --numImages=1
53+
python predict.py --dataFolder=/mnt/vision/Data/PlaneNet/ --textureImageFilename=texture_images/CVPR.jpg --imageIndex=118 --applicationType=logo_video --startIndex=118 --numImages=1
54+
python predict.py --dataFolder=/mnt/vision/Data/PlaneNet/ --textureImageFilename=texture_images/checkerboard.jpg --imageIndex=72 --applicationType=wall_texture --wallIndices=7,9 --startIndex=72 --numImages=1
55+
python predict.py --dataFolder=/mnt/vision/Data/PlaneNet/ --textureImageFilename=texture_images/checkerboard.jpg --imageIndex=72 --applicationType=wall_video --wallIndices=7,9 --startIndex=72 --numImages=1
56+
python predict.py --customImageFolder=my_images/TV/ --textureImageFilename=texture_images/TV.mp4 --imageIndex=0 --applicationType=TV --wallIndices=2,9
57+
python predict.py --customImageFolder=my_images/ruler --textureImageFilename=texture_images/ruler_36.png --imageIndex=0 --applicationType=ruler --startPixel=950,444 --endPixel=1120,2220
58+
```
59+
60+
Note that, the above script generate image sequences for video applications. Please run the following command under the image sequence folder to generate a video:
61+
```bash
62+
ffmpeg -r 60 -f image2 -s 640x480 -i %04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p video.mp4
63+
```
64+
65+
To check out the pool ball application, please run the following commands.
4866
```bash
49-
python predict_custom.py --rootFolder="folder which contains custom images"
67+
python predict.py --customImageFolder=my_images/pool --imageIndex=0 --applicationType=pool --estimateFocalLength=False
68+
cd pool
69+
python pool.py
5070
```
5171

52-
Same commands can be used for various applications by providing arguments, *--imageIndex*, *--suffix*, and *--textureFilename*
72+
Use mouse to play:)

0 commit comments

Comments
 (0)