MCPcopy Create free account
hub / github.com/cszn/USRNet / tensor2img

Function tensor2img

utils/utils_image.py:267–291  ·  view source on GitHub ↗

Converts a torch Tensor into an image Numpy array of BGR channel order Input: 4D(B,(3/1),H,W), 3D(C,H,W), or 2D(H,W), any range, RGB channel order Output: 3D(H,W,C) or 2D(H,W), [0,255], np.uint8 (default)

(tensor, out_type=np.uint8, min_max=(0, 1))

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected