Coder Social home page Coder Social logo

fengyunxuan / conv-mpn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhangfuyang/conv-mpn

0.0 0.0 0.0 234 KB

Conv-MPN: Convolutional Message Passing Neural Network for Structured Outdoor Architecture Reconstruction, CVPR2020

Home Page: https://zhangfuyang.github.io/conv-mpn/page.html

C++ 0.04% Python 92.21% C 4.85% Cuda 2.90%

conv-mpn's Introduction

Conv-MPN: Convolutional Message Passing Neural Network for Structured Outdoor Architecture Reconstruction

Overview

This is the official implementation of the paper Conv-MPN: Convolutional Message Passing Neural Network for Structured Outdoor Architecture Reconstruction.

This paper proposes a novel message passing neural (MPN) architecture Conv-MPN, which reconstructs an outdoor building as a planar graph from a single RGB image.

If you find the paper and the code helpful, please consider citing this paper:

@article{conv-mpn,
Title = {Conv-MPN: Convolutional Message Passing Neural Network for Structured Outdoor Architecture Reconstruction},
Author = {Fuyang, Zhang and Nelson, Nauata and Yasutaka, Furukawa},
Year = {2019},
journal = {arXiv preprint arXiv:1912.01756}
}

Environment Setup

The implementation is based on Python3.5 and Pytorch1.2. You can do pip install -r requirements.txt to install the dependencies.

Data Download

Please download data from this link. The dataset we used is from the paper "Vectorizing World Buildings: Planar Graph Reconstruction by Primitive Detection and Relationship Classification".

Data preprocessing

Corner detection: Given an input RGB image, we first use mask-rcnn to detect corner candidates. We treat each corner as 8x8 bounding box with a corner at the center. In the training, building graphs are generated from annotation and detected corners. In the testing, we only use detected corners. See ./corner_detection/README.md for information related to installation and environment setup.

  1. run ./corner_detection/main.py to train the corner detector.
  2. run ./corner_detection/demo.py to generate detected corners for the dataset.
  3. Note that the above instructions are for processing data with annotation files. If the aim is to run pre-trained Conv-MPN, you can just simply download the corner detection results here and pretrained model here.

Conv-MPN

Training

To train the Network from scratch, please run:

python train.py

You can modify some settings in the config.py.

  1. Conv-MPN is GPU memory intensive due to the use of 3D feature volumes. We use two NVIDIA TitanX GPUs (24G RAM each) for training Conv-MPN(t=3). t=3 means 3 times convolutional message passing. You can specify the gpu devices in config.py script.
  2. config.py contains a variable model_loop_time, which indicates how many iterations of message passing. In our experiments, 3 times achieves best score.
  3. variables conv_mpn and gnn are used for setting the network modes.
    1. conv_mpn = true, gnn = false means using conv-mpn network
    2. conv_mpn = false, gnn = true means using gnn network
    3. conv_mpn = false, gnn = false means per edge classification network.

We compared all the experiments in the paper, please see Experiemnt Section in the paper for the details.

Testing

To evaluate the performance or our trained model, please run:

python demo.py

You can download pretrained model from here.

Contact

If you have any questions, please contact me at [email protected] or [email protected]

conv-mpn's People

Contributors

zhangfuyang 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.