Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
UNAGI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
venkata kolagotla
UNAGI
Commits
90a39725
Commit
90a39725
authored
1 year ago
by
venkata kolagotla
Browse files
Options
Downloads
Patches
Plain Diff
Add new test to check invert method
parent
99b31642
No related branches found
No related tags found
1 merge request
!9
Add CLI entry point to unagi pkg
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/utils/augmentor_utils_test.py
+18
-0
18 additions, 0 deletions
tests/utils/augmentor_utils_test.py
with
18 additions
and
0 deletions
tests/utils/augmentor_utils_test.py
0 → 100644
+
18
−
0
View file @
90a39725
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment