tf2-yolov4

A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection

Showing:

Popularity

Downloads/wk

0

GitHub Stars

175

Maintenance

Last Commit

5mos ago

Contributors

5

Package

Dependencies

5

License

MIT

Categories

Readme

YOLOv4

A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection

Pypi Version Python Versions Tensorflow Versions Code style: black Python package Open In Colab

This implementation runs (for now) inference with the original Darknet weights from AlexeyAB. See the roadmap section to see what's next.

Installation

To install this package, you can run:

pip install tf2_yolov4
pip install tensorflow
# Check that tf2_yolov4 is installed properly
python -c "from tf2_yolov4.model import YOLOv4; print(YOLOv4)"

Requirements:

  • MacOs >= 10.15 since tensorflow-addons is not available for older release of MacOs
  • Python >= 3.6
  • Compatible versions between TensorFlow and TensorFlow Addons: check the compatibility matrix

Examples in Colab

Pretrained weights

Our YOLOv4 implementation supports the weights argument similarly to Keras applications. To load a model with pretrained weights, you can simply call:

# Loads Darknet weights trained on COCO
model = YOLOv4(
    input_shape,
    num_classes,
    anchors,
    weights="darknet",
)

If weights are available locally, they will be used. Otherwise, they will be automatically downloaded.

Roadmap

  • Inference
    • CSPDarknet53 backbone with Mish activations
    • SPP Neck
    • YOLOv3 Head
    • Load Darknet Weights
    • Image loading and preprocessing
    • YOLOv3 box postprocessing
    • Handling non-square images
  • Training
    • Training loop with YOLOv3 loss
    • CIoU loss
    • Cross mini-Batch Normalization
    • Self-adversarial Training
    • Mosaic Data Augmentation
    • DropBlock
  • Enhancements
    • Automatic download of pretrained weights (like Keras applications)

References

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100