Objective In order to solve the problems of poor recognition effect and low accuracy of forest fire smoke detection model caused by small sample size, scattered sample features and small proportion of smoke images in forest fire smoke data set, rapid and accurate recognition and detection of forest fire smoke were realized.
Method Aiming at the sample characteristics of the forest fire smoke image dataset with few samples, this study proposed a forest fire smoke image detection method based on multi-head attention mechanism. Firstly, data enhancement method was used in the training stage to expand the number of training data and reduce the risk of overfitting. Then the feature extraction module and the feature aggregation module were designed. The multi-head attention mechanism was introduced into the feature extraction module and the appropriate location was discussed to make the model pay more attention to the local features of the fire and solve the problem of information loss caused by fewer smoke images. In the feature aggregation module, FPN-PAN module was used for feature fusion of deep and shallow semantic information of images. Finally, the detection head module was set to output the experimental results. Test precision rate, recall rate, false alarm rate, detection rate and F1 value were used to test the effectiveness of this method on the small sample public data set and the self-built fire smoke small sample data set.
Result The experimental results show that adding mosaic data enhancement and multi-scale transformation at the same time in the data enhancement stage can get better detection results. Models that add a multi-head attention mechanism after the fourth convolutional module of the feature extraction module performed best. Compared with the existing methods such as meta-learning short-duration memory network, matching network and lightweight target detection network, the proposed method had better detection effect. The accuracy rate reached 98.79%, the recall rate was 98.28%, the detection rate was 97.33% and the false positive rate was only 6.36%.
Conclusion The experimental results show that the proposed method has better discriminative ability and generalization ability than the existing fire smoke detection models.