Inspiration
In Canada, a fire department responds to a fire every 13 minutes. Almost none of those start as fires but rather as a heat source and something flammable sitting too close together, for too long, with nobody watching. There are a lot of ways and systems that exist for fire detection, but they only ever do so after it has already started. That gap, between "there is a fire" and "there is about to be a fire," is what FireCast is actually built around. I wanted to build something that watches for the hazard not just the flame.
What it does
FireCast runs on a live camera feed. It detects fire, smoke, and eight everyday heat sources and flammable objects, candles, stoves, cardboard, curtains, and more, using a custom-trained YOLOv8 model. For every heat source and flammable object it sees in frame, it calculates the euclidean distance between them. It then turns that into a live risk score. When a heat source and a flammable object are detected to be too close. FireCast flags it as a hazard, draws the risk zone and the connecting distance on screen. It sends an instant SMS alert via Twilio.
How we built it
The model is YOLOv8n which is fine tuned on a custom 10 class dataset covering fire, smoke, and eight heat source and flammable object categories. Many of these datasets were publicly available on platforms like Kaggle, and some of them were custom labelled. The datasets were broken into train, val, and test. Training ran on Kaggle's T4 GPU tier with a batch size of 16 and an 8 epoch patience. The best checkpoint saved from epoch 29. For evaluation, we built a custom script that groups the 10 classes into four categories, fire, smoke, heat source, and flammable object and measures precision recall F1, and accuracy per category. The live system itself is OpenCV plus the trained model, running frame by frame.
Challenges we ran into
Figuring out where and how to train the YOLO model was a big challenge. We also had an unexplained data pipeline issue with the paper class which vanished from the validation entirely, so we had to train the model again after fixing that. A corrupted image file also crashed the evaluation.
Accomplishments that we're proud of
The model holds precision between 88% and 96% across every category, meaning when FireCast detects a hazard, it's right most of the time.
What we learned
Learnt how to use YOLO for the first time.
What's next for Firecast
Wire it to a physical alarm system with a buzzer and LED using a microcontroller for prototyping.
Log in or sign up for Devpost to join the conversation.