## 2 The Proposed Method
### Feature Extraction and Encoding  
Researchers have developed several CNN-based models for various purposes, including applications in photovoltaics [49], crowd estimation [50], deep learning in big data [51], classification and detection [2; 52; 53], medical data/healthcare [54; 55], renewable energy [56], energy consumption [57], IoT-based smart cities [58; 59; 60], and fire recognition [61; 62; 63; 64]. Examples of these architectures include AlexNet, SqueezeNet, GoogleNet, MobileNet, etc. However, each model has limitations and strengths, and researchers are constantly investigating new architectures for performance improvements. To address the issue of fire detection, we have studied the EfficientNet architecture, which is designed to scale all the network dimensions via a compound scaling method. EfficientNet employs a multi-objective network, which prioritizes the optimization of both FLOPs and accuracy. This architecture utilizes search space and uses scaling coefficients, namely, phi, gamma, and delta, to represent the model's FLOPs and accuracy as optimization tools, where alpha and beta monitor the trade-off between accuracy and FLOPs. The EfficientNet architecture comprises numerous convolutional layers, each with varying kernel sizes. The model takes RGB inputs with a size of 150 \(\times\) 150 and reduces the size of the feature maps by scaling down the hidden layers. Additionally, the network width is increased to improve accuracy. This design methodology ensures that the model extracts and utilizes relevant features from the input data. To further reduce false alarms and enhance accuracy, we process the output features of EfficientNet by passing them through our proposed densely connected  
Figure 1: The main framework of E-EFNet incorporates three main steps: data feeding, model training, and output.  
autoencoder layers. This step facilitates feature encoding, allowing for the selection of the most optimal features from the output of EfficientNet.  
The autoencoder learns the underlying representation of input data in a feature map in an unsupervised manner. An autoencoder typically consists of input, hidden, and output layers, depicted in Figure 2, with the encoder and decoder serving as the two essential components. The encoder compresses the input into a lower-dimensional feature map while the decoder reconstructs the original input from the compressed feature map. Assuming we have a dataset of input samples \((x_{n})N_{n=1}\), where each sample \(x_{n}\) belongs to \(r^{m-x-l}\), the encoder takes the input sample \(x_{n}\) and maps it to a lower-dimensional feature map \(o_{n}\), which can be calculated using Equation (1):  
\[h_{n}=F(w_{1}x_{n}+b_{1}) \tag{1}\]  
where \(w_{1}\), \(F\), and \(b_{1}\) are the encoder's weight, activation function, and bias, respectively.  
The decoder then takes the compressed feature map \(h_{n}\) and reconstructs the original input sample \(x_{n}\) from it, as shown in Equation (2):  
\[o_{n}=G(w_{2}x_{n}+b_{2}), \tag{2}\]  
Here, \(w_{2}\), \(G\), and \(b_{2}\) are the weights, activation, and bias of the decoder, respectively. By minimizing the difference between the original input sample \(x_{n}\) and the reconstructed sample \(o_{n}\), the autoencoder can learn a lower-dimensional representation of the input data that captures its essential features.  
The autoencoder's encoding phase transforms the input data into a compressed feature representation, which is then fed into the decoding stage of the autoencoder to reconstruct the original input. By reducing the dimensionality of the input data, the encoding phase can capture all the critical features in a compressed format. Herein, we use the encoder part of the autoencoder to encode the features for further processing.