Skip to content

Image support in IDataView and transforms. #489

Closed
@Ivanidzo4ka

Description

@Ivanidzo4ka

Currently only way to work with images is by manually loading pixels arrays into array field in the class and wrap that class into collection data source. Which is not pleasant.

I propose to add support for type Image in DataView type system which can be based on System.Drawing.Bitmap This way user can specify Bitmap image in their class and it will be properly consumed by CollectionDataSource.

Also I suggest to implement transform which would accept column with file paths and load this images during pipeline execution. Which allow you to save memory in case of streaming dataview, some trainers support streaming structure of data, and this way you need to keep in memory only one image for current row instead of images for all rows.

Since quite often you need to modify images (Re-scale them, transform image into Grayscale, etc) it make sense to keep Image format as "image" and not directly convert it into vector of floats which we require for learners. Which means we need transform which would convert Image type into feature vector.

To summarize I propose to create following:

Image type based on Bitmap.
ImageLoader transform
ImageResizer transform
ImageGrayscale transform
ImageToPixels transform

@shauheen @TomFinley @glebuk

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly APIenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions