In this section, the authors present the proposed system architecture, the algorithms adopted for fire and smoke detection, and the metrics used to evaluate their performance.
3.1. Proposed FireVision System
The authors propose an automated wildfire and smoke detection system based on deep learning models. The architecture is divided into three stages: Data collection, data processing, and final reporting, as shown in
Figure 1.
Initially, drone flights are organized using COTS (Commercial Off-The-Shelf) software (see
Figure 1 (1)), such as the ArduPilot Mission Planner version 1.3.83 [
69], the Dronecode Foundation and Auterion maintained QGroundControl version 4.4 [
70], the Dronecode foundation PX4 autopilot firmware version 1.15 and above [
71] or the DJI bridge [
72], implementing the MAVLink XML control protocol over TCP [
73,
74] (compatible with the mavlink-router daemon software version 4 application that collects and distributes MAVLink messages). For this enterprise setup, a static IP address is required for the LTE drone modem. In the FireVision cloud setup, this capability is provided via a private IP address via the cloud FireVision VPN service. These programs provide the capability for precise definition of geographic surveillance coordinates, ensuring the coverage of large and difficult-to-access areas during the drone flight (see
Figure 1 (2)), where traditional surveillance methods fail to operate effectively, specifically in forests. The system provides real-time detection of fire and smoke objects, as well as instance segmentation. This capability is acquired using two alternative setup cases:
Drone edge inference: Processing is performed directly on the drone’s micro-processor (e.g., Jetson Nano [
44,
75,
76], which has previously been put to the test by the authors [
77]) (see
Figure 1 (3)). The detection results, along with the EXIF position metadata, are then sent to the cloud (see
Figure 1 (4)).
Cloud inference: Raw image data is sent in real time directly to the FireVision cloud (see
Figure 1 (5)) for object detection and instance segmentation.
In both cases (drone or cloud inferences), the detection and processing steps are the same: (a) store image meta information of GPS coordinates (EXIF), (b) execute inferences for the Mask R-CNN smoke model, (c) execute inferences for the Mask R-CNN fire model, (d) from the detected contours and mask areas, calculate the fire criticality index using the fire stress algorithm, and (e) report back to the drone navigation process updated GPS monitoring coordinates, as instructed or not by the fire criticality and stress algorithm.
For each drone image capture following a predefined path-planning operation, the EXIF location data and detection information, along with the detected image, are stored in an SQL database (cloud case) or SQLite (edge case) (see
Figure 1 (6)). This data storage is particularly significant for the drone-based detection case, for the extraction of flight information and its consecutive detection images for the process of reporting (see
Figure 1 (9)).
During the image processing stage, model inference can be performed using two distinct strategies, as illustrated (see
Figure 1 (7)). The first option follows a sequential approach: smoke is detected first, and fire detection is subsequently performed within the extracted smoke contour. Alternatively, smoke and fire can be detected independently in parallel. The complete inference workflow is detailed in
Figure 2. Through this process, precise boundaries and pixel-wise masks (instances) are generated. Additionally, bounding box dimensions and pixel areas are computed for both classes to calculate the fire criticality index (FCI) (see
Section 3.4). The entire pipeline is designed to execute within a timeframe of 1–2 s.
Following detection and the FCI index calculation according to
Section 3.4, the fire criticality–stress index algorithm is executed, updating the drone’s path-planning course (see
Figure 1 (8)). Based on this algorithm, the final stage involves a set of alternate points of hierarchical routing that the drone must immediately follow. Those points are automatically calculated and added to a FIFO queue (Drone Flight Deviation Queue—DFDQ), either directly for the edge-computation case or indirectly as an HTTP response to a previous image HTTP request for the cloud case. That is, If the drone detects an FCI value or the mean FCI value of a polygon route is considered above a threshold value, as calculated by the fire criticality–stress algorithm at the end of a closed circular loop. Moreover, if a new path-planning update is required to be provided to the drone, the “update-pathplan” key value is encoded in the EXIF metadata dictionary of the captured drone image as a binary value 0 or 1.
The drone’s MAVLink positioning and control channel uses 4G/5G via the MAVLink router messaging service, which is instantiated over TCP port 5760. The infrastructure, coverage, and system are mainly managed and monitored by the flight control software. The DFDQ’s commands for drone path plan deviations are automatically appended to the original flight plan queue as a priority execution plan. Then the original flight resumes. If, however, the drone’s battery is below 12%, the return-to-base process initiates, altering the drone’s path plan and forcing it to return to base.
Finally, the FireVision system dashboard is capable of exporting a detailed report in PDF format (see
Figure 1 (9)) for easier understanding and official documentation. This can be performed either in close to real time for cloud inferences, post-processing for inferences, or after the drone acquires the relevant data. The following section provides a detailed description of the FireVision detection model.
3.3. Performance Metrics and Loss Functions Used
This section presents the evaluation metrics and loss functions employed to analyze the training behavior of the proposed model and to assess its detection and segmentation performance. The metrics used in this study were selected based on commonly adopted definitions in the literature [
79,
80,
81]. The examined precision (accuracy) metrics are presented in
Table 2, while the loss measures are presented in
Table 3.
Let
and
denote the predicted and ground-truth bounding boxes, respectively. The bounding box Intersection over Union (IoU) is defined in Equation (
1).
Although instance segmentation networks such as Mask R-CNN operate on color images, and segmentation accuracy is evaluated on binary object masks. For each detected instance, the network predicts a probability map
, which is converted into a binary mask
using a threshold of 0.5:
The ground-truth annotation is also represented as a binary mask
. The mask Intersection over Union (mask IoU) is then defined as shown in Equation (
3).
According to the COCO evaluation protocol, the default metric for bounding box-based object detection is the mean Average Precision (
), with its formal definition given in Equation (
4). However, the authors also employ the mask mean Average Precision (
) metric to obtain a more accurate assessment of instance-level performance. For this purpose, the established mask mAP metric provided by the COCO evaluation framework is used, defined as shown in Equation (
5).
In Equations (
4) and (
5),
and
accordingly denote the Average Precision for class
C, computed from the precision–recall curve using Intersection over Union (IoU) for matching predicted and ground-truth instances. In this study, the authors report bounding box (Bbox) and mask mAP@0.5, corresponding to an IoU threshold of 0.5, where a prediction is considered a true positive if
. The variable
C denotes the number of object classes (fire and smoke), while the background class is excluded from evaluation, following standard practice.
Given the distinct visual characteristics of smoke and fire, detection performance often varies significantly between the two classes; a standard mean could mask a critical failure in one class if the other performs well. To address this, we aggregate the individual mAP scores using a weighted harmonic mean, as shown in Equation (
6). This choice is grounded in recent evaluation methodologies [
82], which demonstrate that harmonic-based metrics impose a stricter penalty on performance disparity than arithmetic averages. By adopting this logic, our unified metric
ensures that a high score is achievable only when the model demonstrates robust detection capabilities across both hazard types.
where
and
denote the mAP@0.5 scores for fire and smoke, respectively, and
represent the task-specific weights (typically set to a value of one for balanced evaluation).
The total loss metric used in the experimental scenarios is a cumulative sum of all losses, as shown in Equation (
7).
where
is the classification loss for object category prediction,
is the bounding box regression loss,
is the objectness loss of the Region Proposal Network,
is the RPN bounding box regression loss, and
is the pixel-wise mask instance segmentation loss [
81].
Frames Per Second (FPS) measures the system’s computational performance. In this study, FPS is calculated as the inverse of the total inference time needed for smoke Mask R-CNN detections, followed by fire Mask R-CNN detections, on a single still image from a drone-mounted camera. For cloud inferences, the measurement input images have a spatial resolution of 5472 by 3648 pixels (20 MegaPixels (MP)), which corresponds to an uncompressed RGB tensor with 8-bit channel depth, approximately 57.1 MB of RAW and 6 to 8 MB of JPEG-compressed images for data transmission. For edge computing inferences, images have been downscaled to 1280 × 768 px to preserve real-time inference performance, since image tiling is not used. For 1 MP images, the raw size is typically around 3 MB (250–900 KB JPEG-compressed). If the total time to process one image through both Mask R-CNN models is
seconds, then the FPS is defined as in Equation (
8):
where
and
are the inference times for the smoke and fire Mask R-CNN models, respectively. The parameter
is exclusive to cloud-based inference scenarios and does not apply to edge detection. It represents the overhead required to upload compressed fire and smoke imagery to the cloud. For a typical 8 MB JPEG transmission over 4G/LTE networks, this latency is estimated to range between 3 and 6 s per image. The approximation used for cloud uploads in this case is the worst-case one and therefore
s for both smoke and fire images.
3.4. Fire Criticality–Stress Algorithm
Upon object detection using the FireVision model, the proposed fire criticality–stress algorithm provides a measure of both the severity of the fire event from the acquired images and its expansion, expressed in the event area coverage, derived from the drone’s GPS lat-lon values, direct or indirect, as stored in each image’s extended information (EXIF). The criticality of a fire–smoke event is expressed by the fire criticality index value (FCI). The criticality index is an aggregative metric that accounts for both fire and smoke detections as independent contours detected and masked (instance-pixel-segmented) by the FireVision model, with the base area being the original image acquired by the drone.
Let an input image of width
W and height
H have a total pixel area of
(drone original image). Let us assume a set of detected smoke contours indexed by
i and fire contours indexed by
j. For each smoke detection, let
denote the bounding box area of smoke detections and
the corresponding Mask R-CNN smoke mask area in pixels. Similarly, for each fire detection, let
be the bounding box area for fire detections and
the fire mask area. All areas are expressed in pixel units. The total detected smoke and fire mask areas are computed using Equation (
9) and are defined as follows:
Similarly, the corresponding total bounding box areas enclosing the contour masks for smoke contours
and fire contours
are computed using Equation (
10).
Then the normalized image coverages of smoke
and fire
are defined using Equation (
11).
The authors assume that the normalized smoke and fire coverages satisfy the constraints of Equation (
12).
If the values are greater than or equal to one, it implies either overlapping contours, duplicated detections, or erroneous mask predictions. If either condition is violated, an iterative correction procedure is applied, in which the largest contour (by mask area) associated with each detection is removed. However, a typical filtering rule is to remove all contours whose area is above 30–70% of the total image area in
. This is an expression from dataset experimentation: the smaller the accepted area sizes of the detected contours, the more accurate the detections. The coverage terms
and
are then recomputed after each removal step until the constraints in Equation (
12) are satisfied, ensuring physically consistent and non-overlapping spatial extents for both smoke and fire detections. Then, to quantify how densely the detected regions are filled by the corresponding masks, density (fill ratio) terms are introduced and calculated using Equation (
13):
where
, a small positive constant preventing division by zero. The overall fire event criticality is quantified using the Fire Criticality Index (FCI), as defined by Equation (
14):
where
and
denote the normalized-over-the-image fire and smoke coverages,
and
are the corresponding mask density terms, and
,
, and
are non-negative weighting coefficients. In this formulation,
is assumed to reflect the dominant contribution of active fire relative to smoke, while the coefficient
modulates the interaction between fire and smoke presence. Indicative values that can be used are
,
, and
, which significantly prioritize fire extent and yield smaller contour areas for fire relative to smoke, while still accounting for smoke propagation and co-occurrence effects. Values that were used in this work are
,
, and
. The co-occurrence effects are considered when FireVision is applied to fire detection contours inside smoke-detected contours. In case of parallel smoke and fire detections on the original drone image, only
and
coefficients are used.
The parameter in the fire criticality index (FCI) is necessary because it captures the nonlinear interaction between fire and smoke coverage, which cannot be represented by the purely additive terms and . The first two terms quantify fire and smoke contributions independently, assuming that total criticality is simply the sum of their individual effects. However, in real fire dynamics, the simultaneous presence of flames and smoke indicates active combustion, sustained heat release, and a higher probability of spatial expansion. Thus, the combined occurrence of fire and smoke represents a synergistic phenomenon in which the overall severity exceeds the linear sum of the components. The interaction term introduces this second-order coupling effect, increasing the index only when both fire and smoke are present, while remaining zero if either component is absent.
Mathematically, the inclusion of enhances the expressive power of the index by transforming it from a linear model into a quadratic one with interaction sensitivity. This improves the discriminative capability between isolated fire detections and coupled fire–smoke events, which typically correspond to more advanced or escalating scenarios. Operationally, this distinction is critical for adaptive drone-based exploration, as co-occurrence may justify more aggressive area-expansion assessment or higher alert levels. Without , the FCI would treat independent and interacting detections similarly, potentially underestimating the severity of dynamically evolving fire events.
The weighting coefficients are not arbitrary tuning parameters, but rather physically motivated scaling factors that reflect the relative contributions of fire and smoke. The assumption that follows directly from combustion physics and operational risk assessment, where an active flame is a more immediate and hazardous condition than smoke alone. The interaction coefficient captures co-occurrence effects, introduces nonlinearity, and is activated only when fire and smoke are simultaneously present, modeling escalation behavior.
Equation (
14) provides a normalized index
that is invariant to image resolution and directly comparable across scenes. For example, a small but dense fire occupying
of the image (
,
) with limited smoke (
,
) results in a low-to-moderate criticality value, typically
. In contrast, a large-scale event with widespread flames (
) and dense smoke coverage (
), both exhibiting high compactness, produces
values exceeding 60, indicating a highly critical fire scenario. This scaling allows the proposed index to distinguish between incipient, developing, and severe fire events in a physically interpretable manner.
A criticality threshold
3–5% is used to signify the onset of a fire event. During an automated drone image-acquisition mission along a predefined GPS trajectory from point
A to point
B, the fire criticality index (FCI) is assessed at the initial anchor
A. If
, a secondary exploration mode is triggered. This mode initiates a spiral flight pattern centered at point
A to estimate the spatial extent of the affected area in physical units (
or
). This process constitutes a core component of the fire criticality algorithm, facilitating adaptive, event-driven area-expansion assessment. When the threshold is exceeded, the drone temporarily deviates from its nominal path. It follows a piecewise square-spiral trajectory among the predefined straight-line flight trajectory from point
A to point
B, separated by a Euclidean distance
. The spiral motion is executed through sequential displacements toward the north, east, south, and west, forming closed square-polygonal coverage regions in polar latitude–longitude coordinates relative to
A. The initial spiral step, which determines both the square edge and the forward distance step towards the direction of
B, is defined by Equation (
15):
where
k is a user-defined control coefficient parameter. The value of
k may either: (a) be a fixed value
, following a fixed-step square-spiral motion policy, or (b) follow an adaptive increase policy starting with a high value of
k, let
, which is decreased by a value of one after each full drone square-polygon revolution and forward move (multiplicative increase of
spiral steps). This is a step length increase-only policy for each step
i distance
, using Equation (
15) and
as a starting step point. Then
, monotonically increase each step’s length
.
Each spiral revolution i consists of a pattern of four directional moves (north, west, south, and east), forming a coverage square used for new image acquisitions, detections, and FCI re-evaluations, each time the drone reaches a vertex. If the criticality at a square polygon vertex falls below , the spiral exploration is terminated and the drone resumes its nominal flight toward point B. Otherwise, the spiral step is repeated, either fixed in length or multiplicatively increased, to refine the estimate of the affected area until the termination condition is met. The exact quantity is used both as the radial extent of the spiral square around the current anchor and as the forward step length along the direction.
For example, a drone flies at an altitude
h m above ground, and the nominal mission segment has assigned flight position anchors
separated by distance
. If the FCI is above the threshold in
A, then the spiral descent towards
B initiates with a spiral step of the same value for both (i) the spiral-square edge length and (ii) the forward advance distance towards
B. This step value is calculated using Equation (
16):
where
is a selected fixed value for the fixed-length update policy. For the adaptive update policy, the control parameter
value is reduced after each completed spiral revolution and forward move so that
. This way, it is guaranteed that the spiral motion is strictly upscaling (i.e., the next step length is always larger than the previous one). Therefore
is enforced, together with the remaining-distance calculation for
to
B,
, where
is the remaining distance from
A to
B:
. Since an increasing-step policy can become infeasible near the end of the
segment (when
becomes small), we introduce the
termination condition close to point
B; let it occur at
:
If the termination condition occurs, then a final spiral revolution may occur one last time, using a predefined control parameter
(fixed value). If this parameter
added to
increases by an amount significant enough to overcome the limitation imposed by Equation (
17), then a last square spiral occurs without forward stepping, based on Equation (
18).
If
, then we perform one last square surveillance before moving to point
B using Equation (
19).
Equation (
19) ensures that for the square-spiral revolution
,
, and therefore Equation (
17)’s condition is fulfilled. It also guarantees safe progression toward
B, since
is used only once and prevents
from driving the drone beyond
B by not implementing the forward step. The algorithm, upon completing the
square-spiral surveillance, will not exceed the remaining
forward and then return directly to
B.
Each spiral square revolution
i generates a closed coverage polygon shape (Cartesian coordinate square shape), formed by four directional checkpoints (north, east, south, and west) located at a radial distance
from the current location anchor. The resulting polygon is a square box whose edges are both equal to
. Therefore, the area of the polygon generated at the
n-th revolution is given by Equation (
20).
Assume a drone flies at an altitude
m on a nominal segment from anchor
A to anchor
B with
and detects a fire incident. Let us assume it is configured to respond using a fixed-length spiral increase and a fixed control parameter
. Then the step is a constant value
, and
. Thus, the drone reaches
B exactly after 8 forward steps (revolutions). Let
be the remaining distance before executing step
and
. The fixed-step sequence is
| k | | (m) | |
| 0 | 8 | 1250 | 8750 | 1.562 |
| 1 | 8 | 1250 | 7500 | 1.562 |
| 2 | 8 | 1250 | 6250 | 1.562 |
| 3 | 8 | 1250 | 5000 | 1.562 |
| 4 | 8 | 1250 | 3750 | 1.562 |
| 5 | 8 | 1250 | 2500 | 1.562 |
| 6 | 8 | 1250 | 1250 | 1.562 |
| 7 | 8 | 1250 | 0 | 1.562 |
Therefore, the mission segment terminates at
B after
(eight square revolutions in total). For the same flight, the adaptive increase policy is performed using Equations (
16)–(
19), with
m. It initiates with
so that
m. After completing the
n revolution, we compute the remaining distance
if the termination condition
holds. Then the drone performs a final step
and returns to
B exactly. Otherwise, the next admissible step is selected by
and mapped to an integer via Equation (
19). The resulting sequence until reaching
B is
| | | (m) | |
| 0 | 16 | 625.0 | 9375.0 | 0.39 |
| 1 | 15 | 666.7 | 8708.3 | 0.44 |
| 2 | 14 | 714.3 | 7994.0 | 0.51 |
| 3 | 13 | 769.2 | 7224.8 | 0.59 |
| 4 | 12 | 833.3 | 6391.5 | 0.69 |
| 5 | 11 | 909.1 | 5482.4 | 0.82 |
| 6 | 10 | 1000.0 | 4482.4 | 1.0 |
| 7 | 9 | 1111.1 | 3371.3 | 1.23 |
| 8 | 8 | 1250.0 | 2121.3 | 1.56 |
| 9 | 7 | 1428.6 | 692.7 | 1.77 |
| 10 | 6 | 1666.6 | | - |
Having a value of , the revolution yields . Therefore, the drone will not perform a final tenth revolution and will return to B.
The fixed-step policy () provides uniform spatial sampling along the trajectory from A to B. This results in identical coverage polygons at each revolution, with a constant area of . This consistency builds trust in systematic scanning and offers clarity in scenarios where fire spread is assumed to be spatially homogeneous. However, this fixed policy does not adjust its spatial resolution based on the event’s primary occurrence. This could lead to redundant or excessive coverage in low-risk areas.
In contrast, the adaptive incremental policy dynamically increases the spiral radius and forward step in response to sustained critical conditions of the first fire detection event. This results in progressively larger coverage polygons, ranging from to in the given example. This approach enables rapid expansion of the surveyed area when severe fire conditions persist, while still allowing detailed inspection near the initial triggering location and its neighborhood. Therefore, the adaptive policy strikes a better balance between local detail and large-scale coverage, making it more suitable for real-time fire-front mapping and area expansion estimation. Additionally, in both cases, the explicit termination rule ensures safe, finite convergence to the destination anchor B, thereby enhancing operational robustness during autonomous missions.