MCPcopy Create free account
hub / github.com/ImprintLab/Medical-SAM2 / tensor_to_img_array

Function tensor_to_img_array

func_2d/utils.py:284–287  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

282
283
284def tensor_to_img_array(tensor):
285 image = tensor.cpu().detach().numpy()
286 image = np.transpose(image, [0, 2, 3, 1])
287 return image
288
289
290def view(tensor):

Callers 1

viewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected