Skip to content

Zumbalamambo/Pedestron

 
 

Repository files navigation

Updates

  • Added pre-trained models for Caltech, CityPersons and EuroCity Persons
  • Added some qualitative results for Caltech on YouTube
  • Added demo script to perform inference using pre-trained models on some images
  • Added testing and training scripts for all datasets.
  • Added configurations for Faster R-CNN along with pre-trained model
  • Added configurations for RetinaNet along with pre-trained model

Pedestron

demo image

Pedestron is a MMetection based repository that focuses on the advancement of research on pedestrian detection. We provide processed annotations and scripts to process the annotation of different pedestrian detection benchmarks.

YouTube

  • YouTube link for qualitative results on Caltech. Pre-Trained model available.

Installation

We refer to the installation and list of dependencies to installation file. Clone this repo and follow installation.

List of detectors

Currently We provide configurations for

  • Cascade Mask-R-CNN
  • Faster R-CNN

Following datasets are currently supported

Datasets Preparation

Benchmarking of Pre-Trained models

Detector Dataset Reasonable Heavy
Cascade Mask R-CNN CityPersons 7.5 28.0
Faster R-CNN CityPersons 10.3 33.07
RetinaNet CityPersons 14.6 39.5
Cascade Mask R-CNN Caltech 1.7 25.7
Cascade Mask R-CNN EuroCity Persons 4.4 21.3

Pre-Trained models

Cascade Mask R-CNN

  1. CityPersons
  2. Caltech
  3. EuroCity Persons

Faster R-CNN

  1. CityPersons

Running a demo using pre-trained model on few images

  1. Pre-trained model can be evaluated on sample images in the following way
python tools/demo.py config checkpoint input_dir output_dir

Download one of our provided pre-trained model and place it in models_pretrained folder. Demo can be run using the following command

python tools/demo.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_5.pth.stu demo/ result_demo/ 

Training

Train with single GPU

python tools/train.py ${CONFIG_FILE}

Train with multiple GPUs

./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM} [optional arguments]

For instance training on CityPersons using single GPU

python tools/train.py configs/elephant/cityperson/cascade_hrnet.py

Training on CityPersons using multiple(7 in this case) GPUs

./tools/dist_train.sh configs/elephant/cityperson/cascade_hrnet.py 7  

Testing

Test can be run using the following command.

python ./tools/TEST_SCRIPT_TO_RUN.py PATH_TO_CONFIG_FILE ./models_pretrained/epoch_ start end\
 --out Output_filename --mean_teacher 

For example for CityPersons inference can be done the following way

  1. Download the pretrained CityPersons model and place it in the folder "models_pretrained/".
  2. Run the following command:
python ./tools/test_city_person.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_ 5 6\
 --out result_citypersons.json --mean_teacher 

Please cite the following work

ArXiv version

@article{hasan2020pedestrian,
  title={Pedestrian Detection: The Elephant In The Room},
  author={Hasan, Irtiza and Liao, Shengcai and Li, Jinpeng and Akram, Saad Ullah and Shao, Ling},
  journal={arXiv preprint arXiv:2003.08799},
  year={2020}
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.5%
  • Cuda 5.6%
  • C++ 2.8%
  • Shell 0.1%