 Welcome back! This is the second video of the series. Next, let's have an overview of the FPEI Vision 1 function pack. FPEI Vision 1 is the STM32 cube function pack featuring examples of computer vision applications based on convolutional neural network, and run on one of our high-performance STM32H7 MCUs. The application examples provided in the function pack are food recognition, which can recognize among 18 classes of common food, and person presence detection, which is able to identify whether a person is present in the image or not. In this video series, we will focus on the food recognition example. The function pack demonstrates the integration of two types of neural network model, 32-bit floating point model, and 8-bit quantizer model. It also demonstrates model integration in different memory configurations. This function pack is designed as a project to help you kickstart and test your own computer vision applications. Now, let me show you how the food recognition demo runs on the STM32H747I discovery board, and talk about more details later. This is the demo of the food recognition application. First, let's power up the board. The welcome screen will show you the application information. After initialization, the classification result will be shown as an icon on the screen. Now, let's put a burger into the frame. Looks like it can recognize a burger. By pressing the blue user button, you can enter the camera preview mode to see what the camera is. By pressing the up and down of the joystick, you can adjust LCD brightness and the left or right to adjust the camera contrast level. You can see the accuracy, the infant time, and the FPS are displayed on the screen. Then let's try some french fries. Okay, 100% sure. Next, a coke. Still doing a good job. How about a donut? Alright, a little lower, but still not bad. Last but not the least, a cupcake. Awesome, well done. I hope you enjoyed the demo. The neural network model used in this demo is the derivative of the mobile net model. Suitable for mobile and embedded vision applications, specifically for image classification problems. We tuned the two hyperparameters to optimize the performance considered constraints of the target hardware. As mentioned in previous slides, both floating point and quantized models are included in the function pack. The quantization process is done using our X-Cube AI expansion package. You can also use the TF Lite converter to do that. By doing the quantization, you will get 3 times faster of the performance, 4 times reduction of the memory footprint, but only lose 0.5% of the accuracy. The function pack running on SDM32 H747D scan report provides multiple and the flexible memory configurations. Weights and activations can be placed in any combination, either on the external or internal memories. It allows the user to easily evaluate and measure the different memory compromises for the application. The external memories extend the capabilities, for instance, by supporting higher resolution camera and more complex neural networks. The board integrates both external flash via the quad-SPI and external RAM via FMC. The quad-SPI memory interface provides a communication interface, allowing the microcontroller to communicate with external SPI and quad-SPI memories. The interface supports the connection of one or two external memories. This means the data can be transferred over a 4 or 8-bit database in between the memory and the microcontroller. It gives the user flexibility to choose between the number of pins required for the connection and the performance of the data transfer. FMC stands for flexible memory controller. It provides external memory support through three memory controllers that enables the CPU to communicate with external memories. This interface is fully configurable, allowing easy connection with external memory or other parallel interfaces. With the help of this function pack, it's very simple to build a computer vision application that runs on SDM32H7 devices. As shown in the figure, starting from a pre-trained floating point CNN model, using a framework such as Keras, TensorFlow Lite, etc., we can generate the optimized C code using the SDM32QBAI2 and integrate the code into a computer vision framework, which is provided as part of the FPAI Vision 1 function pack. To know more about the CUBE AI2, please visit www.st.com.sdm32QBAI. You can also take a look at the user manual, UM2526, of getting started with X-Cube AI and the documentation in the X-Cube AI expansion package. These are the examples of optimizing the C code generated by the X-Cube AI. The network files contain the description of the neural network topology, the network data files contain the weights and biases of the neural network, and the AI interface files provides abstraction interface to the neural network API. The application executes the following operations in sequence. After the initialization and the first frame capture, first copy the frame acquired by the camera in the camera capture buffer. We have the DMA engine from DCMI data register. After acquisition completion, the content of the camera capture buffer is also copied into the LCD frame buffer. Second, at this point, depending on the memory allocation configuration chosen, the camera capture buffer content is copied into the camera frame buffer, and the capture of the subsequent frame is launched. Next, rescale the image contained in the camera frame buffer into the resizeDST image buffer to match the expected CN input tensor dimension of 224 by 224. Next, perform pixel color format conversion and red-blue color channel swapping from the resizeDST image buffer into the PFCDST image buffer. For instance, in the food recognition example, the RGB565 capture format is converted to the RGB888 format to provide the three input channels expected by the food recognition CN model. Next, adapt the format of each pixel contained in the PFCDST image buffer content into the NN input buffer. The adaption consists in changing the representation of each pixel to fit with the range defined by the NN model training and the quantization format expected by a quantized model. In another word, the normalization. Next, run inference of the neural network model. The NN input buffer as well as activation buffer are provided as input to the neural network. The results of the classification are stored into the NN output buffer. And finally, post a process to find the class label with the largest predicted probability and display the results on LCD display. Thank you for your time. In the next video, I will dig deeper into the memory part. Like memory requirement, memory configurations, buffer placement, etc. So, see you in the next video.