Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
7c82b82
Add support for ColorCast
fiona-gladwin Oct 17, 2025
bb5fd27
Add support for grid mask augmentation
fiona-gladwin Oct 22, 2025
c6365d4
Add NonLinearBlend support in rocAL
fiona-gladwin Oct 22, 2025
967555d
Add support for the Median Filter and Gaussian filter
fiona-gladwin Oct 23, 2025
78b6473
Fix kernel size data type for Gaussian and Median Filters
fiona-gladwin Nov 17, 2025
4d6c220
Add support for Warp perspective augmentation
fiona-gladwin Oct 23, 2025
6e778eb
Add support for Threshold augmentation and API
fiona-gladwin Oct 24, 2025
11f92ef
Add rocAL support for new augmentations
fiona-gladwin Oct 27, 2025
0e1ac07
Fix unit tests
fiona-gladwin Oct 27, 2025
64b2f53
Modify copyright
fiona-gladwin Oct 27, 2025
c54d408
Warp Perspective fixes
fiona-gladwin Oct 28, 2025
2377b2b
Fix Threshold augmentation
fiona-gladwin Oct 29, 2025
53b7d37
Change kernel size to unsigned for Dilate and Erode
fiona-gladwin Oct 29, 2025
925eabf
Add support for erase augmentation in rocAL
fiona-gladwin Oct 26, 2025
775a462
Erase node with vector inputs
fiona-gladwin Nov 13, 2025
c49908b
Fix erase augmentation
fiona-gladwin Nov 14, 2025
739b0a0
Change num boxes to vx_tensor type
fiona-gladwin Nov 14, 2025
51fe74c
Clean up erase augmentation codes
fiona-gladwin Nov 14, 2025
1aa135a
Add support for Crop and Patch augmentation
fiona-gladwin Nov 4, 2025
cbf16f6
Add support for remap augmentation
fiona-gladwin Nov 4, 2025
cc0897e
Add unit trsts and python bindings for remap
fiona-gladwin Nov 4, 2025
58a8db4
Add support for RICAP
fiona-gladwin Nov 4, 2025
2e71384
Add support for Bitwise NOT operation
fiona-gladwin Nov 5, 2025
199d37a
Add support for Bitwise NOT
fiona-gladwin Nov 11, 2025
557f137
Reorganize code
fiona-gladwin Nov 19, 2025
87fff6b
Minor fix stddev for Non-linear blend
fiona-gladwin Nov 19, 2025
741451f
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Nov 21, 2025
c3e8697
Add python support for newly added kernels
fiona-gladwin Nov 21, 2025
5f837c9
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Nov 21, 2025
6f81f41
Minor changes
fiona-gladwin Nov 21, 2025
b43260f
Fix build issues
fiona-gladwin Nov 21, 2025
41638f4
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Nov 21, 2025
f99bb78
Minor change
fiona-gladwin Nov 21, 2025
bc87cf8
Fix issues with Remap
fiona-gladwin Nov 24, 2025
913167a
Add new test cases
fiona-gladwin Dec 2, 2025
ce396d0
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Dec 2, 2025
982efeb
Fix params for Golden outputs
fiona-gladwin Dec 4, 2025
a51f20f
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Dec 4, 2025
ac10574
Fix the color ptr type in erase
fiona-gladwin Dec 5, 2025
6f4a6f5
Fix Erase color tensor
fiona-gladwin Dec 5, 2025
b0b47ba
Add test cases for new augmentations
fiona-gladwin Dec 5, 2025
32af90c
Add NonLinearBlend test cases
fiona-gladwin Dec 12, 2025
d4e74ed
Update rocAL/include/api/rocal_api_augmentation.h
fgladwin Dec 12, 2025
399b450
Resolve PR comments
fiona-gladwin Dec 12, 2025
60db636
Add suitable python test cases and remove unwanted ones
fiona-gladwin Dec 12, 2025
a791e9b
Minor changes
fiona-gladwin Dec 12, 2025
404acc2
Resolve copilot comment
SundarRajan98 Dec 12, 2025
fad7448
Resolve copilot comment
SundarRajan98 Dec 12, 2025
4254540
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Dec 12, 2025
156da07
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Dec 15, 2025
0a44fdf
Minor changes
fiona-gladwin Dec 15, 2025
21c5101
Minor code clean up
fiona-gladwin Dec 16, 2025
297a476
Add test cases for Dilate, erode, magnitude, phase and warp perspective
fiona-gladwin Dec 16, 2025
10583ad
Minor fixes threshold
fiona-gladwin Dec 16, 2025
1723675
Resolve copilot comments
fiona-gladwin Dec 16, 2025
a487fd5
Fix threshold pybind
fiona-gladwin Dec 16, 2025
d515f99
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Dec 17, 2025
90e2aeb
Fix RICAP augmentation, create pinned memory for permutation
fiona-gladwin Dec 17, 2025
423888c
Minor change
fiona-gladwin Dec 17, 2025
42959f4
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Dec 17, 2025
5425302
Minor changes
fiona-gladwin Dec 17, 2025
3212a9e
Create a vx_tensor of UINT8 type for RGB array
fiona-gladwin Dec 19, 2025
e2036aa
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Dec 22, 2025
a54ffbe
Add python support for the new augmentations
fiona-gladwin Dec 23, 2025
a0657a2
Minor change
fiona-gladwin Dec 23, 2025
78a3afd
Add VX_RPP version check for new augmentations
fiona-gladwin Dec 23, 2025
233532d
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Dec 23, 2025
266a856
Add version check for new augmentations
fiona-gladwin Dec 23, 2025
ca8670e
Fix version check in THROW statements
fiona-gladwin Dec 23, 2025
c1946ef
Add version check for new augmentations
fiona-gladwin Dec 23, 2025
7060d28
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Dec 23, 2025
635e3ba
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Jan 6, 2026
4e49d8f
Minor changes - resolve review comments
fiona-gladwin Jan 6, 2026
5567e36
Update python description
fiona-gladwin Jan 6, 2026
5bd4381
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Jan 6, 2026
1a37f52
Merge branch 'develop' into rocal_vx_rpp_set1
fgladwin Jan 7, 2026
54c78c1
Add border type for gaussian filter
fiona-gladwin Jan 7, 2026
c4cd2a5
Introduce ImageBorderType enum
fiona-gladwin Jan 7, 2026
de22dc2
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Jan 7, 2026
38ee95f
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Jan 7, 2026
c8b21c5
Add rocAL support for Set 1 augmentations: GaussianNoise, ShotNoise, …
SundarRajan28 Jan 8, 2026
60d5be8
Add VX_EXT_RPP version check for Set 1 augmentation APIs
SundarRajan28 Jan 8, 2026
39f8043
Update vx_rpp version checks to 3.1.5 for Set 1 augmentations
SundarRajan28 Jan 8, 2026
c35b3a6
Add C++ and Python tests for Set 1 augmentations
SundarRajan28 Jan 9, 2026
baf5750
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Jan 9, 2026
2a61302
Fix issue with Log
SundarRajan28 Jan 9, 2026
4effbc0
Unit tests fix
SundarRajan28 Jan 9, 2026
e705cf7
Spatter API changes
SundarRajan28 Jan 9, 2026
ae669c8
Merge branch 'develop' into rocal_vx_rpp_set2
fiona-gladwin Jan 9, 2026
e28f0a4
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Jan 9, 2026
fe1657e
Merge branch 'develop' into new_augs_set1
SundarRajan98 Jan 10, 2026
cef421f
Update copyright year to 2026
SundarRajan28 Jan 10, 2026
e774316
Move VX_EXT_RPP_CHECK_VERSION to beginning of API functions
SundarRajan28 Jan 10, 2026
4f54f1c
Merge branch 'develop' into rocal_vx_rpp_set1
LakshmiKumar23 Jan 12, 2026
53ec9be
Merge remote-tracking branch 'ToT/develop' into new_augs_set1
SundarRajan28 Jan 14, 2026
fec01a2
Merge branch 'develop' into rocal_vx_rpp_set1
fiona-gladwin Jan 14, 2026
22eabd1
Merge branch 'rocal_vx_rpp_set1' into rocal_vx_rpp_set2
fiona-gladwin Jan 14, 2026
386a8a2
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Jan 14, 2026
53c8e93
Resolve PR comments
fiona-gladwin Jan 19, 2026
04de48b
Address review comments
fiona-gladwin Jan 19, 2026
a35564f
Merge branch 'develop' into rocal_vx_rpp_set2
fiona-gladwin Jan 20, 2026
439dc27
Merge branch 'rocal_vx_rpp_set2' into rocal_vx_rpp_set3
fiona-gladwin Jan 20, 2026
2604c5d
Address review comments
fiona-gladwin Jan 20, 2026
efba07f
Merge branch 'develop' into rocal_vx_rpp_set3
LakshmiKumar23 Jan 20, 2026
f623110
Merge branch 'develop' into rocal_vx_rpp_set3
fiona-gladwin Jan 21, 2026
b04d807
Address review comments
fiona-gladwin Jan 22, 2026
eacce68
Update copyright
fiona-gladwin Jan 22, 2026
c6d0543
Merge branch 'develop' into rocal_vx_rpp_set3
fiona-gladwin Jan 23, 2026
a9e4a8e
Merge branch 'develop' into rocal_vx_rpp_set3
LakshmiKumar23 Feb 2, 2026
ac11903
Merge branch 'develop' into rocal_vx_rpp_set3
fiona-gladwin Feb 4, 2026
4d0d8b2
Merge remote-tracking branch 'origin/rocal_vx_rpp_set3' into new_augs…
SundarRajan28 Feb 4, 2026
ae53b30
Merge branch 'develop' into new_augs_set1
LakshmiKumar23 Feb 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 210 additions & 0 deletions rocAL/include/api/rocal_api_augmentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,78 @@ extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoiseFixed(RocalContext context, R
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies gaussian noise effect on images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] is_output is the output tensor part of the graph output
* \param [in] mean specifies the mean value for the Gaussian noise distribution
* \param [in] stddev specifies the standard deviation for the Gaussian noise distribution
* \param [in] seed seed value for the random number generator
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalGaussianNoise(RocalContext context, RocalTensor input,
bool is_output,
RocalFloatParam mean = NULL, RocalFloatParam stddev = NULL,
int seed = 0,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies gaussian noise on images with fixed parameters.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] mean specifies the mean value for the Gaussian noise distribution
* \param [in] stddev specifies the standard deviation for the Gaussian noise distribution
* \param [in] is_output is the output tensor part of the graph output
* \param [in] seed seed value for the random number generator
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalGaussianNoiseFixed(RocalContext context, RocalTensor input,
bool is_output,
float mean = 0.0, float stddev = 1.0, int seed = 0,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies shot noise effect on images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] is_output is the output tensor part of the graph output
* \param [in] noise_factor specifies the noise intensity factor for the shot (Poisson) noise
* \param [in] seed seed value for the random number generator
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalShotNoise(RocalContext context, RocalTensor input,
bool is_output,
RocalFloatParam noise_factor = NULL,
int seed = 0,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies shot noise on images with fixed parameters.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] noise_factor specifies the noise intensity factor for the shot (Poisson) noise
* \param [in] is_output is the output tensor part of the graph output
* \param [in] seed seed value for the random number generator
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalShotNoiseFixed(RocalContext context, RocalTensor input,
float noise_factor,
bool is_output, int seed = 0,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies snow effect on images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
Expand Down Expand Up @@ -686,6 +758,42 @@ extern "C" RocalTensor ROCAL_API_CALL rocalRainFixed(RocalContext context, Rocal
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies spatter effect on images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] is_output is the output tensor part of the graph output
* \param [in] red red channel value of the spatter color
* \param [in] green green channel value of the spatter color
* \param [in] blue blue channel value of the spatter color
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalSpatter(RocalContext context, RocalTensor input,
bool is_output,
RocalIntParam red = NULL, RocalIntParam green = NULL, RocalIntParam blue = NULL,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies spatter effect on images with fixed parameters.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] red red channel value of the spatter color
* \param [in] green green channel value of the spatter color
* \param [in] blue blue channel value of the spatter color
* \param [in] is_output is the output tensor part of the graph output
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalSpatterFixed(RocalContext context, RocalTensor input,
uint8_t red, uint8_t green, uint8_t blue,
bool is_output,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Adjusts the color temperature in images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
Expand Down Expand Up @@ -717,6 +825,47 @@ extern "C" RocalTensor ROCAL_API_CALL rocalColorTempFixed(RocalContext context,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies color jitter augmentation on images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] is_output is the output tensor part of the graph output
* \param [in] brightness brightness adjustment factor
* \param [in] contrast contrast adjustment factor
* \param [in] hue hue adjustment value in degrees
* \param [in] saturation saturation adjustment factor
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalColorJitter(RocalContext context, RocalTensor input,
bool is_output,
RocalFloatParam brightness = NULL,
RocalFloatParam contrast = NULL,
RocalFloatParam hue = NULL,
RocalFloatParam saturation = NULL,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies color jitter augmentation on images with fixed parameters.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] brightness brightness adjustment factor
* \param [in] contrast contrast adjustment factor
* \param [in] hue hue adjustment value in degrees
* \param [in] saturation saturation adjustment factor
* \param [in] is_output is the output tensor part of the graph output
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalColorJitterFixed(RocalContext context, RocalTensor input,
float brightness, float contrast, float hue, float saturation,
bool is_output,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies fog effect on images.
* \ingroup group_rocal_augmentations
* \param [in] context Rocal context
Expand Down Expand Up @@ -1748,4 +1897,65 @@ extern "C" RocalTensor ROCAL_API_CALL rocalCropAndPatch(RocalContext context,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Computes the natural logarithm of input element-wise and returns the output
* \param [in] p_context Rocal context
* \param [in] p_input Input Rocal tensor
* \param [in] is_output is the output tensor part of the graph output
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalLog(RocalContext p_context,
RocalTensor p_input,
bool is_output);

/*! \brief Applies water effect on images.
* \ingroup group_rocal_augmentations
* \note Accepts U8 and RGB24 input.
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] is_output is the output tensor part of the graph output
* \param [in] amplitude_x amplitude of the water effect in the x direction
* \param [in] amplitude_y amplitude of the water effect in the y direction
* \param [in] frequency_x frequency of the water effect in the x direction
* \param [in] frequency_y frequency of the water effect in the y direction
* \param [in] phase_x phase of the water effect in the x direction
* \param [in] phase_y phase of the water effect in the y direction
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalWater(RocalContext context, RocalTensor input,
bool is_output,
RocalFloatParam amplitude_x = NULL,
RocalFloatParam amplitude_y = NULL,
RocalFloatParam frequency_x = NULL,
RocalFloatParam frequency_y = NULL,
RocalFloatParam phase_x = NULL,
RocalFloatParam phase_y = NULL,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

/*! \brief Applies water effect on images with fixed parameters.
* \ingroup group_rocal_augmentations
* \note Accepts U8 and RGB24 input.
* \param [in] context Rocal context
* \param [in] input Input Rocal tensor
* \param [in] amplitude_x amplitude of the water effect in the x direction
* \param [in] amplitude_y amplitude of the water effect in the y direction
* \param [in] frequency_x frequency of the water effect in the x direction
* \param [in] frequency_y frequency of the water effect in the y direction
* \param [in] phase_x phase of the water effect in the x direction
* \param [in] phase_y phase of the water effect in the y direction
* \param [in] is_output is the output tensor part of the graph output
* \param [in] output_layout the layout of the output tensor
* \param [in] output_datatype the data type of the output tensor
* \return RocalTensor
*/
extern "C" RocalTensor ROCAL_API_CALL rocalWaterFixed(RocalContext context, RocalTensor input,
float amplitude_x, float amplitude_y,
float frequency_x, float frequency_y,
float phase_x, float phase_y,
bool is_output,
RocalTensorLayout output_layout = ROCAL_NONE,
RocalTensorOutputType output_datatype = ROCAL_UINT8);

#endif // MIVISIONX_ROCAL_API_AUGMENTATION_H
35 changes: 35 additions & 0 deletions rocAL/include/augmentations/arithmetic_augmentations/node_log.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#pragma once

#include "pipeline/node.h"

class LogNode : public Node {
public:
LogNode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs);
LogNode() = delete;

protected:
void create_node() override;
void update_node() override {};
};
6 changes: 6 additions & 0 deletions rocAL/include/augmentations/augmentations_nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ THE SOFTWARE.
#include "augmentations/color_augmentations/node_vignette.h"
#include "augmentations/effects_augmentations/node_jitter.h"
#include "augmentations/effects_augmentations/node_snp_noise.h"
#include "augmentations/effects_augmentations/node_gaussian_noise.h"
#include "augmentations/effects_augmentations/node_shot_noise.h"
#include "augmentations/effects_augmentations/node_snow.h"
#include "augmentations/effects_augmentations/node_rain.h"
#include "augmentations/effects_augmentations/node_spatter.h"
#include "augmentations/effects_augmentations/node_water.h"
#include "augmentations/color_augmentations/node_color_temperature.h"
#include "augmentations/effects_augmentations/node_fog.h"
#include "augmentations/effects_augmentations/node_pixelate.h"
Expand All @@ -44,6 +48,7 @@ THE SOFTWARE.
#include "augmentations/geometry_augmentations/node_resize.h"
#include "augmentations/geometry_augmentations/node_rotate.h"
#include "augmentations/color_augmentations/node_color_twist.h"
#include "augmentations/color_augmentations/node_color_jitter.h"
#include "augmentations/color_augmentations/node_hue.h"
#include "augmentations/color_augmentations/node_saturation.h"
#include "augmentations/geometry_augmentations/node_crop_mirror_normalize.h"
Expand Down Expand Up @@ -86,3 +91,4 @@ THE SOFTWARE.
#include "augmentations/geometry_augmentations/node_crop_and_patch.h"
#include "augmentations/geometry_augmentations/node_remap.h"
#include "augmentations/geometry_augmentations/node_ricap.h"
#include "augmentations/arithmetic_augmentations/node_log.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#pragma once

#include "pipeline/graph.h"
#include "pipeline/node.h"
#include "parameters/parameter_factory.h"
#include "parameters/parameter_vx.h"

class ColorJitterNode : public Node {
public:
ColorJitterNode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs);
ColorJitterNode() = delete;
void init(float brightness, float contrast, float hue, float saturation);
void init(FloatParam *brightness_param, FloatParam *contrast_param, FloatParam *hue_param, FloatParam *saturation_param);

protected:
void create_node() override;
void update_node() override;

private:
ParameterVX<float> _brightness;
ParameterVX<float> _contrast;
ParameterVX<float> _hue;
ParameterVX<float> _saturation;
constexpr static float BRIGHTNESS_RANGE[2] = {0.0f, 20.0f};
constexpr static float CONTRAST_RANGE[2] = {0.0f, 255.0f};
constexpr static float HUE_RANGE[2] = {0.0f, 359.0f};
constexpr static float SATURATION_RANGE[2] = {0.0f, 10.0f};
};
Loading