Detection of Fire Hazards Using Transfer Learning Techniques

Detection of Fire Hazards Using Transfer Learning Techniques

Vijay Kumar* | Akshay Juneja

IT Department, D R Ambedkar NIT Jalandhar, Jalandhar 144008, India

Computer Science and Engineering, COER University, Roorkee 247667, India

Corresponding Author Email: 
vijaykumarchahar@gmail.com
Page: 
1-7
|
DOI: 
https://doi.org/10.18280/rces.131-401
Received: 
13 August 2026
|
Revised: 
4 October 2026
|
Accepted: 
12 October 2026
|
Available online: 
13 November 2026
| Citation

© 2026 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Fire hazards are the most unavoidable threat in any home, especially with elderly people living or working alone in the kitchen. The fire alarms presently used to detect smoke (not fire) with their properties are not so reliable. So, a real-time fire detection system is proposed that takes input as a live video stream, checks individual frames of the video for chances of fire, and alerts the user if fire flames exceed a threshold value. For this, ResNet-50 and VGG-16 are used to simulate the proposed model using a publicly available dataset that comprises 864 images and 15 videos. The proposed approach yields 97.01% training accuracy, along with 96.63% precision, 96.28% recall, and 96.45% F1-score. The results reveal that the chances of getting false alarms are very low. The proposed model gives a more accurate result by examining the number of persons in the room and predicting the chances of fire in the absence of people.

Keywords: 

image processing, Convolutional Neural Network, Residual Neural Network 50, background subtraction, key frame

1. Introduction

With good medical care facilities and technological enhancements, the world's population is aging; nearly every country in the world is seeing a rise in the number and proportion of elderly people in its population. According to the statistics from World Population Prospects: the 2019 revision, by 2050, one in six people in the world will be over 65 years of age [1]. With a growing number of older adults living alone, it is increasingly important to ensure that they are safe at home. Frequent falls and burns are the most serious accidents occurring in old age. The recovery time among the older population is also comparatively longer. It is not rational to put the full responsibility of taking care of senior citizens suffering from dementia, Alzheimer's disease, etc. on family members and friends. Prevention of falls, protection against fire and related dangers, and avoiding bathroom hazards are some of the main concerns to ensure home safety for elderly people [2]. Among them, the kitchen plays an important role in human life. It is an essential place for everyday activities such as cooking. It is the place most visited by the resident and is also the most prone to being set on fire if left unattended.

Fire hazards are the most common threat to elderly/disabled people while working in a kitchen alone. This paper proposes a fire detection and surveillance system that detects the presence of fire, checks its severity according to various threshold values, alerts the control panel, and notifies the occupants to evacuate the place immediately. This detection system is a step ahead of the current fire alarms [3, 4], as the fire alarms currently used detect smoke and its properties, and do not actually sense fire. This may give false positives in many cases or delayed detection, as smoke can be detected only after the fire becomes severe and exceeds a threshold value [5-7].

The proposed model will set the fire threshold higher to generate an alarm if there is someone present in the room, which can be detected using computer vision. It will try to generate an alarm soon enough, so that the fire can be put out in its initial stages to minimize the damage. The model will detect both fire and smoke using image processing techniques. It will also use motion detection of flames and smoke for better results. It is used to further train the detection model and gives accurate results. Besides fire detection, this model can also be used to detect and prevent falls caused by any unusual object present on the floor.

The remainder of the paper is organized as follows. Section 2 explains the related work done in the field of fire detection in kitchen/home. Section 3 describes the proposed model. Experimental results are presented in Section 4. Section 5 presents the concluding remarks.

2. Related Work

Since home safety is a major concern for disabled and elderly people, various approaches and devices have been developed [8-10]. The approaches in fire detection used classical detection methods that were slow to use in real-time applications. The researchers developed a method for detecting real-time video fire and smoke based on foreground image accumulation and optical flow [11-14]. Accumulation images are extracted using the frame differential method. A statistical model depending on the foreground accumulation image recognized the flame regions while assessing the optical flow and using a movement feature discriminating model to recognize smoke regions. The algorithm could detect the following three detection cases in real time: fire with flame and no smoke, fire with smoke and no flame, and fire with flame and smoke. They used HSI and RGB color models for motion detection and smoke detection in addition to color features. Nevertheless, it takes the smoke detectors a long time to detect smoke. This risk cannot be taken in elderly care.

