TENSORFLOW

TensorFlow is free, open source artificial intelligence library, using data flow graphs to build models. TensorFlow allows developers to create dataflow graphs—these are structures that describe how data moves through a graph, or a series of processing nodes. Each node in the graph represents a mathematical operation, and each connection or edge between nodes is a multidimensional data array, or tensor. The nodes are arranged in layers depending on the number of connections between them.

HOW CAN TENSORFLOW BE USED IN FTC?

Because of TensorFlow's ability to create data flow graphs with multi-dimensional arrays, this can be used to build models. Building models allows the program to identify 3D objects in real life based on the graph. This applies to FTC when (during autonomous) an object must be interacted with (picked up, moved, etc.). The object can be detected using TensorFlow in the program, and upon detection can initiate a series of steps for the autonomous to take. This makes the robots movement very accurate because it knows the exact position of the object(s) it must reach. An example of this is in this year's competition, where the sky stones must be taken to the other side of the field in autonomous. Using the camera on the robot controller phone to detect the sky stones will make moving them very accurate, especially since the placement of the sky stones are randomized.

HOW TO USE TENSORFLOW

TRAINING A MODEL ON A COMPUTER

There may already be existing models for the object you are trying to detect. If so, then you just need to create the program. However, in cases where the model is incomplete (such as the sky stones this year) it is possible to create your own. To create a model, there must be many, many pictures (within the 100-200 zone) of the object taken at various angles, positions, and lighting where the phone camera may be. *Tip: put filters on the photos so they can be doubled, tripled, etc. to reach the ideal number. Label the images using labelImg, where the object is boxed and labeled on each image. After this, convert the labels into XML files. After this use a script to convert them into CSV files. Use a .py script convert into tfrecords.