学习吴恩达的深度学习第三课缺少yolo.h5文件,花了很长时间来解决这个问题。
看到****上各种需要积分下载的yolo.h5文件,实在看不下去了。
- 从 https://github.com/allanzelener/YAD2K 下载YAD2K 项目
- 打开http://pjreddie.com/media/files/yolo.weights 下载yolo.weights
- 前往 https://github.com/pjreddie/darknet/tree/master/cfg 下载 yolov2.cfg文件,并修改文件名为yolo.cfg。(这步是重点!百度上面很多其他提示地址要么404,要么和yolo.weights版本导致后续操作出现“TypeError: buffer is too small for requested array”错误!)
- 将yolo.weights和 yolo.cfg移动到第一步下载的YAD2K 文件夹内。
- 打开powershell工具,通过CD命令等将powershell的当前地址换成YAD2K 文件夹目录地址
- 然后直接在powershell命令行输入:python yad2k.py yolo.cfg yolo.weights model_data/yolo.h5
- 等待大概20秒钟,yolo.h5文件将生成成功,位置在YAD2K/model_data文件夹内!
参考网址:
(流程)https://github.com/JudasDie/deeplearning.ai/issues/2
(buffer is too small for requested array错误解决办法)https://github.com/allanzelener/YAD2K/issues/9