Implementation of YOLO v3 object detector in Tensorflow (TF-Slim). Full tutorial can be found here.
Tested on Python 3.5, Tensorflow 1.11.0 on Ubuntu 16.04.
- YOLO v3 architecture
- Basic working demo
- Weights converter (util for exporting loaded COCO weights as TF checkpoint)
- Training pipeline
- More backends
To run demo type this in the command line:
- Download COCO class names file:
wget https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names
- Download and convert model weights:
- Download binary file with desired weights:
- Full weights:
wget https://pjreddie.com/media/files/yolov3.weights
- Tiny weights:
wget https://pjreddie.com/media/files/yolov3-tiny.weights
- Full weights:
- Run
python ./convert_weights.py
andpython ./convert_weights_pb.py
- Download binary file with desired weights:
- Run
python ./demo.py --input_img <path-to-image> --output_img <name-of-output-image> --frozen_model <path-to-frozen-model>
####Optional Flags
- convert_weights:
--class_names
- Path to the class names file
--weights_file
- Path to the desired weights file
--data_format
NCHW
(gpu only) orNHWC
--tiny
- Use yolov3-tiny
--ckpt_file
- Output checkpoint file
- convert_weights_pb.py:
--class_names
1. Path to the class names file--weights_file
- Path to the desired weights file
--data_format
NCHW
(gpu only) orNHWC
--tiny
- Use yolov3-tiny
--output_graph
- Location to write the output .pb graph to
- demo.py
--class_names
- Path to the class names file
--weights_file
- Path to the desired weights file
--data_format
NCHW
(gpu only) orNHWC
--ckpt_file
- Path to the checkpoint file
--frozen_model
- Path to the frozen model
--conf_threshold
- Desired confidence threshold
--iou_threshold
- Desired iou threshold
--gpu_memory_fraction
- Fraction of gpu memory to work with