Saifudaullah used Raspberry Pi and Arduino Uno-based technologies [15]. It was available at a lower cost with low power consumption and faster processing. But it did not explain any approach to detect fires. No measures were taken to avoid false alarms. Hence, it was not very reliable.

In recent times, many small-sized and affordable software and hardware are available that are easy to use and install for fire color modelling and motion detection. But they did not provide smoke detection. There is no authentication for false alarms [16, 17].

In study of Avazov et al. [18], YOLOv7-based fire detection system was proposed for maritime environments using 4,622 ship-scene images with data augmentation. It achieved 93% accuracy and achieved effective real-time fire detection. However, visually similar objects cause false detections.

YOLOv8-based Smart Fire Detection System (SFDS) was proposed for real-time fire detection in smart cities using IoT, fog, and cloud computing [19]. It yielded high precision and was found effective for fire detection, with fewer false alarms and faster response.

A YOLOv6-based fire detection system was designed using a dataset of 4,000 images acquired from multiple sources [20]. It achieved 0.96 recall and 0.83 precision. However, it suffers from overfitting.

Another YOLO-based approach is used for a ship fire detection model [21]. It utilized histogram equalization to improve detection under challenging conditions. It achieved high accuracy and was found effective for real-time fire monitoring in maritime environments.

A forest fire detection approach was proposed using YOLOv8-based transfer learning along with the TranSDet model [22]. It was trained on 5,200 augmented images. It achieved 98% accuracy and detected small, distant fires during both daytime and nighttime conditions.

3. Proposed Model

3.1 Motivation

Fire alarm systems are important not only for building a smart home, but also have significant use in commercial purposes [23, 24]. The Municipal By-Laws and State Regulations give complete specifications for fire safety, detection, and prevention rules in India. Several commercial and residential buildings have been found flouting fire safety regulations, particularly high-rise buildings. Many residents do not bother to install fire detectors in their buildings. This is mainly due to increased costs and maintenance of systems. Also, it is a common notion among the elderly population that false alarms. Studies show that old people are a bit cranky in nature; they switch off the detectors if they give false alarms in some cases. Therefore, a model that gives good accuracy for alerts is required.

However, fire alarms are an essential requirement in commercial as well as residential buildings. In this paper, a cost-effective real-time surveillance fire detection system is proposed, which studies the current state and availability of its residents in the room and gives us the chances of fire, if any.

3.2 Proposed approach

The proposed model consists of five main modules. These modules are image acquisition, division of frames, person detection, pre-processing, and deep learning. The brief description of these modules is given in the following subsections. Figure 1 illustrates the proposed model.

Figure 1. Proposed model for identifying key frames

3.2.1 Image acquisition 

Firstly, an input is given to the system, which can be either a live video stream, a captured pre-recorded video, or any image captured at a time instant with a webcam. If the input is a video or a live stream, then it is divided into subsequent frames. A normal video of 1 second constitutes about 25–30 frames. It depends on the quality of the webcam used.

3.2.2 Division into frames

After dividing the video into frames, each frame is studied separately. There is no need to run the model and test it on each frame because generally, a small spark detected in one frame cannot turn into a massive fire in the next frame. The time difference between two subsequent frames is very small. So, a skip rate of approximately 4 frames per second is used. This means that we test for fire in every 1 out of 4 frames here.

3.2.3 Person detection

The inspection process is started on a single frame. To detect the number of persons in that frame, an OpenCV library function, HOG Descriptor and its various functions, is used. It works as an object detector and gives us the idea and count of the different objects present in the room. It acts as a classifier for objects.

3.2.4 Image pre-processing

If there are persons present in the room, then he/she can see and extinguish the fire. However, if there is no one present in the room/kitchen, then the chances of fire are relatively higher. Various image processing techniques are used to sense the fire with the help of its properties such as color, motion detection, fire contour detection, and segmentation.

RGB image is converted into Hue Saturation Value (HSV) form to segregate only fire characteristics. Segmentation is done to divide the image into smaller segments known as sub-pixels for better processing. It makes the representation of the image easier. Motion detection detects the movement of pixels in subsequent frames. Figure 2 depicts the steps involved in fire detection.

