stereolabs / zed-csharp-api

C# API for the ZED SDK
MIT License
10 stars 3 forks source link

CustomVision Onnx compatibility #14

Closed LudoTexx closed 3 years ago

LudoTexx commented 3 years ago

Hello,

After a while, I working back on zed camera, I have really appreciate the last update with all this new objects in detection.

Thank for having rename everything in C# API, closest compatibly with C++ name in documentation, its nice.

We already use ZED object detection for humans, and some engine, but for our project we try to detect our own object (underground old objects), I have try and work with Custom Vision since some days now, at this point I can detect my own object directly with Azure API online, and still working on local detection with onnx file.

The final goal is to take a capture frame from the Zed cam (like every 1/2 seconds), send the frame to CustionVision AI object detection and set an alarm if the detection is confirmed.

This could be interesting to add a kind of feature in ZED for use onnx file and use our own object detection.

Or maybe a system is already implemented in ZED for our own object detection in C#.

Thank you for reading.

obraun-sl commented 3 years ago

Hi, Yes that's definitely something we are looking at as it is not the first request for it...!

LudoTexx commented 3 years ago

Hello again,

So i have successfully implemented onnx detection with local computer without AZURE service and made it work in WPF app.

Now i try to add in this test project to make it work with ZED camera frame.

I have already write functions for convert "WriteableBitmap" from zed to "VideoFrame" for use Onnx ML detection.

But when i try to add zed refences with NuGet , i can get the Stereolabs.zed DLL, but for the interface i got this error :

Attempting to gather dependency information for package 'sl_zed_interface.3.4.0' with respect to project 'ZedOnnxDetection', targeting '.NETFramework,Version=v4.7.2'
Gathering dependency information took 65 ms
Attempting to resolve dependencies for package 'sl_zed_interface.3.4.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'sl_zed_interface.3.4.0'
Resolved actions to install package 'sl_zed_interface.3.4.0'
Adding package 'sl_zed_interface.3.4.0' to folder 'C:\GitHub\ZedOnnxDetection\packages'
Added package 'sl_zed_interface.3.4.0' to folder 'C:\GitHub\ZedOnnxDetection\packages'
Install failed. Rolling back...
Package 'sl_zed_interface.3.4.0' does not exist in project 'ZedOnnxDetection'
Removing package 'sl_zed_interface.3.4.0' from folder 'C:\GitHub\ZedOnnxDetection\packages'
Removed package 'sl_zed_interface.3.4.0' from folder 'C:\GitHub\ZedOnnxDetection\packages'
Executing nuget actions took 4,69 sec
Failed to add reference to 'sl_zed_interface'.
  Please make sure that the file is accessible, and that it is a valid assembly or COM component.
Time Elapsed: 00:00:07.5127584
========== Finished ==========

So off course, i can't run...

image

The first time i have work ZED, Nuget was not unavailable, first time i use so maybe i do something wrong..

EDIT : ZED SDK is up do date and camera work perfectly with Zed Explorer, etc..