Metadata-Version: 2.1
Name: CVAugmentor
Version: 1.0.2
Summary: A package for augmenting images and videos for computer vision tasks
Home-page: https://github.com/AliKHaliliT/CVAugmentor
Author: Ali Khalili Tazehkandgheshlagh
Author-email: ali.khalili.t98@gmail.com
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: colorama (==0.4.6)
Requires-Dist: numpy (==1.24.3)
Requires-Dist: opencv-python (==4.6.0.66)
Requires-Dist: Pillow (==9.0.1)
Requires-Dist: tqdm (==4.64.0)

# 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:
```bash
pip install CVAugmentor
```
## Usage
For a detailed usage guide, please refer to the [documentation](https://alikhalilit.github.io/CVAugmentor/).
### Single Image Augmentation
```python
# 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", type="single", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)
```
### Single Video Augmentation
```python
# 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", type="single", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)
```
### Augmenting Multiple Images
```python
# 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", type="batch", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)
```
### Augmenting Multiple Videos
```python
# 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", type="batch", mode="singular", augmentations=augmentations, verbose=True, warn_verbose=True)
```
## License
This work is licensed under an [MIT](https://choosealicense.com/licenses/mit/) License.
