View on GitHub


Raspberry pi Object Detection

Object detection model using OpenCV

Engineer School Area of Interest Grade
Shashank S Mission San Jose High School Computer Science Rising Junior

Headstone Image

Final Milestone

My project for this program was to build a door lock using an object detection model. I used Python’s open cv library, which allowed me to detect people’s faces. Additionally, I added a fingerprint reader from adafruit to act as a second verification method. Unfortunately, this isn’t a complete door lock because there is no locking or unlocking mechanism. Initially, I planned to integrate a servo but, I wasn’t able to get the necessary wires on time. Some challenges I faced included setting up the pi - the majority of the first week I spent setting up my pi - I continuously rewrote my micro SD with the Raspbian OS until it finally worked. Additionally, installing all the correct libraries and packages necessary for OpenCV and adafruit became a tedious process. In the future, I do plan to rework the prototype - I plan to use a programmable microcontroller to replace the raspberry pi and create a custom PCB board to make my circuitry more compact.

Second Milestone

My initial goal for week two was to get all my small systems to work individually - this would include a working fingerprint reader, a face-detection model, and a rotating servo motor. Furthermore, if I had enough time, I planned to write one large python script that combined all the systems. I reached my second milestone when I wrote a working python script that combined my face-detection model and fingerprint reader. Unforturenly, I was unable to write a script for a servo system because I did not have the necessary GPIO wires. Additionally, I had a frustrating time setting up my fingerprint reader - there would be multiple errors stating I didn’t have the correct libraries or packages installed. Fortunately, most of the code is completed, and the final step is to install the servo system.


First Milestone

I reached my first milestone when I was able to run a python script that draws a square around a person’s head successfully. To achieve this, I used python’s OpenCV module and its face detection library. Although I have only completed a fraction of the complete project, I ran into multiple programming bugs and hardware complications. I ran into my first obstacle while setting up the raspberry pi. I set up my pi through a headless setup, and in doing so, the pi would not turn on properly. I ended up setting up the pi by downloading the OS on a micro sd card and used VNC viewer to work on my pi. Installing OpenCV wasn’t difficult, but programming the camera to draw a box around a face was an issue. However, I was able to resolve this by using an XML library from GitHub.