dotnet / dotnet/machinelearning-samples

Hello, this is C# ML.net object. I have a coding question for ML.net object search

Open
#894 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
4.7k
Forks
2.7k
Avg merge
2d 22h
Merged PRs (30d)
1

Description

https://docs.microsoft.com/ko-kr/dotnet/machine-learning/tutorials/image-classification

I’m studying at the top.

`
public class ImageNetData
{
[LoadColumn(0)]
public string ImagePath;

[LoadColumn(1)]
public string Label;

public static IEnumerable ReadFromFile(string imageFolder)
{
return Directory
.GetFiles(imageFolder)
.Where(filePath => Path.GetExtension(filePath) != ".md")
.Select(filePath => new ImageNetData { ImagePath = filePath, Label = Path.GetFileName(filePath) });
}
}
`

`
IEnumerable images = ImageNetData.ReadFromFile(imagesFolder);
IDataView imageDataView = mlContext.Data.LoadFromEnumerable(images);
var modelScorer = new OnnxModelScorer(imagesFolder, modelFilePath, mlContext);

// Use model to score data
IEnumerable probabilities = modelScorer.Score(imageDataView);
`

I think the syntax code here is a way to get it into a folder and save the image file inside, but I want to send the image of the picturebox to get the result value.

But this is a way to take all the pictures in the folder and save them as outford…

How can I send the image of the picturebox to produce the results?

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.