LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Tensorflow API for LabVIEW

Status: New

TensorFlow is an open source machine learning tool originally developed by Google research teams.

 

Quoting from their API page:

 

TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most complete and the easiest to use, but the C++ API may offer some performance advantages in graph execution, and supports deployment to small devices such as Android.

Over time, we hope that the TensorFlow community will develop front ends for languages like Go, Java, JavaScript, Lua R, and perhaps others.

 

Idea Summary: I would love to see LabVIEW among the "perhaps others". 😄

 

(Disclaimer: I know very little in that particular field of research)

 

18 Comments
TonyLHw
Member

Hi ZhankuiHuo,

   We discussed this over email.  I'll post here in case others are interested.  The Tensorflow model trained requires input pixels as floating point RGB (0.0 to 1.0).  The image imported in LabVIEW returns pixel values from 0 to 255.  Either change LabVIEW to make pixels to be between 0.0 and 1.0, or change Tensorflow graph to accept pixels from 0 to 255.  Happy building!

wngjiehao
Member

Hello, TonyLHw, I am using win7 64 bit, through the trained Mnist dataset, LeNet Network. Call error in LabVIEW: IMAQ DL Model Create
Error reported from TensorFlow
Error Code: 15
Description: Can't parse G:\hand\CNN_MNIST\lenet.pb as binary proto

 

TonyLHw
Member

Hi wngjiehao,

My apologies for the delay.  Good question.  IMAQ calls into a tensorflow dll internally. that error in particular is from tensorflow.  When that happens I typically search if anyone else has seen it online also.  If you message me your code I'd be happy to help.  Be sure pb file contains frozen graph, which contains the trained constants.  There is example python code for this earlier.

wngjiehao
Member

 Hi,  TonyLHw

Thank you for your answer. My problem has been solved. According to the query data, because the TensorFlow version of LabVIEW is 1.4.1, the corresponding TensorFlow version needs to be installed.

TonyLHw
Member

Glad your issue has been solved!  That is a good point.  TensorFlow version is important.  When using TensorFlow Object Detection API for instance.  I acquire gitHub code from date of  TensorFlow version that Labview uses.

AlexZhang
Member

If you wanna know how to train the AI model by yourself, please refer to the book <深度学习图像识别技术>

arno_phil
Member

Hi everyone,

 

We are facing a small issue with the integration of tensorflow in our software :

our software allows to run a model training through our interface. Everything works fine but when the learning process is running, the labview interface switch to "not responding" since the code is stuck on the python node...

Do you have any idea to fix this issue? Ideally, we would like to display a progress bar but don't know how to do...

All ideas are welcome!

 

Many thanks in advance!

 

frozen_interface.png

TonyLHw
Member

I have not tried this myself yet, or know if it would work, but one thought would be to have the python execution node kick off the training (calls a python function that then kicks off training asynchronously then returns).  Then have another function that can read the status of the training from LabVIEW.  I thought that LabVIEW didn't hang while it was executing a python execution node, but I could be remembering wrong.