Neural Motifs

Code for Neural Motifs: Scene Graph Parsing with Global Context (CVPR 2018)
Alternatives To Neural Motifs
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Awesome Gcn377
4 years ago1
resources for graph convolutional networks (图卷积神经网络相关资源)
Social Stgcnn360
4 months ago1mitPython
Code for "Social-STGCNN: A Social Spatio-Temporal Graph Convolutional Neural Network for Human Trajectory Prediction" CVPR 2020
Neural Motifs348
4 years ago26mitPython
Code for Neural Motifs: Scene Graph Parsing with Global Context (CVPR 2018)
2 years ago28mitJupyter Notebook
Code for CVPR'19 paper Linkage-based Face Clustering via GCN
2 months ago12mitC++
Deep relational reasoning graph network for arbitrary shape text detection; Accepted by CVPR 2020 (Oral).
6 months ago17mitPython
Code accompanying the paper "Say As You Wish: Fine-grained Control of Image Caption Generation with Abstract Scene Graphs" (Chen et al., CVPR 2020, Oral).
4 years ago6mitPython
Source code for our CVPR 2019 paper - PPGNet: Learning Point-Pair Graph for Line Segment Detection
Gpa Detection93
2 years ago10Python
Implementation of Cross-domain Detection via Graph-induced Prototype Alignment (CVPR 2020 Oral).
Ai Paper Drawer88
2 years ago
人工智能论文关键点集结。This project aims to collect key points of AI papers.
3 years ago1Java
Code for the CVPR'19 paper "Explore-Exploit Graph Traversal for Image Retrieval"
Alternatives To Neural Motifs
Select To Compare

Alternative Project Comparisons


Like this work, or scene understanding in general? You might be interested in checking out my brand new dataset VCR: Visual Commonsense Reasoning, at!

This repository contains data and code for the paper Neural Motifs: Scene Graph Parsing with Global Context (CVPR 2018) For the project page (as well as links to the baseline checkpoints), check out If the paper significantly inspires you, we request that you cite our work:


  title={Neural Motifs: Scene Graph Parsing with Global Context},
  author={Zellers, Rowan and Yatskar, Mark and Thomson, Sam and Choi, Yejin},
  booktitle = "Conference on Computer Vision and Pattern Recognition",  


  1. Install python3.6 and pytorch 3. I recommend the Anaconda distribution. To install PyTorch if you haven't already, use conda install pytorch=0.3.0 torchvision=0.2.0 cuda90 -c pytorch.

  2. Update the config file with the dataset paths. Specifically:

    • Visual Genome (the VG_100K folder, image_data.json, VG-SGG.h5, and VG-SGG-dicts.json). See data/stanford_filtered/ for the steps I used to download these.
    • You'll also need to fix your PYTHONPATH: export PYTHONPATH=/home/rowan/code/scene-graph
  3. Compile everything. run make in the main directory: this compiles the Bilinear Interpolation operation for the RoIs as well as the Highway LSTM.

  4. Pretrain VG detection. The old version involved pretraining COCO as well, but we got rid of that for simplicity. Run ./scripts/ Note: You might have to modify the learning rate and batch size, particularly if you don't have 3 Titan X GPUs (which is what I used). You can also download the pretrained detector checkpoint here.

  5. Train VG scene graph classification: run ./scripts/ 2 (will run on GPU 2). OR, download the MotifNet-cls checkpoint here: Motifnet-SGCls/PredCls.

  6. Refine for detection: run ./scripts/ 2 or download the Motifnet-SGDet checkpoint.

  7. Evaluate: Refer to the scripts ./scripts/eval_models_sg[cls/det].sh.


Feel free to open an issue if you encounter trouble getting it to work!

Popular Cvpr Projects
Popular Graph Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.