Early Fire Detection and Monitoring System
A thermal-imaging early fire detection and suppression system for server rooms. A Pico 2 W sensing unit streams thermal frames to a cloud-hosted machine-learning classifier that separates fires from merely hot objects.

Overview
Server rooms contain equipment that is hot by design, so a simple temperature threshold either misses small, distant flames or raises false alarms on harmless hot objects. This final-year capstone project at the University of Johannesburg is a thermal early fire detection and suppression system that detects a fire by its behaviour, not by its temperature alone.
How it works
- Sensing unit: A custom PCB built around a Raspberry Pi Pico 2 W captures 32 × 24 thermal frames and measures ambient temperature with a DS18B20.
- Cloud classification: Each frame is uploaded to a server on AWS (FastAPI), where a random forest classifier sorts the scene into Normal, Warning (hot, non-fire objects) or Fire. The verdict is returned in about 20 ms.
- Safe fallback: If the server does not answer within 3 s, the device falls back to its own 45 °C and 65 °C thresholds. Safety rails that detect a steadily rising temperature or a growing hot area stay active in both modes.
- Suppression interlock: Firmware logic drives suppression only under defined conditions.
- Dashboard: A web dashboard provides live monitoring and a Data Capture page for recording labelled thermal sessions.
Machine-learning results
The classifier uses 14 features calculated over windows of five frames, including hotspot size, sharpness, flicker, rate of rise and movement. It was trained on 60 recorded sessions (about 5 900 frames) of Normal, Warning and Fire scenes, and evaluated by session-based cross-validation so that every result comes from sessions the model had never seen.
| Measure | Result | Target |
|---|---|---|
| Accuracy on unseen sessions | 87.0 % | ≥ 89 % |
| False-positive rate | 3.7 % | ≤ 10 % |
| Fire sessions that raised an alarm | 13 of 14 | — |
The classifier never confused a fire with a normal scene. All its errors are between Warning and Fire, mostly from soldering-iron tips, which look like a small flame at this sensor resolution. The accuracy target was narrowly missed, and the dataset is expected to close that gap with corrected labels and more Warning recordings.
Acknowledgements
EasyEDA assisted with sourcing the equipment, and AWS provided free credits for hosting.