dotnet / machinelearning-samples

Samples for ML.NET, an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
4.47k stars 2.68k forks source link

Mark System.Drawing.Common as Required in ObjectDetection Example #1041

Open Eddie-Hartman opened 1 month ago

Eddie-Hartman commented 1 month ago

I was following along with this tutorial and got to the end: https://learn.microsoft.com/en-us/dotnet/machine-learning/tutorials/object-detection-onnx#create-helper-functions

and could not compile because Image was not a recognized class. In previous versions, System.Drawing.Common was a transitive dependency and would get installed. It's not now and so the documentation needs updated to require installing this package from NuGet in the Pre-requisites section: https://learn.microsoft.com/en-us/dotnet/machine-learning/tutorials/object-detection-onnx#create-helper-functions

See here as well: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only