Skip to content

ImageClassificationTrainer PredictedLabelColumnName bug when the name is not default #7452

Closed
@Lavshyak

Description

@Lavshyak

System Information (please complete the following information):

  • OS & Version: Windows 11
  • ML.NET Version: ML.NET v4.0.2
  • .NET Version: .NET 9.0
  • Microsoft.ML.Vision 4.0.2
  • SciSharp.TensorFlow.Redist 2.3.1 (or Windows GPU 2.3.1)

Describe the bug
If ImageClassificationTrainer.Options PredictedLabelColumnName = "PredictedLabel" (default), no bugs.
But if ImageClassificationTrainer.Options PredictedLabelColumnName = "PredictedLabelKey" (not default), i get exception "Could not find input column 'PredictedLabelKey' (Parameter 'inputSchema')" from KeyToValueMappingTransformer (inputColumnName: "PredictedLabelKey") when Fit().

Expected behavior
No exception

Screenshots, Code, Sample Projects
Project with reproduction and xunit: https://github.com/Lavshyak/MLNetImageClassificationTrainerPredictedColumnNameProblem/blob/master/MLNetImageClassificationTrainerPredictedColumnNameProblem/UnitTest1.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions