Allow controlling intensity of RandomMotion transform
See original GitHub issue🚀 Feature
Motivation
Intensity of RandomMotion transform seems to mostly depend on the “time” of the motion. And while RandomGhosting transform exposes intensity
parameter, RandomMotion does not expose times
parameter, and does not have intensity
.
Pitch
Either provide intensity
parameter, or allow setting the range of times
parameter used internally.
Alternatives
Save the image before the transform is applied, then “manually” blend the transformed one into the original one with custom weight, thus emulating intensity.
Additional context
I am trying to augment training by creating bad images for an image quality estimator, because most images in my training set are good. I would like to control the degree of corruption, e.g. to have control whether I produce an image with rating of 1/10 or 4/10.
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
I coded this transform a long time ago reading Richard Shaw’s paper. My version is a bit simplified, but works. I am now away at a conference, but I’ll try to add some explanations to the docs when I’m back.
For now, maybe you can just use a convex combination of the original image and the transformed one:
It would be easy, yes. But it would take a bit of time, which I don’t really have now. Feel free to open a PR!