Teensy 4.0 Image Classification w/CMSIS-NN

Status
Not open for further replies.

mjs513

Senior Member+
As a further demo of the T4's capability I implemented a image classification using ARM's CMSIS-Neural Network with a ArduCAM for image capturing. The example uses the CIFAR-10 dataset that allows images to be classified into 10 groups ({"Plane", "Car", "Bird", "Cat", "Deer", "Dog", "Frog", "Horse", "Ship", "Truck"}) other datasets allow more flexibility. Ok enough of the overview.

In another post in the T4 Beta thread I posted on getting the ArduCAM software working on the T4. I posted that demo on the YouTube.

For this project I used a ST7789 2in 240x320 display along with the OV2640 ArduCAM (the T4 is mounted below the breadboard shield on a custom breakout board designed to accept Arduino type shields).
20190830_072526.jpg

I created a Arduino style library for CMSIS-NN and incorporated it into the sketch I created to display the images. To make it work though I had to create a function to reduce the image size (320x240) bitmap down to a 32x32 image for the NN to work with CIFAR-10 dataset. The image I used for a test was of an airplane that I printed out (not very good print though as a test):
20190830_072538.jpg

After I selected Bitmap and did a single capture using ArduCAMs interface a reduced size image along with the classification and confidence level is printed on the screen:
20190830_072646.jpg
Note: I did test other images directly from the screen with out issue with the setup.

Thought you all you like to know what is possible with the T4.
 
Ok - heres a short little video from the time I hit capture to when it displays the classification:

 
Status
Not open for further replies.
Back
Top