Figure 2. Steps involved in fire detection system using image processing techniques

3.2.5 Applying deep learning modules

The image processing techniques detect fire and smoke based on their visual properties. The physical properties of flame detection include color, shape, and temporal variation, whereas smoke detection considers diffuse texture, grayish appearance, and complex patterns. But these may give false positives in some cases. For instance, a large red colored moving object may be mistaken for fire flames if it resembles all its basic properties. People, especially senior citizens, get easily annoyed by these false alarms. They are more likely to remove the detection systems from their homes to avoid any panic attacks.

Therefore, deep learning modules such as ResNet-50 and VGG-16 are used to improve the detection accuracy of both flame and smoke. Traditional Convolutional Neural Networks (CNNs) perform poorly on real-time datasets and may give misleading information [25]. Therefore, deep CNNs such as ResNet and VGG are used, which work well on real-time datasets. However, they take more time to train the model, but are also more accurate. They can handle images that are more difficult to classify. Feature extraction followed by object classification is done in this model.

Residual Neural Network (ResNet) 50 is a form of convolutional neural network in which the actual input vector and the pre-processed input vector are combined to train the artificial neural network that follows. Figure 3 shows the training and testing of the proposed model.

Figure 3. Training and testing of the proposed model after processing using a Convolutional Neural Network (CNN)

In the proposed system, flame detection has higher priority because flames provide a distinct and immediate visual representation of fire. Smoke detection is a complementary indicator. It varies with lighting conditions, background, density, and scene depth. Therefore, flame detection provides more consistent visual evidence, while smoke detection supports early identification of fire without visible flames.

Firstly, the model is trained on the dataset using ResNet-50. The training time is quite higher than that of a traditional CNN. The model is created by appending a 'Dense' layer, with a number of activation units equivalent to the number of classes (3), to a pre-trained ResNet-50 model. This significantly reduces the training time. The frames for training and testing are read from the directories using the Image Data Generator. Data augmentation is performed by horizontally flipping each image by setting the horizontal flip to True in the Image Data Generator. Prediction involves sampling the test videos into frames and predicting the class probabilities in each sampled frame. The class with the maximum probability is assigned to the key frame. However, if the max probability is less than 0.5, the frame is assigned to the default class. The predicted class and the class probability are drawn on the frame before writing it into a separate video file using VideoWriter. If signs of fire are detected in any frame, the skip rate is immediately decreased to 1, testing each subsequent frame from then on for fire.

4. Results and Discussion

4.1 Dataset used

Detection of fire and smoke during live surveillance by fire authorities can significantly increase the response time to such tragedies saving many lives. The dataset used is taken from the Kaggle library and is named “Fire and Smoke Detection in CCTV Footage” [26]. This kernel translated this task into an image recognition problem on sampled CCTV video frames. The CCTV footage for training and testing is downloaded from publicly available videos. The training set is prepared by sampling the videos at a constant rate and manually distributing the sampled frames into 'default', 'fire' and 'smoke' categories. Frames are kept in directories named after the class to which they belong.

The dataset comprises images and videos as shown in Table 1. As compared to existing datasets, this dataset comprises video-derived frames instead of still images. It has also been used in existing fire-detection algorithms. The experiment is performed using the Python programming language on Google Colab [27].

Table 1. Dataset used

Class

No. of Images

No. of Videos

Training Phase

Default

161

12

Fire

274

Smoke

258

Testing Phase

Default

84

3

Fire

57

Smoke

30

4.2 Results

4.2.1 Image processing output

After converting the RGB image into HSV form and applying image processing techniques, the output image is obtained. Figure 4 shows the signs of fire flames detected.

(a) Input image

(b) Output image

Figure 4. Signs of fire flames detected using image processing

4.2.2 When a person is present in the room

The person detector counts and detects the number of persons present in the room. If there are people present in the room/kitchen, then the chances of fire are relatively less, and he/she can extinguish the fire.

Figure 5 shows the input image with 2 persons in the room. By applying the Histogram of Gradients (HOG) Descriptor with its parameters and multi-scale functions, we detect the person and obtain a probability of fire of 0.085%, which is almost negligible.

(a) Input image

(b) Output image

Figure 5. Person detected in a room with a low chance of fire

4.2.3 When no person is present in the room

In a simple CNN, the flattened vector obtained from the images after going through the convolution phase may have discarded some essential features from the image due to repetitive convolution applied. For this reason, ResNet is used that will add the initial features to the pre-processed vector.

Figure 6(b) shows the final output image when the trained deep learning model is simulated on the input image taken in Figure 6(a).

(a) Original input image

(b) Final output image

Figure 6. Fire detected with probability after applying deep learning

4.2.4 Quantitative analysis

Table 2 shows the accuracy obtained during the training phase from the pre-trained ResNet-50 model for 20 epochs.

Table 2. Accuracy obtained from the training phase

Epoch No.

No. of Classes

Training Batch Size

Accuracy (%)

Precision (%)

Recall (%)

F1-Score (%)

1

3

50

68.69

67.82

66.94

67.37

2

3

50

89.32

88.76

87.95

88.35

3

3

50

90.42

89.84

89.16

89.50

4

3

50

91.20

90.73

90.02

90.37

5

3

50

92.93

92.41

91.76

92.08

6

3

72

93.07

92.58

91.94

92.26

7

3

72

94.81

94.25

93.72

93.98

8

3

72

94.81

94.38

93.85

94.11

9

3

72

95.63

95.14

94.67

94.90

10

3

72

95.53

95.06

94.52

94.79

11

3

72

96.13

95.64

95.18

95.41

12

3

104

96.51

96.03

95.61

95.82

13

3

104

96.50

96.12

95.69

95.90

14

3

104

96.58

96.19

95.78

95.98

15

3

104

96.35

95.96

95.54

95.75

16

3

112

96.76

96.37

95.91

96.14

17

3

112

96.32

95.94

95.48

95.71

18

3

112

96.45

96.08

95.63

95.85

19

3

112

96.67

96.31

95.86

96.08

20

3

112

97.01

96.63

96.28

96.45

It is observed that the increase in number of epochs increases accuracy percentage as the model is trained. The training batch size is varied to decrease the system load. It gives the number of input images processed in a single training session. The default number of classes taken here is 3.

Figure 7 shows the accuracy obtained during the training process. It is observed that the training loss decreases with the increase in the number of epochs. Accuracy increases and is almost tending to 1 as the number of epochs increase and the model is trained further.

The proposed system can be trained on larger and more diverse datasets comprising different fire, smoke, lighting, and indoor environments. For real-home deployment, the model can be optimized and integrated with edge devices such as Raspberry Pi or NVIDIA Jetson, with multiple cameras at different angles and IoT connectivity. The system can monitor larger areas while maintaining real-time detection and alert generation.

Figure 7. Accuracy vs. number of epochs

Figure 8 shows the validation loss during the validation phase. It reveals that the decrease in validation loss and accuracy remains constant as we increase the number of epochs during the validation phase of the algorithm.

Table 3 presents the comparative analysis of the proposed and existing techniques.

Figure 8. Variation in validation loss and accuracy

Table 3. Comparative analysis

Ref.

Approach

Dataset

Accuracy (%)

Precision (%)

Recall (%)

Limitations

[15]

Raspberry Pi + Arduino Uno

Sensor-based

—

—

—

Fire-detection approach and false-alarm handling not addressed in detail

[18]

YOLOv7

4,622 ship-scene images

93

—

—

False detections from visually similar objects

[19]

YOLOv8 + SFDS

Smart-city environment

—

97.1

—

Evaluated for smart-city environments

[20]

YOLOv6

4,000 images

—

83

96

Overfitting reported

[21]

YOLO + Histogram Equalization

25,000+ ship-fire images

99

—

—

Focused on maritime environments

[22]

YOLOv8 + Transfer Learning + TranSDet

5,200 augmented images

98

—

—

Mainly focused on forest-fire surveillance

Proposed Work

ResNet-50 + VGG-16 + HOG

Fire/smoke CCTV images

97.01

96.63

96.28

-

5. Conclusion

