marichka-dobko / OAA-PyTorch

The PyTorch code for OAA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OAA-PyTorch

The PyTorch code for "Integral Object Mining via Online Attention Accumulation", which is implemented based on the code of psa and ACoL.

Installation

python3
torch >= 1.0
tqdm
torchvision
python-opencv

Download the VOCdevkit.tar.gz file and extract it into data/ folder.

Attention accumulation

cd OAA-PyTorch/
./train.sh 

After the training process, you can resize the accumulated attention map to original image size.

cd ./runs/exp1/
python res.py

For a comparison with the attention maps generated by the final classification model, you can generate them by

./test.sh

Pre-accumulated maps and models [link]

Integal Attention learning

If you want to skip the online attention accumulation process to train the integral model directly, Download the pre-accumulated maps and extract them to exp1/.

./train_iam.sh
./test_iam.sh

If you have any question about OAA, please feel free to contact Me (pt.jiang AT mail DOT nankai.edu.cn).

About

The PyTorch code for OAA


Languages

Language:Python 98.5%Language:Shell 1.5%