TensorFlow.NET | NET Standard bindings Google 's TensorFlow | Machine Learning library
kandi X-RAY | TensorFlow.NET Summary
kandi X-RAY | TensorFlow.NET Summary
TensorFlow.NET (TF.NET) provides a .NET Standard binding for TensorFlow. It aims to implement the complete Tensorflow API in C# which allows .NET developers to develop, train and deploy Machine Learning models with the cross-platform .NET Standard framework. TensorFlow.NET has built-in Keras high-level interface and is released as an independent package TensorFlow.Keras.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TensorFlow.NET
TensorFlow.NET Key Features
TensorFlow.NET Examples and Code Snippets
Community Discussions
Trending Discussions on TensorFlow.NET
QUESTION
We have written a x-plat worker service using .NET 5 that is running on a Raspberry PI 4 (Raspberry Pi OS). We have trained a custom vision object detection model on customvision.ai, exported it to ONNX and it all works well on Windows.
We are now struggling to get it running on the Pi. The ML.NET bits does not seem to work on the Pi. We're getting (with target runtime "linux-arm"):
Microsoft.ML currently supports 'x64' and 'x86' processor architectures. Please ensure your application is targeting 'x64' or 'x86'
We've searched hi and low for any working examples. We've also tried to export to Tensorflow format and explore Tensorflow.NET without any success.
Can anyone point to an example that is consuming a customvision.ai generated model in .NET Core/5 on a Raspberry PI? We are extending an existing prototype and would like to avoid rewriting it all in Python/C++ or create out of process calls.
Versions: ML.NET 1.6, Microsoft.ML.OnnxRuntime 1.8.1
Many thanks,
Mansos
...ANSWER
Answered 2021-Oct-09 at 23:57Are you running an Uno Platform app to capture a picture from the camera module (or usb webcam) in your Pi4 and running ML.Net too?
QUESTION
I am using the TensorFlow.net library for loading some machine learning models. Everything works fine in the editor. However, when I am building the app (Windows standalone app) the dll is not loaded and therefore callbacks to the TensorFlow models cannot be made. The strangest thing is that the dll works fine and is loaded when I build the player as a development build with script debugging enabled. I tried moving the dll next to the .exe on the root folder but the problem persisted.
Any ideas on how to approach the issue?
...ANSWER
Answered 2020-Sep-03 at 10:24I solved this so I am posting the answer in case someone might find this helpful in the future.
The problem was that I have added all the managed and native DLLs inside the Unity project manually by downloading the dll from visual studio through nugget, compiling, and then copying the file inside the assets/Plugins folder. That probably created some dependencies that they were working inside the editor but the dll was unable to find the corresponding package when building the app.
The solution came by using nuget2Unity that automatically downloads NuGet packages and translates them to unity packages. Using this tool I was able to make it work both in the editor and standalone player. In case you follow this solution and you receive errors such as "unloading broken assembly", "could not load signature", just move all the managed dlls to the same Plugins folder under assets and the error will go away.
I hope this answer may come in handy.
QUESTION
I'm currently working on a desktop tool in .NET Framework 4.8 that takes in a list of images with potential cracks and uses a model trained with ML.Net (C#) to perform crack detection. Ideally, I'd like the prediction to take less than 100ms on 10 images (Note: a single image prediction takes between 36-41ms).
At first, I tried performing multiple predictions in different threads using a list of PredictionEngines and a Parallel.For-loop (using a list of threads since there is no PredictionEnginePool implementation for .Net Framework). I later learned that using an ITransformer to do predictions is a recommended, thread-safe, approach for .Net Framework and moved to using that, but in both cases it did not give me the performance I was hoping for.
It takes around 255-281ms (267.1ms on average) to execute the following code:
...ANSWER
Answered 2020-Aug-31 at 19:31It's likely a version mismatch.
TensorFlow supports CUDA® 10.1 (TensorFlow >= 2.1.0)
https://www.tensorflow.org/install/gpu
You can check your output window for reasons why it would not be connecting to your GPU.
QUESTION
I have c# TensorFlow.NET working in Unity. But it using an image from the file system. I want to be able to use an image from memory (Texture2D).
I tried to follow some examples of people using TensorFlowSharp. But that didn't work.
What am I doing wrong?
Note: with both functions, I am using the same image. The image is 512x512. but the result of both pictures is different.
...ANSWER
Answered 2020-Jul-03 at 10:40I ended up using this code from Shaqian: https://github.com/shaqian/TF-Unity/blob/master/TensorFlow/Utils.cs
Add this script to your project and then you could use it like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TensorFlow.NET
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page