def __call__(self, image, test):
# type: (Image.Image, any) -> any
image = numpy.asarray(image, dtype=self._dtype)[:, :, :3] / 255 # rgb
image = rgb2lab(image).astype(self._dtype).transpose(2, 0, 1)
if self._normalize:
image /= 50
image[0] -= 1
return image
data_process.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录