dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.02k stars 1.88k forks source link

[Image Classification DNN] - Need to support additional image formats, not just JPEG #4152

Closed CESARDELATORRE closed 5 years ago

CESARDELATORRE commented 5 years ago

The current implementation only supports JPEG images for the dataset since it only has JpegDecodingetc. internally.

Ideally, we need to support the same image formats than the ones supported by each Architecture (InceptionV3, ResNet, etc.)

See in PR: https://github.com/dotnet/machinelearning/pull/4151/files#diff-37f2285ba1483af56ae20862631502ecR177

codemzs commented 5 years ago

The current tf.net version we are using does not seem to have bindings for all image types. But the latest version seems to have we will upgrade to them latest next month

codemzs commented 5 years ago

@ashbhandare is looking into this.

ashbhandare commented 5 years ago

According to Tensorflow documentation for decode_jpeg (https://www.tensorflow.org/api_docs/python/tf/io/decode_jpeg), the function supports "decoding PNGs and non-animated GIFs". This implies that currently, there is support for JPEG, PNG and non-animated GIFs in the ImageClassification implementation.