NumpyToPIL¶ class mmpretrain.datasets.transforms.NumpyToPIL(to_rgb=False)[源代码]¶ 将图片从 OpenCV 格式转为为 PIL.Image.Image 格式 Required Keys: img Modified Keys: img 参数: to_rgb (bool) – Whether to convert img to rgb. Defaults to True. transform(results)[源代码]¶ Method to convert images to PIL.Image.Image.