GithubHelp home page GithubHelp logo

sicara / tf2-yolov4 Goto Github PK

View Code? Open in Web Editor NEW
211.0 14.0 53.0 3.34 MB

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

License: MIT License

Python 99.99% Makefile 0.01%
tensorflow keras object-detection yolo yolov4

tf2-yolov4's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.