From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
This example demonstrates the use of the Model Importer API in the Vision Development Module to perform Object detection feature for Defect Inspection application using Deep Learning.
The example uses a pre-trained model – SSD_MobilenetV1 which is trained in TensorFlow. This model is loaded using the Model Importer VI to detect defects in the images.
The example has two controls:
Front Panel:
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
If I read this correctly, the heavy lifting (training, configuration, etc) is done first in Python, then when we want to run the model, we can use this set of .vis to reload that model and classify images. Is that correct?
To classify is NI Vision running python to do this or is tensorflow being called directly somehow? Is this any better than trying to do the classification with some labview<->python bridge?
What are the Python, tensorflow, etc versions needed?
Dear D*,
Yes, tensorflow is used to do the heavy lifting and Labview VIs do the model loading and inference.
The supported tensorflow version is 1.4. Python is not being used here for execution.
For deployment scenarios labvew<-->python bridge doesn't make life easier for the end user.
Python version would be whichever you use for your development.
@thuyanhl 已写:
Overview
This example demonstrates the use of the Model Importer API in the Vision Development Module to perform Object detection feature for Defect Inspection application using Deep Learning.
Description
The example uses a pre-trained model – SSD_MobilenetV1 which is trained in TensorFlow. This model is loaded using the Model Importer VI to detect defects in the images.
The example has two controls:
- Select Image Control to browse through different images.
- Minimum Score Threshold input, which determines which defects to overlay on the image display.
Hardware and Software Requirements
- LabVIEW Full Development System 64-bit 2018 or later
- Vision Development Module 2018 or later
Steps to Implement or Execute Code
- Run the Deep Learning Object Detection.VI
- Choose a specific image using the Select Image slider control
- Observe the bounding box values for the detected defects and the Score Threshold in the Detected Defects array. This array shows every defect in the selected image.
- Modify the Minimum Score Threshold to select which bounding box to overlay.
Additional Information or References
- Deep Learning VIs: http://zone.ni.com/reference/en-XX/help/370281AE-01/TOC75.htm
- Deep Learning Introduction: http://zone.ni.com/reference/en-XX/help/370281AE-01/nivisionconcepts/deeplearning_introduction/
- Deep Learning FAQs: http://zone.ni.com/reference/en-XX/help/370281AE-01/nivisionconcepts/deeplearning_faq/
Front Panel:
Would you please post out the python code for training the tensorflow model and saving the model for this project?
As mentioned in the previous two posts, we are also very much interested in testing out the python code for generating the tensorflow model and the training data set for setting up and train our own models. Could someone please share the code and the training data set with us?
Tensorflow model zoo being open source the changes may happen in the object detection model's topology and older published models may get out-dated. A good idea would be to follow object_detection/Readme.md and the links mentioned in there. eg. training_pets.
This page is pretty symptomatic of the abysmal level of documentation in LabVIEW nowadays.
You might think: well, this is just a page to post an example of how to use TensorFlow in LabVIEW, and links are posted for further information.
Think again.
Link 1: list of Deep Learning VIs linking to the terse Help file for each VI (terse as "nothing to be gained from it").
Link 2: Half a page description of the Vision Development Module (it's used to handle images?)
Link 3: Half a page FAQ
If you know TensorFlow, you don't need LabVIEW to use it and in fact you will want to stay away from it in all likelihood.
If you don't know TensorFlow, well, I have really no clue as to what you will gain from this series of VIs.
This is not specific to Deep Learning. In fact, the whole Vision Development module is exactly as undocumented.
It is as if NI had concluded they did not need to bother with documentation (while still charging an arm and a leg for their software).
Sad state of affair, indeed. Luckily, open source software is thriving. A coincidence?
Hi NI Team,
I'm working on Custom labeled Object detection. so I need to create own TensorFlow frozen graph with a version<1.4. I can able to create a frozen graph with the latest version, But that doesn't support in LabVIEW. If I try with Tensorflow 1.4, I am getting an error. Please help me to create a frozen graph with Tensorflow 1.4.