Skip to content

simblah/SGRN_torch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SGRN_torch

Implementation of Spatial-aware Graph Relation Network for Large-scale Object Detection

This code is modified based on ruotianluo Faster R-CNN code.

I implement code only for Faster R-CNN / Visual Genome Dataset / Resnet101 backbone.


Prepare Dataset & Pre-weight

  • Download Annotation File link --> Unzip zip file to $your_data_path/vg
  • Download Visual Genome Image Files zip1 zip2 --> Unzip 2 zip files to $your_data_path/vg/JPEGImages/*.jpg
  • Download Imagenet pre-trained weight for resnet 101 link --> Copy file to $your_preweight_path/
  • Download trained weight of Faster RCNN link --> Copy file to $your_weight_path/FRCNN/ and use it for training SGRN module

Requirements


Train

  • Train Faster RCNN
python tools/trainval_net.py --cfg "experiments/cfgs/res101.yml" --tag "FRCNN" --net "res101" --weight $your_preweight_path/res101.pth --iters 2400000
  • Train SGRN
python tools/trainval_net.py --cfg "experiments/cfgs/res101_gcn.yml" --tag "SGRN" --net "SGRN" --weight "your_weight_path/FRCNN/res101_faster_rcnn_iter_1200000.pth" --iters 1200000

Test

  • Test Faster RCNN
python tools/test_net.py --cfg "experiments/cfgs/res101.yml" --model "your_weight_path/FRCNN/res101_faster_rcnn_iter_1200000.pth"  --net "res101"
  • Download trained weight of SGRN link --> Copy file to $your_weight_path/SGRN/

  • Test SGRN

python tools/test_net.py --cfg "experiments/cfgs/res101_gcn.yml" --model "your_weight_path/SGRN/res101_faster_rcnn_iter_1200000.pth"  --net "SGRN"

Result

  • Faster RCNN Mean Average Precision : 11.2
  • Faster RCNN with SGRN Mean Average Precision : 11.5

About

Spatial-aware Graph Relation Network for Large-scale Object Detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published