百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

planerecover

> 编程语言
开源

[ECCV'18]通过革命神经网络从单一图像中取回3D平面图

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

[ECCV'18]通过革命神经网络从单一图像中取回3D平面图

Plane-Recover

This codebase is a TensorFlow implementation of our ECCV-2018 paper:

Recovering 3D Planes from a Single Image via Convolutional Neural Networks

Fengting Yang and Zihan Zhou

Please contact Fengting Yang ([email protected]) if you have any questions.

Prerequisites

This codebase was developed and tested with python 2.7, Tensorflow 1.4.1, CUDA 8.0.61 and Ubuntu 16.04.

Preparing training data

Here we provide our training and testing data on SYNTHIA dataset. Once you download the training data, you can set the training data path as in the training command and start to train the network.

If you wish to generate the training data by yourself, you may want to follow the following steps.

First, download the four-season sequences (Spring, Summer, Fall, Winter) of SEQS-02, SEQS-04, SEQS-05, and save them in one folder ``````. Then run the following command to filter out the static frames and generate the training data

bash
python data_pre_processing/SYNTHIA/SYNTHIA_frame_filter.py --dataset_dir= --dump_root= 
python data_pre_processing/SYNTHIA/SYNTHIA_pre_processing.py --filtered_dataset= --dump_root= 

The code will generate two ".txt" files for training and testing, we recommend replacing the tst_100.txt with the one in the data_pre_processing/SYNTHIA folder for the availability of the ground truth. The "train_8000.txt" in some folder records the training data we used in our training. Please note the depth unit of SYNTHIA is centimeter, so we divide the depth map by 100.0 in the data loading process.

Training

Once the data is prepared, you should be able to train the model by running the following command

bash
python train.py --dataset_dir= --log_dir=

if you want to continue to train or fine-tune from a pre-trained model, you can run

bash
python train.py --dataset_dir= --log_dir= --init_checkpoint_file= --continue_train=True

You can then start a tensorboard session by

tensorboard --logdir= --port=6006

and monitor the training progress by opening the 6006 port on your browser. If everything is set up properly, reasonable segmentation should be observed around 200k steps. The number of recovered planes will keep increasing until it reaches the maximum number set in the code (default=5).

A pre-trained model has been included in the folder named "pre_trained_model", and the ground truth segmentation is in "eval/labels/".

Testing

We provide test code to generate: 1) plane segmentation (and its visualization) and 2) depth prediction (planar area only). The evaluation of the depth prediction accuracy will be presented right after the test process. Please run

bash
python test_SYNTHIA.py --dataset= --output_dir= --test_list= --ckpt_file= --use_preprocessed=

We also provide code to generate planar 3D models. Please run

bash
cd eval
python generate3D.py --dataset= --pred_depth= --savepath= --test_list= --use_preprocessed=

The point cloud of the .ply file for the planar model should be viewed in ``````. You can visualize it through MeshLab directly.

Note:

  1. We use the filtered data as input instead of the pre-processed one (to preserve the resolution of the ground truth depth). If you do not want to do the pre-processing and have already downloaded our data, you can simply modify the path related to the dataset in test_SYNTHIA.py. The final result may not be exactly the same as ours but should be similar. And please set --use_preprocessed=True at testing time.
  2. We intentionally exclude seq.22 in our training to test the model performance in a video clip. That is why this sequence is missing in the provided training/test data. We can run the same test by downloading the filtered seq.22 (without pre-processing) here and generate a test list accordingly.

Evaluation

We also provide the MATLAB code for the plane segmentation evaluation:

(1) Open the eval/eval_planes.m;
(2) Set the pred_path as the path to the plane_sgmts folder generated in the test step and check if the label_path is appropriately pointing to the eval/labels/SYN_GT_sgmt;
(3) Run the program, you should be able to see the evaluation result on the command window.

Acknowledgement

Our code is developed based on the training framework provided by SfMLearner

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言