Giter Site home page Giter Site logo

zhangyuyuanfang / pedestron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hasanirtiza/pedestron

0.0 1.0 0.0 59.5 MB

[Pedestron] Pedestrian Detection: The Elephant In The Room. On ArXiv 2020

Home Page: https://arxiv.org/pdf/2003.08799.pdf

License: Apache License 2.0

Python 63.83% C++ 1.94% Cuda 3.82% Shell 0.06% MATLAB 4.31% Jupyter Notebook 26.03%

pedestron's Introduction

PWC

PWC

Pedestron

Pedestron is a MMdetection based repository that focuses on the advancement of research on pedestrian detection. We provide a list of detectors, both general purpose and pedestrian specific to train and test. Moreover, we provide pre-trained models and benchmarking of several detectors on different pedestrian detection datasets. Additionally, we provide processed annotations and scripts to process the annotation of different pedestrian detection benchmarks. If you use Pedestron, please cite us (see at the end) and other respective sources.

๐Ÿ”ฅ Updates ๐Ÿ”ฅ

  • [NEW] Ported testing of Mask-Guided Attention Network for Occluded Pedestrian Detection (MGAN). (ICCV'19), into Pedestron along with pretrained model
  • [NEW] Pedestron now supports general person and pedestrian detection in crowded scenarios. Pre-trained model along with evaluation script on CrowdHuman benchmark is added
  • [NEW] Pre-trained model for WIDER pedestrian datasets has been added to the Pedestron, for general person detection
  • ๐Ÿ”ฅ Configuration along with a pre-trained model for RetinaNet with Gudied Anchoring added. Its fast and accurate
  • ๐Ÿ”ฅ Configuration along with a pre-trained model for Faster R-CNN with HRNet for EuroCity Persons has been adeed
  • ๐Ÿ”ฅ Google Colab step-by-step instruction on how to setup Pedestron and run demo by Gokulan Vikash

YouTube demo

Leaderboards

Installation

We refer to the installation and list of dependencies to installation file. Clone this repo and follow installation. Alternatively, Google Colab step by step instruction can be followed for installation

List of detectors

Currently we provide configurations for the following detectors, with different backbones

  • Cascade Mask-R-CNN
  • Faster R-CNN
  • RetinaNet
  • RetinaNet with Guided Anchoring
  • Hybrid Task Cascade (HTC)
  • MGAN

Following datasets are currently supported

Datasets Preparation

Benchmarking

Benchmarking of pre-trained models on pedestrian detection datasets (autonomous driving)

Detector Dataset Backbone Reasonable Heavy
Cascade Mask R-CNN CityPersons HRNet 7.5 28.0
Cascade Mask R-CNN CityPersons MobileNet 10.2 37.3
Faster R-CNN CityPersons HRNet 10.2 36.2
RetinaNet CityPersons ResNeXt 14.6 39.5
RetinaNet with Guided Anchoring CityPersons ResNeXt 11.7 41.5
Hybrid Task Cascade (HTC) CityPersons ResNeXt 9.5 35.8
MGAN CityPersons VGG 11.2 52.5
Cascade Mask R-CNN Caltech HRNet 1.7 25.7
Cascade Mask R-CNN EuroCity Persons HRNet 4.4 21.3
Faster R-CNN EuroCity Persons HRNet 6.1 27.0

Benchmarking of pre-trained models on general human/person detection datasets

Detector Dataset Backbone AP
Cascade Mask R-CNN CrowdHuman HRNet 84.1

Pre-Trained models

Cascade Mask R-CNN

  1. CityPersons
  2. Caltech
  3. EuroCity Persons
  4. CrowdHuman 1
  5. CrowdHuman 2 (higher AP)
  6. WIDER Pedestrian

Faster R-CNN

  1. CityPersons
  2. EuroCity Persons

RetinaNet

  1. CityPersons

RetinaNet with Guided Anchoring

  1. CityPerson

Hybrid Task Cascade (HTC)

  1. CityPersons

MGAN

  1. CityPersons

Getting Started

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/ 

See Google Colab demo.

Training

  • single GPU training
  • multiple GPU 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

  • single GPU testing
  • multiple GPU 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 

Alternatively, for EuroCity Persons

python ./tools/test_euroCity.py configs/elephant/eurocity/cascade_hrnet.py ./models_pretrained/epoch_ 147 148 --mean_teacher

or without mean_teacher flag for MGAN

python ./tools/test_city_person.py configs/elephant/cityperson/mgan_vgg.py ./models_pretrained/epoch_ 1 2\
 --out result_citypersons.json  

Testing with multiple GPUs on CrowdHuman

./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}]
./tools/dist_test.sh configs/elephant/crowdhuman/cascade_hrnet.py ./models_pretrained/epoch_19.pth.stu 8 --out CrowdHuman12.pkl --eval bbox

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}
}

pedestron's People

Contributors

hellock avatar hasanirtiza avatar yhcao6 avatar oceanpang avatar thangvubk avatar myownskyw7 avatar lindahua avatar innerlee avatar ljpadam avatar zhihuagao avatar gokulanv avatar xvjiarui avatar patrick-llgc avatar sovrasov avatar donnyyou avatar dtennant avatar luodian avatar dsuess avatar joker316701882 avatar eugenelawrence avatar xfguo-ucas avatar nattichai avatar ozps avatar zhangtemplar avatar slidelucask avatar lzhbrian avatar ychfan avatar stupidzz avatar cclauss avatar libuyu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.