aisegmentcn / matting_human_datasets

人像matting数据集,包含34427张图像和对应的matting结果图。
Other
614 stars 64 forks source link

How about saving image and mask respectively for better compression rate #1

Closed austingg closed 5 years ago

austingg commented 5 years ago

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.

aisegmentcn commented 5 years ago

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)

austingg commented 5 years ago

@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.