Code Monkey home page Code Monkey logo

graphbased-scenegraphgeneration's Introduction

Graph-based Scene Graph Generation

This project is a set of graph structure-based scene graph generation. All codes based on PyTorch.

Models

  • GCN: Simple Graph Convolution Network. Using 2 GCN layers to update objects and relations separately.
  • GraphSAGE: Simple Graph Sample and AggregatE model. Using 2 GraphSAGE layers to update objects and relations separately.
  • HGNN: Heterogeneous GNN can handle Object-Object (OO) and Object-Relation-Object (ORO) graphs and uses a custom heterogeneous graph neural network (GNN) for learning and prediction
  • TripleGCN: Implemented from Wald et al.'s famous SGPN (CVPR'2020). TripleGCN first generates a <subject, predicate, object> triplet to deal with the features in semantic graphs, and then aggregates the objects & relations features.
  • More comming soon...

Dependencies

  • Python 3.x
  • PyTorch
  • NumPy
  • Matplotlib

Usage

To use this framework, you need to design your own obj_vecs, rel_vecs, and edge_index matrices as following.

obj_vecs: shape (O, D), where O is the number of objects in the scene and D is the dimension of each object feature vector

rel_vecs: shape (T, D), where T is the number of relations in the scene

edge_index: shape (T, 2), edge_index[k] = i, j indicates a triplet < object_vecs[i], rel_vecs[k], obj_vecs[j] >

Note

The code is still being tested. The correctness and validity of the model cannot be guaranteed.

License

This project is released under the MIT license.

graphbased-scenegraphgeneration's People

Contributors

pericleshat avatar

Stargazers

 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.