Object Detection With Deep Learning on Raspberry Pi

This will serve as a brief description of your project. Limit this to three sentences because it can become overly long at that point. This copy should draw the user in and make she/him want to read more.

Engineer

Arjun Mallipedi

Area of Interest

Computer Science

High School

Silver Creek High School

Grade

Incoming Junior

Final Milestone

Final Video Presentation

My final milestone was being able to create a program that detects motion, takes a picture, and scores that picture and can tell whether or not the picture is of my dog’s face. I had successfully connected the motion sensor to my raspberry pi and used the program for it so that if it detects motion it would print “Motion Detected” in order to confirm that it detected motion. I then used an if statement based on whether or not the motion sensor detected motion. If it did the program would turn on the camera and take a picture. It would then save that picture onto the raspberry pi and then the program would run the captured image through my nanonets model. My nanonets model which was trained to recognize the face of my dog would then scan the image and score based on how much it resembles the face of my dog. If the image received a score less than 0.84 the program would return false. If it did receive a score greater than or equal to 0.84 the program would return true. This took a long time to do for many reasons. I struggled to connect the motion sensor to my raspberry pi because the cable wires that connected them kept on getting loose and coming off. In my program I had to make a main function that utilized the 3 separate functions that ran the camera, motion sensor, and nanonets model. Before this I thought I could just use an if statement but when I ran the program nothing happened other than it printing motion detected. Once I did this, I still ran into errors because the program wasn’t running the captured image through my nanonets model. It was all because of one line of code that I placed incorrectly, It was supposed to be in an if statement but since it wasn’t it was causing an error in the program.

Third Milestone

Second Milestone

My second milestone is being able to train and create a nanonets model that is able to recognize the face of my dog. I did this by annotating 50 pictures of my dog which means that I outline boxes around his face and trained the nanonets model to recognize his face. I decided to use a face recognition model because I didn’t want the model to get confused and start recognizing everything that moves. His face would be his most distinct part so a face recognition model is the best type of model for this situation. It took a long time to do because halfway through I realized a lot of my pictures weren’t the best to use to train the model so I had to retake pictures and when I ran this model using saved images on the raspberry pi there were many issues because of the way I wrote the programming. It took a while to fix but once I did it was able to recognize the face of my dog and score it properly. I made the minimum score 0.84 for the program to return true because anything lower than that and the program was recognizing my face as his. If I had used more pictures it would be more accurate but because I wanted to get a working model as fast as possible I only used 50.

First Milestone

The first milestone that I hit was being able to successfully connect my camera to my raspberry pi, test out all of its functions, and make them work based on the programming in the raspberry pi which includes the sample prediction model from nanonets.. Setting up my raspberry pi was not too difficult but connecting it to the camera and making sure everything worked took some time. On the first attempt the camera was able to take pictures and save those images on the raspberry pi but when I attempted to have it take videos, it took several tries because the camera wouldn’t stop recording and would always end up freezing. I changed the programming a bit and fixed it, I think the issue was that the program didn’t have a properly declared endpoint. For the sample nanonets model, it took several attempts to get it working, fixing it to work based on the images I wanted it to test was hard because of the amount downloading and storing files on the raspberry pi I had to do and rearranging the code to do that.

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering