硬件環境: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
檢測結果爲: