Abstract:Gas flame detection in high-altitude low-pressure environments faces dual challenges of insufficient recognition accuracy and real-time performance degradation. This study proposes an improved lightweight YOLOv8n algorithm with multi-dimensional optimizations for enhanced performance. First, a GhostConv module was constructed in the backbone to reduce computational parameters. Second, the C2f module was restructured into a C2f_RepGhost configuration that maintained feature representation capability while simplifying inference processes. Finally, the convolutional block attention module (CBAM) attention mechanism was incorporated to strengthen fine-grained flame feature extraction, and the WIoU loss function was adopted to improve localization accuracy. Experimental results based on mechanism testbed data demonstrate that the improved model's parameter count decrease by 12.64%, computational load decrease by 12.2%, and precision increase by 21.2% while maintaining frame rate detection. This method provides an effective lightweight solution for flame state recognition in low-pressure environments.