Add support for new augmentations in rocAL - Group 5#442
Merged
Conversation
Change copyright Add unit tests for NonLinearBlend, Gaussian and Median filters
Dilate Erode Magnitude Phase
Remove per-iter updation of perspective array Add unit test for WarpPerspective
Remove ThresholdFixed Modify params to accept vector
Reorganize unit tests
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds rocAL support for several new RPP augmentations (ChannelPermute, ColorToGreyscale, JpegCompressionDistortion, Lut, Posterize, Solarize) and extends both C++ and Python APIs, along with updating test scripts and image comparison logic.
Changes:
- Added new C++ augmentation node implementations and exposed them via the rocAL C API.
- Extended Python bindings (pybind +
amd/rocal/fn.py) to expose the new augmentations. - Updated Python/C++ test runners and pixel comparison to cover/handle new augmentations and output formats.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/python_api/unit_tests.sh | Adds Python API unit-test invocations for new augmentations |
| tests/python_api/unit_test.py | Adds augmentation dispatch for new ops; improves image layout inference for visualization |
| tests/python_api/image_comparison.py | Improves color/grayscale detection; relaxes mismatch rules for stochastic/new ops |
| tests/cpp_api/unit_tests/unit_tests.cpp | Adds new C++ test cases and improves output color-format handling for saving |
| tests/cpp_api/unit_tests/testAllScripts.sh | Adds new C++ test runs for the new augmentation cases |
| tests/cpp_api/unit_tests/pixel_comparison/image_comparison.py | Updates randomized augmentation handling and mismatch relaxations |
| rocAL_pybind/rocal_pybind.cpp | Exposes new augmentations via pybind module defs |
| rocAL_pybind/amd/rocal/fn.py | Adds Python fn.* wrappers for new augmentations |
| rocAL/source/augmentations/effects_augmentations/node_water.cpp | Implements Water node using vxExtRppWater |
| rocAL/source/augmentations/effects_augmentations/node_spatter.cpp | Implements Spatter node using vxExtRppSpatter |
| rocAL/source/augmentations/effects_augmentations/node_solarize.cpp | Implements Solarize node using vxExtRppSolarize |
| rocAL/source/augmentations/effects_augmentations/node_shot_noise.cpp | Implements ShotNoise node using vxExtRppShotNoise |
| rocAL/source/augmentations/effects_augmentations/node_posterize.cpp | Implements Posterize node using vxExtRppPosterize |
| rocAL/source/augmentations/effects_augmentations/node_lut.cpp | Implements LUT node and internal LUT tensor creation |
| rocAL/source/augmentations/effects_augmentations/node_jpeg_compression_distortion.cpp | Implements JPEG compression distortion node |
| rocAL/source/augmentations/effects_augmentations/node_gaussian_noise.cpp | Implements GaussianNoise node using vxExtRppGaussianNoise |
| rocAL/source/augmentations/color_augmentations/node_color_to_greyscale.cpp | Implements ColorToGreyscale node using vxExtRppColorToGreyscale |
| rocAL/source/augmentations/color_augmentations/node_color_jitter.cpp | Implements ColorJitter node using vxExtRppColorJitter |
| rocAL/source/augmentations/color_augmentations/node_channel_permute.cpp | Implements ChannelPermute node using vxExtRppChannelPermute |
| rocAL/source/augmentations/arithmetic_augmentations/node_log.cpp | Implements Log node using vxExtRppLog |
| rocAL/source/api/rocal_api_augmentation.cpp | Adds C API entry points for the new ops and wires them to nodes |
| rocAL/include/augmentations/effects_augmentations/node_water.h | Declares WaterNode and parameter ranges |
| rocAL/include/augmentations/effects_augmentations/node_spatter.h | Declares SpatterNode and parameters |
| rocAL/include/augmentations/effects_augmentations/node_solarize.h | Declares SolarizeNode and threshold range |
| rocAL/include/augmentations/effects_augmentations/node_shot_noise.h | Declares ShotNoiseNode and noise-factor range |
| rocAL/include/augmentations/effects_augmentations/node_posterize.h | Declares PosterizeNode and level-bits range |
| rocAL/include/augmentations/effects_augmentations/node_lut.h | Declares LutNode and LUT tensor/buffer members |
| rocAL/include/augmentations/effects_augmentations/node_jpeg_compression_distortion.h | Declares JpegCompressionDistortionNode and quality range |
| rocAL/include/augmentations/effects_augmentations/node_gaussian_noise.h | Declares GaussianNoiseNode and mean/stddev ranges |
| rocAL/include/augmentations/color_augmentations/node_color_to_greyscale.h | Declares ColorToGreyscaleNode and SubpixelLayout enum |
| rocAL/include/augmentations/color_augmentations/node_color_jitter.h | Declares ColorJitterNode and parameter ranges |
| rocAL/include/augmentations/color_augmentations/node_channel_permute.h | Declares ChannelPermuteNode and permutation array member |
| rocAL/include/augmentations/augmentations_nodes.h | Adds includes for new node headers |
| rocAL/include/augmentations/arithmetic_augmentations/node_log.h | Declares LogNode |
| rocAL/include/api/rocal_api_augmentation.h | Declares new public C APIs and docstrings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@SundarRajan28 please take a look at the copilot comets. Some of them can be implemented |
LakshmiKumar23
previously approved these changes
Feb 12, 2026
Contributor
Contributor
|
@LakshmiKumar23 The precheckin CI is passing |
LakshmiKumar23
approved these changes
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Integrates new RPP augmentations in rocAL:
Corresponding MIVisionX PR - #1602
Technical Details
Test Plan
Test Result
Submission Checklist