def preprocess(subjets, constits, edges,
cutoff=0.1,
rotate=True,
reflect=True,
zoom=False,
out_width=25,
normalize=True):
translate(constits, subjets)
image = pixelize(constits, edges)
if rotate:
image = rotate_image(image, subjets)
if reflect:
image = reflect_image(image, subjets)
image = zoom_image(image, zoom if zoom is not False else 1., out_width)
if normalize:
image = normalize_image(image)
return image
评论列表
文章目录