/keras-YOLOv3-mobilenet

I transfer the backend of yolov3 into Mobilenetv1,VGG16,ResNet101 and ResNeXt101

Primary LanguagePythonMIT LicenseMIT

keras-yolo3-Mobilenet

Cloned from Adamdad. See original repo for full doc.

I created yolo_image.py and modified yolo.py a bit so that images can be batch-processed and the results are stored as a jpg file with boxes plus a json file with coordinates and other textual information. See YOLO 自動框出相片裡的人/動物/生活用品 for details. That post refers to my clone of the original yolo, but the .py modifications are pretty much copied directly to this repo.

Quick Start

Preparation:

  1. Clone this repo into $HOME/git/ as $HOME/git/keras-YOLOv3-mobilenet/
  2. Create $HOME/pictures/ and put .jpg files in it.
  3. Create an empty $HOME/models/ for storing downloaded and converted models.
  4. Create an empty $HOME/result/ for storing results.
  5. Start the keras docker: docker run --name keras -it -v $HOME:/srv gw000/keras:2.1.4-py3-tf-cpu bash

Then inside the docker:

pip3 install Pillow matplotlib opencv-python

cd /srv/git/keras-YOLOv3-mobilenet/
wget https://pjreddie.com/media/files/yolov3.weights -O ../models/yolov3.weights
python3 convert.py yolov3.cfg ../../models/yolov3.weights ../../models/yolo.h5
time python3 yolo_image.py --model_path ../../models/yolo.h5 --outdir ../../result/ ../../pictures/*.jpg