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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file CVAugmentor-1.0.10.tar.gz.
File metadata
- Download URL: CVAugmentor-1.0.10.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
790ab28aae9892ca6d8510273e9b410d0b4f7a8f139ff2decdb32d476e113524
|
|
| MD5 |
f89f831bcced0c2951bc45d7480afdd7
|
|
| BLAKE2b-256 |
dcd11ab4f2ad1198c36e3ff1e0419e5e8ffc22e1404ab438c9550343671d752f
|
File details
Details for the file CVAugmentor-1.0.10-py3-none-any.whl.
File metadata
- Download URL: CVAugmentor-1.0.10-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfa179a95960e1f673b217fa457c7e7d3a5195d0ed6a52de753a29ad1a050b8e
|
|
| MD5 |
79b8f57a4b61842e7d7cef51fef00f7d
|
|
| BLAKE2b-256 |
4a5acddf45d964e55c8d34efc635bceeb38da37f31a0982b9fa08ddf3fb44bf7
|