Skip to main content

A package for augmenting images and videos for computer vision tasks

Project description

CVAugmentor

Introduction

This is a simple tool to augment images and videos for computer vision tasks.

Available augmentations are: no_augmentation, flip, zoom, rotate, shear, grayscale, hue, saturation, brightness, exposure, blur, noise, cutout, negative.

Installation

You can install the package using pip:

pip install CVAugmentor

Usage

For a detailed usage guide, please refer to the documentation.

Single Image Augmentation

# Importing the libraries
from CVAugmentor import Augmentations as aug
from CVAugmentor import Pipeline


# Define the augmentations
augmentations = {
    "zoom": aug.zoom(),
    "flip": aug.flip(),
}

# Create a Pipeline object
p = Pipeline()

# Augment the image
p.augment(input_path="path/to/input_image", output_path="path/to/output_image", target="image", process_type="single", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)

Single Video Augmentation

# Importing the libraries
from CVAugmentor import Augmentations as aug
from CVAugmentor import Pipeline


# Define the augmentations
augmentations = {
    "zoom": aug.zoom(),
    "flip": aug.flip(),
}

# Create a Pipeline object
p = Pipeline()

# Augment the video
p.augment(input_path="path/to/input_video", output_path="path/to/output_video", target="video", process_type="single", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)

Augmenting Multiple Images

# Importing the libraries
from CVAugmentor import Augmentations as aug
from CVAugmentor import Pipeline


# Define the augmentations
augmentations = {
    "zoom": aug.zoom(),
    "flip": aug.flip(),
}

# Create a Pipeline object
p = Pipeline()

# Augment the images
p.augment(input_path="path/to/input_images", output_path="path/to/output_images", target="image", process_type="batch", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)

Augmenting Multiple Videos

# Importing the libraries
from CVAugmentor import Augmentations as aug
from CVAugmentor import Pipeline


# Define the augmentations
augmentations = {
    "zoom": aug.zoom(),
    "flip": aug.flip(),
}

# Create a Pipeline object
p = Pipeline()

# Augment the videos
p.augment(input_path="path/to/input_videos", output_path="path/to/output_videos", target="video", process_type="batch", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)

License

This work is licensed under an MIT License.

Project details


Download files

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

Source Distribution

CVAugmentor-1.0.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

CVAugmentor-1.0.4-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file CVAugmentor-1.0.4.tar.gz.

File metadata

  • Download URL: CVAugmentor-1.0.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for CVAugmentor-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d8c94227ffc730ca51e487c836335a4e2b905fc78c3437a44e2ca83e0abd0c87
MD5 498c805519c1d048d7dd53a3f15a2472
BLAKE2b-256 e71f699bb923eec5bb9323a5aba057359689c00f2794c6e61e53f57b4065bd12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: CVAugmentor-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for CVAugmentor-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 345bd255cca899276df055f788d2000f9697ac155f24f91a1d9f39e6fb194596
MD5 2f1aa3af0b17af8b462982311b9649b4
BLAKE2b-256 f3a33166554f28b9cce46adad3391b810c52b4f244ecafa7afe47dbd83a200a1

See more details on using hashes here.

Supported by

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