YOLOv4, YOLOv3, YOLO-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
PythonMIT
tensorflow-yolov4-tflite
YOLOv4 Implemented in Tensorflow 2.0.
Convert YOLO v4, YOLOv3, YOLO tiny .weights to .pb, .tflite and trt format for tensorflow, tensorflow lite, tensorRT.
# run script in /script/get_coco_dataset_2017.sh to download COCO 2017 Dataset# preprocess coco datasetcd data
mkdir dataset
cd ..
cd scripts
python coco_convert.py --input ./coco/annotations/instances_val2017.json --output val2017.pkl
python coco_annotation.py --coco_path ./coco
cd ..
# evaluate yolov4 model
python evaluate.py --weights ./data/yolov4.weights
cd mAP/extra
python remove_space.py
cd ..
python main.py --output results_yolov4_tf
# Prepare your dataset# If you want to train from scratch:
In config.py set FISRT_STAGE_EPOCHS=0
# Run script:
python train.py
# Transfer learning:
python train.py --weights ./data/yolov4.weights
The training performance is not fully reproduced yet, so I recommended to use Alex's Darknet to train your own data, then convert the .weights to tensorflow or tflite.
TODO
Convert YOLOv4 to TensorRT
YOLOv4 tflite on android
YOLOv4 tflite on ios
Training code
Update scale xy
ciou
Mosaic data augmentation
Mish activation
yolov4 tflite version
yolov4 in8 tflite version for mobile
References
YOLOv4: Optimal Speed and Accuracy of Object Detection YOLOv4.