- download base
git clone https://github.com/pjreddie/darknet
cd darknet
wget https://pjreddie.com/media/files/yolov3.weights
- change the first line of Makefile
GPU = 1
- make
make
- then test
./darknet -nogpu detect cfg/yolov3.cfg yolov3.weights data/dog.jpg
./darknet -i 1 detect cfg/yolov3.cfg yolov3.weights data/dog.jpg
-
change src/image.c & image.h
-
make
make clean & make
Core Module: DarknetTest
from DarknetTest import Detector
image = '' # (image path or ndarray)
yolov3 = Detector(gpu=1,
cfg="/darknet/cfg/yolov3.cfg",
weights="/darknet/yolov3.weights",
data="/darknet/cfg/coco.data")
result, width_height = yolov3.detect_result(image)