Using Python and YOLO, a real-time object detection system, I created four unique projects. Initially, I connected my script utilizing YOLO to my GPU to ensure smooth operation, especially when using higher weights. These weights, essential packages within YOLO, increase the likelihood of detecting objects as they become larger, but they can also cause a significant drop in FPS. However, after connecting to my GPU, all of the projects ran smoothly and successfully, for more details regarding each project, please take a look below.
The first project I developed was a Vehicle counter. I provided the script with a video of a vehicle passing by a security camera and wrote a program to detect only the vehicles, ignoring other objects such as pedestrians. To achieve this, I implemented a tracker that followed each vehicle as it moved down the road, ensuring it was not counted multiple times. This tracking was visually represented by a green line flashing as each vehicle passed through. Additionally, I assigned an ID to each detected vehicle, which helped maintain consistency in tracking and prevent duplicate counts. While these IDs display numbers, they serve only to avoid duplicate counts and are not the vehicle counter itself. The actual vehicle count is displayed in the top left corner of the video, as shown below.
The second project I developed was similar to the vehicle counter but instead focused on tracking people. I used a video of people riding an escalator and created a tracker to count how many people went up and down. While similar to the car counter project, the challenge lay in keeping track of people moving in two different directions, unlike the car counter where cars moved in one direction. Despite this complexity, I successfully created two trackers, each tracking a different direction, indicated by green lines flashing when the correct object, in this case, a person, passed through, as shown in the video.
The third project focused on developing a PPE (Personal Protective Equipment) detection system. Unlike the first two projects where I used pre-trained YOLO models, for this project, I created my own detection model specifically for PPE. I sourced a dataset from Roboflow and trained my model in Google Colab to detect items such as hard hats, masks, safety vests, safety cones, and machinery. After training the model, I tested it by feeding it multiple videos to ensure it accurately detected PPE attire. Additionally, I configured the script for real-time detection, enabling me to use my camera to confirm if the model accurately identified the PPE I was wearing. This project presented new challenges, as I had to learn how to train my own model rather than relying on pre-trained ones. Despite the increased difficulty, I was determined to create a functional model and succeeded in detecting PPE objects.
In the fourth and final project, I created a Poker Hand Detector using a real-time detection system. Like my third project, I sourced the dataset from Roboflow and trained my model in Google Colab to detect the displayed card. For instance, if the displayed card is the King of Hearts, the model would recognize it as "KH" and highlight the top and bottom corners of the card. This project required not only training a model to detect individual cards but also writing additional code to identify the correct poker hand. For example, if the user displayed a Royal Flush, the model would detect the individual cards and send that data to another script to verify if the hand matches a recognized poker combination. If it did, the identified hand would be displayed at the top of the screen. This project was the most challenging by far, as it involved creating both a custom card detection model and writing a secondary script to evaluate the poker hand.
All of these projects were driven by my desire to create something interesting while learning more about object detection. This experience has deepened my interest in computer vision and its potential applications in aerospace, such as in drone technology. The code for all of these projects is available on GitHub.