Image augmentation class should not exist
The ImageAugmentation
class seems to be just an instance of the DataAugmentation
class really if its methods are written in classes instead.
Somehow similar to bob.bio.base#95 (closed)
The ImageAugmentation
class seems to be just an instance of the DataAugmentation
class really if its methods are written in classes instead.
Somehow similar to bob.bio.base#95 (closed)
A lot of API in this package like normalizers could just be functions instead of classes IMHO. Take ScaleFactor in normalizers for example:
class ScaleFactor(object):
"""
Normalize a sample by a scale factor
"""
def __init__(self, scale_factor=0.00390625):
self.scale_factor = scale_factor
def __call__(self, x):
return x * self.scale_factor
which instead can be:
def scale_by_factor(array, scale_factor=0.00390625):
return array * scale_factor
# to customize the default value:
from functools import partial
scale_by_factor = partial(scale_by_factor, scale_factor=1)
I think the code will be much more re-usable if they are in functions and we still have not figured out a concrete API for deep learning. So, functions should be preferred to classes because they are easier to refactor later.
mentioned in issue #37 (closed)
I will close this one since we'll take care of that in #37 (closed)
closed