yolo.h5生成方法
第一步
git clone https://github.com/allanzelener/yad2k.git
cd yad2k
第二步
方法一 复制 conda environment:
conda env create -f environment.yml
source activate yad2k
方法二 安装python包
pip install numpy h5py pillow
pip install tensorflow-gpu # CPU-only: conda install -c conda-forge tensorflow
pip install keras # Possibly older release: conda install keras
第三步
下载cfg和weights http://pjreddie.com/darknet/yolo/
我下的是YOLOv2 608x608
cfg:https://github.com/pjreddie/darknet/blob/master/cfg/yolov2.cfg
weights:https://pjreddie.com/media/files/yolov2.weights
放到 yad2k 目录下
./yad2k.py yolo.cfg yolo.weights model_data/yolo.h5
./test_yolo.py model_data/yolo.h5 # output in images/out/
转自:https://github.com/allanzelener/YAD2K/blob/master/README.md
觉得麻烦的可以直接下载我做好的 yolo.h5