MCPcopy Create free account
hub / github.com/OpenTalker/StyleHEAT / tensor2sketch

Function tensor2sketch

utils/common.py:27–31  ·  view source on GitHub ↗
(var)

Source from the content-addressed store, hash-verified

25
26
27def tensor2sketch(var):
28 im = var[0].cpu().detach().numpy()
29 im = cv2.cvtColor(im, cv2.COLOR_GRAY2BGR)
30 im = (im * 255).astype(np.uint8)
31 return Image.fromarray(im)
32
33
34# Visualization utils

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected