• Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yolo v3 object detection implemented in Tensorflow.

Yolo v3 Object Detection in Tensorflow

Yolo v3 is an algorithm that uses deep convolutional neural networks to detect objects.

Kaggle notebook

Getting started

Prerequisites

This project is written in Python 3.6.6 using Tensorflow (deep learning), NumPy (numerical computing), Pillow (image processing), OpenCV (computer vision) and seaborn (visualization) packages.

pip install -r requirements.txt

Downloading official pretrained weights

Let's download official weights pretrained on COCO dataset.

wget -P weights https://pjreddie.com/media/files/yolov3.weights

Save the weights in Tensorflow format

Save the weights using load_weights.py script.

python load_weights.py

Running the model

Now you can run the model using detect.py script. Don't forget to set the IoU (Intersection over Union) and confidence thresholds.

Usage

python detect.py <images/video> <iou threshold> <confidence threshold> <filenames>

Images example

Let's run an example using sample images.

python detect.py images 0.5 0.5 data/images/dog.jpg data/images/office.jpg

Then you can find the detections in the detections folder.
You should see something like this.

detection_1.jpg

alt text

detection_2.jpg

alt text

Video example

You can also run the script with video files.

python detect.py video 0.5 0.5 data/video/shinjuku.mp4

The detections will be saved as detections.mp4 file. alt text

To-Do List

  • Model training

Acknowledgments