图像课作业车辆检测,先跑了一下yolo3体验一下
1. 下载
代码:
git clone https://github.com/qqwweee/keras-yolo3.git
训练好的权值文件:
https://pjreddie.com/darknet/yolov2/
2.生成h5文件
yolov3.weights权值文件tf不识别,需要进行转化:
(1)cd到对应weight文件目录下
(2)转化:
python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
3.运行
使用python yolo_video.py --image运行,识别图片,然后键入路径文件名开始识别
结果:
再测一个车辆和行人的:
视频的话是python yolo_vedio --input name.mp4
(网上 都是说直接python yolo.py,但是yolo.py下没有main函数,应该不能运行才是)