BobLd / YOLOv4MLNet

Use the YOLO v4 and v5 (ONNX) models for object detection in C# using ML.Net
MIT License
79 stars 31 forks source link

not working with Microsoft.ML 2.0.1 #15

Closed pedoc closed 1 year ago

pedoc commented 1 year ago

I'm learning ML.NET framework, thanks for such a great example

When I looked at your repo, I found that the dependency version was rather old, so I tried to upgrade to the latest version (2.0.1) through nuget, and then, when I run, it will throw the following exception

    var model = pipeline.Fit(mlContext.Data.LoadFromEnumerable(new List<YoloV4BitmapData>()));//include YoloV3BitmapData 
System.ArgumentOutOfRangeException: "Could not determine an IDataView type and registered custom types for member Image Arg_ParamName_Name"

I didn't find any merge instructions for upgrading from 1.x to 2.x via Google, do you know how to fix this?

Thanks in advance

pedoc commented 1 year ago

Use MLImage to replace the Bitmap type