In this paper, an intelligent and fully trained fire detection and alert system is proposed to build safe homes. It analyzes the properties of fire and applies various image processing techniques to predict the output. This is more reliable than conventional fire alarms, as it uses deep learning techniques to train the model first and then is tested on a real-time dataset. The system has proved to be very reliable with great immunity to false alarms. However, there are several limitations of this dataset. It has only few videos that limits the diversity of camera viewpoints, indoor environments, backgrounds, illumination conditions, and fire/smoke appearances. Furthermore, bounding-box annotations have to be implemented separately in the frames for processing. Also, there are no multiple camera viewpoints, environmental conditions, lighting variations, fire intensities, smoke densities, and geographically diverse scenes. In the future, the data size will be increased to improve the accuracy of the proposed model. It will be integrated with other smart devices, such as a desktop or mobile application, to give an alert to the caretakers when their acquaintances are in danger. The proposed system will be deployed using an edge device such as Raspberry Pi or NVIDIA Jetson connected to an IoT platform. The fire detection alerts will be transmitted to a mobile application or cloud server in real time using the Internet. The application will notify users with the detected location and fire status. This provides a practical pathway from the current prototype toward real-world deployment. These results make the proposed system more efficient, robust, and reliable, and can be used commercially.

  References

[1] United Nations. (2019). World Population Prospects 2019. Department of Economic and Social Affairs, Population Dynamics, United Nations. https://population.un.org/wpp/.

[2] Sadewa, R.P., Irawan, B., Setianingsih, C. (2019). Fire detection using image processing techniques with convolutional neural networks. In International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), Yogyakarta, Indonesia, pp. 290-295. https://doi.org/10.1109/ISRITI48646.2019.9034642

[3] Deve, K.B., Hancke, G.P., Silva, B.J. (2016). Design of a smart fire detection system. In IECON 2016-42nd Annual Conference of the IEEE Industrial Electronics Society, Florence, Italy, pp. 6205-6210. https://doi.org/10.1109/IECON.2016.7794000

[4] Ahrens, M. (2004). US experience with smoke alarms and other fire detection/alarm equipment. National Fire Protection Association. https://firedoc.nist.gov/article/i3gzXYQBWEcjUZEYbyuz.

[5] Merino, L., Caballero, F., Martínez-de Dios, J.R., Ferruz, J., Ollero, A. (2006). A cooperative perception system for multiple UAVs: Application to automatic detection of forest fires. Journal of Field Robotics, 23(3-4): 165-184. https://doi.org/10.1002/rob.20108

[6] Luo, R.C., Su, K.L., Tsai, K.H. (2002). Fire detection and isolation for intelligent building system using adaptive sensory fusion method. In Proceedings of IEEE International Conference on Robotics and Automation, Washington, DC, USA, pp. 1777-1781. https://doi.org/10.1109/ROBOT.2002.1014799

[7] Wang, X., Xiao, J., Bao, M. (2000). A ship fire alarm system based on fuzzy neural network. In Proceedings of the 3rd World Congress on Intelligent Control and Automation, Hefei, China, pp. 1734-1736. https://doi.org/10.1109/WCICA.2000.862769

[8] Healey, G., Slater, D., Lin, T., Drda, B., Goedeke, A.D. (1993). A system for real-time fire detection. In Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition, New York, NY, USA, pp. 605-606. https://doi.org/10.1109/CVPR.1993.341064

[9] Neubauer, A. (1997). Genetic algorithms in automatic fire detection technology. In Second International Conference on Genetic Algorithms in Engineering Systems: Innovations and Applications, Glasgow, UK, pp. 180-185. https://doi.org/10.1049/cp:19971177

[10] Asif, O., Hossain, M.B., Hasan, M., Rahman, M.T., Chowdhury, M.E.H. (2014). Fire-detectors review and design of an automated, quick responsive fire-alarm system based on SMS. International Journal of Communications, Network and System Sciences, 7: 386-395. https://doi.org/10.4236/ijcns.2014.79040

[11] Wu, Q., Cao, J., Zhou, C., et al. (2018). Intelligent smoke alarm system with wireless sensor network using ZigBee. Wireless Communications and Mobile Computing, 2018: 8235127. https://doi.org/10.1155/2018/8235127

[12] Yu, C., Mei, Z., Zhang, X. (2013). A real-time video fire flame and smoke detection algorithm. Procedia Engineering, 62: 891-898. https://doi.org/10.1016/j.proeng.2013.08.140

