A Keras implementation of YOLOv3 (Tensorflow backend) inspired by allanzelener/YAD2K.
- Download YOLOv3 weights from YOLO website.
- Convert the Darknet YOLO model to a Keras model.
- Run YOLO detection.
wget https://pjreddie.com/media/files/yolov3.weights
python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
python yolo.py OR python yolo_video.py
-
Generate your own annotation file and class names file.
One row for one image;
Row format: image_file_path box1 box2 ... boxN;
Box format: x_min,y_min,x_max,y_max,class_id (no space).
For VOC dataset, trypython voc_annotation.py
-
Make sure you have run
python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
A file model_data/yolo_weights.h5 will be generated when you run train.py for the first time.
The file is used to load pretrained weights. -
Modify train.py and start training.
python train.py
You will get the trained model model_data/my_yolo.h5.