mdbloice / Augmentor

Image augmentation library in Python for machine learning.
https://augmentor.readthedocs.io/en/stable
MIT License
5.08k stars 866 forks source link

Different image types #211

Closed Franciscose1 closed 4 years ago

Franciscose1 commented 4 years ago

Hi,

I am currently working with the ISIC-2017 dataset, that contains images as .jpg and masks as .png

When adding the ground truth masks, the output is:

0 ground truth image(s) found.

If I convert the image to .jpg, this problem disappears. Is is possible to add support to .png?

Thank you, Francisco

joys8998 commented 4 years ago

The problem is not the support of .png files since the library works fine with .png files but the extension file in images and groundtrith has to be the same. If you use .png images and .png masks it should work.

From the documentation:

an image titled cat321.jpg will match with the image cat321.jpg in the ground_truth_directory. The function respects each image’s label, therefore the image named cat321.jpg with the label cat will match the image cat321.jpg in the subdirectory cat relative to ground_truth_directory.

Franciscose1 commented 4 years ago

Thank you very much!

Though it would be better to match through the same name, independently of the extension in use.