Skip to content

CustomVisionOnnx won't work properly after upgrading to ML. NET 2.0 #28

@BigHeadDev

Description

@BigHeadDev

I can confirm that the problem is with the nuget package Microsoft.ML.ImageAnalytics
Due to some changes in its dependency during the process from 1. x to 2.0, it no longer relies on System.Drawing.Common
image
image

The following code snippet shows the key errors:

public class WineInput {// C# Input Mapping
        [ImageType(ImageSettings.imageWidth, ImageSettings.imageHeight)]
        public Bitmap Image { get; set; }
    }
    public struct ImageSettings {
        public const int imageHeight = 416;
        public const int imageWidth = 416;
    }
MLContext context = new MLContext();
            var emptyData = new List<WineInput>();
            var data = context.Data.LoadFromEnumerable(emptyData);// Error!

How should I modify the code to use Microsoft.ML.ImageAnalytics 2.0

Thank you very much for the video posted on Youtube and learning a lot~I hope you can help me solve this problem
😁

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions