地址
https://github.com/theAIGuysCode/tensorflow-yolov4-tflite
配置环境
name: yolov4-gpu
dependencies:
- python==3.7
- pip
- matplotlib
- opencv
- cudnn
- cudatoolkit==10.1.243
- pip:
- tensorflow-gpu==2.3.0rc0
- opencv-python==4.1.1.26
- lxml
- tqdm
- absl-py
- easydict
- pillow
我的tensorflow-gpu2.4.1 ,cuda10.0 能够正常使用。
下载weights文件
https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights
生成模型
python save_model.py --weights ./model/yolov4-tiny.weights --tiny true --output ./checkpoints/yolov4.tf --input_size 416 --model yolov4
进行预测
python detect.py --weights ./checkpoints/yolov4.tf --size 416 --model yolov4 --images kite.jpg --framework trt