PennFudanPed_train.json
: Contains COCO annotations for a randomly generated train split of the PennFudan dataset.
PennFudanPed_val.json
: Contains COCO annotations for the corresponding validation split of the PennFudan dataset.
The below scripts should be run for detections obtained using all the three methods mentioned below:
- Pretrained HoG
- Custom HoG trained using SVM on HoG features
- Pretrained Faster RCNN
git clone https://github.com/sm354/Pedestrian-Detection.git
cd Pedestrian-Detection
pip install -r requirements.txt
wget https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip
unzip PennFudanPed.zip
gdown <link>
unzip svm.zip
python eval_hog_pretrained.py --root <path to dataset root directory> --test <path to test json> --out <path to output json>
Training
python train_hog_custom.py --root <path to dataset root directory> --train <path to train json> --model <path to save trained SVM model>
Testing
python eval_hog_custom.py --root <path to dataset root directory> --test <path to test json> --out <path to output json> --model <path to trained SVM model>
python eval_faster_rcnn.py --root <path to dataset root directory> --test <path to test json> --out <path to output json>
python eval_detections.py --gt <path to ground truth annotations json> --pred <path to detections json>
The script eval_detections.py
takes in ground truth annotations and predicted detections for the evaluation dataset and computes the following metrics:
- Average Precision, computed over 10 IOU thresholds in the range 0.5:0.05:0.95
- Average Recall computed at 1 detection per image.
- Average Recall comptued at 10 detections per image.