Skip to content
Snippets Groups Projects
Commit 90a39725 authored by venkata kolagotla's avatar venkata kolagotla :alien:
Browse files

Add new test to check invert method

parent 99b31642
No related branches found
No related tags found
1 merge request!9Add CLI entry point to unagi pkg
import cv2
import numpy as np
from unagi.utils.augmentor_utils import InvertPartAugmentor
def test_invert(bin_img_path):
"""Test the __invert__ method of InvertPartAugmentor"""
probability = 0.5 # probability of operation being performed
augmentor = InvertPartAugmentor(probability)
img = img = cv2.imread(bin_img_path, cv2.IMREAD_GRAYSCALE)
inverted_img = augmentor.__invert__(img)
inverted_img_np = np.array(inverted_img)
assert inverted_img_np is not None
assert inverted_img_np.shape == img.shape
assert inverted_img_np.dtype == img.dtype
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment