| ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
Module DocumentationTensorFlow is a popular neural network framework. This module identifies the object in a square region in the center of the camera field of view using a deep convolutional neural network. The deep network analyzes the image by filtering it using many different filter kernels, and several stacked passes (network layers). This essentially amounts to detecting the presence of both simple and complex parts of known objects in the image (e.g., from detecting edges in lower layers of the network to detecting car wheels or even whole cars in higher layers). The last layer of the network is reduced to a vector with one entry per known kind of object (object class). This module returns the class names of the top scoring candidates in the output vector, if any have scored above a minimum confidence threshold. When nothing is recognized with sufficiently high confidence, there is no output.
This module runs a TensorFlow network and shows the top-scoring results. In this module, we run the deep network on every video frame, so framerate will vary depending on network complexity (see below). Point your camera towards some interesting object, make the object fit within the grey box shown in the video (which will be fed to the neural network), keep it stable, and TensorFlow will tell you what it thinks this object is. Note that by default this module runs different flavors of MobileNets trained on the ImageNet dataset. There are 1000 different kinds of objects (object classes) that these networks can recognize (too long to list here). The input layer of these networks is 299x299, 224x224, 192x192, 160x160, or 128x128 pixels by default, depending on the network used. The networks provided on the JeVois microSD image have been trained on large clusters of GPUs, using 1.2 million training images from the ImageNet dataset. For more information about MobileNets, see https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md For more information about the ImageNet dataset used for training, see http://www.image-net.org/challenges/LSVRC/2012/ Sometimes this module will make mistakes! The performance of mobilenets is about 40% to 70% correct (mean average precision) on the test set, depending on network size (bigger networks are more accurate but slower). Neural network size and speedThis module takes a central image region of size given by the For example:
To easily select one of the available networks, see JEVOIS:/modules/JeVois/TensorFlowEasy/params.cfg on the microSD card of your JeVois camera. Serial messagesWhen detections are found with confidence scores above DO category:score category:score ... category:score where category is a category name (from See Standardized serial messages formatting for more on standardized serial messages, and Helper functions to convert coordinates from camera resolution to standardized for more info on standardized coordinates. More networksSearch the web for models in TFLITE format and for TensorFlow 1.x series. For example, see https://tfhub.dev/s?module-type=image-classification To add a new model to your microSD card:
Using your own networkFor a step-by-step tutorial, see Training custom TensorFlow networks for JeVois. This module supports RGB or grayscale inputs, byte or float32. You should create and train your network using fast GPUs, and then follow the instruction here to convert your trained network to TFLite format: https://www.tensorflow.org/lite/ Then you just need to create a directory under JEVOIS:/share/tensorflow/ with the name of your network, and, in there, two files, labels.txt with the category labels, and model.tflite with your model converted to TensorFlow Lite (flatbuffer format). Finally, edit JEVOIS:/modules/JeVois/TensorFlowEasy/params.cfg to select your new network when the module is launched. | ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
|