qqwweee / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend)
MIT License
7.14k stars 3.44k forks source link

Tiny Yolo v3 model #152

Open karanmartian opened 6 years ago

karanmartian commented 6 years ago

Hi,

How do you go about creating the Keras model for tiny yolo v3?

RaphaelMeudec commented 6 years ago

Follow the same step as in the README.md but with yolov3-tiny architecture:

wget https://pjreddie.com/media/files/yolov3-tiny.weights
python convert.py yolov3-tiny.cfg yolov3-tiny.weights model_data/yolo.h5
python yolo.py   OR   python yolo_video.py [video_path] [output_path(optional)]
ambr89 commented 6 years ago

Hi, I've a problem when I convert my.weights, My config is set with width and height to 104, but convert.py transform my model to 416x416 input.

Any idea to use 104x104?

abhijithnraj commented 5 years ago

AssertionError: Mismatch between model and given anchor and class sizes

First of all I converted the weights and configs and created the .h5 file as above

python3 convert.py yolov3-tiny.cfg yolov3-tiny.weights model_data/yolo.h5

I encountered the following error when running python3 yolo_video.py --image AssertionError: Mismatch between model and given anchor and class sizes I downloaded the weights from https://pjreddie.com/media/files/yolov3-tiny.weights I tried changing the class files to both coco and voc but still get the same error.

datduonguva commented 5 years ago

The problem is that "--image" flag will disable all positional parameters, and hence, the yolo.py reads the full model, not the tiny model. This is the root of the issue.