From ba4d18a2d20eed034ea7926d10e5f760d3809ba2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 18 Dec 2019 23:41:47 +0100 Subject: live --- inversion/visualize.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inversion/visualize.py') diff --git a/inversion/visualize.py b/inversion/visualize.py index d17fe13..2461458 100644 --- a/inversion/visualize.py +++ b/inversion/visualize.py @@ -36,6 +36,9 @@ def data2img(data): rescaled = np.clip(rescaled, 0, 255) return np.rint(rescaled).astype('uint8') +def data2pil(data); + return Image.fromarray(data2img(data), mode='RGB') + def interleave(a, b): res = np.empty([a.shape[0] + b.shape[0]] + list(a.shape[1:]), dtype=a.dtype) res[0::2] = a -- cgit v1.2.3-70-g09d2