YOLOv3 implementation in TensorFlow 2.x
Project description
YOLOv3-TF
YOLOv3 implementation in TensorFlow 2.x
Installation
pip install yolov3-tf
Depends on tensorflow >=2.3.0 <=2.9.1
Usage
The package consists of three core modules -
- dataset
- models
- utils
Dataset
The dataset.py
module is for loading and transforming the tfrecords for object detection. The examples in the input tfrecords must match the parsing schema.
import yolov3_tf.dataset as dataset
train_dataset = dataset.load_tfrecord_dataset(tfrecords_path)
train_dataset = train_dataset.batch(batch_size)
train_dataset = train_dataset.map(
lambda x, y: (
dataset.transform_images(x, image_dim),
dataset.transform_targets(y, anchors, anchor_masks, image_dim),
)
)
Models
The models.py
module consists of implementation of two YOLOv3 and YOLOv3 tiny in Tesnsorflow.
from yolov3_tf.models import YoloV3, YoloV3Tiny
model = YoloV3(image_dim = 416, training=True, classes=10)
Utils
The utils.py
module provides some common functions for training YOLOv3 model, viz., loading weights, freezing layers, drawing boxes on images, compute iou
# convert weights
from yolov3_tf.models import YoloV3, YoloV3Tiny
from yolov3_tf import utils
yolo = YoloV3()
utils.load_darknet_weights(yolo, weights_path, is_tiny=False)
yolo.save_weights(converted_weights_path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yolov3-tf-0.1.3.tar.gz
.
File metadata
- Download URL: yolov3-tf-0.1.3.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.13 Linux/5.15.0-1017-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae930df56bb3f81f8e1d4749c277a737ced93fe4d69bf824f55abe0d0d3db63 |
|
MD5 | d1c93c63ea4f4f8f800c072cd16acbd6 |
|
BLAKE2b-256 | b5191629d0bf2c96c737de764b6998ddc58ee76c34d4e92ba67799f20eda51ee |
File details
Details for the file yolov3_tf-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: yolov3_tf-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.13 Linux/5.15.0-1017-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 251dcc4aae0174603f8da097b7576be2de62c21ae50ad32f5806e4926234bf5e |
|
MD5 | be55bf269620ebe951801bc8a2565fe4 |
|
BLAKE2b-256 | 715c256496fadadee0529993f7480e715da4f6cb713da1a482a82a28209ed62b |