kbressem / faimed3d

Extension to fastai for volumetric medical data
MIT License
32 stars 14 forks source link

Update RandomBrightness3D(RandTransform) and RandomContrast3D(RandTra… #59

Closed adrianerrea closed 2 years ago

adrianerrea commented 2 years ago

…nsform)

Both classes RandomBrightness3D(RandTransform) and RandomContrast3D(RandTransform) use a fix step value of 25 to get a random value from beta_range or alpha_range. However, if the beta_range or alpha_range is quite small (as the default values), the final self.beta or self.alpha value will always be the lower value of the beta_range or alpha_range. With this update, you can set up your own beta_step or alpha_step according to your own range values and the function will output much more different values according to the range provided.