Skip to content

ObjectDetection-Onnx System.AccessViolationException: 'Attempted to read or write protected memory. #7359

@eddylai

Description

@eddylai

System Information (please complete the following information):

  • OS & Version: Windows 10/11
  • ML.NET Version: ML.NET v1.6
  • .NET Version: .NET 8.0

Describe the bug
bulild and run the download OnnxObjectDetectionApp code got exception:
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
(Visual Studo 2022 17.13.0)

To Reproduce
Steps to reproduce the behavior:

  1. open project samples\csharp\end-to-end-apps\ObjectDetection-Onnx\OnnxObjectDetection.sln
  2. buld and run OnnxObjectDetectionApp
  3. See error

Expected behavior
renders a live-stream of the device's web cam, runs the video frames through an object detection model using ML.NET, and paints bounding boxes with labels indicating the objects detected in real-time.

Screenshots, Code, Sample Projects

Image

Metadata

Metadata

Assignees

Labels

onnxExporting ONNX models or loading ONNX models

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions