python3 -m pip install yolov4
YOLOv4 Implemented in Tensorflow 2.
- yolov4-tiny.conv.29
- yolov4-tiny.weights
- yolov4-tiny-relu.weigths(incomplete)
- yolov4.conv.137
- yolov4.weights
- coco.names
python3 -m pip install -U pip setuptools wheel
python3 -m pip install numpy
Install OpenCV (cv2)
python3 -m pip install tensorflow
Ref: https://www.tensorflow.org/lite/guide/python
- Train and predict using TensorFlow 2 only
- Run yolov4-tiny-relu on Coral board(TPU).
- Train tiny-relu with coco 2017 dataset
- Update Docs
- Optimize model and operations
>>> from yolov4.tf import YOLOv4
>>> help(YOLOv4)
from yolov4.tf import YOLOv4
yolo = YOLOv4()
yolo.classes = "coco.names"
yolo.make_model()
yolo.load_weights("yolov4.weights", weights_type="yolo")
yolo.inference(media_path="kite.jpg")
yolo.inference(media_path="road.mp4", is_image=False)
Object detection test jupyter notebook
from yolov4.tf import YOLOv4
yolo = YOLOv4(tiny=True)
yolo.classes = "coco.names"
yolo.make_model()
yolo.load_weights("yolov4-tiny.weights", weights_type="yolo")
yolo.inference(media_path="kite.jpg")
yolo.inference(media_path="road.mp4", is_image=False)
from yolov4.tf import YOLOv4
yolo = YOLOv4()
yolo.classes = "coco.names"
yolo.make_model()
yolo.load_weights("yolov4.weights", weights_type="yolo")
yolo.save_as_tflite("yolov4.tflite")
from yolov4.tflite import YOLOv4
yolo = YOLOv4()
yolo.classes = "coco.names"
yolo.load_tflite("yolov4.tflite")
yolo.inference("kite.jpg")
https://wiki.loliot.net/docs/etc/project/yolov4/yolov4-training