Last active
June 8, 2018 19:09
-
-
Save maranemil/0886b01126130fcd3a41870e9cd10e9e to your computer and use it in GitHub Desktop.
Object Detection with YoloV3 Darknet ML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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