I have a mat file dataset(128 x 128). how can I add noise? please explain.
- add noise in any particular place.
- add noise in the file where values are non zero.
I have a mat file dataset(128 x 128). how can I add noise? please explain.
You have have to convert that into a torch tensor (but please add more detail), if you have torch tensor 128 x 128, then you can use:
image = image + torch.randn(image.size()) *1 + 0
where 1 is the mean and 0 is the standard deviation