Skip to main content

YOLOv4

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

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 https://github.com/sicara/tf2-yolov4/archive/master.zip
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

To load the Darknet weights trained on COCO, you have to:

  • get the weights (yolov4.weights) from AlexeyAB/darknet
  • run convert-darknet-weights PATH_TO/yolov4.weights

TF weights should be saved as yolov4.h5. For more information about the conversion script, run convert-darknet-weights --help.

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

Metadata

Release files for tf2-yolov4 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tf2-yolov4 0.1.0
File Size Uploaded
tf2_yolov4-0.1.0.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tf2-yolov4 0.1.0
File Interpreter ABI Platform
tf2_yolov4-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / tf2_yolov4-0.1.0.tar.gz

Download URL tf2_yolov4-0.1.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
579163e701be53f167e6292693c3661462329d6bad3d2ac3ad638ca1634c69ed
BLAKE2b-256 checksum
How to use checksums
794ba1d7891577c3065ad000952df7ddec97c8cf8199610c4ce37461f946cd1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Release files / tf2_yolov4-0.1.0-py3-none-any.whl

Download URL tf2_yolov4-0.1.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
377cdbc7f67c4ac581c07af336303b663c52594ecac185a0fffc44efdf229474
BLAKE2b-256 checksum
How to use checksums
6a6124a0aed949afc7715b767160abc241c7cd9e7ae9c34e4f8b42c1d6924e63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page