Giter Site home page Giter Site logo

topdig's Introduction

Relationformer: A Unified Framework for Image-to-Graph Generation

Requirements

  • CUDA>=9.2
  • PyTorch>=1.7.1

For other system requirements please follow

pip install -r requirements.txt

Compiling CUDA operators

cd ./models/ops
python setup.py install

Code Usage

1. Dataset preparation

Please download 20 US Cities dataset and organize them as following:

code_root/
└── data/
    └── 20cities/

After downloading the dataset run the following script to preprocess and prepare the data for training

python generate_data.py

2. Training

2.1 Prepare config file

The config file can be found at .configs/road_rgb_2D.yaml. Make custom changes if necessary.

2.2.a Training on multiple-GPU (e.g. 3 GPUs)

For example, the command for training Relationformer is following:

python train.py --config configs/road_rgb_2D.yaml --cuda_visible_device 0 1 2 --nproc_per_node 3

3. Evaluation

Once you have the config file and trained model of Relation, run following command to evaluate it on test set:

python test.py --config configs/road_rgb_2D.yaml --checkpoint ./trained_weights/last_checkpoint.pt

4. Interactive notebook

Please find the debug_relationformer.ipynb for interactive evaluation and visualization

topdig's People

Contributors

tmits37 avatar suprosanna avatar docsom avatar

Watchers

 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.