chainer / chainercv

ChainerCV: a Library for Deep Learning in Computer Vision
MIT License
1.48k stars 304 forks source link

DirectoryParsingLabelDataset fails to read images with an alpha channel #926

Open yoshnary opened 5 years ago

yoshnary commented 5 years ago

When I tried the ImageNet training example, it failed due to DirectoryParsingLabelDataset. ImageNet 2012 dataset has an image with an alpha channel, and DirectoryParsingLabelDataset cannot read it. I dealt with it by adding alpha='ignore' to the following function call. https://github.com/chainer/chainercv/blob/ca45a7ff2f1f6fb45fbc431c8b5bb0f8d646be0f/chainercv/datasets/directory_parsing_label_dataset.py#L148 Could you fix it in a proper way?