Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Teensy 4.0 Image Classification w/CMSIS-NN

Hybrid View

  1. #1
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098

    Teensy 4.0 Image Classification w/CMSIS-NN

    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).
    Click image for larger version. 

Name:	20190830_072526.jpg 
Views:	3 
Size:	72.7 KB 
ID:	17398

    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):
    Click image for larger version. 

Name:	20190830_072538.jpg 
Views:	4 
Size:	41.5 KB 
ID:	17399

    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:
    Click image for larger version. 

Name:	20190830_072646.jpg 
Views:	3 
Size:	54.9 KB 
ID:	17400
    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.

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,415
    Looking great!

  3. #3
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Quote Originally Posted by KurtE View Post
    Looking great!
    Thanks - finally got one project finished

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,678
    Very cool

  5. #5
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,098
    Ok - heres a short little video from the time I hit capture to when it displays the classification:

    https://youtu.be/7c876aBWRIw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •