Spotting fire on a camera that can't afford a big model
A fire and smoke detector that got more accurate while needing a tenth of the compute, small enough to run on the camera itself.
- Role
- ML research intern. Designed, trained and evaluated the model.
- Built with
- PyTorch, ConvNeXt, YOLOv8, DINOv3, Docker
- Outcome
- Accuracy went from 86.7% to 92.8% mAP@0.5 while compute fell 90%, from 59.5 to 5.6 GFLOPs.
The question
Fire detection works best on the camera itself, where there’s no network delay and no server to go down. But cameras have tiny compute budgets, and the accurate detectors are heavy. Can you have both?
What I tried
I tried two paths. The first used a large self-supervised backbone (DINOv3) to see how good the features could get. The second swapped in a small ConvNeXt-Tiny backbone under a standard YOLOv8 detection head, trained on a home fire and smoke dataset.
the small one won. didn’t expect that.
What happened
The small model beat the baseline on accuracy, 92.8% against 86.7% mAP@0.5, while needing about a tenth of the compute. That is small enough to run on the device. I packaged it in Docker so it runs the same way anywhere.
Decision log
Every fork in the road, and which way I went.
- 01
Which backbone should see the image?
ruled out: a large pretrained DINOv3 ConvNeXt- chose: a small ConvNeXt-Tiny
The big one learned well, but a fire detector that needs a server is a fire detector that arrives late. The target was the edge, so the model had to fit the edge.
- 02
Build the detection head from scratch, or borrow one?
ruled out: a custom head- chose: YOLOv8's proven head
The new idea was the backbone. Keeping a proven head meant any change in the numbers came from the part I was actually testing.