Image Recognition using Raspberry PišŸ„§

My project was to create an Image Recognition program using Raspberry Pi. To do the project, I used Google’s Tensorflow library and a lot of reading on Raspberry Pi and Tensorflow documentation.

Luke Z.

Area of Interest

Electrical Engineering, AI/ML, Data Science

Mission San Jose High School

Grade

IncomingĀ Senior

Demo Night & Final Milestone

My final milestone was to clean up and troubleshoot all the remaining errors. It was great to finally create a working program, and seeing how far I’ve come to create my first Machine Learning-related project was such a great feeling.

Second Milestone šŸ™‚

My second milestone was a lot more straightforward than my first milestone since I had more experience dealing with Tensorflow and Machine Learning syntax. For my second milestone, I converted my code from the Cloud to Raspberry Pi. However, when I converted my code to RPI, a lot of time went into trimming unneeded lines of code that used to be useful on Google Colab as well as troubleshooting the various errors due to compatibility issues. Some examples of things I had to troubleshoot include memory allocation warnings and HadoopFileSystemLoadErrors. I had to do a lot of research on the syntax to resolve these warnings and errors since I’ve never used RPI before and I’ve never encountered such messages. To fix these issues, I read up on lots of documentation and followed guides to install different packages and I was able to resolve them in the end. Setting up the camera module was something I wanted to complete in milestone 2 and this allowed me to feed in pictures to the model by using the RPI camera instead of hardcoding an image’s path. By converting my code from Colab to RPI and setting up the camera, I was able to complete my second milestone!!!  

First Milestone!

My first milestone was to successfully classify the image I provided to the model as a dog or a cat. To do this, there were 4 important sub-tasks: finding the actual model to train, understanding the general idea of each of the model’s code blocks and the syntax of Tensorflow, shortening the time for the training process, and saving and loading the model onto a different notebook or local drive. Finding the model to train was important because most of the models I found weren’t compatible with Google Colab. I had to do a lot of research to find a model that fit with Google Colab as well as something that seemed more straightforward to understand. Understanding syntax and the code was probably the toughest challenge throughout the entire project since I’ve ever been exposed to AI/ML before so a lot of time went into researching the Tensorflow documentation. Moving on to the third sub-task, I saved a lot of time by using a built-in GPU on Google Colab which lowered the training process from about an hour to approximately 10 min. The last task I had for milestone was saving and loading the model. Saving and loading the model was a great way to save time since I wouldn’t have to constantly retrain my model whenever I made a minor edit and I wouldn’t lose all my progress; I could simply load it onto any notebook or IDE and it would be pre-trained. With these four sub-tasks completed, I finished my first milestone :). The next step I want to take is to convert my code from the Cloud to Raspberry PI.

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering