Need help with PPGNet?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

159 Stars 35 Forks MIT License 34 Commits 11 Opened issues


Source code for our CVPR 2019 paper - PPGNet: Learning Point-Pair Graph for Line Segment Detection

Services available


Need anything else?

Contributors list

PPGNet: Learning Point-Pair Graph for Line Segment Detection

PyTorch implementation of our CVPR 2019 paper:

PPGNet: Learning Point-Pair Graph for Line Segment Detection

Ziheng Zhang, Zhengxin Li, Ning Bi, Jia Zheng, Jinlei Wang, Kun Huang, Weixin Luo, Yanyu Xu, Shenghua Gao

(* Equal Contribution)

The poster can be found HERE.

pipe-line Demonstraton of juncton-line graph representaton G={V, E}. (a) an sample image patch with 10 junctons (V); (b) the graph which describes the connectvity of all junctons (G); (c) the adjacency matrix of all junctons (E, black means the junction pair is connected).


  • Python >= 3.6
  • fire >= 0.1.3
  • numba >= 0.40.0
  • numpy >= 1.14.5
  • pytorch = 0.4.1
  • scikit-learn = 0.19.2
  • scipy = 1.1.0
  • tensorboard >= 1.11.0
  • tensorboardX >= 1.4
  • torchvision >= 0.2.1
  • OpenCV >= 3.4.3


  1. clone this repository (and make sure you fetch all .pth files right with git-lfs):
    git clone
  2. download the preprocessed SIST-Wireframe dataset from BaiduPan (code:lnfp) or Google Drive.
  3. specify the dataset path in the
    script. (modify the --data-root parameter)
  4. run

Please note that the code requires the GPU memory to be at least 24GB. For GPU with memory smaller than 24GB, you can use a smaller batch with

parameter and/or change the
parameter in
to be a smaller integer to avoid the out-of-memory error.


Please cite our paper for any purpose of usage.

  title={PPGNet: Learning Point-Pair Graph for Line Segment Detection},
  author={Ziheng Zhang and Zhengxin Li and Ning Bi and Jia Zheng and Jinlei Wang and Kun Huang and Weixin Luo and Yanyu Xu and Shenghua Gao},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.