MCPcopy Create free account
hub / github.com/albertpumarola/GANimation / tensor2maskim

Function tensor2maskim

utils/util.py:29–33  ·  view source on GitHub ↗
(mask, imtype=np.uint8, idx=0, nrows=1)

Source from the content-addressed store, hash-verified

27 return image_numpy_t.astype(imtype)
28
29def tensor2maskim(mask, imtype=np.uint8, idx=0, nrows=1):
30 im = tensor2im(mask, imtype=imtype, idx=idx, unnormalize=False, nrows=nrows)
31 if im.shape[2] == 1:
32 im = np.repeat(im, 3, axis=-1)
33 return im
34
35def mkdirs(paths):
36 if isinstance(paths, list) and not isinstance(paths, str):

Callers

nothing calls this directly

Calls 1

tensor2imFunction · 0.85

Tested by

no test coverage detected