Abstract:In the crucible of public safety, the imperative to guard against the scourge of fire is non-negotiable, yet conventional detection methodologies often falter when confronted with the complexities of specific environments. Herein lies the promise of computer vision technology, which offers the capability to monitor expansive territories in real-time and to identify the telltale signs of impending fires, most notably smoke. However, the intricate morphologies, textural variations, and chromatic subtleties of smoke present a significant challenge to the precision of its detection through machine vision.Addressing this exigency, we have conceived and developed an innovative smoke classification algorithm, seamlessly integrating a lightweight neural network and the convolutional block attention module (CBAM) within the YOLOv8 framework. This approach is designed to augment the accuracy and efficiency of smoke classification. Our algorithm leverages the GhostNet architecture, ingeniously replacing standard convolutional layers with a more efficient alternative, thereby maintaining high performance while drastically reducing the computational load on the model.Furthermore, the integration of CBAM imbues the algorithm with the ability to dynamically adjust its focus across different regions of the image, ensuring that salient smoke features are prioritized for detailed analysis. This feature enhances the model’s robustness and adaptability to diverse scenarios.To validate the efficacy of our algorithm, we conducted extensive experiments using both a publicly available smoke dataset and a custom dataset augmented with challenging samples. Empirical results have demonstrated that our algorithm achieves a smoke recognition accuracy of 99.9% on the public dataset and 99.2% on the custom dataset, outperforming existing methods. On our experimental machine, the algorithm exhibited a frame rate of 833 fps under GPU-accelerated conditions and 28 fps under CPU-only operation, affirming its potential for rapid and accurate early fire detection.