Skip to content

People detection using YOLOv3 model and Penn-Fudan dataset

Notifications You must be signed in to change notification settings

joanna-janos/PeopleDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

People detector

YOLOv3 model Penn Fudan Database dataset Supported img extensions
Python OpenCV

Python Python
Image on the left side was an input to detector.
On the right side is result with boxes indicating detected people.

⚙️ Model

For detection I used pretrained YOLOv3 model. It has been trained on COCO dataset with 80 possible classes. In my case, after detecting an object I check if label matches person class as I need only this one.
More information about YOLOv3 can be found here.

🔨 Input preprocessing

Image width and height are scaled to fit dimensions of model input. Then image is transformed to BLOB1.

📄 Dataset

As a dataset I chose Penn-Fudan Database for Pedestrian Detection and Segmentation.
"This is an image database containing images that are used for pedestrian detection [...]. The images are taken from scenes around campus and urban street. [...] Each image will have at least one pedestrian in it. [...] All labeled pedestrians are straight up."

⁉️ How does it work?

You can detect people on some choosen images or all in selected directory.

  1. Prepare data directory with images (only .png and .jpg extensions are supported).
    Default directory is called data and is in the same level as src directory.
  2. Prepare config for YOLOv3 model (configuration file, model weights and classes to be detected).
    Default directory is called config and is under yolo directory.
  3. Go to detector directory and run python main.py (there are 4 possible arguments to set: data path, results path, model config path and which files should be pass to detector).

If you need any help, run python main.py --help

✨ Results

  1. Detector can draw boxes for more than one person on image. Person can stay in shadow or even be turned. For an example input-output you can look at images at the beginning of this README.

  2. Sometimes detector marks two people as one detected object.

Python Python
Input on the left, output on the right side.



1 BLOB - Binary Large OBject - "A Blob is a group of connected pixels in an image that share some common property."

About

People detection using YOLOv3 model and Penn-Fudan dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages