Skip to content

Support custom data sources #2174

Open
Open

Description

I want to use image classification, but I have images in heterogeneous locations, and some need some kind of custom pre-processing, so the current image data sources is very limiting

Also, there's some other scenarios I'm facing which might require the images to feed to ML will need some sort of preprocessing. It's a big waste to have to write them to temporary files.

"DataSource": {
    "Type": "Folder",
    "Version": 1,
    "FolderPath": "c:\\Images"
  },

But I would like to do something like this:

"DataSource": {
    "Type": "Class",
    "Version": 1,
    "ClassName": "CustomImageImporter"
  },
class CustomImageImporter : IImageClassifierImporter
{
    public IEnumerable<(string Label, Byte[] Image)> EnumerateLabeledInputImages()
    {
        yield return ("cat", LoadBytes("cat.png"));
        yield return ("dog", LoadBytes("dog.png"));
    }
}

The only alternative I have right now is not using AutoML and writing the whole thing in ML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions