Federated learning based fire detection method using local MobileNet Authors: Sridhar Panneerselvam, Senthil Kumar Thangavel, Vidya Sagar Ponnam, Sudhakar Sengan Published: 2024 ABSTRACT AbstractFire is a dangerous disaster that causes human, ecological, and financial ramifications. Forest fires have increased significantly in recent years due to natural and artificial climatic factors. Therefore, accurate and early prediction of fires is essential. While significant advancements have been made in traditional and Deep Learning (DL) methods for fire detection, challenges remain in accurately pinpointing and recognizing fire regions, especially in diverse and large environments, to prevent damage effectively. To address these challenges, this paper introduces a novel Federated Learning (FL)-based method called Indoor-Outdoor FireNet (IOFireNet) for detecting and localizing fire regions. The proposed method incorporates a Bilateral Filter (BF) to effectively preprocess fire images to reduce noise artifacts and enhance detection clarity. It employs Super Pixel-based Adaptive Clustering (SPAC) to precisely segment fire and non-fire regions. A global IOFireNet model is developed to aggregate parameters from local models, improving detection accuracy across varied environments, while MobileNet is used for efficient data processing, enabling predictions on fire spread, severity, and affected areas to support early warnings. The proposed FL-based IOFireNet attains an accuracy rate of 98.65% for fire detection and 97.14% of mean IoU for segmentation. The proposed SPAC model reaches a mean IoU of 4.06%, which is 2.45% better than the graph cut algorithm and CRF model. The proposed model achieves an accuracy of 0.23%, 4.20%, 3.29%, and 10.02%, better than VGG-19, ResNet-50, Inception, and Dense Net, respectively.Keywords: Fire detection, Federated Learning, Bilateral Filter, Superpixel Based Adaptive Clustering, IOFireNetSubject terms: Environmental sciences, Natural hazards, Energy science and technology Introduction In human history, fire has proven to be a valuable tool. However, fire accidents are a common disaster and a significant cause of fatal injuries and property damage. Fire often produces toxic gases, pollutes the environment, and harms the general economy and human lives1. A recent National Fire Protection Association study found that fire departments respond to over 350,000 home structure fires nationwide, resulting in almost $7 billion in direct losses2. Therefore, accurate and early fire prediction is essential. The existing approaches, like smoke and heat detection, cause false alarms, delays in detection, and sometimes missed detection problems, which are unsuitable for large spaces3. These problems make it even more challenging to receive prior detection warnings. Fire accidents have more severe repercussions. Early detection of fire accidents enables us to minimize loss of life and property damage4. A manual inspection was initially used to detect fires, but its human expenditures and resources are high5,6. Therefore, the manual review was soon replaced by sensor and infrared technology and remote sensing satellite imagery for fire monitoring7. Although these sensors can be effective, they also have drawbacks. Vision-based Fire detection technology that identifies the fire area through an image processing mechanism has recently significantly minimized damage8. Several computer vision-based fire detection techniques have been suggested by researchers, but there are still several challenges to be solved, such as fluctuating illumination, low-resolution frames, flickering, and color changes in objects that mimic fire9. Therefore, the algorithm used in the detection part is the most essential factor determining an image fire detector’s performance10. In the past decades, researchers have proposed various image-processing approaches for this purpose with Deep Learning (DL) and Machine Learning (ML) technology11. Despite advancements in Fire Detection (FD) technologies, several limitations persist. Traditional methods, such as smoke and heat detection, often produce false alarms, delayed responses, and sometimes miss fires in large or open spaces due to the inherent limitations of these sensors. Additionally, while vision-based fire detection technologies have improved damage mitigation, they are challenged by fluctuating illumination, low-resolution imagery, and changes in object appearance that can mimic fire, leading to inaccuracies12. The reliance on manual inspection or fixed-sensor approaches is resource-intensive and lacks scalability, limiting early warning capabilities and effectiveness. This study’s proposed method relies on transfer learning for detecting fires. Transfer learning is an effective technique for classification, prediction, and recognition13. Transfer learning is being developed and used in Fire Detection (FD) to improve FD. The paper addresses several critical scientific and technological challenges in the domain of FD. One of the primary challenges is the accurate identification and localization of fire regions in diverse environments, including indoor and outdoor settings. Existing methods struggle with this due to fluctuating illumination, visual noise, and low-resolution imagery, which can cause False Positives (FP) and inaccurate segmentation14. Another challenge is the need for scalability and adaptability in fire detection systems. Traditional approaches, often reliant on fixed sensors or manual inspection, lack flexibility and efficiency when deployed across large areas or in varied geographical settings. Moreover, there is a technological gap in existing methods, as they typically focus only on detection rather than providing additional predictive insights, such as the spread and intensity of fires, which are crucial for proactive management15. Existing FD techniques, including traditional smoke and heat sensors and advanced vision-based systems, face several limitations that hinder their effectiveness. Traditional methods are prone to false alarms, delayed detections, and missed fire events, particularly in expansive or open environments where sensor coverage is inadequate16. Vision-based FD methods using image processing have shown promise; however, they are susceptible to varying lighting conditions, low-resolution frames, and visual noise, such as objects that mimic fire (e.g., sunlight reflections or red-colored objects). These methods struggle with accurately segmenting and identifying fire regions, especially in diverse environments with fluctuating illumination17. Furthermore, many of these techniques lack scalability and adaptability, as they frequently rely on fixed sensors or manual inspection, which are resource-intensive and inefficient for large-scale deployment. To address these issues, the proposed Indoor-Outdoor FireNet (IOFireNet) method leverages a Federated Learning (FL) model that integrates data from multiple sources, ensuring scalability and adaptability across varied environments (indoor, outdoor, and forested areas). Additionally, using a Bilateral Filter (BF) and Super Pixel-based Adaptive Clustering (SPAC) enhances image clarity and segmentation precision, overcoming challenges related to visual noise and fluctuating lighting18. The proactive capability to predict fire spread, intensity, and area further distinguishes the IOFireNet model, providing early warning systems that are accurate and efficient. The following are the key contributions to this work Development of a novel FL-based IOFireNet model: The proposed IOFireNet is specifically designed to detect and localize fire regions in diverse environments, addressing indoor and outdoor settings—an approach not commonly addressed together in existing studies. Development of a novel FL-based IOFireNet model: The proposed IOFireNet is specifically designed to detect and localize fire regions in diverse environments, addressing indoor and outdoor settings—an approach not commonly addressed together in existing studies. Advanced image preprocessing and segmentation techniques: Using a BF for noise artifact removal enhances image clarity while applying SPAC, which ensures precise segmentation of fire and non-fire regions, improving the model’s FD accuracy and robustness. Advanced image preprocessing and segmentation techniques: Using a BF for noise artifact removal enhances image clarity while applying SPAC, which ensures precise segmentation of fire and non-fire regions, improving the model’s FD accuracy and robustness. Integration of global and local models: The global IOFireNet aggregates data from multiple local models, leveraging an FL model. A local MobileNet is used to deliver localized data on fire incidents, enhancing the adaptability and accuracy of fire detection across varied locations. Integration of global and local models: The global IOFireNet aggregates data from multiple local models, leveraging an FL model. A local MobileNet is used to deliver localized data on fire incidents, enhancing the adaptability and accuracy of fire detection across varied locations. Capability to predict fire spread, intensity, and area: The proposed algorithm not only detects fires but also predicts their direction, severity, and area, supporting proactive early warning systems. Capability to predict fire spread, intensity, and area: The proposed algorithm not only detects fires but also predicts their direction, severity, and area, supporting proactive early warning systems. Comprehensive performance evaluation: The model’s performance is rigorously compared with existing algorithms using precision, sensitivity, accuracy, F1-score, and specificity metrics, demonstrating its superiority. Comprehensive performance evaluation: The model’s performance is rigorously compared with existing algorithms using precision, sensitivity, accuracy, F1-score, and specificity metrics, demonstrating its superiority. The remaining portion of the work has been followed by section “Related works”, which discusses the related works on FD techniques. Section “Proposed methodology” discusses the proposed FL approach based on the IOFireNet methodology. The experimental setup and the result achieved using a dataset are discussed in section “Result and discussion”. Section “Conclusion and future work” represents the conclusion and future work of the proposed model. Related works Researchers have recently proposed many DL and ML techniques for FD using temporal and color models. An overview of a few current methods for FD is presented in this section. S. Saponara et al.19 presented the smart cities’ forest fire classification and detection using DL. The model uses the pre-trained convolutional basis of MobileNetV2 to develop a DL-based dubbed FireNet. The suggested technique achieves an accuracy of 98.42%, a 1.58% error rate, 97.42% precision, and 99.47% recall in classifying the fire and no-fire images. Z. Xue et al.20 developed a Support Vector Machine (SVM) and a rough set theory-based FD. Forecasting accuracy is improved by optimizing the parameters (kernel) of the Rough Set and Support Vectors Machine (RS-SVM) and alleviating the deficiencies in overfitting. The SVM affects the overall classification performance, and optimizing those parameters can improve a classifier’s efficiency. The RS-SVM analyzed the smog feature in fire images with different kernel functions and achieved a 94.3% True Positive (TP) value for the polynomial kernel function. U. Dampage et al.21 applied Attention U-Net and Squeeze Net to FD in the forest region. A Channel Shuffle operation modifies the traditional squeeze net by replacing the convolution layer for Feature Selection (FS) and applying this modified network as an encoder in Attention U-Net to classify the fire from forest images. This model attains an accuracy of 93% and a 0.89 execution time per image. M. Mukhiddinov et al.22 developed an embedded system with a smart Internet of Things (IoT) device for smoke and FD using surveillance video indoors and outdoors. Neural network-based YOLOv2 is designed with smart IoT for FD. This model was tested on 200 images and achieved 93% FD accuracy, 94% sensitivity, and 80% specificity, which work better on surveillance video than R-CNN and Fast R-CNN. A.B. Abdusalomov et al.23 suggested a model built on YOLOv5 for small-target FD detection on forest fires. Images should function as sensors in practical apps to find forest fires. Consequently, the YOLOv5-based Spatial Pyramid Pooling-Fast-Plus (SPPFP) module is utilized to attain global data on minor forest fires. S.T. Seydi et al.24 suggested a system and methodology for early-stage forest FD using a radiocommunication sensor network. Furthermore, the conditions for sensor node architecture and node placement in harsh forest areas are appropriately evaluated to reduce damage and negative effects produced by wild animals and bad weather. The overall system requires an accuracy of 90%. F. Saeed et al.25 proposed a smart glass and Deep Learning (DL)--based vision-based FD and notification system for Blind and Visually Impaired (BVI) persons. The method allows for detecting fires before they spread from inside structures. The suggested design enables image brightness, and a novel CNN employs a convolutional block attention module and an improved YOLOv4 model. The improved YOLOv4 model gives the 73.6% and 71.5% accuracy, respectively. Radhakrishna Achanta et al.26 presented using a Convolutional Neural Network (CNN)-based DL model to enhance forest FD. The Detectron2 model’s potential for woodland FD has still not been investigated. Following a different DL object detection method, an FD was initially used to spot forest fires. The next step is to use small images and eliminate low-quality pixel images to identify fire more accurately in different phases and situations. Jie Chen et al.27 developed a DL-based Fire-Net to predict burning biomass and active fires; the model is trained on Landsat-8 images. For an exact representation, combine the thermal and optical modalities from the images. The system also used residual and separable convolution blocks, which enabled extracting more precise features from large datasets. The overall accuracy for the experiment was 97.35%. Joshua Zhexue Huang et al.28 developed an adequate DL for FD. The proposed model comprises three primary Deep Neural Networks (DNN): an Adaboost-LBP, an Adaboost-Hybrid MLP neural network, and a CNN. An Adaboost-MLP model is employed to forecast the fire. After making a prediction, a proposed model and CNN use images of surveillance cameras to FD29. Majid, Saima, et al.1 propose a framework called Cross-to-Merge Training (C2MT), which enhances model robustness by being insensitive to prior information during the sample selection process. C2MT utilizes a co-teaching strategy with cross-divided training data, where two networks are trained simultaneously and merged periodically using federated averages. This method also introduces the Median Balance Strategy (MBS) to evenly split training data into labeled and unlabeled subsets based on the projected loss distribution. This innovative balancing technique minimizes the impact of noise, improving the model’s generalization capabilities across different noise rates and types30. Another significant contribution by31 is the BPT-PLR, designed to address two key issues in NLL: class imbalance and the optimization conflict between supervised and unsupervised learning. The BPT-PLR corporates a Two-Dimensional Gaussian mixture model (2D-GMM) for balanced partitioning, ensuring class balance in the training subsets. Additionally, it uses a Pseudo-Label Relaxed Contrastive Loss (PL-PLR) to reduce conflicts during optimization, leading to better performance in semi-supervised learning scenarios. This approach has shown optimal or near-optimal results on benchmark datasets such as CIFAR-10, CIFAR-100, Animal-10 N, and Clothing1M, demonstrating its effectiveness in handling noisy labels. Zhang, Qian, et al.32 also developed an improved joint optimization framework for noise correction called CMKL. This method combines Mix-up entropy and Kullback-Leibler entropy as a new loss function to fine-tune label annotations, providing better correction results. CMKL does not rely on prior information, such as a clean validation set, making it practical for real-world scenarios where ground-truth data is unavailable. Experiments on datasets like CIFAR-10 and Clothing1M show the superior performance of CMKL compared to other state-of-the-art methods. Addressing the challenge of noisy labels in DNN training33, suggested the ECMB. Unlike traditional methods that require prior information like a noise transition matrix, ECMB is a fully end-to-end noise correction framework that applies an improved Mixup entropy and a new balance term for label updating. This technique ensures a balanced distribution of classes while correcting noisy labels, resulting in higher accuracy. The framework has been validated on several datasets, including CIFAR-10, CIFAR-100, and Clothing1M, where it outperforms existing approaches. Zhang, Qian, et al.34 proposed a Fire Segmentation-Detection Framework (FSDF) to address the limitations in traditional and DL-FD by combining HSV and CLBP for flame Feature Extraction (FE) with YOLOv8 for segmentation and VQ-VAE for unsupervised detection. Evaluations using real-world fire datasets show FSDF’s superiority over baseline methods, with notable improvements in precision (19.5%), recall (1.2%), and F-score (11.7%). Field tests with a robot deployment validate its practical application, underscoring FSDF’s adaptability and effectiveness in diverse fire scenarios35. Table 1 below analyzes the literature in terms of its strengths and weaknesses. Table 1Critical analysis of existing FD methods.ReferenceMethodStrengthsWeaknessesApplication and Limitations 36 DL-based FireNet using MobileNetV2High accuracy (98.42%) and recall (99.47%), practical for smart city applicationsLimited adaptability to diverse fire conditions (e.g., fluctuating illumination)Well-suited for structured environments but struggles in open or forested areas 37 RS-SVMOptimizes kernel parameters and effectively handles smog features with high true positive ratesHigh dependence on kernel optimization; less effective in varying lighting conditionsEffective in smog-heavy regions but less adaptable to forest or varied environments 38 Attention U-Net and Squeeze NetEfficient image classification with moderate execution time, proper in varied illuminationModerate accuracy (93%) and execution time may be too long for real-time applicationsPerforms well in controlled environments; less effective in dynamic outdoor scenarios 39 YOLOv2 with IoT for SurveillanceGood for real-time detection with 93% accuracy; suitable for indoor and outdoor scenariosLower specificity (80%) compared to other methods; not optimized for all fire typesWorks well in monitored areas but limited in unstructured, expansive locations 40 YOLOv5 with SPPFP moduleEffective in small FD targets with global data capabilitiesIt may not adapt well to diverse flame conditions; it is sensitive to training data qualityIt is effective for forest fires but may not scale well to urban or complex landscapes 41 Radiocommunication sensor networkEarly-stage FD in harsh environments; 90% accuracy in forest areasLimited to radiocommunication; may not perform well in non-forest or urban environmentsBest for forest areas; not adaptable to urban fire situations 42 Smart Glass and DL-based Vision SystemVision-based systems are specialized for visually impaired persons and early indoor FDLimited outdoor application; accuracy (73.6%) is lower than other DL modelsSpecialized for indoor applications; not optimized for outdoor or large-scale fires 43 CNN-based Detectron2Adaptable for small images and low-quality frames, potential in varied phases and conditionsIt lacks extensive real-world application validation; there are potential limitations with noiseIt requires further validation; effectiveness has not been proven across all fire conditions 44 DL-based Fire-Net (Landsat-8 images)Combines thermal and optical data for precise FE in biomass firesDepending on the quality of satellite imagery, it may not adapt to urban fires effectivelySuitable for biomass FD; limited application in urban settings 45 Adaboost-DNN Hybrid ModelThe ensemble approach improves robustness in various scenarios and is adaptable to surveillance dataThe complex model structure increases training time and may not be suitable for low-power devicesVersatile for camera-based monitoring; less efficient in non-surveillance environments 46 Cross-to-Merge Training (C2MT)Insensitivity to sample selection information; balances labeled/unlabeled data for robustnessComplexity in merging models; performance fluctuations under different noise conditionsBalances data well; struggles with extreme noise rates and non-visual datasets 47 BPT-PLRAddresses class imbalance, reducing optimization conflicts; performs well in noisy datasetsIt requires precise class balance, but there are potential limitations in highly imbalanced real-world datasetsIt adapts to noisy labels; it may need fine-tuning for specific dataset configurations 48 CMKLFine-tunes noisy labels without prior info; practical in real-world, imbalanced datasetsIt depends heavily on entropy functions, which may not work efficiently in non-visual datasetsPractical in data imbalance but needs further testing in varied conditions 49 ECMBEnd-to-end correction without noise matrix; maintains class balance for better accuracyRelies on class balance term effectiveness; requires substantial computing resourcesOptimized for datasets, real-world applications may require more customization 50 Fire Segmentation-Detection Framework (FSDF)Combines traditional and DL; excels in precision (19.5%) and robustnessIntegration complexity requires substantial testing and deployment resourcesValidated in real-world conditions, complexity might limit scalability Critical analysis of existing FD methods. Differences between existing and proposed methods By analyzing the literature in detail, the differences between the existing and proposed methods are specified below. Step 1.The proposed work considers indoor and outdoor FD using FL, while the existing studies have only regarded DL for FD so far, which makes it different and significant from the rest of the works. The proposed work considers indoor and outdoor FD using FL, while the existing studies have only regarded DL for FD so far, which makes it different and significant from the rest of the works. Step 2.Unlike the proposed IOFireNet, most researchers did not classify the types of fire, such as indoor fire, outdoor fire, forest fire, nighttime fire, and daytime fire. Unlike the proposed IOFireNet, most researchers did not classify the types of fire, such as indoor fire, outdoor fire, forest fire, nighttime fire, and daytime fire. Step 3.Although several advancements have been made in the existing FD, the proposed method predicts the direction and spread of fire, its severity (or intensity), and its area to supplement early warning. Although several advancements have been made in the existing FD, the proposed method predicts the direction and spread of fire, its severity (or intensity), and its area to supplement early warning. From the related works, several methods were utilized in fire prediction and segmenting the fire area. Moreover, the proposed model also focuses on sensing and segmenting the fire region and improving the accuracy rate with minimal computation. The model produces segmentation results at a minimal computational cost while maintaining accuracy. Proposed methodology This paper proposes the use of FL-based IOFireNet to predict and localize fires. The fire images were preprocessed using the BF to eliminate the noise artifacts. After preprocessing, the images are segmented using SPAC to segment the fire and non-fire regions. A global IOFireNet is designed for nearby locations, and a local MobileNet delivers the fire accident data. The proposed algorithm will predict the direction and spread of fire, its severity (or intensity), and its area to supplement early warning51. The global model is generated by aggregating the parameters of the local model; then, it is applied to local fire data to create a detection model. The schematic representation of the proposed model is shown in Fig. 1. The schematic representation of the proposed model. The process begins with preprocessing using a BF, a non-linear, edge-preserving noise reduction technique. This step is crucial for eliminating noise artifacts while maintaining the clarity of important image features, particularly edges, which are vital for accurately detecting fire regions. Following preprocessing, the segmentation of fire regions is performed using the SPAC. SPAC is precisely selected due to its ability to align atomic pixel regions with natural object boundaries effectively. This technique considers color and integrates contour, texture, and spatial features, making it more robust and adaptive than clustering methods, such as K-means or graph-cut algorithms. By employing SPAC, we enhance segmentation precision, ensuring that fire regions are accurately delineated even under varying environmental conditions and illumination. After segmentation, the IOFireNet is applied to detect and localize fire regions. The decision to use IOFireNet, which integrates an FL, is based on its ability to aggregate and adapt local model parameters, thus improving detection accuracy across varied indoor and outdoor environments. Furthermore, combining global and local models in IOFireNet ensures that localized data (collected via MobileNet) can be processed efficiently, supporting the prediction of fire spread, severity, and area52. This approach optimizes performance, reducing computation time while increasing FD accuracy. Dataset description In this paper, the fire images dataset is considered from Kaggle, which consists of 5030 images from indoor fire, outdoor fire, forest fire images, nighttime fire, and daytime fire. The image size ranges from 224 × 224 pixels. The data are split based on a 70:20:10 ratio for training testing and validation. This work has used data augmentation approaches with 5030 images in the collection to produce additional images. Basic augmentation techniques, like zooming, flipping, and scaling, increase the sample images. As a result of these modifications, the training set introduces a variety of images. It reduces overfitting and improves the predictability and sensitivity of this proposed model. For the experiment, 10,563 images were utilized for training, 3750 images were used for testing, and 777 images were used for validation. Table 2 illustrates the fire sample specification. Table 2Fire sample specification.LabelsImagesTrainingTestingValidationIndoor fire2220924243Outdoor fire2400630174Forest fire images2040810132Nighttime fire2109750186day time fire182163642 Fire sample specification. Bilateral filter The BF is a non-linear, leveling, edge-preserving noise reduction filter. Herein, the fire images were pre-processed using the BF to eliminate the noise artifacts53. The Gaussian smoothing process assumes a weighted mean of neighboring pixel values. The weights are inversely correlated with the distance from the neighborhood’s centre. In addition to these longitudinal weights, the BF adds a tonal weight, causing pixels with values close to the center pixel to be weighted more strongly than pixels with values farther apart. Figure 2 shows the input image into the pre-processed image. Input image and pre-processed image. Due to the tonal weighting, the BF can preserve edges while smoothing out flat areas. The BF, Eq. (1), starts with linear Gaussian smoothing. The weight for f(Y) and f(y) depends only on the spatial distance and is equal to . A weighting portion based on the total distance is added by the BF (x). This results in Eqs. (2) and (3). The explicit dependence of the weights on the image values requires an explicit normalization to ensure that the sum of all weights is one. Super pixel-based adaptive clustering The fire region is segmented using the SPAC. This technique groups atomic region pixels aligned with natural object boundaries by employing a linear clustering approach that integrates color, contour, texture, spatial features, and an adaptive distance measure54. The feature weight in each iteration is adjusted based on discriminability. The color and spatial distance are initially computed using Eq. (4): Here, L, a, and b represent the lightness and the chromatic components in the CIE Lab color space, respectively. , and represent the differences between the corresponding values of pixels. The constants ‘x’ and ‘y’ are computed based on the pixel comparison values. The normalized Euclidean distance is then used to compute the spatial distance ‘’. The gradient difference ‘’ is computed in ‘l’ domain to measure the directional intensity variation of input images55. Similarly, Weber local descriptors are used to extract prominent local patterns from input images, which is how texture features are obtained. Combining the four features as mentioned above into feature space and computing the distance between pixels by the following Eq. (5): Where represents the weight of color, spatial, gradient, and texture differences . As discussed before, the discriminability of different features is measured to update the weight in each iteration56. A greater importance is assigned to a smaller sum of cluster distance, while a smaller weight is assigned to a more significant sum of cluster distance, according to the principle of feature weighting. The initialization of all features is assigned an equal weight, which is further used in pixel assignment. Then, the discriminability is computed on each iteration according to the sum of within-cluster distances using Eq. (6). where represents the feature set , v represents the total count of superpixels, ‘z’ stands for pixels count, represents whether the pixels belong to a cluster center and is a distance measure computed among to on feature ‘a’. The weight of ‘a’ feature is adjusted based on its relative discriminability as Eq. (7). In each iteration, the weights of various features are updated. In the above equation, ‘’ stands for a constant variable set to 9 in our study, as explained. The stop criteria are achieved at the fixed value ‘n’, set to 10 in this study. for superpixel clustering for fire image segmentation. IOFireNet IOFireNet layers are responsible for transforming pixels into features that describe the input image’s content and transmitting these features. Thus, in this instance, IOFireNet is used as a feature generator for another neural network57. IOFireNet is a set of CNN that can be used for categorization and other usual tasks. They are small, low-latency, and low-power models. Due to their size, these are considered good DL for mobile device use. Input images for the IOFireNet design should be 224 × 224 with features scaled between [-1,1]. The loaded input image is reduced, and the center value of the [0, 255] pixel range is used to feature scale the image tensor values. The output is then divided by the offset value to scale between [− 1,1] after each pixel in the image has its offset value removed. For on-device and embedded applications, it offers the advantages of minimum computational power, time, space, and increased accuracy. Depth-aware Separable Convolution serves as IOFireNet’s foundation. Using fewer factors than networks with the same depth makes the neural network lighter. In the conventional convolution procedure, a point-first convolution follows a depth-first convolution, and the two collections are referred to as a depth-wise separable convolution. Three convolutional layers form its function. A 1 × 1 pointwise convolution layer follows only after the depth-wise convolution layer to filter the data. Pointwise convolution, a projection layer, will turn a tensor with many channels into one with fewer channels. Before advancing to depth-wise convolution, the first layer performs a 1 × 1 convolution to determine the number of channels in the data. The architecture diagram of IOFireNet is depicted in Fig. 3. The architecture of proposed IOFireNet. Depth-wise separable convolution The lightweight Deep Convolutional Neural Network (DCNN), MobileNet, is substantially smaller and performs considerably faster. The Mobile Net is based on depth-wise separated convolutions and point-by-point convolutions. Each input channel gets its filter because of depth-wise convolution in mobile nets. After the pointwise convolution, the depth-wise convolution products are combined using a 1 × 1 convolution. A typical convolution algorithm filters and combines inputs to generate an additional collection of outputs (Table 3). Table 3Hyperparameter setting proposed model.ParametersMobileNetConvolutional80, 80, 32Number of Neurons512Learning Rate0.01Batch Normalization80, 80, 32Deep Wise Convolutional80, 80, 32Dropout0.2Dense layer1Input Activation FunctionReLUGlobal Average Pooling1280Output Activation FunctionSigmoid Hyperparameter setting proposed model. A layer for filtering and a layer for merging are created from the depthwise separable convolution—such a factorization results in a substantial reduction of the computation and model dimensions. The input to a typical convolutional layer is feature map E and produces a feature map H where is a square input feature that maps height and width in spatial dimensions, F is the number of input channels, is a square output feature that maps spatial height and width, and D is the number of output channels. The parameterized convolutional kernel ‘k’ of size determines the normal convolution layer where is the spatial dimension of the kernel, F is the quantity of input channels, and D is the quantity of output channels. The standard convolution with stride one and filling produces the following result: feature maps, Eq. (8). The expense of computing with standard convolutions is Eq. (9). where the quantity of input channels multiplicatively affects the computational cost F, the amount of output channels D, the kernel size and the size of the feature map . MobileNet covers the connections between each of these systems. When depthwise separable convolutions are used, the correlation between output channels and kernel size breaks down. The typical convolution technique combines and filters features with convolutional kernels to produce a new representation. A significant reduction in computational cost can be achieved by separating the filtering and combination phases using factorized convolutions, also known as depthwise separable convolutions. The two layers of a depthwise separable convolution are pointwise and depthwise convolution. For each input channel, a unique filter is applied using depthwise convolutions. A simple 1 × 1 convolution called pointwise convolution combines the output of the depthwise layer. MobileNets employ batch norm and ReLU nonlinearities at both layers. A filter is applied to each input channel in the convolution layer, Eq. (10). where the depthwise convolutional kernel has a dimension of , and the fth filter is applied to the channel in E to create the fth channel of the filtered output of the feature map . Depth-wise convolution’s computational cost is computed as Eq. (11). Depthwise separable convolutions cost of Eq. (12) Convolution can be reduced mathematically when considering a two-step method of combining and filtering Eqs. (13), (14). Mobile Net uses 3 × 3 depthwise separable convolutions instead of conventional convolutions, which use 8 to 9 times less computation but have a drastically reduced accuracy. A global model with federated learning This section examines the state of decentralized data sharing of FD images with forest areas, indoor and outdoor, fire areas during the day, and fire areas during the night. FL is utilized to merge results from many data sets distributed throughout various sites. The main objective is to distribute the data among the several sites while utilizing the FL to manage privacy. An IOFireNet is used to gather the local data (Fig. 4). Federated learning process. Result and discussion The experimental setup of this study was implemented through MATLAB 2020b and executed on a computer with Windows 10 OS and an Intel i7 processor running at 2.10 GHz and 64 GB of RAM. The practical result of the proposed method is validated in different environments (indoor outdoor, forest area, daytime fire area, and nighttime fire area). The efficiency of the proposed approach is evaluated using the following statistical measures (Sensitivity, F1-score, Precision, and Accuracy). The proposed method will be capable of predicting the direction and spread of fire, the severity (or intensity) of fire, and its area to supplement early warning. Figure 5 illustrates the experimental results of the proposed FD. The experimental results of the proposed IOFireNet. Figures 5, 6 and 7 examine the experimental findings from the indoor, outdoor, and forest area settings for qualitative analysis. There is a significant improvement in image quality when processing the exterior images compared with the indoor ones, and the outdoor image processing can be done in real-time. Some strategies enhance color without sacrificing scene details, while others over-enhance color. The proposed approach works better than it in terms of color distortion and handling uneven FD distribution, and it has several advantages. The experiment results for indoor FD. The experiment findings of a forest area FD images. Performance analysis The efficiency of the proposed IOFireNet was evaluated using parameters such as Accuracy, F1-Score, Specificity, Precision, and Sensitivity, Eqs. (15), (18). Table 4 illustrates the proposed IOFireNet performance analysis—the classification of FD in indoor, outdoor, and forest areas. The accuracy of the proposed FL-based IOFireNet is 98.56%, 96.42%, and 93.83%, respectively. Figures 8 and 9 show that the proposed FL-based IOFireNet method attains higher accuracy in testing and training. The classification accuracy of the proposed FL-based IOFireNet was 98.65%. Table 4Proposed IOFireNet performance analysis.ClassesIndoor areaOutdoor areaForest areaAccuracy98.5696.4293.83Precision96.3595.4892.73Sensitivity95.7894.3691.48F1-Score97.5096.4394.68 Proposed IOFireNet performance analysis. Accuracy graph of the proposed method. Loss curve for the proposed method. A vertical axis, the accuracy range, and a horizontal axis display the number of epochs, all illustrate the performance curve in Fig. 8. As the number of periods increases, the performance of the IOFireNet increases. Figure 9 shows the loss curve of the proposed IOFireNet, which diminishes as the epochs are raised. The proposed IOFireNet obtains high accuracy for FD using the dataset. Comparative analysis This evaluation compared The proposed IOFireNet with numerous existing techniques based on different performance metrics. The proposed FL-based IOFireNet attains an accuracy range of 98.65%. The accuracy of the proposed FL approach based on the MobileNet is more efficient than that of the existing models. Table 5 compares the proposed SPAC model with traditional segmentation techniques such as graph-cut algorithms and conditional random fields. The proposed SPAC segmentation techniques achieve a mean IoU of 97.14%. The proposed SPAC attains a mean IoU of 4.06%, which is 2.45% better than the Attention ResU-Net, SegNet, graph-cut algorithm, and CRF. Table 5Comparison of Segmentation Model.Segmentation methodMean IoU (%)Attention ResU-Net5888.11SegNet5989.15Graph Cut Algorithm93.19CRF94.76Proposed SAPC97.14 Comparison of Segmentation Model. The proposed FL-based IOFireNet improves the overall accuracy of the VGG-19, ResNet-50, Xception, and DenseNet by 93.46%, 94.50%, 95.40%, and 92.76%, respectively. The proposed FL-based IOFireNet improves the overall precision of the VGG-19, ResNet-50, CNN, and DenseNet by 91.59%, 93.42%, 94.68%, and 90.08%, respectively. The Proposed FL-based IOFireNet improves the sensitivity of VGG-19, ResNet-50, Xception, and DenseNet by 90.13%, 91.45%, 92.61%, and 89.29%, respectively. The proposed FL-based IOFireNet improves the overall F1-Score of the VGG-19, ResNet-50, Xception, and DenseNet by 88.62%, 90.06%, 90.60%, and 88.87%, respectively. The efficiency of the proposed model is calculated based on the specific parameters illustrated in Fig. 10. Comparison of proposed and traditional DL. According to Table 6, the proposed FL-based IOFireNet improves the overall accuracy of 98.42%, 93%, 93%, and 97.35% better than CNN + Squeeze Net, U-Net + Squeeze Net, YOLOv2 Net, and DL + Fire-Net. Table 5 illustrates a comparison of the proposed versus the existing model. From Table 5, it is evident that the accuracy of the proposed IOFireNet is 98.65%. Table 6Comparison of presented versus existing model.AuthorsMethodsAccuracy (%) 16 NN + FFire Net98.42 18 UNet + Squeeze Net93 19 YOLOv2 Net93 24 DL + Fire Net97.35ProposedFL-based IOFireNet98.65 Comparison of presented versus existing model. Ablation study An ablation study assessed the efficiency of the SPAC applied in the segmentation stage. This experiment, with SPAC and without, is shown in Fig. 11. Ablation study comparison with and without SPAC. According to a comparison, the performance was estimated in terms of accuracy, precision, recall, and F1 score. According to this research findings, the segmenting of the fire using ablation models was typically less accurate than using the SPAC, proving the SPAC’s usefulness in the segmenting process of the proposed IOFireNet. The efficiency of the proposed IOFireNet was evaluated, and the ablation was performed with and without SPAC. There is a possibility that the model without SPAC has less accuracy. From this analysis, we have concluded that the proposed SPAC attains high accuracy in the fire segmentation process. Time complexity analysis MobileNet applies the depthwise separable convolution, in which the number of parameters and calculations is significantly lower than that of the primary convolution layers. The time complexity of the depthwise separable convolution layer, which is discussed in section “Proposed methodology”, is represented by Eq. (19). where ‘n’ is the number of input samples, ‘k’ is the kernel size, d is the number of input channels, and m is the number of output channels (filters). The work has presented time complexity for complete MobileNet with L layers as follows in Eq. (20). The FL is trained across multiple devices (clients) that hold their local datasets. The training process has local training and communication overhead. Every client performs the computations on its data portion in the dataset. The time complexity of local training for each client is estimated as in Eq. (21). As in conventional distributed training, clients update a server after local training. This transmission process can be described In Eq. (22) below. which accounts for the model weights with ‘m’ parameters. The overall complexity for R communication rounds in Eq. (23). where ‘nc’​ is the number of clients, and ‘E’ is the number of epochs executed on each client. The magnitude of time used in the preprocessing of input data, which might comprise normalization and resizing, is given in Eq. (24). where n is the number of samples being processed. Potential computational costs occur in applying MobileNet in an FL setting, including outlining the architectural aspects and operational details in an FL setting. Discussion This study aimed to detect fire in indoor and outdoor environments with low complexity and high accuracy. The results were compared with various evaluation metrics, such as accuracy, precision, and specificity analysis. Table 3 illustrates the performance of the proposed IOFireNet for different classes, such as indoor, outdoor, and forest areas. The proposed model attains a high accuracy of 98.56% for indoor FD, which is 2.17% and 4.79% better than outdoor and forest fires, respectively. The proposed model achieves a high F1-score of 97.50% for indoor FD, which is 1.11% and 2.45% better than outdoor and forest fires. In addition, for sensitivity, precision achieves better performance for the indoor FD. Table 4 illustrates the segmentation performance based on the mean IoU with existing techniques. The proposed model attains a high mean IoU value of 97.14%. The proposed SPAC achieves a mean IoU of 4.06%, 2.45% better than the graph-cut algorithm and CRF models VGG-19, ResNet-50, Xception, and DenseNet. Figure 12 compares proposed and traditional DLs such as VGG-19, ResNet-50, Inception, and Dense Net. The proposed model achieves an accuracy of 0.23%, 4.20%, 3.29%, and 10.02%, better than VGG-19, ResNet-50, Inception, and Dense Net, respectively. The proposed model achieves an F1-score of 6.34%, 4.81%, 4.24%, and 6.07%, better than VGG-19, ResNet-50, Inception, and Dense Net. In addition, the proposed model achieves better performance based on sensitivity and precision than the existing methods. Results of the proposed model in the fire area. Table 5 illustrates the comparison of the presented model versus the existing model in terms of accuracy. The proposed model attains a high accuracy of 98.56%, which is 1.31%, 5.72%, 5.72%, and 0.23% better than existing techniques such as DL + Fire Net24 YOLOv2 Net19, UNet + Squeeze Net18, and NN + FFire Net16. Furthermore, the results were analyzed by removing SPAC to evaluate the proposed IOFireNet. While using SPAC, the proposed model attains higher accuracy. Case study: wind, smoke, and weather condition prediction in the fire area In this study, various obstacles, namely landscape and weather conditions, are essential in indoor and outdoor environments to predict fire. Some common conditions in fire areas are smoke, wind direction, and environmental weather conditions. Fire can be controlled manually with tools such as fire extinguishers, water sprays, fire pumps, and fire blankets. Moreover, some Artificial Intelligence (AI) techniques are used for FD in indoor and outdoor environments. The DL and ML methods are effective FD methods. The experimental setup was performed in real-time under various environmental factors such as weather conditions, wind speed, and terrain. Figure 12 depicts the FD results of the proposed model with a sample image to predict the fire. In the first row, the forest fire image is taken and segmented using SPAC, which provides a better accuracy of 99.53%. In the second row, the hill station fire image is assumed, and it is segmented using SPAC, which provides an accuracy of 97.53%, which is relatively low compared to forest FD due to the terrain condition. In the second row, the hill station fire image is taken, and it is segmented using SPAC techniques, which provides an accuracy of 97.53%, which is relatively low compared to forest FD due to the terrain condition. In the third row, the forest fire image with smoke is taken, and it is segmented using SPAC, which provides a better accuracy of 98.28%. The model attains better performance in different environmental conditions, such as weather and wind speed, but it fails to provide better accuracy in FD fire for terrain conditions. Conclusion and future work This paper proposes a novel Federated Learning (FL)-based Indoor-Outdoor Fire Net (IOFireNet) method to detect and localize the fire region. The fire images were pre-processed using the BF to eliminate the noise artifacts. After preprocessing, the images are segmented using Super Pixel-based Adaptive Clustering (SPAC) to segment the fire and non-fire regions. A global IOFireNet is designed for nearby locations, and a local MobileNet delivers the fire accident data. The proposed algorithm will be capable of predicting the direction and spread of fire, its severity (or intensity), and its area to supplement early warning. The global model is generated by aggregating the parameters of the local model; then, it is applied to local fire data to generate a Fire Detection (FD) model. The proposed FL-based IOFireNet method achieves an overall accuracy of 98.65% for FD and 97.14% of the mean IoU for segmentation. The FL-based IOFireNet method shows better Accuracy, Precision, F1-score, and Sensitivity simulation results than existing techniques. The limitation of the proposed IOFireNet model is the lack of FD in terrain conditions. This limitation will be considered as future work for extending our proposed system. The proposed model, IOFireNet, is an improvement compared to known architectures, including ResNet, VGG16, Inception, and Xception. Unlike these models, which are now less advanced, IOFireNet is designed to work efficiently on any system’s available computational resources, memory, and processing time, thus ideal for systems with limited resources. Moreover, IOFireNet provides better accuracy than these traditional models, which confirms the proposed model’s reliability in solving complex problems with low operating expenses. These advantages make IOFireNet suitable for application areas where defining the workflow and performance accuracy are critical. Author contributions Conceptualization, Methodology, Formal analysis, Investigation, Writing - Original Draft, Writing - Review & Editing : Sridhar Panneerselvam; Writing - Review & Editing, Formal analysis, Investigation : Senthil Kumar Thangavel; Software and Validation : Vidya Sagar Ponnam; Resources, Data Curation and Visualization : Sudhakar Sengan. Data availability The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Citations Data Availability Statement The datasets used and/or analyzed during the current study available from the corresponding author on reasonable request.