dotnet / dotnet/machinelearning-samples

Unable to run/debug application OnnxObjectDetectionWeb

Open
#879 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
PowerShell
Stars
4.7k
Forks
2.7k
Avg merge
2d 22h
Merged PRs (30d)
1

Description

Hi all - I have cloned the app, followed the instructions in the readme file, but I'm unable to run the Web App OnnxObjectDetectionWeb. I'm using Visual Studio 2019 Pro and I have enabled the "Preview Features" as recommended in the guide.

I'm receiving the following error

**System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'**

Issue happens in line 25, file OnnxModelConfigurator.cs

```
var pipeline = mlContext.Transforms.ResizeImages(resizing: ImageResizingEstimator.ResizingKind.Fill, outputColumnName: onnxModel.ModelInput, imageWidth: ImageSettings.imageWidth, imageHeight: ImageSettings.imageHeight, inputColumnName: nameof(ImageInputData.Image))
.Append(mlContext.Transforms.ExtractPixels(outputColumnName: onnxModel.ModelInput))
.Append(mlContext.Transforms.ApplyOnnxModel(modelFile: onnxModel.ModelPath, outputColumnName: onnxModel.ModelOutput, inputColumnName: onnxModel.ModelInput));

```

Any ideas how to fix it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.