albumentations icon indicating copy to clipboard operation
albumentations copied to clipboard

Spatter transform cannot accept 'color' keyword argument

Open tobycollins opened this issue 1 year ago • 1 comments

🐛 Bug

When I try to use the 'color' keyword argument for Spatter, I get the runtime error 'TypeError: init() got an unexpected keyword argument 'color''

To Reproduce

Steps to reproduce the behavior:

  1. transform = [albu.Spatter(mean=0.65, std=0.3, gauss_sigma=2, cutout_threshold=0.68, intensity=0.6, mode='rain', always_apply=False, p=0.5, color=None) for _ in range(9)]

Expected behavior

Error 'TypeError: init() got an unexpected keyword argument 'color''

Environment

  • Albumentations version 1.3.0
  • Python version 3.7
  • OS Ubuntu 20.04
  • How you installed albumentations: pip

tobycollins avatar Mar 29 '23 14:03 tobycollins

Hi @tobycollins, the color parameter was added in PR #1305, which was merged into the master branch after the release of version 1.3.0. Maybe wait for the next release version or clone the repo.

victor1cea avatar Apr 09 '23 01:04 victor1cea