title: The ML.net prediction has HUGE different compared with Custom Vision
body: <p>I've trained a model(object detection) using Azure Custom Vision, and export the model as ONNX,
  then import the model to my WPF(.net core) project.</p>
  <p>I use ML.net to get prediction from my model, And I found the result has HUGE different compared with the prediction I saw on Custom Vision.</p>
  <p>I've tried different order of extraction (ABGR, ARGB...etc), but the result is very disappointed, can any one give me some advice as there are not so much document online about Using Custom Vision's ONNX model with WPF to do object detection.</p>
  <p>Here's some snippet:</p>
  <pre><code>        // Model creation and pipeline definition for images needs to run just once, so calling it from the constructor:
          var pipeline = mlContext.Transforms
              .ResizeImages(
                  resizing: ImageResizingEstimator.ResizingKind.Fill,
                  outputColumnName: MLObjectDetectionSettings.InputTensorName,
                  imageWidth: MLObjectDetectionSettings.ImageWidth,
                  imageHeight: MLObjectDetectionSettings.ImageHeight,
                  inputColumnName: nameof(MLObjectDetectionInputData.Image))
              .Append(mlContext.Transforms.ExtractPixels(
                  colorsToExtract: ImagePixelExtractingEstimator.ColorBits.Rgb,
                  orderOfExtraction: ImagePixelExtractingEstimator.ColorsOrder.ABGR,
                  outputColumnName: MLObjectDetectionSettings.InputTensorName))
              .Append(mlContext.Transforms.ApplyOnnxModel(modelFile: modelPath, outputColumnName: MLObjectDetectionSettings.OutputTensorName, inputColumnName: MLObjectDetectionSettings.InputTensorName));
  
          //Create empty DataView. We just need the schema to call fit()
          var emptyData = new List&lt;MLObjectDetectionInputData&gt;();
          var dataView = mlContext.Data.LoadFromEnumerable(emptyData);
  
          //Generate a model.
          var model = pipeline.Fit(dataView);
  </code></pre>
  <p>Then I use the model to create context.</p>
  <pre><code>            //Create prediction engine.
              var predictionEngine = _mlObjectDetectionContext.Model.CreatePredictionEngine&lt;MLObjectDetectionInputData, MLObjectDetectionPrediction&gt;(_mlObjectDetectionModel);
  
              //Load tag labels.
              var labels = File.ReadAllLines(LABELS_OBJECT_DETECTION_FILE_PATH);
  
              //Create input data.
              var imageInput = new MLObjectDetectionInputData { Image = this.originalImage };
  
  
              //Predict.
              var prediction = predictionEngine.Predict(imageInput);
  </code></pre>