(im)
| 212 | def bgr2rgb(im): return cv2.cvtColor(im, cv2.COLOR_BGR2RGB) |
| 213 | |
| 214 | def rgb2bgr(im): return cv2.cvtColor(im, cv2.COLOR_RGB2BGR) |
| 215 | |
| 216 | def tensor2img(tensor, rgb2bgr=True, out_type=np.uint8, min_max=(0, 1)): |
| 217 | """Convert torch Tensors into image numpy arrays. |
no outgoing calls
no test coverage detected