Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Webglstudio.js | 4,064 | 3 years ago | 31 | mit | JavaScript | |||||
A full open source 3D graphics editor in the browser, with scene editor, coding pad, graph editor, virtual file system, and many features more. | ||||||||||
Sg2im | 1,211 | 2 years ago | 11 | apache-2.0 | Python | |||||
Code for "Image Generation from Scene Graphs", Johnson et al, CVPR 2018 | ||||||||||
Qskinny | 1,058 | 2 days ago | July 17, 2022 | 111 | bsd-3-clause | C++ | ||||
A lightweight framework on top of the Qt scene graph and only few classes from Qt/Quick. It is usable from C++ and/or QML. | ||||||||||
Scene Graph Benchmark.pytorch | 914 | 2 months ago | 108 | mit | Jupyter Notebook | |||||
A new codebase for popular Scene Graph Generation methods (2020). Visualization & Scene Graph Extraction on custom images/datasets are provided. It's also a PyTorch implementation of paper “Unbiased Scene Graph Generation from Biased Training CVPR 2020” | ||||||||||
Graph Rcnn.pytorch | 482 | 3 years ago | 32 | Python | ||||||
Pytorch code for our ECCV 2018 paper "Graph R-CNN for Scene Graph Generation" and other papers | ||||||||||
Unityeventvisualizer | 444 | 3 years ago | 3 | mit | C# | |||||
A graph editor for viewing all UnityEvents at a glance | ||||||||||
Awesome Gcn | 377 | 4 years ago | 1 | |||||||
resources for graph convolutional networks (图卷积神经网络相关资源) | ||||||||||
Neural Motifs | 348 | 4 years ago | 26 | mit | Python | |||||
Code for Neural Motifs: Scene Graph Parsing with Global Context (CVPR 2018) | ||||||||||
Scenegraphparser | 299 | 2 years ago | 5 | mit | Python | |||||
A python toolkit for parsing captions (in natural language) into scene graphs (as symbolic representations). | ||||||||||
Scene Graph Tf Release | 293 | 4 years ago | 20 | mit | Python | |||||
"Scene Graph Generation by Iterative Message Passing" code repository |
This repository contains an implementation of the models introduced in the paper Scene Graph Generation by Iterative Message Passing by Xu et al. The model taks an image and a graph proposal as input and predicts the object and relationship categories in the graph. The network is implemented using TensorFlow and the rest of the framework is in Python. Because the model is built directly on top of Faster-RCNN by Ren et al, a substantial amount of data processing code is adapted from the py-faster-rcnn repository.
If you find this work useful in your research, please consider citing:
@inproceedings{xu2017scenegraph,
title={Scene Graph Generation by Iterative Message Passing},
author={Xu, Danfei and Zhu, Yuke and Choy, Christopher and Fei-Fei, Li},
booktitle={Computer Vision and Pattern Recognition (CVPR)},
year={2017}
}
The project page is available at http://cs.stanford.edu/~danfei/scene-graph/.
To get started with the framework, install the following dependencies:
It is recommended that you install everything in an Anaconda environment, i.e., install Anaconda and run
conda create -n sence-graph python=2.7
source activate scene-graph
Run pip install -r requirements.txt
to install all the requirement except TensorFlow and CUDA. Follow the provided URL to install TensorFlow r0.11 (0.10 and 0.12 also works).
The code has not been tested on TensorFlow 1.0 and above, but may potentially work once you convert all TF-related code using the offical transition script.
cd lib
make
Make sure you have installed all the dependencies and compiled the libraries.
Run the download.sh
script to download the mini-vg dataset and a model checkpoint.
./download.sh
Run the following command to visualize a predicted scene graph. Set GPU_ID
to the ID of the GPU you want to use, e.g. 0
.
./experiments/scripts/test.sh mini-vg -1 \
dual_graph_vrd_final 2 \
checkpoints/dual_graph_vrd_final_iter2.ckpt \
viz_cls \
GPU_ID
The scene graph dataset used in the paper is the VisualGenome dataset, although the framework can work with any scene graph dataset if converted to the desired format. Please refer to the dataset README for further instructions on converting the VG dataset into the desired format or downloading pre-processed datasets.
Follow the following steps to train a model:
Prepare or download the full dataset.
Download a Faster-RCNN model pretrained on the MS-COCO dataset and save the model to data/pretrained/
.
Edit the training script experiments/scripts/train.sh
such that all paths agree with the files on your file system.
To train the final model with inference iterations = 2, run:
./experiments/scripts/train.sh dual_graph_vrd_final 2 CHECKPOINT_DIRECTORY GPU_ID
The program saves a checkpoint to checkpoints/CHECKPOINT_DIRECTORY/
every 50000 iterations. Training a full model on a desktop with Intel i7 CPU, 64GB memory, and a TitanX graphics card takes around 20 hours. You may use tensorboard to visualize the training process. By default, the tf log directory is set to checkpoints/CHECKPOINT_DIRECTORY/tf_logs/
.
Follow the following steps to evaluate a model:
Prepare or download the full dataset or the mini-vg dataset.
If you wish to evaluate a pre-trained model, first download a checkpoint in the "Checkpoints" section.
Edit the evaluation script experiments/scripts/test.sh
such that all paths agree with the files on your file system.
To evaluate the final model with inference iterations = 2 using 100 images in the test set of the full VG dataset (use mini-vg for the mini VG dataset), run
./experiments/scripts/test.sh vg 100 dual_graph_vrd_final 2 CHECKPOINT_PATH(.ckpt) all GPU_ID
Note that to reproduce the results as presented the paper, you have to evaluate the entire test set by setting the number of images to -1.
The evaluation process takes around 10 hours. Setting the evaluation mode to all
is to evaluate the models on all three tasks, i.e., pred_cls, sg_cls, sg_det
.
You can also set the evaluation mode to individual tasks.
Follow the following steps to visualize a scene graph predicted by the model:
Prepare or download the full dataset or the mini-vg dataset.
If you wish to evaluate a pre-trained model, first download a checkpoint in the "Checkpoints" section.
Edit the evaluation script experiments/scripts/test.sh
such that all paths agree with the files on your file system.
To visualize the predicted graph of the first 100 images in the test set of the full VG dataset (use mini-vg for the mini VG dataset), run
./experiments/scripts/test.sh vg 100 dual_graph_vrd_final 2 CHECKPOINT_PATH(.ckpt) viz_cls GPU_ID
The viz_cls
mode assumes ground truth bounding boxes and predicts the predicted object and relationship labels, which is of the same setting as the sg_cls
task.
viz_det
mode uses the proposed bounding box from the regional proposal network as the object proposals, which is of the same setting as the sg_det
task.
A TensorFlow checkpoint of the final model trained with 2 inference iterations:
dual_graph_vrd_final_iter2_checkpoint.zip
MIT License