硬件环境:win10系统 Anaconda 1050Ti
软件环境:tensorflow-gpu=1.11.0 keras-gpu=2.2.4 pillow matplotlib
项目地址:https://github.com/qqwweee/keras-yolo3
一. 环境配置
可参见上一篇复现mask rcnn的博客https://blog.csdn.net/hesongzefairy/article/details/104702119 基本方法相同
二. 权重文件下载
官方的下载地址:https://pjreddie.com/media/files/yolov3.weights
但是官方下载的weights并不适用keras版的,要经过一行代码转换成h5文件
注意h5文件需要放在model_data文件夹下
python convert.py yolov3.cfg yolov3.weights model_data/yolov3.h5
三.运行demo(单帧检测)
python yolo_video.py --image #官方提示--image参数进入单帧检测模式 否则是video模式
会提示输入图片名称,这里我输入33.jpg
检测结果为: