techwingslab / yolov5-net

YOLOv5 object detection with C#, ML.NET, ONNX
MIT License
351 stars 104 forks source link

Predict(image) no matching #86

Closed NBarile closed 12 months ago

NBarile commented 12 months ago

Hi,

I have this error, and I don't know how to resolve it. image

It's my input image ? Or my model ? Or my Class ? Here you can see my YoloClass for my Custom Detection


public record MyYolo : YoloModel
{
    public MyYolo()
        : base(640, 640, 3, 6, new int[] { 8, 16, 32 }, new int[][][]
        {
            new int[][]
            {
                new int[] { 10, 13 },
                new int[] { 16, 30 },
                new int[] { 33, 23 }
            },
            new int[][]
            {
                new int[] { 30, 61 },
                new int[] { 62, 45 },
                new int[] { 59, 119 }
            },
            new int[][]
            {
                new int[] { 116, 90 },
                new int[] { 156, 198 },
                new int[] { 373, 326 }
            }
        }, new int[] { 80, 40, 20 }, 0.2f, 0.25f, 0.45f, new string[] { "output" }, new List<YoloLabel>
        {
            new YoloLabel(0, "pointrouge"),
            new YoloLabel(1, "pointblanc")
        }, UseDetect: true)
    {
    }
}```

If you need more information, please ask me :p

Thanks !
NBarile commented 12 months ago

I resolve my problem I find the solution here : https://github.com/techwingslab/yolov5-net/issues/75

DuranDurannn commented 1 week ago

@NBarile Hi, may I know which part of the code that you needed to change? Im still quite new with C# and have no idea what I am suppose to do to resolve my issue.