# Fire Video Recognition Based on Local and Global Adaptive Enhancement
## 1 Introduction  
In recent years, fires have posed a significant threat to lives and properties worldwide [1, 2, 3]. The methods based on computer vision play a pivotal role in fire warnings. Flame is a combustion phenomenon, and it is characterized by the generation of heat and light. Generally, flames can exhibit variations in shape over time and differ in color depending on the type of material being burned. The differences between flame and other movements are as follows: First, flames have no fixed shape or volume, and their appearance varies with factors such as wind speed, temperature, and the type of fuel. Second, flames cause thermal convection by heating the surrounding air, with hot air rising and cold air descending, thereby influencing the shape and direction of the flame. Third, the color of the flame depends on the combustion temperature and the substances involved in the combustion. The higher the temperature, the brighter the flame and the more it tends toward blue. When the temperature is lower, it presents as yellow or orange. Therefore, we hypothesize that analyzing flame movements can improve the accuracy of fire warnings. In the field of fire detection based on static images, local information (such as texture, color, shape, etc.) is vital. Moreover, the global contextual information also affects the accuracy of fire recognition.  
Fire video recognition is the technical basis of fire detection. Over the past few years, video recognition approaches based on deep learning have attained remarkable success [4; 5; 6]. These methods can efficiently extract video features in the temporal domain and spatial domain, laying the foundation for identifying the video content. However, these methods ignore the local and global motion characteristics of flames. Generally, a deep neural network trained on a large-scale dataset can obtain better generalization ability. Therefore, large-scale datasets are crucial for the research of fire recognition. Currently, in the domain of fire video recognition, there is a shortage of large-scale datasets.  
To address these issues, a Large-scale Fire Video Recognition (LFVR) dataset was built, and a Local and Global Adaptive Enhancement (LGAE) network for fire video recognition is proposed. The network mainly includes the backbone block, the Local Adaptive Motion Enhancement (LAME) block, and the Global Adaptive Motion Enhancement (GAME) block. The LAME block was designed to depict the local motion information, thus enhancing the ability to learn the local information about flames. To describe the global motion information, the GAME block was devised. GAME adaptively learns information about global data distribution, thereby establishing the global contextual information about flames. The fire recognition capability of LGAE is improved using these two blocks. On the LFVR dataset, the F1 score of LGAE was 88.93%. In addition, experimental results indicated that LGAE surpasses baseline methods and attained the highest performance. The primary contributions of this study are outlined below.  
1. The LGAE network was designed to recognize fire videos, and it mainly consists of LAME and GAME. By learning the local and global motion information, the ability of LGAE to recognize flames is improved.
2. The LAME block was devised to depict the local motion information, which enhances the capacity for describing local movements of flames. The GAME block was designed to learn the global contextual information about flames.
3. A large-scale dataset for fire video recognition was built, which includes 11,560 video clips. To our knowledge, LFVR is currently the largest dataset for fire video recognition. This dataset is public on [[https://github.com/yunyi9/LFVR](https://github.com/yunyi9/LFVR)]([https://github.com/yunyi9/LFVR](https://github.com/yunyi9/LFVR)) (accessed on 19 November 2024).