mlcommons / GaNDLF

A generalizable application framework for segmentation, regression, and classification using PyTorch
https://gandlf.org
Apache License 2.0
150 stars 78 forks source link

[BUG] Noise and Blur enhanced fail for certain images #859

Closed sarthakpati closed 2 months ago

sarthakpati commented 2 months ago

Describe the bug

The variable blur and noise augmentations [ref,ref] fail for certain images that do not have a float pixel type.

To Reproduce

Steps to reproduce the behavior:

  1. Use png data for training.
  2. Use either of one of these 2 augmentations.
  3. See error.

Expected behavior

It should run. A simple fix is to add image.data.float() before calling torch.std for both.

Media

N.A.

Environment information

N.A.

Additional context

N.A.