GithubHelp home page GithubHelp logo

nitinjoseph11 / hawp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cherubicxn/hawp

0.0 0.0 0.0 6.85 MB

Holistically-Attracted Wireframe Parsing [TPAMI'23] & [CVPR' 20]

License: MIT License

Shell 1.05% C++ 29.26% Python 64.83% C 2.25% MATLAB 1.68% Cuda 0.46% Makefile 0.14% Cython 0.21% Dockerfile 0.12%

hawp's Introduction

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

This is the official implementation of our paper.

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

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

Highlights

  • HAT Fields: A General and Robust Representation of Line Segments for Wireframe Parsing
  • HAWPv2: A state-of-the-art fully-supervised wireframe parser. Please checkout HAWPv2.md for its details.
  • HAWPv3: A state-of-the-art self-supervised wireframe parser. Please checkout HAWPv3.md for its details and HAWPv3.train.md for the training recipe.
  • HAWPv3 can be used as a good wireframe parser for the out-of-distribution images.

  • We provide a running example on the images of DTU dataset (scene24) as below.
    python -m hawp.ssl.predict --ckpt checkpoints/hawpv3-imagenet-03a84.pth  \
      --threshold 0.05  \
      --img ~/datasets/DTU/scan24/image/*.png \ 
      --saveto docs/figures/dtu-24 --ext png \

Data Downloading

Training and Testing datasets for HAWPv2
  • The training and testing data (including Wireframe dataset and YorkUrban dataset) for HAWPv2 can be downloaded via Google Drive. Many thanks to authors of these two excellent datasets!

  • You can also use the gdown to download the data in the terminal by

    gdown 134L-u9pgGtnzw0auPv8ykHqMjjZ2claO
    unzip data.zip

Installation

Anaconda
  • Clone the code repo: git clone https://github.com/cherubicXN/hawp.git.
  • Install ninja-build by sudo apt install ninja-build.
  • Create a conda environment by
conda create -n hawp python==3.9
conda activate hawp
pip install -e .
  • Run the following command lines to install the dependencies of HAWP
# 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
  • Verify the installation.
python -c "import torch; print(torch.cuda.is_available())" # Check if the installed pytorch supports CUDA.
  • Downloading the offically-trained checkpoints of both HAWPv2 and HAWPv3.
sh downloads.sh
Docker

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

sudo docker build - < Dockerfile --tag hawp:latest

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

  • Documentations
  • Google Colab Notebook

hawp's People

Contributors

cherubicxn avatar alwc avatar encounter1997 avatar ckanesan avatar pinto0309 avatar awarebayes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.