lsun
lsun copied to clipboard
Add 'save' command for saving images as jpg files.
Certain machine learning tools require every training image files contained in one folder, hence the 'save' command is needed, at least for my work:)
If only saving images in one folder is concerned here, does "--flat" for export serve the purpose?
I tried export --flat
and did get all the images in one folder with extension *.webp. But I wanted them as *.jpg.
I just find that changing this line to image_out_path = join(image_out_dir, key + '.jpg')
will just meet the purpose. AND it's a lot faster than cv2.imwrite
.
If you think it'll be useful, I can commit another pull request with this method.
I see. cv2.imwrite may be unavoidable to make the generated images supported by general image io. I will commit a fix for this soon.
Thank you for that:) BTW, this dataset is fantastic!!!