(var)
| 25 | |
| 26 | |
| 27 | def 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 |
nothing calls this directly
no outgoing calls
no test coverage detected