Skip to main content

tf-yolov4

PyPI version Upload Python Package

YOLOv4 implementation with Tensorflow 2.

Install

pip instal tf-yolov4

Example

Prediction

import numpy as np
import PIL.Image
import yolov4

# Default: num_classes=80
yo = yolov4.YOLOv4(num_classes=80)

# Default: weights_path=None
# num_classes=80 and weights_path=None: Pre-trained COCO model will be loaded.
# num_classes!=80 and weights_path=None: Pre-trained backbone and SPP model will be loaded.
# Otherwise: User-defined weight file will be loaded.
yo.load_weights(weights_path=None)

img = np.array(PIL.Image.open('./data/sf.jpg'))

# The image with predicted bounding-boxes is created if `debug=True`
boxes, classes, scores = yo.predict(img, debug=True)

output

Load Darknet weight

import yolov4

yo = yolov4.YOLOv4(num_classes=10)
yo.load_darknet_weights('/path/to/darknet_weight')

TODO

  • Prediction
  • Load Darknet weight file
  • Pre-trained model
  • Basic training function and Loss definition
  • Label-smoothed BCE loss
  • c-IoU loss
  • Training data augmentation

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf-yolov4-1.0.4.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tf_yolov4-1.0.4-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file tf-yolov4-1.0.4.tar.gz.

File metadata

  • Download URL: tf-yolov4-1.0.4.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for tf-yolov4-1.0.4.tar.gz
Algorithm Hash digest
SHA256 35d8035bc04349e65dff83d2208ebc2e7c5f26594a829fce8cd01995c68fbbcf
MD5 43ab873434b5ea731a9e6a6ffdaf2e21
BLAKE2b-256 157fd435462b8c54a26afc7e720d50886c48eb761487e1cadd36a2983061aebf

See more details on using hashes here.

File details

Details for the file tf_yolov4-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: tf_yolov4-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for tf_yolov4-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b0694fa134429e3b06e74bdff244b8d82ba9716a11fed71e6436c6a677a24036
MD5 01010386f53a47ab938af0a8e4d2d1c4
BLAKE2b-256 13067497758c412029d6f67b12beda3437259316fc1a11780705bafdbca7d771

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 files

1.0.2

2 files

1.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page