warmspringwinds / tf-image-segmentation

Image Segmentation framework based on Tensorflow and TF-Slim library
MIT License
549 stars 186 forks source link

Use scipy.misc.imread instead of PIL Image #3

Open meetps opened 7 years ago

meetps commented 7 years ago

WRT

https://github.com/warmspringwinds/tf-image-segmentation/blob/master/tf_image_segmentation/utils/tf_records.py#L37

I think you should reconsider using scipy.misc.imread in place of PIL Image, because for VOC datasets, the PIL loads a grayscale image for the segmentation annotation, while a 3 channel input is necessary to determine the segments.

warmspringwinds commented 7 years ago

Hi,

Can you elaborate more?

I agree PIL is a bad dependency.

I needed a way to do this.

If it is possible to do with scipy.misc.imread, I would be glad to change it.