dotnet / dotnet/machinelearning-samples
Unable to run/debug application OnnxObjectDetectionWeb
- 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
Assessment
This issue has not been assessed yet.