Abstract:Traditional fire detection methods are mostly based on object detection techniques, which suffer from difficulties in acquiring fire samples and high manual annotation costs. To address this issue, this study proposes an unsupervised fire detection model based on contrastive learning and synthetic pseudo anomalies. A cross-input contrastive learning module is proposed for achieving unsupervised image feature learning. Then, a memory prototype that learns the feature distribution of normal scene images to discriminate fire scenes through feature reconstruction is introduced. Moreover, a method for synthesizing pseudo anomaly fire scenes and an anomaly feature discrimination loss based on Euclidean distance are proposed, making the model more targeted toward fire scenes. Experimental results demonstrate that the proposed method achieves an image-level AUC of 89.86% and 89.56% on the publicly available Fire-Flame-Dataset and Fire-Detection-Image-Dataset, respectively, surpassing mainstream image anomaly detection algorithms such as PatchCore, PANDA, and Mean-Shift.