Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
data
models
site
Output.py
README.md
YoloObjectDetector.py
detect_image.py
detect_images.py
detect_video.py
downloadYOLO.sh

README.md

Object Detection using a pretrained Model

This sample project uses the YOLOv3 model to detect different types of objects (80 classes, defined by the COCO Dataset).

Output

First of all you need to download the two different weight files and place them in the models/yolo* folders. This can be done automatically using downloadYOLO.sh.

Usage

Each script allows you to pass a spatial size as parameter. The following values can be used:

  • tiny
  • 320 (default)
  • 416
  • 608

Depending on the choosen size, the detection might run quite slow. Tiny uses a different model which is optimized for small devices.

Example:

python3 SCRIPT.py -s tiny

You can exit each script by pressing q and if you require additional help run it with the -h flag.

detect_image.py and detect_video.py

Those scripts use either a Webcam or a File as input and show the result of the detection. If you do not pass a file as input, the script tries to use your webcam. You can find some example images in the data/ directory.

Example:

# Use webcam
python3 detect_image.py
# Use image
python3 detect_image.py -i data/cat1.jpg

detect_images.py

This script iterates through all images in the given folder, performs an object detection on them and writes the result into target/.

Example:

# All images in date/
python3 detect_images.py data/
You can’t perform that action at this time.