GithubHelp home page GithubHelp logo

Model not supported about yolov8 HOT 6 CLOSED

dme-compunet avatar dme-compunet commented on June 18, 2024
Model not supported

from yolov8.

Comments (6)

dme-compunet avatar dme-compunet commented on June 18, 2024

Hello @uri-el99, this exception is thrown because you are trying to perform detection from a model whose task is not 'detect'. YOLOv8 has models for several tasks, you must make sure that the inference you make matches to task of the model. (you can see the model task in the Netron tool)

from yolov8.

uri-el99 avatar uri-el99 commented on June 18, 2024

Hello @uri-el99, this exception is thrown because you are trying to perform detection from a model whose task is not 'detect'. YOLOv8 has models for several tasks, you must make sure that the inference you make matches to task of the model. (you can see the model task in the Netron tool)

I greatly appreciate your response and help on this problem, thank you very much for that observation.
Hoping not to take up your time, I would like to know if you can help me with another question.
I want to load an image in WindowsForms through an OpneFileDialog and display the image in another one, but already with the results obtained by the model. Do you know how I can make the conversion from System.Drawing.Image to Compunet.YoloV8.ImageSelector?

from yolov8.

FunJoo avatar FunJoo commented on June 18, 2024
var ofd = new Microsoft.Win32.OpenFileDialog();
if (ofd.ShowDialog() == true)
{
    var image = Compunet.YoloV8.ImageSelector(ofd.FileName)
}

from yolov8.

uri-el99 avatar uri-el99 commented on June 18, 2024
var ofd = new Microsoft.Win32.OpenFileDialog();
if (ofd.ShowDialog() == true)
{
    var image = Compunet.YoloV8.ImageSelector(ofd.FileName)
}

Hi @FunJoo hope I am not disturbing you. Rephrasing my question, how can I display the result in a PictureBox?
I want to open an image that is displayed in a PictureBox, and, subsequently, that selected image is analysed and the result is displayed in another PictureBox. I hope you can help me a bit and sorry for the inconvenience.

from yolov8.

FunJoo avatar FunJoo commented on June 18, 2024

Hi, @uri-el99 I do not use WinForm, but I can provide you with a method given by ChatGPT4.

public static SixLabors.ImageSharp.Image<Rgb24> ConvertToImageSharpImage(System.Drawing.Image systemDrawingImage)
{
    using MemoryStream memoryStream = new MemoryStream();
    systemDrawingImage.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Png);
    memoryStream.Seek(0, SeekOrigin.Begin);
    return SixLabors.ImageSharp.Image.Load<Rgb24>(memoryStream);
}

public static System.Drawing.Image ConvertToSystemDrawingImage(SixLabors.ImageSharp.Image<Rgb24> imageSharpImage)
{
    using MemoryStream memoryStream = new MemoryStream();
    imageSharpImage.Save(memoryStream, new SixLabors.ImageSharp.Formats.Png.PngEncoder());
    memoryStream.Seek(0, SeekOrigin.Begin);
    return System.Drawing.Image.FromStream(memoryStream);
}

When encountering situations where Compunet.YoloV8.ImageSelector is needed, you can directly use SixLabors.ImageSharp.Image.

from yolov8.

uri-el99 avatar uri-el99 commented on June 18, 2024

@FunJoo Thanks for all your support, using the information you provided, I was able to solve that problem, and, although others came up later, I was able to solve them.
I appreciate the time you took to find a solution, thank you very much. best regards!

from yolov8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.