Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent model results #34

Closed
monkeycc opened this issue Jan 13, 2024 · 2 comments
Closed

Inconsistent model results #34

monkeycc opened this issue Jan 13, 2024 · 2 comments

Comments

@monkeycc
Copy link

monkeycc commented Jan 13, 2024

    static async Task DetectDemo(string image, string outputDirectory, YoloV8 predictor)
    {
        Console.WriteLine();
        Console.WriteLine("================ DETECTION DEMO ================");
        Console.WriteLine();

        Console.WriteLine($"Processing image: {image}");


        Console.WriteLine("Working...");
        using var origin = Image.Load(image);
        using var resizedImage = origin.Clone(ctx => ctx.Resize(new ResizeOptions
        {
            Size = new Size(1280, 1280),
            Mode = ResizeMode.Max
        }));

        Console.WriteLine("Working...");
        var result = await predictor.DetectAsync(resizedImage);

        Console.WriteLine();
        Console.WriteLine($"Result: {result}");
        Console.WriteLine($"Speed: {result.Speed}");
        Console.WriteLine();

        Console.WriteLine("Plotting and saving...");
        // using var origin = Image.Load(image);
        using var plotted = await result.PlotImageAsync(resizedImage);

        var pathToSave = Path.Combine(outputDirectory, Path.GetFileName(image));
        plotted.Save(pathToSave);
    }

Inconsistent model results

Python inference
C # Inference

Two different results
C # is missing

The same goes for scaling images
What should I do ?

@dme-compunet
Copy link
Owner

dme-compunet commented Jan 14, 2024 via email

@dme-compunet
Copy link
Owner

dme-compunet commented Mar 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants