aisegmentcn / matting_human_datasets

人像matting数据集,包含34427张图像和对应的matting结果图。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How about saving image and mask respectively for better compression rate

austingg opened this issue · comments

Firstly, great dataset!

How about saving image and mask respectively, since the dataset is more than 14G now? the image part can be compressed a lot with jpg compared with png, the mask is saved to a single channel png.

Hello, for examining and improving the quality of matting data, we surpply matting images.
Users can read matting images and then create alpha file.
in_image = cv2.imread('png图像文件路径', cv2.IMREAD_UNCHANGED)
alpha = in_image[:,:,3]
cv2.imwrite('png格式的alpha文件路径', alpha)

@aisegmentcn Yes, I knew the matting image was in the alpha channel.

If you separate RGB image and mask channel into two file, e.g (one example is consist of image1.jpg, and image1.png [matting mask]), both of them would get a better compress rate, may be smaller than 10G. That will be helpful for downloading and transporting the dataset.

In a nutshell, png format is much larger than jpg format.