Inspiration
This project was developed for TAMUHack 2026, a two-week hardware development sprint. The inspiration came from a daily struggle at Texas A&M University: spending over 30 minutes searching for a parking spot. My teammate and I aimed to solve this by engineering a cost-effective, IoT-based occupancy tracker utilizing computer vision to monitor vehicles entering and exiting lots in real-time.
Fabrication steps
Hardware Architecture:
Designed a hub-and-spoke mesh network utilizing ESP32-CAM "sender" modules at lot entrances and a central "receiver" node to aggregate the data.
Collision Avoidance:
Engineered a custom polling system where the receiver cycles through unique camera IDs, prompting them to send data only when the channel is clear.
---------------------------------------------------------------------------------
Network Architecture & Protocol Development
The first major engineering hurdle was designing the system architecture. We mapped out a mesh network utilizing ESP32-CAM modules as "sender" nodes placed at lot entrances, and a central "receiver" node to aggregate the data. To prevent data collisions—where multiple cameras might try to transmit simultaneously—I engineered a custom polling system. Each camera was assigned a unique ID, and the receiver continuously cycled through these IDs, granting permission to transmit only when the channel was clear.
Ensuring data integrity during transmission proved to be a massive challenge. Initially, I attempted to send .bmp files to conserve processing resources, but synchronization issues caused the images to arrive completely corrupted.
This was by far the most challenging part of this project; I spent the majority of the project debugging the image transmitting system
Data Integrity:
To solve early issues with packet loss and distorted .bmp files, I implemented a custom ACK-NACK protocol with a two-way handshake. This verified headers and packet order, ensuring flawless data transfer.
Optimization:
Successfully upgraded the data transmission pipeline to handle 640x480 JPEGs, significantly reducing payload size while maintaining the high resolution necessary for computer vision.
---------------------------------------------------------------------------------
Through rigorous testing, I developed a robust two-way handshake utilizing an ACK-NACK protocol to verify headers and ensure packets arrived in the exact correct order. Once the data pipeline was stable, I optimized the system to handle 640x480 JPEGs, which significantly reduced payload size while providing the high resolution required for accurate computer vision.
waiting for "ok" from reciever to start sending package
Sends the JPEG in chunks of 28 bytes, waits for receiver before advancing
Ensure the reciever gets the header so image doesnt corrupt
Both me and my partner worked tirelessly on this project. I focues more on the programming while he was more hardware side; designing, 3D printing, and soldering the components. However we would often switch roles to get a break and honestly both did an equal part of the project
The sender modules (2 each); esp-cam, ultrasonic sensor, nrf radio transmitter, voltage stepper
The main receiver. esp32-s3, TFT display, nrf antenna
Completed camera module
Model Fine-Tuning:
Leveraged Ultralytics to fine-tune a YOLO11 object detection model using a custom dataset of over 5,000 vehicle images.
Directional Logic:
Rather than just detecting cars, the model was trained to classify whether a vehicle was entering or exiting based on its orientation (facing left vs. right) within the camera frame.
web Integration:
Hosted the AI model on a local Python Flask server. The receiver module pushes captured JPEGs to this server over a local network, triggering the inference script to update the running lot count.
AI Integration
To accurately detect vehicles without false activations, I integrated a custom machine learning pipeline. Drawing on my previous experience with Ultralytics, I fine-tuned a YOLO11 object detection model using a dataset of over 5,000 vehicle images. I hosted this model on a local Flask server running on a laptop. When the receiver module caught a JPEG from a lot entrance, it pushed the image over the local network to the Flask server. The AI then analyzed the frame, classifying whether a car was entering or exiting based on its orientation (facing left versus right), and updated the lot's occupancy count accordingly.
Deployment
To tie the entire system together, we rapidly developed a web dashboard hosted via Flask that mimicked the official A&M parking status portal, providing a clean, real-time user interface. We were finalizing the integration right up to the deadline.
"Initial training iterations were run for only 5 epochs to test the pipeline. The resulting metrics revealed high validation volatility and highlighted the necessity of training for more epochs. Additionally I learned that standard ImageNet metrics like 'Top-5 Accuracy' are irrelevant for binary (Left/Right) classification tasks, as the model mathematically guarantees a 100% score.
User Interface:
Developed a real-time web dashboard that mimics the official A&M parking portal to instantly display live lot capacity to users.
Hackathon Success:
We integrated the final components right up to the deadline and successfully ran a live demo for the judges. The project's robust networking and AI integration earned us the title of "Best IoT Hack" out of 25+ teams.
Images taken from our sender modules