Comments (6)
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.
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.
var ofd = new Microsoft.Win32.OpenFileDialog();
if (ofd.ShowDialog() == true)
{
var image = Compunet.YoloV8.ImageSelector(ofd.FileName)
}
from yolov8.
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.
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.
@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)
- System.InvalidOperationException: 'The loaded model does not support this task' HOT 3
- Results different between python and .net HOT 1
- 请问是不是只能在.net上边使用,不能在.net Framework项目上用?
- Solving problems with multithreading when working with GPU HOT 6
- Application hangs on Detect() with GPU HOT 1
- Understanding Yolov8 Task Input and Output Formats in OnnxRuntime HOT 1
- Difference between Python and DotNet HOT 1
- Is there a best example of multithreading or WebApi? HOT 1
- How to enable GPU HOT 3
- Inconsistent model results HOT 3
- Suggest adding OBB support HOT 2
- [discussion] optimize code logic to improve operational efficiency HOT 2
- Index was outside the bounds of the array. HOT 5
- Logic for resizing images to fit the size of the model input data. HOT 4
- Inference with Camera HOT 2
- It's not really using the GPU
- Getting lower confidence values HOT 2
- Load Image HOT 2
- Possible to select between fp16 and fp32? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov8.