Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Object Detection with YoloV3 Darknet ML
# Install Yolo Package
git clone https://github.com/pjreddie/darknet.git
cd darknet
make
# Download weights files
wget https://pjreddie.com/media/files/yolov3.weights
wget https://pjreddie.com/media/files/yolo.weights
wget https://pjreddie.com/media/files/yolov2.weights
wget https://pjreddie.com/media/files/yolo-tiny.weights
# Run script Using A Pre-Trained Model
./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg -out prediction
./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg
# batch more pictures
for f in jpg2/*.jpg; do time ./darknet detect cfg/yolov2.cfg yolov2.weights "$f" -thresh 0.15 -out "$f"_out; done
# Speed up detecton by editing yolov2.cfg - 1280x720 px - from 15 sec to 5 sec downtime
[net]
# Testing
batch=1
subdivisions=1
# Training
# batch=64
# subdivisions=8
width=156
height=156
channels=3
momentum=0.9
decay=0.0009
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001
burn_in=1000
max_batches = 50020
policy=steps
steps=40000,45000
scales=.1,.1
# change labels in files if needed
data/voc.names
data/coco.names
#scripts/voc_label.py
#examples/coco.c
#examples/cifar.c
#examples/yolo.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.