'Args:
keepdims (bool): return image of shape [H, W, 1] instead of [H, W]
rgb (bool): interpret input as RGB instead of the default BGR'

def __init__(self, keepdims=True, rgb=False):

    mode = (cv2.COLOR_RGB2GRAY if rgb else cv2.COLOR_BGR2GRAY)
    super(Grayscale, self).__init__(mode, keepdims)
