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

neurvps

> 编程语言
开源

通过锥形卷积进行神经网络消失点扫描

200 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

通过锥形卷积进行神经网络消失点扫描

NeurVPS: Neural Vanishing Point Scanning via Conic Convolution

This repository contains the official PyTorch implementation of the paper: Yichao Zhou, Haozhi Qi, Jingwei Huang, Yi Ma. "NeurVPS: Neural Vanishing Point Scanning via Conic Convolution". NeurIPS 2019.

Introduction

NeurVPS is an end-to-end trainable deep network with geometry-inspired convolutional operators for detecting vanishing points in images. With the power of data-driven approaches and geometrical priors, NeurVPS is able to outperform the previous state-of-the-art vanishing point detection methods such as LSD/J-Linkage and Contour (TMM17).

Main Results

Qualitative Measures

SceneCity Urban 3D (SU3) Natural Scene (TMM17) ScanNet

Random sampled results can be found in the supplementary material of the paper.

Quantitative Measures

SceneCity Urban 3D (SU3) Natural Scene (TMM17) ScanNet

Here, the x-axis represents the angle accuracy of the detected vanishing points and the y-axis represents the percentage of the results whose error is less than that. Our conic convolutional networks outperform all the baseline methods and previous state-of-the-art vanishing point detection approaches, while naive CNN implementations might under-perform those traditional methods, especially in the high-accuracy regions.

Code Structure

Below is a quick overview of the function of each file.

…

Reproducing Results

Installation

For the ease of reproducibility, you are suggested to install miniconda (or anaconda if you prefer) on a Linux environment before following executing the following commands.

Note that as of 2025/08/08, pytorch deprecated the support of conda. The old instruction up to CUDA 12.4 can still be found in https://pytorch.org/get-started/previous-versions/.

bash
git clone https://github.com/zhou13/neurvps
cd neurvps
conda create -y -n neurvps
source activate neurvps
# Replace pytorch installation with the matching CUDA version in https://pytorch.org/get-started/previous-versions/
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=12.4 -c pytorch -c nvidia
conda install -y tensorboardx -c conda-forge
conda install -y pyyaml docopt matplotlib scikit-image opencv tqdm
mkdir data logs

Downloading the Processed Datasets

Make sure curl is installed on your system and execute

bash
cd data
wget https://huggingface.co/yichaozhou/neurvps/resolve/main/Data/scannet-vp/scannet-vp.z0{1..7}
wget https://huggingface.co/yichaozhou/neurvps/resolve/main/Data/scannet-vp/scannet-vp.zip
zip -FF scannet-vp.zip --out scannet-vp-full.zip
unzip -FF scannet-vp-full.zip
wget https://huggingface.co/yichaozhou/neurvps/resolve/main/Data/su3.tar.xz
wget https://huggingface.co/yichaozhou/neurvps/resolve/main/Data/tmm17.tar.xz
tar xf su3.tar.xz
tar xf tmm17.tar.xz
rm *.tar.xz *.z*
cd ..

Alternatively, you can download the processed datasets manually from our Hugging Face repo and proceed accordingly.

Training

Execute the following commands to train the neural networks from scratch on 2 GPUs (GPU 0 and GPU 1, specified by -d 0,1) with the default parameters:

bash
python ./train.py -d 0,1 --identifier su3 config/su3.yaml
python ./train.py -d 0,1 --identifier tmm17 config/tmm17.yaml
python ./train.py -d 0,1 --identifier scannet config/scannet.yaml

The checkpoints and logs will be written to logs/ accordingly.

Note: For TMM17 dataset, due to its small size the model is more senstive to the initialization. You may need to train it multiple times to reach the same performance as the pre-trained model. For SU3, it has been reported that it is possible to achieve higher performance with 4-GPU training than the reported one in the paper, though the training process is more volatile.

Pre-trained Models

You can download our reference pre-trained models from our Hugging Face repo. Those pre-trained models should be able to reproduce the numbers in our paper.

Evaluation

Execute the following commands to compute and plot the angular accuracy (AA) curves with trained network checkpoints:

bash
python eval.py -d 0 logs/YOUR_LOG/config.yaml logs/YOUR_LOG/checkpoint_best.pth.tar

FAQ

I want a quick tutorial on vanishing points.

A: I have a blog post on Vanishing Points and “Gaussian Sphere Representation”.

I do not understand your format of vanishing points.

A: Uncomment these lines or these lines to visualize vanishing points overlaid with 2D images.

What is the unit of focal length in the yaml and why do I need it?

A: The focal length in our implementation is in the unit of 2/w pixel (w is the image width. only a square image is supported). This follows the convention of the OpenGL projection matrix so that to make it resolution invariant. The focal length is used for uniform sampling of the position of vanishing points. If it is not known, you can set it to some common focal length for your categories of images, as we do in config/tmm17.yaml.

You can also check the function to_label and to_pixel, which use the focal length to convert the 3D line direction from and to a 2D vanishing point.

I have a question. How could I get help?

A: You can post an issue on Github, which might help other people that have the same question. You can also send me an email if you think that is more appropriate.

Acknowledgement

We thank Yikai Li from SJTU and Jiajun Wu from MIT for pointing out a bug in the data augmentation for the TMM17 Natural Scene dataset. This work is supported by a research grant from Sony Research.

Citing NeurVPS

If you find NeurVPS useful in your research, please consider citing:

@inproceedings{zhou2019neurvps,
 author={Zhou, Yichao and Qi, Haozhi and Huang, Jingwei and Ma, Yi},
 title={{NeurVPS}: Neural Vanishing Point Scanning via Conic Convolution},
 booktitle={{NeurIPS}},
 year={2019}
}

Issues· 2 开放

查看全部 Issues在 GitHub 打开

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

> 标签

Pythoncnnconic-convolutiondeep-learningdeep-neural-networks

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

> 工具信息

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

> 相关工具

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