Adding support for voxel augmentations and metadata operations#456
Adding support for voxel augmentations and metadata operations#456SundarRajan98 wants to merge 451 commits intoROCm:developfrom
Conversation
rocm-docs-core moved from RadeonOpenCompute to ROCm
* Fix formatting issues - Minor changes * Clean up C++ audio unit test * Remove max frames and channels from decoder * Minor changes * Add Output comparison for python audio unittests * Modify rocal audio unit test Update README * Minor change * Remove NSR * Resolve PR comments * Minor changes - Modifying the names of the arguments * Initial commit for removing file list reader * Added a bried desc for the rocAL enum for border type * Add a WRN statement in PreEmphasis Filter to only use FP32 dtype * minor changes * Change the borderType enum to int32 from uint32 dtype * Minor changes * Minor change * Update README for audio unit test * Parameters for rocALAudioIterator * Removing file list reader and metadata reader * Minor change * Remove the reset_tensor_roi() from the PreEmphasis augmentation making sure the src and dst roi points to the same location * Del the Unit Test Files introduced earlier * Changing python unittests for QA mode * Resolving review comments * Adding comment for file list case in file source reader * Add pre_emphasis function and gollden output comparison in audio unit tests * minor change - add update val in create array * Minor variable name change * Minor additions in the .h file * minor change * Formatting Changes * Update unit test * Minor change * minor change * Resolving review comments * Minor changes Add wav extension in file reader Add reader in unit test * Minor change * Add file reader to python audio unit test * Add to_decibels augmentations to rocAL * Formatting , review comments resolution and change enum dtype to int32 instead of uint32 * Update C++ unit test * Update python audio unit test * Remove the unused variable output - Resolve warnings in cpp unit test * Remove the dst_roi arg passed to rpp * Minor changes Change borderType enum prefix * Adding file list reader to C++ unit tests * Fixing issues with C++ audio unit tests * Adding test case for to_decibels and downmix * Modifying python unittests * Fixing spectogram test case * Remove the reset_tensor_roi calls * Resolving review comments * Resolve some PR comments * Minor changes * Resolving review comments * Change the dims[0] and dims[1] positioning for Spectrogram * Resolving review comments * Resolving review comments * Resolving PR comments * Updating audio unit tests for default file list path * Minor changes * Minor Change * Minor change * Name change from sample to data * Change from decoded_data_info to DecodedDataInfo * Revert "Change the dims[0] and dims[1] positioning for Spectrogram" This reverts commit d791b9a. * Remove audio_decoder_factory.cpp file * Minor change * Change variable name * Add Spectrogram Case in unit tests * Add spectrogram case in python unit tests * Update the struct variable name in audio files * Fixing issues with downmix node output * Adding ROI updation in downmix node * Adding downmix test case for python unit tests * Adding downmix and to_decibels test case in C++ tests * Minor changes * Change ROCAL_DATA_PATH to exclude rocal_data * Update ROCAL_DATA_PATH to exclude rocal_data * Use Pascal case for function names in audio decoder * Add audio path for downmix test case * Fix review comments * Modify cmake to have SNDFILE in all capital * Minor changes * Add struct for audio info in AudioReadAndDecode * Fix merge conflict * Renaming crop_image_info to CropImageInfo * Remove - actual_host_buffers - Unused * Rename TimingDBG to TimingDbg * Move the instances of DecodedDataInfo to its base class LoaderModule * Fix a WRN msg in master_graph.cpp * Remove a dangling comment * Rename _circ_data_info to _circ_buff_data_info * Add Glob to CMakeLists.txt * Rename SndFileDecoder to GenericAudioDecoder * Fix build issues * Minor change * Update python API README.md for audio unit test * Update audio unit test README * Adding missed param in python unit tests * Revert "Add Glob to CMakeLists.txt" This reverts commit 47263d9. * Fix include headers for Audio files * Fix copy data 2D * Minor changes * Pass decoded data info to load routine instead of separate vectors * Update CHANGELOG.md * Update CHANGELOG.md * Change swap_handle_time variable name in loader * Update the changelog.md * Update ChangeLog.md * Update CHANGELOG.md * Formatting changes Add comments * Update doxygen comments * Move file source reader from readers/image to readers folder * Update README and add doxygen description * Update CMakeLists and README for audio test * Update README for audio test * Minor fix * Fix merge from PR 2 * Minor changes shard_count argument name * Rename set and get functions of data_info to decoded_data_info * Revert empty line removed in CMakeLists.txt * Removed prefix original for audio vectors * Resolve PR comments * Add @params to all args in pytorch.py * Fix build issue * Minor changes in unit test * Minor changes * Change ROCAL instaces to rocAL in pytorch.py * Resolve the PR comments * Minor changes in decoders.py - Modify the comment for shard_size * Minor changes * Address the PR comments * Address Review comments * Introduce Audio layouts * Add layout changes for spectrogram * Fix the unit tests - c++ & python * Minor fix * Adding changes for spec layout changes * Fix merge conflicts * Resolving review comments --------- Co-authored-by: swetha097 <[email protected]> Co-authored-by: fiona-gladwin <[email protected]> Co-authored-by: Swetha B S <[email protected]> Co-authored-by: Fiona-MCW <[email protected]> Co-authored-by: SundarRajan28 <[email protected]> Co-authored-by: Swetha B S <>
…Uniform + Normal Distribution nodes ] (ROCm#127) * Removing file list reader and metadata reader * Minor change * Remove the reset_tensor_roi() from the PreEmphasis augmentation making sure the src and dst roi points to the same location * Del the Unit Test Files introduced earlier * Changing python unittests for QA mode * Resolving review comments * Adding comment for file list case in file source reader * Add pre_emphasis function and gollden output comparison in audio unit tests * minor change - add update val in create array * Minor variable name change * Minor additions in the .h file * minor change * Formatting Changes * Update unit test * Minor change * minor change * Resolving review comments * Minor changes Add wav extension in file reader Add reader in unit test * Minor change * Add file reader to python audio unit test * Add to_decibels augmentations to rocAL * Formatting , review comments resolution and change enum dtype to int32 instead of uint32 * Update C++ unit test * Update python audio unit test * Remove the unused variable output - Resolve warnings in cpp unit test * Remove the dst_roi arg passed to rpp * Minor changes Change borderType enum prefix * Adding file list reader to C++ unit tests * Fixing issues with C++ audio unit tests * Adding test case for to_decibels and downmix * Modifying python unittests * Fixing spectogram test case * Remove the reset_tensor_roi calls * Resolving review comments * Resolve some PR comments * Minor changes * Resolving review comments * Change the dims[0] and dims[1] positioning for Spectrogram * Resolving review comments * Resolving review comments * Resolving PR comments * Updating audio unit tests for default file list path * Minor changes * Minor Change * Minor change * Name change from sample to data * Change from decoded_data_info to DecodedDataInfo * Revert "Change the dims[0] and dims[1] positioning for Spectrogram" This reverts commit d791b9a. * Remove audio_decoder_factory.cpp file * Minor change * Change variable name * Change copyright year and remove debug statements * Add Spectrogram Case in unit tests * Add spectrogram case in python unit tests * Update the struct variable name in audio files * Fixing issues with downmix node output * Adding ROI updation in downmix node * Adding downmix test case for python unit tests * Adding downmix and to_decibels test case in C++ tests * Minor changes * Change ROCAL_DATA_PATH to exclude rocal_data * Update ROCAL_DATA_PATH to exclude rocal_data * Use Pascal case for function names in audio decoder * Add resample test case and fixed issues * Minor changes * Adding latest changes to resample and distribution nodes * Fixing ROI handle errors with distribution nodes * Add audio path for downmix test case * Resolving review comments * Add resample and operator overloading test cases in test suite * Resolving review comments * Minor change * Resolving review comments * Fix review comments * Modify cmake to have SNDFILE in all capital * Adding set_seed in master_graph ctor * fix output mismatch for Tensor add Tensor * Minor changes * Add struct for audio info in AudioReadAndDecode * Fix merge conflict * Renaming crop_image_info to CropImageInfo * Remove - actual_host_buffers - Unused * Rename TimingDBG to TimingDbg * Move the instances of DecodedDataInfo to its base class LoaderModule * Fix a WRN msg in master_graph.cpp * Remove a dangling comment * Rename _circ_data_info to _circ_buff_data_info * Add Glob to CMakeLists.txt * Rename SndFileDecoder to GenericAudioDecoder * Fix build issues * Minor change * Update python API README.md for audio unit test * Update audio unit test README * Adding missed param in python unit tests * Revert "Add Glob to CMakeLists.txt" This reverts commit 47263d9. * Fix include headers for Audio files * Fix copy data 2D * Minor changes * Pass decoded data info to load routine instead of separate vectors * Update CHANGELOG.md * Update CHANGELOG.md * Change swap_handle_time variable name in loader * Update the changelog.md * Update ChangeLog.md * Update CHANGELOG.md * Formatting changes Add comments * Update doxygen comments * Move file source reader from readers/image to readers folder * Update README and add doxygen description * Update CMakeLists and README for audio test * Update README for audio test * Minor fix * Fix merge from PR 2 * Minor changes shard_count argument name * Rename set and get functions of data_info to decoded_data_info * Revert empty line removed in CMakeLists.txt * Removed prefix original for audio vectors * Resolve PR comments * Add @params to all args in pytorch.py * Fix build issue * Minor changes in unit test * Minor changes * Change ROCAL instaces to rocAL in pytorch.py * Resolve the PR comments * Minor changes in decoders.py - Modify the comment for shard_size * Minor changes * Address the PR comments * Address Review comments * Introduce Audio layouts * Add layout changes for spectrogram * Fix the unit tests - c++ & python * Minor fix * Adding changes for spec layout changes * Fix merge conflicts * Fix merge conflicts * Minor changes * Remove dtype warnings * Resolving review comments --------- Co-authored-by: Swetha B S <[email protected]> Co-authored-by: SundarRajan28 <[email protected]> Co-authored-by: Fiona-MCW <[email protected]> Co-authored-by: Swetha B S <> Co-authored-by: fiona-gladwin <[email protected]>
* Setup - CentOS 7 Updates * Setup - Fix * CMakeLists - CentOS 7 Package updates * CMake3 Install on setup * Setup - Updates * Updates - Readme & JPEG
* SLES - Package updates * SLES - Updates * Setup - Updates * rocAL Setup - Cleanup * SLES - OpenCV Package
…s/sphinx (ROCm#173) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kiriti Gowda <[email protected]>
ROCm#178) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <[email protected]>
Co-authored-by: SundarRajan98 <[email protected]> Co-authored-by: Lakshmi Kumar <[email protected]>
* Add tf_pets training example * Adding dockerfile and readme changes * Resolving review comments * Resolving review comments --------- Co-authored-by: SundarRajan98 <[email protected]>
…s/sphinx (ROCm#183) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ROCm#128) * Modifying python unittests * Fixing spectogram test case * Remove the reset_tensor_roi calls * Resolving review comments * Resolve some PR comments * Minor changes * Resolving review comments * Change the dims[0] and dims[1] positioning for Spectrogram * Resolving review comments * Resolving review comments * Resolving PR comments * Updating audio unit tests for default file list path * Minor changes * Minor Change * Minor change * Name change from sample to data * Change from decoded_data_info to DecodedDataInfo * Revert "Change the dims[0] and dims[1] positioning for Spectrogram" This reverts commit d791b9a. * Remove audio_decoder_factory.cpp file * Minor change * Change variable name * Change copyright year and remove debug statements * Add Spectrogram Case in unit tests * Add spectrogram case in python unit tests * Update the struct variable name in audio files * Fixing issues with downmix node output * Adding ROI updation in downmix node * Adding downmix test case for python unit tests * Adding downmix and to_decibels test case in C++ tests * Minor changes * Change ROCAL_DATA_PATH to exclude rocal_data * Update ROCAL_DATA_PATH to exclude rocal_data * Use Pascal case for function names in audio decoder * Adding mel filter bank augmentation support in rocAL * Add resample test case and fixed issues * NWC - NSR + Slice * Minor changes * Minor changes * Adding latest changes to resample and distribution nodes * Add test suite changes for NSR * Fixing ROI handle errors with distribution nodes * Resolve issue with Slice Node * Add audio path for downmix test case * Add NSR and Slice in python unit tests * Resolving review comments * Add resample and operator overloading test cases in test suite * Resolving review comments * Minor change * Resolving review comments * Fix review comments * Modify cmake to have SNDFILE in all capital * Fix Slice * Add NSR and slice in audio test suite * Fix NSR and Slice output issue * Resolving review comments * Adding set_seed in master_graph ctor * Change Name NonSilentRegion to NonSilentRegionDetection * fix output mismatch for Tensor add Tensor * Remove nD tensor layouts * Minor changes * Add struct for audio info in AudioReadAndDecode * Fix merge conflict * Clean up - node_slice.cpp * Resolve PR comments - 1 * Remove unused variables, add comments, format merge commit * Resolve internal PR comments * Changes in node_slice.cpp * Change Enum fom UINT TO INT type * Minor change * Fornat * Fix pybind issue for normalize * Changes in node_slice.cpp to move the fill_values to create_node from update_node * Add _vx to scalar variables in the nsr * Moving normalize to effects augmentations folder * Renaming crop_image_info to CropImageInfo * Remove - actual_host_buffers - Unused * Rename TimingDBG to TimingDbg * Move the instances of DecodedDataInfo to its base class LoaderModule * Fix a WRN msg in master_graph.cpp * Remove a dangling comment * Rename _circ_data_info to _circ_buff_data_info * Adding changes to normalize node * Add Glob to CMakeLists.txt * Rename SndFileDecoder to GenericAudioDecoder * Fix build issues * Minor change * Update python API README.md for audio unit test * Update audio unit test README * Add debug and changes to normalize node and test case * Minor fixes for MFB * Add Normalize and MFB test cases in C++ tests * Revert "Merge remote-tracking branch 'swe_fork/swbs/audio/pr7' into swbs/audio/pr9" This reverts commit e480f98, reversing changes made to e5e9ad2. * Fix cpp unit test * Adding missed param in python unit tests * Revert "Add Glob to CMakeLists.txt" This reverts commit 47263d9. * Fix include headers for Audio files * Fix copy data 2D * Minor changes * Pass decoded data info to load routine instead of separate vectors * Update CHANGELOG.md * Update CHANGELOG.md * Change swap_handle_time variable name in loader * Update the changelog.md * Update ChangeLog.md * Update ChangeLog.md * Update CHANGELOG.md * Formatting changes Add comments * Update doxygen comments * Move file source reader from readers/image to readers folder * Update README and add doxygen description * Update CMakeLists and README for audio test * Update README for audio test * Minor fix * Fix merge from PR 2 * Minor changes shard_count argument name * Rename set and get functions of data_info to decoded_data_info * Revert empty line removed in CMakeLists.txt * Removed prefix original for audio vectors * Resolve PR comments * Add @params to all args in pytorch.py * Fix build issue * Minor changes in unit test * Minor changes * Change ROCAL instaces to rocAL in pytorch.py * Resolve the PR comments * Minor changes in decoders.py - Modify the comment for shard_size * Minor changes * Address the PR comments * Address Review comments * Introduce Audio layouts * Add layout changes for spectrogram * Fix the unit tests - c++ & python * Minor fix * Adding changes for spec layout changes * Update node_slice.cpp * Update node_slice.h * Resolving review comments --------- Co-authored-by: SundarRajan28 <[email protected]> Co-authored-by: Swetha B S <> Co-authored-by: Fiona-MCW <[email protected]> Co-authored-by: fiona-gladwin <[email protected]> Co-authored-by: Lakshmi Kumar <[email protected]>
…Cm#130) * Name change from sample to data * Change from decoded_data_info to DecodedDataInfo * Revert "Change the dims[0] and dims[1] positioning for Spectrogram" This reverts commit d791b9a. * Remove audio_decoder_factory.cpp file * Minor change * Change variable name * Change copyright year and remove debug statements * Add Spectrogram Case in unit tests * Add spectrogram case in python unit tests * Update the struct variable name in audio files * Fixing issues with downmix node output * Adding ROI updation in downmix node * Adding downmix test case for python unit tests * Adding downmix and to_decibels test case in C++ tests * Minor changes * Change ROCAL_DATA_PATH to exclude rocal_data * Update ROCAL_DATA_PATH to exclude rocal_data * Use Pascal case for function names in audio decoder * Adding mel filter bank augmentation support in rocAL * Add resample test case and fixed issues * NWC - NSR + Slice * Minor changes * Minor changes * Adding latest changes to resample and distribution nodes * Add test suite changes for NSR * Fixing ROI handle errors with distribution nodes * Resolve issue with Slice Node * Add audio path for downmix test case * Add NSR and Slice in python unit tests * Resolving review comments * Add resample and operator overloading test cases in test suite * Resolving review comments * Minor change * Resolving review comments * Fix review comments * Modify cmake to have SNDFILE in all capital * Fix Slice * Add NSR and slice in audio test suite * Fix NSR and Slice output issue * Resolving review comments * Adding set_seed in master_graph ctor * Change Name NonSilentRegion to NonSilentRegionDetection * fix output mismatch for Tensor add Tensor * Remove nD tensor layouts * Minor changes * Add struct for audio info in AudioReadAndDecode * Fix merge conflict * Clean up - node_slice.cpp * Resolve PR comments - 1 * Remove unused variables, add comments, format merge commit * Resolve internal PR comments * Changes in node_slice.cpp * Change Enum fom UINT TO INT type * Minor change * Fornat * Fix pybind issue for normalize * Changes in node_slice.cpp to move the fill_values to create_node from update_node * Add _vx to scalar variables in the nsr * Moving normalize to effects augmentations folder * Renaming crop_image_info to CropImageInfo * Remove - actual_host_buffers - Unused * Rename TimingDBG to TimingDbg * Move the instances of DecodedDataInfo to its base class LoaderModule * Fix a WRN msg in master_graph.cpp * Remove a dangling comment * Rename _circ_data_info to _circ_buff_data_info * Adding changes to normalize node * Add Glob to CMakeLists.txt * Rename SndFileDecoder to GenericAudioDecoder * Fix build issues * Minor change * Update python API README.md for audio unit test * Update audio unit test README * Add debug and changes to normalize node and test case * Minor fixes for MFB * Add Normalize and MFB test cases in C++ tests * Revert "Merge remote-tracking branch 'swe_fork/swbs/audio/pr7' into swbs/audio/pr9" This reverts commit e480f98, reversing changes made to e5e9ad2. * Fix cpp unit test * Minor Change * Fix C++ audio unit test for 2D data * Minor changes * Minor fix in verify output * Change in API docs * Adding missed param in python unit tests * Revert "Add Glob to CMakeLists.txt" This reverts commit 47263d9. * Fix include headers for Audio files * Fix copy data 2D * Minor changes * Pass decoded data info to load routine instead of separate vectors * Update CHANGELOG.md * Update CHANGELOG.md * Change swap_handle_time variable name in loader * Update the changelog.md * Update ChangeLog.md * Update ChangeLog.md * Update CHANGELOG.md * Formatting changes Add comments * Update doxygen comments * Move file source reader from readers/image to readers folder * Update README and add doxygen description * Update CMakeLists and README for audio test * Update README for audio test * Minor fix * Fix merge from PR 2 * Minor changes shard_count argument name * Rename set and get functions of data_info to decoded_data_info * Revert empty line removed in CMakeLists.txt * Removed prefix original for audio vectors * Resolve PR comments * Add @params to all args in pytorch.py * Fix build issue * Minor changes in unit test * Minor changes * Change ROCAL instaces to rocAL in pytorch.py * Resolve the PR comments * Minor changes in decoders.py - Modify the comment for shard_size * Minor changes * Address the PR comments * Address Review comments * Introduce Audio layouts * Add layout changes for spectrogram * Fix the unit tests - c++ & python * Minor fix * Adding changes for spec layout changes * Adding changes to MFB and normalize nodes * Update node_slice.cpp * Update node_slice.h * Fix merge conflicts * Resolving review comments * Resolving review comments * Resolving review comments --------- Co-authored-by: fiona-gladwin <[email protected]> Co-authored-by: Swetha B S <> Co-authored-by: Swetha B S <[email protected]> Co-authored-by: SundarRajan28 <[email protected]> Co-authored-by: Fiona-MCW <[email protected]> Co-authored-by: swetha097 <[email protected]> Co-authored-by: Lakshmi Kumar <[email protected]> Co-authored-by: Kiriti Gowda <[email protected]>
…n/rocAL into fg/multiple_loaders
There was a problem hiding this comment.
Pull request overview
This PR expands rocAL’s augmentation and metadata toolset to better support volumetric (voxel) pipelines and new metadata-driven ROI workflows (including connected-component bbox selection and ROI-random-crop anchor generation), with Python bindings exposed via pybind and fn.py.
Changes:
- Added new metadata ops:
randomObjectBbox(connected-component bbox selection) androiRandomCrop(random crop anchor generation within an ROI). - Extended augmentations to support new controls/layouts: conditional execution for Brightness/GaussianNoise and depth-axis flipping for Flip.
- Added a fixed-shape tensor slicing path (
sliceFixed) to support vector-shape slicing alongside tensor-shape slicing.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| rocAL_pybind/rocal_pybind.cpp | Exposes new ops (roiRandomCrop, randomObjectBbox, sliceFixed) to Python via pybind. |
| rocAL_pybind/amd/rocal/fn.py | Updates Python functional API wrappers (conditional execution, depth flip, slice fixed-shape, new metadata ops). |
| rocAL/source/pipeline/tensor.cpp | Adds Tensor::create_from_ptr() to wrap an externally-owned buffer pointer as a vx tensor. |
| rocAL/source/pipeline/random_object_bbox.cpp | Implements connected-component labeling + random bbox selection (with optional caching). |
| rocAL/source/pipeline/master_graph.cpp | Wires bbox + ROI random-crop updates into the execution loop and manages ROI-random-crop state. |
| rocAL/source/augmentations/geometry_augmentations/node_slice.cpp / .h | Adds fixed-shape slice path and improves fill-value replication handling. |
| rocAL/source/augmentations/geometry_augmentations/node_flip.cpp / .h | Adds optional depth flip support gated by vx_rpp version. |
| rocAL/source/augmentations/effects_augmentations/node_gaussian_noise.cpp / .h | Adds conditional execution support; updates vx_rpp version gating logic. |
| rocAL/source/augmentations/color_augmentations/node_brightness.cpp / .h | Adds conditional execution support (vx_rpp >= 3.3.1). |
| rocAL/source/api/rocal_api_meta_data.cpp / include/api/rocal_api_meta_data.h | Adds public C/C++ APIs for ROI random crop and random object bbox selection. |
| rocAL/source/api/rocal_api_augmentation.cpp / include/api/rocal_api_augmentation.h | Extends augmentation APIs: conditional execution for brightness/gaussian noise, depth flag for flip, and adds rocalSliceFixed. |
| rocAL/include/pipeline/master_graph.h | Declares new metadata operator hooks and ROI random-crop state in MasterGraph. |
| rocAL/include/pipeline/random_object_bbox.h | Declares RandomObjectBbox and its caching structures. |
| rocAL/include/pipeline/content_hash.h | Introduces a non-cryptographic content hash for caching repeated mask inputs. |
| rocAL/include/pipeline/tensor.h | Declares create_from_ptr() in Tensor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rocAL/source/augmentations/effects_augmentations/node_gaussian_noise.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
spolifroni-amd
left a comment
There was a problem hiding this comment.
Does this need to be added to the documentation? If so, let me know.
| @@ -3029,6 +3030,8 @@ rocalSlice( | |||
| Tensor* output = nullptr; | |||
| ROCAL_INVALID_CONTEXT_ERR(p_context, output); | |||
There was a problem hiding this comment.
It is not a good idea to have a macro specific to one type of argument. Instead have a generic macro that can detect any invalid input argument. For e.g, this can be combined with ROCAL_INVALID_INPUT_ERR. Please remove all such
| */ | ||
| extern "C" RocalTensor ROCAL_API_CALL rocalBrightness(RocalContext context, RocalTensor input, bool is_output, | ||
| RocalFloatParam alpha = NULL, RocalFloatParam beta = NULL, | ||
| RocalFloatParam alpha = NULL, RocalFloatParam beta = NULL, RocalIntParam conditional_execution = NULL, |
There was a problem hiding this comment.
Please add the newly introduced parameter to the end of the API and set default value. This will ensure that even if the user doesn't set its value, old usage won't break. Same for all such in this file
| */ | ||
| extern "C" RocalTensor ROCAL_API_CALL rocalFlip(RocalContext context, RocalTensor input, bool is_output, | ||
| RocalIntParam horizonal_flag = NULL, RocalIntParam vertical_flag = NULL, | ||
| RocalIntParam horizonal_flag = NULL, RocalIntParam vertical_flag = NULL, RocalIntParam depth_flag = NULL, |
There was a problem hiding this comment.
move the newly introduced parameter to the end. Instead of having 2 separate flags, please use one variable and use bitmask for horizontal/vertical/depth.
| */ | ||
| extern "C" RocalTensor ROCAL_API_CALL rocalFlipFixed(RocalContext context, RocalTensor input, | ||
| int horizonal_flag, int vertical_flag, bool is_output, | ||
| int horizonal_flag, int vertical_flag, bool is_output, int depth_flag = 0, |
There was a problem hiding this comment.
Can we combine all this into a single flag
| bool is_output, | ||
| RocalFloatParam mean = NULL, RocalFloatParam stddev = NULL, | ||
| int seed = 0, | ||
| int seed = 0, RocalIntParam conditional_execution = NULL, |
There was a problem hiding this comment.
Newly introduced variables should be added to end of the existing parameters
| extern "C" RocalTensor ROCAL_API_CALL rocalBrightnessFixed(RocalContext context, RocalTensor input, | ||
| float alpha, float beta, | ||
| bool is_output, | ||
| bool is_output, int conditional_execution = 1, |
There was a problem hiding this comment.
make sure the new parameters are added at the end
| SliceNode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs); | ||
| SliceNode() = delete; | ||
| ~SliceNode(); | ||
| void init(Tensor *anchor_param, const std::vector<int> &shape_param, std::vector<float> &fill_values_param, OutOfBoundsPolicy policy); |
There was a problem hiding this comment.
why do we need to add a new api with vector data types for shape_param? The shape_param tensor should accomodate fixed shape_param
Motivation
This PR adds multiple voxel augmentations and adds new metadata operations to rocAL. This PR needs to be merged alongside the MIVISIONX PR #1625
Technical Details
Test Plan
Test Result
Submission Checklist