Skip to content

Jingchensun/Inverted-Attention-FasterRCNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inverted Attention with Faster R-CNN

This is an pytorch implementation of the WACV'2020 paper 'Improving Object Detection with Inverted Attention'.

Step 1: Installation

Create a conda environment and install dependencies:

conda create -y -n torch113 python=3.8
conda activate torch113
pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
pip install -r requirements.txt

Step 2: Download Dataset

We use Pascal VOC2012 train/val dataset

wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
tar -xvf OCtrainval_11-May-2012.tar

Step 3: Train the model

Set the dataset path "--data-path" of VOCdevkit in the 'train_res50_fpn.py'

python train_res50_fpn.py

img

Step 4: Evualate the model

python validation.py 

img

Step 5: Visulize the feature map

Change the model path in the "Object_CAM_IAN.ipynb" under visualization file, and you will obtain the attention map like this: img

Acknowledgement

This repo benefits from faster_rcnn,and Pytorch-Inverted-Attention. Thanks for their works.

About

[WACV 2020] Inverted Attention of Faster RCNN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published