-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sample_std parameter to RandGaussianNoise #7425
Labels
Comments
6 tasks
KumoLiu
pushed a commit
that referenced
this issue
Feb 26, 2024
Fixes issue #7425 ### Description Add a `sample_std` parameter to `RandGaussianNoise` and `RandGaussianNoised`. When True, the Gaussian's standard deviation is sampled uniformly from 0 to std (i.e., what is currently done). When False, the noise's standard deviation is non-random and set to std. The default for sample_std would be True for backwards compatibility. Changes were based on RandRicianNoise which already has a `sample_std` parameter and is similar to RandGaussianNoise in concept and implementation. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Timothy Baker <bakertim@umich.edu>
juampatronics
pushed a commit
to juampatronics/MONAI
that referenced
this issue
Mar 25, 2024
Fixes issue Project-MONAI#7425 ### Description Add a `sample_std` parameter to `RandGaussianNoise` and `RandGaussianNoised`. When True, the Gaussian's standard deviation is sampled uniformly from 0 to std (i.e., what is currently done). When False, the noise's standard deviation is non-random and set to std. The default for sample_std would be True for backwards compatibility. Changes were based on RandRicianNoise which already has a `sample_std` parameter and is similar to RandGaussianNoise in concept and implementation. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Timothy Baker <bakertim@umich.edu> Signed-off-by: Juan Pablo de la Cruz Gutiérrez <juampatronics@gmail.com>
Yu0610
pushed a commit
to Yu0610/MONAI
that referenced
this issue
Apr 11, 2024
Fixes issue Project-MONAI#7425 ### Description Add a `sample_std` parameter to `RandGaussianNoise` and `RandGaussianNoised`. When True, the Gaussian's standard deviation is sampled uniformly from 0 to std (i.e., what is currently done). When False, the noise's standard deviation is non-random and set to std. The default for sample_std would be True for backwards compatibility. Changes were based on RandRicianNoise which already has a `sample_std` parameter and is similar to RandGaussianNoise in concept and implementation. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Timothy Baker <bakertim@umich.edu> Signed-off-by: Yu0610 <612410030@alum.ccu.edu.tw>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The documentation for
RandGaussianNoise
does not make clear that the standard deviation is sampled uniformly from 0 tostd
. (at least in my opinion; the doc-string ofstd
reads "Standard deviation (spread) of distribution'). Additionally, it may be useful to have the option to not sample the standard deviation, and just usestd
as the spread every time.Describe the solution you'd like
Add a
sample_std
parameter toRandGaussianNoise
. When True, the noise's standard deviation is sampled uniformly from 0 tostd
(i.e., what is currently done). When False, the noise's standard deviation is non-random and set tostd
. The default forsample_std
would be True for backwards compatibility.Describe alternatives you've considered
Updating the documentation of
RandGaussianNoise
to make more clear that thestd
is being sampled.Additional context
sample_std=False
: Adding different levels of random Gaussian noise to images to test the robustness of a registration algorithm to varying levels of Gaussian noise.RandRicianNoise
is similar toRandGaussianNoise
in concept and implementation.RandRicianNoise
already has the proposedsample_std
parameter.RandRicianNoise
's implementation.The text was updated successfully, but these errors were encountered: