dotnet / dotnet/machinelearning-samples

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

Offen
#894 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PowerShell
Sterne
4.7k
Forks
2.7k
Ø Merge
2 T. 22 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit dem verlinkten ML.NET-Tutorial zur Bildklassifizierung und der im Issue gezeigten Verwendung von ImageNetData.ReadFromFile und OnnxModelScorer.Score. Ermitteln Sie, wie ein Bild aus einer PictureBox in den Scoring-Ablauf dieses Beispiels gelangen sollte, und überprüfen Sie anschließend, dass es das erwartete Klassifizierungsergebnis liefert, ohne auf die Aufzählung von Ordnern angewiesen zu sein.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, machine-learning
Bereich
machine-learning
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
15/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.