This repository contains the PyTorch implementation for CVPR 2020 Paper "Neural Contours: Learning to Draw Lines from 3D Shapes" by Difan Liu, Mohamed Nabail, Aaron Hertzmann, Evangelos Kalogerakis.
- The project is developed on Ubuntu 16.04 with cuda9.0 + cudnn7.0. The code has been tested with PyTorch 1.1.0 (GPU version) and Python 3.6.8.
- Python packages:
- OpenCV (tested with 4.2.0)
- PyYAML (tested with 5.3.1)
- scikit-image (tested with 0.14.2)
-
Pre-trained model is available here, please put it in
data/model_weights
:cd data/model_weights unzip weights.zip
-
download example testing data:
cd data/example wget https://people.cs.umass.edu/~dliu/projects/NeuralContours/example.zip unzip example.zip
-
training data is available here.
- we use rtsc-1.6 to compute all the input geometric feature maps and lines. See here for details.
- run geometry branch without NRM (Neural Ranking Module), this script takes thresholds of geometric lines as input:
python -m scripts.geometry_branch_demo -sc 10.0 -r 10.0 -v 10.0 -ar 0.1 -model_name bumps_a -save_name data/output/bumps_a.png
- Testing with NRM and ITB:
Note that computation time depends on GPU performance, parameter setting and input 3D model. For reference, tested on GeForce GTX 1080 Ti, under default setting, Neural Contours of
python -m scripts.test -model_name bumps_a -save_name data/output/bumps_a_NCs.png
bumps_a
takes about 12 minutes.
@InProceedings{Liu_2020_CVPR,
author={Liu, Difan and Nabail, Mohamed and Hertzmann, Aaron and Kalogerakis, Evangelos},
title={Neural Contours: Learning to Draw Lines from 3D Shapes},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}
}
To ask questions, please email.