Giter VIP home page Giter VIP logo

graphviz's Introduction

GraphViz

license

Visualizes a graph stored as a json file as a force-directed graph in a webbrowser. It has specifically been built to visualize scene graphs, a representation commonly used in computer vision. See Visual Genome for details about the representation.

This type of visualization is often found in many computer vision papers that build models to display their model's output scene graphs.

example image example scene graph

Usage

First, you need an image and its associated scene graph.

Save a scene graph object as json in a file with the following format:

{
    url: STRING,
    objects: [
        {name: STRING},
        ...
    ],
    attributes: [
        {attribute: STRING, object: INT},
        ...
    ],
    relationships: [
        {predicate: STRING, object: INT, subject: INT},
        ...
    ]
}

The url should point to an image source. The attributes and relationships lists contain an object int field that is an index to the object it refers to in the objects list.

Run the following command to visualize the scene graph:

python visualize_scene_graph.py --graph LOCATION_OF_YOUR_SCENE_GRAPH

The above command will automatically open up the browser and display a scene graph and its associated image.

Contributing.

Feel free to contribute to this project by sending me a pull request. Feel free to follow me on twitter (@RanjayKrishna) for updates and to see my other work.

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.