示例#1
0
 def imgprep(img):
     img = imgproc.resize(img, [160, 80], keep_ratio='height')
     img = imgproc.subtract_luminance(img)
     img = np.rollaxis(img, 2)
     return (img / 100.0).astype(np.float32)
示例#2
0
 def imgprep(img):
     img = imgproc.subtract_luminance(img)
     img = np.rollaxis(img, 2)
     return (img / 100.0).astype(np.float32)