Code accompanying the paper "Expecting the Unexpected: Training Detectors for Unusual Pedestrians with Adversarial Imposters(CVPR2017)". As for the generator for synthetic data, please take this repo for reference.
- ubuntu or Mac OS
- tensorflow==1.1+(with GPU)
- pip install image
- pip install sklearn
- pip install scipy
- image_pylib(This repository should be put under the same folder with RPNplus.)
Run Demo:
- Download model files(RPN_model & VGG16_model) first, and put them in the ./models/ folder.
- The number 0 is your GPU index, and you can change to any available GPU index.
- This demo will test the images in the ./images/ folder and output the results to ./results/ folder.
python demo.py 0
Train:
- The number 0 is your GPU index, and you can change to any available GPU index.
- Open train.py and set
imageLoadDir
andanoLoadDir
to proper values(imageLoadDir
means where you store your images andanoLoadDir
means where you store your annotation files).
python train.py 0
Please cite our paper if you use this code or our datasets in your own work:
@article{huang2017recognition,
title={Expecting the Unexpected: Training Detectors for Unusual Pedestrians with Adversarial Imposters},
author={Huang, Shiyu and Ramanan, Deva},
journal={arXiv preprint arXiv:1703.06283},
year={2017}
}
- Our code is based on Yinpeng Dong's code and this repo: https://github.com/machrisaa/tensorflow-vgg
Shiyu Huang(huangsy13@gmail.com)