yolov3系列(一)-keras-yolo3环境搭建

yoloV3主页:

https://pjreddie.com/darknet/yolo/

keras-yolo3代码:

https://github.com/qqwweee/keras-yolo3.git

VOC数据集

http://host.robots.ox.ac.uk/pascal/VOC/

环境需求

  • tensorflow-gpu1.4.0
  • keras2.1.3
  • python3.6.0

demo

  • 下载代码
    https://github.com/qqwweee/keras-yolo3.git
  • 下载 yoloV3 权重文件
    https://pjreddie.com/media/files/yolov3.weights
  • 权重下载太慢的话可以到下面的连接下载
链接:https://pan.baidu.com/s/1HqSZPEC5OiBhFB4I060TUg 
提取码:b99w
  • 将darknet下的yolov3配置文件转换成keras适用的h5文件
    python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5

运行预测图像程序

  • 运行预测图像
    python yolo_video.py --image
  • 运行预测视频
    # python yolo_video.py --input <input video file> --output <output video file>
    python yolo_video.py --input d:\ai\test.mp4 --output d:\ai\test_success.mp4
  • 调用预测本地摄像头
    yolo.py 中大致175行 把 vid = cv2.VideoCapture(video_path) 修改为 vid = cv2.VideoCapture(0)
    然后运行python yolo_video.py
  • 调用远程 rtmp/rtsp 流进行预测
    yolo.py 中大致175行 把 vid = cv2.VideoCapture(video_path) 修改为 vid = cv2.VideoCapture('rtmp://58.200.131.2:1935/livetv/hunantv')
    然后运行python yolo_video.py

猜你喜欢

转载自blog.csdn.net/qq122716072/article/details/103715467
今日推荐