Turicreate: Do not warn about .DS_Store when loading images

Created on 8 Jun 2018  路  2Comments  路  Source: apple/turicreate

Having a .DS_Store file in your folder of images (on Mac) is very common. We probably shouldn't be printing a confusing warning about it not being a supported file when calling tc.load_images:

Unsupported image format. Supported formats are JPEG and PNG file: style/.DS_Store`

Issues filed due to user feedback in #636.

bug images p2

Most helpful comment

We identify image formats only by inspecting file extensions, so to me it makes the most sense if this code simply ignored all files that don't have a supported extension. If no supported files are found, we can emit a warning then. It seems more likely that a user might have auxiliary data in these directories that they want us to ignore, then that they will be confused if we silently ignore some unsupported file format, especially if we document load_images clearly.

All 2 comments

Agreed, let's silently skip files named .DS_Store.

We identify image formats only by inspecting file extensions, so to me it makes the most sense if this code simply ignored all files that don't have a supported extension. If no supported files are found, we can emit a warning then. It seems more likely that a user might have auxiliary data in these directories that they want us to ignore, then that they will be confused if we silently ignore some unsupported file format, especially if we document load_images clearly.

Was this page helpful?
0 / 5 - 0 ratings