Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sicara/tf2-yolov4
A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection
https://github.com/sicara/tf2-yolov4
keras object-detection tensorflow yolo yolov4
Last synced: 28 days ago
JSON representation
A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection
- Host: GitHub
- URL: https://github.com/sicara/tf2-yolov4
- Owner: sicara
- License: mit
- Created: 2020-04-28T07:06:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T15:33:12.000Z (8 months ago)
- Last Synced: 2024-09-28T13:40:55.397Z (about 1 month ago)
- Topics: keras, object-detection, tensorflow, yolo, yolov4
- Language: Python
- Size: 3.26 MB
- Stars: 208
- Watchers: 14
- Forks: 53
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - sicara/tf2-yolov4 - yolov4?style=social"/> : A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection. (Other Versions of YOLO)
- awesome-yolo-object-detection - sicara/tf2-yolov4 - yolov4?style=social"/> : A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection. (Other Versions of YOLO)
README
# YOLOv4
> A TensorFlow 2.0 implementation of YOLOv4: Optimal Speed and Accuracy of Object Detection
[![Pypi Version](https://img.shields.io/pypi/v/tf2-yolov4.svg)](https://pypi.org/project/tf2-yolov4/)
![Python Versions](https://img.shields.io/badge/python-3.6%20|%203.7%20|%203.8-%23EBBD68.svg)
![Tensorflow Versions](https://img.shields.io/badge/TensorFlow-2.x-blue.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Python package](https://github.com/sicara/tf2-yolov4/workflows/Python%20package/badge.svg?branch=master)](https://github.com/sicara/tf2-yolov4/actions?query=workflow%3A%22Python+package%22)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sicara/tf2-yolov4/blob/master/notebooks/YoloV4_Dectection_Example.ipynb)This implementation runs (for now) inference with the original Darknet weights from [AlexeyAB](https://www.github.com/AlexeyAB/darknet).
See the roadmap section to see what's next.
## Installation
To install this package, you can run:
```bash
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](https://github.com/tensorflow/addons#python-op-compatibility-matrix)## Examples in Colab
- [Run detection on a single image](./notebooks/YoloV4_Dectection_Example.ipynb) / [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sicara/tf2-yolov4/blob/master/notebooks/YoloV4_Dectection_Example.ipynb)
## Pretrained weights
Our YOLOv4 implementation supports the `weights` argument similarly to Keras applications. To load a model with pretrained
weights, you can simply call:```python
# 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
- [x] Inference
- [x] CSPDarknet53 backbone with Mish activations
- [x] SPP Neck
- [x] YOLOv3 Head
- [x] Load Darknet Weights
- [x] Image loading and preprocessing
- [x] YOLOv3 box postprocessing
- [x] Handling non-square images
- [ ] Training
- [ ] Training loop with YOLOv3 loss
- [ ] CIoU loss
- [ ] Cross mini-Batch Normalization
- [ ] Self-adversarial Training
- [ ] Mosaic Data Augmentation
- [ ] DropBlock
- [ ] Enhancements
- [x] Automatic download of pretrained weights (like Keras applications)## References
- [yolov3-tf2](https://github.com/zzh8829/yolov3-tf2)