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.
Metadata
Release files for cvaugmentor 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| CVAugmentor-1.0.6.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| CVAugmentor-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.5 kB
Release files / CVAugmentor-1.0.6.tar.gz
| Download URL | CVAugmentor-1.0.6.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
910a120838a96d65ca3318f89cdca476a7fb3d30d141815eb4246766b4d11128
|
|
BLAKE2b-256 checksum How to use checksums |
a3733e515e7bae40623be4f53734ddd62b20a109f37cd39c9e6a3c45ebb6b037
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / CVAugmentor-1.0.6-py3-none-any.whl
| Download URL | CVAugmentor-1.0.6-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4c011316547733dd0a635af9b750a6e343d580143445f209240787e3cb913c3
|
|
BLAKE2b-256 checksum How to use checksums |
38c346d0ec1b6fc4261fdaa052bcb7fb7d58126f14ccd26d543def2d88cd3849
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|