dotnet / dotnet/machinelearning-modelbuilder

Support custom data sources

Open
#2,174 2 comments 0 reactions 0 assignees View on GitHub
Code Example? Feature request Stale
Dominant language
Dockerfile
Stars
285
Forks
66
PR merge metrics
No merged PRs in 30d

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.

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

But I would like to do something like this:

```json
"DataSource": {
"Type": "Class",
"Version": 1,
"ClassName": "CustomImageImporter"
},
```
```c#
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.