(mask, imtype=np.uint8, idx=0, nrows=1)
| 27 | return image_numpy_t.astype(imtype) |
| 28 | |
| 29 | def 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 | |
| 35 | def mkdirs(paths): |
| 36 | if isinstance(paths, list) and not isinstance(paths, str): |
nothing calls this directly
no test coverage detected