Tensor Streaming Protocol for Real-Time Data Collection
Data collection is widely recognized as a significant bottleneck in machine learning. Collecting data from various sources, including data companies, open-source datasets, and surveys can be expensive and often involves additional tasks like data cleaning, which is time-consuming. To simplify data collection for our users, we offer the Tensor Streaming Protocol. Using this protocol, you can build the firmware to stream data from any sensor or development kit directly into DEEPCRAFT™ Studio. The data fed into the Studio adheres to the required specifications, eliminating the need for data formatting and thus saving valuable time. This topic will cover what the Streaming Protocol is, when to use, how to customize, and how to flash on your development kit.
What is Tensor Streaming Protocol?
Tensor Streaming Protocol is a comprehensive set of rules designed to facilitate the streaming of data from any sensor or development board or kit into DEEPCRAFT™ Studio. Using the Tensor Streaming Protocol, you can build your own firmware to stream and collect data for building a machine learning model and evaluating a model in real-time. We offer two versions of the Tensor Streaming Protocol:
- Protocol version 1
- Protocol version 2
Protocol version 1
Refer to the Protocol version 1 (opens in a new tab) Bitbucket repository to know more about the protocol.
Protocol version 1 is deprecated and we recommand using Protocol version 2 for implementing your firmware for improved performance and easy implementation. However, we continue to support the backward compatibility. This means that if your firmware is currently implemented using Protocol version 1, you will still be able to stream data into Studio without any issues.
Protocol version 2
Protocol version 2 defines a streaming mechanism used for communication between a client and a board. The protocol is intended to work over TCP, UDP, serial port, and Bluetooth communication. This protocol is designed to handle multiple data streams from sensors, models, and playback devices, enabling efficient data transfer and processing in embedded systems. This protcol is based on protobuf3 and provide the DotNetCli test client to evaluate the implementation. Refer to the Protocol version 2 (opens in a new tab) Bitbucket repository to know more about the protocol.
Implement your own firmware
Using the Tensor Streaming Protocol, you can implement custom firmware to stream data from any sensor or development board. This allows you to implement firmware from scratch to collect data from various sensors on your board at different rates. Drawing inspiration from our implementation of the streaming firmware for PSoC™ 6 AI Evaluation Kit, you can extend the firmware to support additional sensors or to collect data at different rates.
For guidance on how to register a sensor or multiple sensors on a development kit using Protocol Version 2 or Protocol version 1, refer to Registering sensors or development kits using Protocol Version 2 and Registering sensors or development kits using Protocol version 1 respectively.
We recommend implementing the custom firmware using Protocol version 2 (opens in a new tab), as Protocol version 1 (opens in a new tab) is deprecated. Note that support for Protocol version 1 will not be provided going forward.
By leveraging the Tensor Streaming Protocol, you can streamline your data collection process, making it more efficient and tailored to your specific needs.
-
If you are collecting data using a board flashed with New Streaming Firmware/ Protocol version 2, make sure you select Use Node Explorer with Protocol Version 2 option in Tools> Options> General.
-
If you are collecting data using a board flashed with Old Streaming Firmware/ Protocol version 1, make sure you select Serial Capture Nodes with Protocol Version 1 option in Tools> Options> General.