English | 简体中文 | License | Citation | Contributing | Security | Third-Party Notices
Important
OpenFireAlert is an experimental open-source monitoring project for research, learning, and engineering exploration. It is provided as-is and is not a certified fire-safety system or a replacement for professional emergency response, inspections, or applicable safety requirements.
OpenFireAlert is an open-source intelligent wildfire monitoring platform that combines AI vision, Jetson edge inference, ESP32 sensor nodes, and a Spring Boot control plane.
The repository is organized as a deployable engineering project rather than a research-only prototype. Each module can be used independently, but the full system is designed around this data flow:
sensor-node and vision-edge collect field signals -> control-plane stores device state and alarms -> the web console displays live status and stream links -> model-workbench maintains the detector model lifecycle.
| Goal | Start here | What you will configure |
|---|---|---|
| Run the backend and web console | control-plane/ |
MySQL, SMTP, alarm email, stream endpoints, admin account |
| Run Jetson fire/smoke inference | vision-edge/ |
backend URL, RTSP URL, device ID, model path |
| Flash ESP32 sensor firmware | sensor-node/ |
WiFi, backend host/port, device ID, sensor pins |
| Train or export YOLO models | model-workbench/ |
dataset YAML, model YAML, output directory, weight files |
| Read deployment notes | documentation/ |
architecture, module order, production checklist |
| Add public demo assets | reference-assets/ |
sample ownership and redistribution rights |
OpenFireAlert/
|-- control-plane/ Spring Boot API service and web console
|-- vision-edge/ Jetson runtime, camera tools, runtime models, output layout
| |-- models/ curated runnable model artifacts
| |-- camera-tools/ CSI camera capture and RTSP smoke tests
| |-- diagnostics/ GPU and TensorRT environment checks
| `-- outputs/ ignored local outputs, plus reviewed public training archive
|-- sensor-node/ ESP32 firmware for DHT11, MQ2, and buzzer linkage
|-- model-workbench/ YOLO training, export scripts, and model/dataset configs
| `-- configs/ readable dataset and model YAML files
|-- documentation/ architecture and deployment notes
|-- ReadmePhoto/ curated README figures grouped by system, model, and UI
|-- reference-assets/ placeholder for redistributable demo assets
|-- LICENSE AGPL-3.0
`-- THIRD_PARTY_NOTICES.md
The ultralytics/ directories are vendored upstream source used by the training and edge runtime modules. Avoid editing them unless you are intentionally patching the YOLO runtime.
No real credentials are stored in this repository. Copy example files and fill your own values before running:
control-plane/src/main/resources/application.example.yamlcontrol-plane/src/main/resources/static/config.example.jssensor-node/include/config.example.hvision-edge/.env.examplemodel-workbench/.env.example
Do not commit database passwords, SMTP authorization codes, WiFi passwords, tunnel domains, private dataset paths, unreviewed training outputs, or private video samples. Only the curated runtime model under vision-edge/models/ and the reviewed public training archive under vision-edge/outputs/training-runs/included-fire-smoke-detector-20260419/ are intentionally included.
-
Start MySQL and create a database such as
wildfire_aegis. -
Configure and start the control plane:
cd control-plane mvn spring-boot:run -
Run edge inference with the included portable model:
cd vision-edge python edge_fire_detector.py --source 0 -
Flash the ESP32 after creating
sensor-node/include/config.h:cd sensor-node pio run --target upload -
Train or export a replacement detector from
model-workbench/only after the dataset YAML points to your local dataset.
vision-edge/models/ contains a curated fire/smoke detector so the edge module can run without an extra training step:
wildfire-aegis-fire-smoke.pt: portable default runtime model.wildfire-aegis-fire-smoke.engine: TensorRT export for the original Jetson deployment environment.manifest.json: size, hash, class list, and provenance notes.
TensorRT engine files are environment-sensitive. If TensorRT, CUDA, GPU architecture, or driver versions differ, regenerate the .engine file from the .pt model.
ReadmePhoto/ contains curated high-resolution figures grouped by purpose: system for architecture and hardware diagrams, model for detector outputs and training charts, and user for redacted web-console screenshots. These files are documentation assets for README pages, technical reports, and public demos; none of the runtime modules depend on them.
The detector figure shows the overall YOLO11-based network used by OpenFireAlert. The backbone extracts multi-scale visual features, the feature-fusion path aggregates shallow and deep representations, and the detection heads produce fire/smoke predictions at multiple scales. The custom FeatureComplexHead, FeatureComplexNeck, and PoolingLayer blocks are expanded in the lower part of the figure so their internal data flow is visible without opening the model YAML.
This figure is useful when reviewing model changes, explaining the detector design, or comparing architecture variants in model-workbench/configs/models/.
The alarm figure summarizes the backend decision path after a Jetson device uploads a frame. Normal frames only refresh device status, while fire/smoke frames enter a per-device anti-jitter state machine. Only first threats and threats that reappear after the cooldown window trigger LinkageAlarmService, which then coordinates ESP32 buzzer state, email delivery, alarm records, and dashboard visibility.
This figure matches the current control-plane flow around Jetson frame ingestion, ESP32 sensor linkage, duplicate-alarm suppression, and frontend observability.
The wiring diagram maps the firmware pin definitions to a reproducible hardware setup. It shows the DHT11 temperature/humidity sensor, MQ2 smoke sensor, and active-low buzzer module connected to the ESP32-S3 DevKitC-1, including shared ground and voltage-level notes for MQ2 modules.
The pin assignments come from sensor-node/src/main.cpp: DHT11 data on GPIO4, MQ2 analog output on GPIO2, MQ2 digital output on GPIO8, and buzzer control on GPIO7.
The following screenshots are redacted README copies from the web console. Local URLs, organization-specific text, personal contact information, and private IP values are hidden before publication.
The overview page summarizes online devices, recent alarm activity, runtime status, processing ratio, and the latest alarm records.
The monitoring page shows ESP32 sensor cards with temperature, humidity, smoke value, buzzer status, and Jetson camera device status.
The alert records page shows handled and unhandled alarms, device linkage context, smoke values, and operator actions.
The following images are frames generated for presentation. They simulate realistic forest fire and smoke scenes and add YOLO-style bounding boxes for fire and smoke. They are useful for explaining the expected visual output format, but they should not be treated as benchmark evidence or real model inference results.
The included detector is accompanied by a reviewed public training archive at vision-edge/outputs/training-runs/included-fire-smoke-detector-20260419/. The archive documents the released model with parameters, metrics, small visual summaries, exported weights, and TensorBoard metadata. It does not include raw D-Fire dataset images, labels, or private videos.
The training curves summarize loss and validation metrics across epochs. They are useful for quickly checking convergence behavior and spotting obvious training instability.
The normalized confusion matrix gives a compact view of class-level behavior for the included fire/smoke detector.
Additional precision/recall/F1 charts and run metadata are available in the archived run directory.
This project is released under AGPL-3.0 because it includes and modifies Ultralytics YOLO source code. See LICENSE and THIRD_PARTY_NOTICES.md.
If you deploy a modified OpenFireAlert service over a network, provide users a visible source-code link for the running version. Raw datasets and private videos are not included in this repository. Check licenses before publishing any additional model, dataset, media, or calibration assets.
Project-specific source code, documentation, and project assets are attributed in NOTICE. Forks and derivative works must preserve applicable copyright and license notices, and must not imply that they are the official OpenFireAlert project or are endorsed by its copyright holders. See TRADEMARKS.md for the project-identity notice.
If you use OpenFireAlert in research, reports, or derivative work, use the repository citation metadata in CITATION.cff.
See CONTRIBUTING.md before opening a pull request. Use the repository's issue forms for public bugs and feature proposals; report suspected vulnerabilities only through the private process described in SECURITY.md.
Recommended checks before publishing a release:
python -m py_compile vision-edge/edge_fire_detector.py model-workbench/train_fire_detector.py
cd control-plane && mvn test
cd sensor-node && pio run
rg -n "password|secret|token|ngrok|localhost.run|/Users/|C:\\\\Users|workspace.xml|application.yaml|config.js|config.h|target|.idea"Platform-specific tools such as TensorRT, PlatformIO, CUDA, and PyTorch must be installed in the target environment.