[13] Liu, B., Zhang, Y., Gan, F., Wang, D. (2007). Design intelligent multi-sensor fire monitoring based on DSP. In 8th International Conference on Electronic Measurement and Instruments, Xi'an, China, pp. 779-782. https://doi.org/10.1109/ICEMI.2007.4351263

[14] Zhang, L., Fang, G. (2009). Design implementation of automatic fire alarm system based on wireless sensor networks. In Proceedings of the 2009 International Symposium on Information Processing, Huangshan, China, pp. 410-413.

[15] Bin Bahrudin, M.S., Kassim, R.A., Buniyamin, N. (2013). Development of fire alarm system using Raspberry Pi and Arduino Uno. In 2013 International Conference on Electrical, Electronics and System Engineering (ICEESE), Kuala Lumpur, Malaysia, pp. 43-48. https://doi.org/10.1109/ICEESE.2013.6895040

[16] Parmer, J.E., Corso, P.S., Ballesteros, M.F. (2006). A cost analysis of a smoke alarm installation and fire safety education program. Journal of Safety Research, 37(4): 367-373. https://doi.org/10.1016/j.jsr.2006.05.006

[17] Guo, L., Sun, Y., Li, J., Ren, Q., Ren, M. (2012). A framework of fire monitoring system based on sensor networks. In International Conference on Wireless Algorithms, Systems, and Applications, vol 7405. Springer, Berlin, Heidelberg, pp. 398-410. https://doi.org/10.1007/978-3-642-31869-6_35

[18] Avazov, K., Jamil, M.K., Muminov, B., Abdusalomov, A.B., Cho, Y.I. (2023). Fire detection and notification method in ship areas using deep learning and computer vision approaches. Sensors, 23(16): 7078. https://doi.org/10.3390/s23167078

[19] Talaat, F.M., ZainEldin, H. (2023). An improved fire detection approach based on YOLO-v8 for smart cities. Neural Computing and Applications, 35(28): 20939-20954. https://doi.org/10.1007/s00521-023-08809-1

[20] Norkobil Saydirasulovich, S., Abdusalomov, A., Jamil, M.K., Nasimov, R., Kozhamzharova, D., Cho, Y.I. (2023). A YOLOv6-based improved fire detection approach for smart city environments. Sensors, 23(6): 3161. https://doi.org/10.3390/s23063161

[21] Ergasheva, A., Akhmedov, F., Abdusalomov, A., Kim, W. (2024). Advancing maritime safety: Early detection of ship fires through computer vision, deep learning approaches, and histogram equalization techniques. Fire, 7(3): 84. https://doi.org/10.3390/fire7030084

[22] Yunusov, N., Islam, B.M.S., Abdusalomov, A., Kim, W. (2024). Robust forest fire detection method for surveillance systems based on You Only Look Once version 8 and transfer learning approaches. Processes, 12(5): 1039. https://doi.org/10.3390/pr12051039

[23] da Penha, O.S., Nakamura, E.F. (2010). Fusing light and temperature data for fire detection. In Proceedings of IEEE International Symposium on Computers and Communications (ISCC 2010), Riccione, Italy, pp. 107-112. https://doi.org/10.1109/ISCC.2010.5546519

[24] Braun, J., Derbel, F. (2025). Wireless sensor network for fire detection with network coding to improve security and reliability. Measurement: Sensors, 37: 101404. https://doi.org/10.1016/j.measen.2024.101404

[25] Zeng, D., Gao, A., Xu, Z. (2026). Intelligent tunnel fire source characteristic inversion technology based on large language model multi-agent collaboration. Fire, 9(6): 233. https://doi.org/10.3390/fire9060233

[26] Pande, R. (2019). Fire and smoke detection in CCTV footage. Kaggle Dataset. https://www.kaggle.com/ritupande/fire-and-smoke-detection-in-cctv-footage.

[27] Juneja, A., Kumar, V., Chandel, P., Kumari, P., Gola, K.K., Painuli, D. (2025). Applications of various Python libraries for data visualization. In International Conference on Data Science and Applications, Jaipur, India, pp. 286-295. https://doi.org/10.1007/978-3-032-12827-0_22