dotnet / dotnet/machinelearning

Attempting to use In Memory Images for Prediction

Open
#5,697 2 comments 0 reactions 0 assignees View on GitHub
area-Vision documentation Priority:2
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

### System information

- Windows 10

### Issue

- **I'm trying to use in memory images with an ML Model Loaded from an MLModel.zip file**
- **I cannot work our how to build the pipeline in order to adapt the input schema?**

### Source code / logs

I'm following the examples I can find in the ML repository. The such as the WebApp and WebApi Images classification example applications but they all wrap a tensorflow model in order to then be able to pass a Bitmap to the Prediction method.

I've been trying all day to find either simpler examples or the right syntax and I've completely failed so far. The examples build pipelines to do things like resizing, extracting pixels and recolorising whereas all my images are pre-prepared and I'm using an ML.NET model which should be the simplest use case but there aren't currently any of these simpler examples.

What I cant find out how to do, or even identify if it's the right approach, is create a pipeline that loads an ML.NET "native" model created by Model Builder then adapt this to take in a Bitmap using the same type of class as in the [demos](https://github.com/CESARDELATORRE/TensorFlowImageClassificationWebApp):

Such as this:

```
public class ImageInputData
{
[ImageType(227, 227)]
public Bitmap Image { get; set; }
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.