Home

Awesome

Holistically-Attracted Wireframe Parsing: From Supervised Learning to Self-Supervised Learning

This is the official implementation of our paper.

<!-- [**News**] The upgraded HAWPv2 and HAWPv3 are available now! [**News**] We experimentally provided an easy-to-install version for inference-only usage of HAWP, please checkout the [``inference``](https://github.com/cherubicXN/hawp/tree/inference) branch for the details. -->

[News] Our journal version has been accepted in PAMI!

[News] The upgraded HAWPv2 and HAWPv3 are available now!

Highlights

<p align="center"> <!-- <img src="figures/teaser.png" height="400" > --> <img src="docs/figures/v3-wireframe/00037187.png" width="30%"> <img src="docs/figures/v3-wireframe/00051510.png" width="30%"> <img src="docs/figures/v3-wireframe/00074259.png" width="30%"> </p> <p align="center"> <img src="docs/figures/v3-BSDS/37073.png" width="30%"> <img src="docs/figures/v3-BSDS/42049.png" width="30%"> <img src="docs/figures/v3-BSDS/85048.png" width="30%"> </p> <p align="center"> <img src="docs/figures/v3-CrowdAI/000000000190.png" width="30%"> <img src="docs/figures/v3-CrowdAI/000000000210.png" width="30%"> <img src="docs/figures/v3-CrowdAI/000000000230.png" width="30%"> <p>

Data Downloading

<details> <summary> <b>Training and Testing datasets for HAWPv2</b> </summary> </details>

Installation

<details> <summary><b>Anaconda</b></summary>
conda create -n hawp python==3.9
conda activate hawp
pip install -e .
# Install pytorch, please be careful for the version of CUDA on your machine
pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu116 
# Install other dependencies
pip install -r requirement.txt
python -c "import torch; print(torch.cuda.is_available())" # Check if the installed pytorch supports CUDA.
sh downloads.sh
</details> <details> <summary><b>Docker</b></summary>

We also provide a Dockerfile. You could build the docker image by running the following command lines.

sudo docker build - < Dockerfile --tag hawp:latest
</details>

Citations

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

@article{HAWP-journal,
title = "Holistically-Attracted Wireframe Parsing: From Supervised to Self-Supervised Learning",
author = "Nan Xue and Tianfu Wu and Song Bai and Fu-Dong Wang and Gui-Song Xia and Liangpei Zhang and Philip H.S. Torr
journal = "IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI)",
year = {2023}
}

and

@inproceedings{HAWP,
title = "Holistically-Attracted Wireframe Parsing",
author = "Nan Xue and Tianfu Wu and Song Bai and Fu-Dong Wang and Gui-Song Xia and Liangpei Zhang and Philip H.S. Torr
",
booktitle = "IEEE Conference on Computer Vision and Pattern Recognition (CVPR)",
year = {2020},
}

Acknowledgment

We acknowledge the effort from the authors of the Wireframe dataset and the YorkUrban dataset. These datasets make accurate line segment detection and wireframe parsing possible. We also thank Rémi Pautrat for helpful discussions.

TODO