LangGas: Introducing Language in Selective Zero-Shot Background Subtraction for Semi-Transparent Gas Leak Detection with a New Dataset

Wenqi Guo, Yiyang Du, Shan Du

Abstract

Detecting semi-transparent gas leaks, such as methane, is a critical challenge for industrial safety and environmental protection. Traditional computer vision methods struggle with the blurry, inconsistent shapes of gas plumes and the lack of high-quality labeled datasets. This paper introduces LangGas, a zero-shot framework that combines background subtraction (BGS) with Vision-Language Models (VLMs) and SAM 2. By leveraging a new synthetic dataset, SimGas, the researchers demonstrate that semantic prompting (e.g., "white steam") can effectively identify gas plumes without task-specific training. The proposed pipeline achieves an Intersection over Union (IoU) of 69% on SimGas, significantly outperforming standard motion-based baselines.

Introduction

Methane is a potent greenhouse gas with over 28 times the heat-trapping potential of $CO_2$. However, "seeing" a semi-transparent gas plume is notoriously difficult. Computer vision typically thrives on well-defined objects, whereas gas leaks are semi-transparent and lack consistent boundaries. Existing datasets are often too small, lack precise pixel-level ground truth, or are biased toward specific environments. Furthermore, manual labeling of real-world gas footage is subjective and environmentally costly. LangGas addresses these issues by proposing a zero-shot detection pipeline that utilizes the semantic power of VLMs to filter motion-detected regions.

Methodology

The LangGas framework employs a multi-stage pipeline designed to avoid the need for expensive real-world training data:

  1. Background Subtraction (BGS) & Enhancement: The system identifies moving pixels in a video. An adaptive enhancement factor is applied to "boost" the signal of faint gas plumes.
  2. VLM Filtering: The system uses Owl-V2, an open-vocabulary object detector. Instead of searching for "methane," which may not be well-represented in infrared training data, the model is prompted with "white steam." Negative prompts (e.g., "human," "car") are used to filter out non-leak moving objects.
  3. Temporal Filtering: To reduce flicker and false positives, detections must persist over time. The filter fills in gaps if a leak momentarily disappears from detection.
  4. Segmentation with SAM 2: Bounding boxes from the VLM are fed into the Segment Anything Model 2 (SAM 2) to generate precise, pixel-level masks.
The LangGas multi-stage pipeline for zero-shot gas leak detection, integrating background subtraction, VLM filtering, and SAM 2 segmentation.

Experimental Setup and Datasets

The researchers introduced SimGas, a high-quality synthetic dataset created in Blender. It features 12,000 frames with diverse backgrounds, interfering foreground objects (bats, humans, cars), and perfectly accurate "priori" ground truth masks. For real-world validation, the method was tested qualitatively on GasVid, a dataset of controlled methane releases.

Results and Discussion

The "Steam" Proxy and Prompt Engineering

A key finding of the study is the effectiveness of prompt engineering. Prompting the VLM with "white steam" or "white smoke" significantly outperformed technical terms like "gas leak" or "methane." This is attributed to VLMs being trained on internet-scale RGB data where steam is common, whereas infrared methane plumes are rare.

Comparison of different text prompts and their impact on IoU across varying VLM thresholds, illustrating the superiority of the "white steam" proxy.

Performance Metrics

The full LangGas pipeline achieved an IoU of 69% on the SimGas dataset. Ablation studies showed that adding VLM filtering and SAM 2 to a standard background subtraction baseline (MOG2) improved the IoU by nearly 20%. The temporal filtering also made the system more robust to threshold changes, requiring less fine-tuning for different environments.

Conclusion

LangGas demonstrates that combining the motion-detection capabilities of background subtraction with the semantic intelligence of VLMs creates a robust, zero-shot detector for semi-transparent gas leaks. While the current implementation runs at 2-3 FPS, future work will focus on optimizing speed for real-time industrial use and replacing standard BGS with optical flow to accommodate moving camera platforms like drones.

Summary updated

BibTeX
@inproceedings{guo2025langgas,
  author = {Wenqi Guo and Yiyang Du and Shan Du},
  title = {{LangGas: Introducing Language in Selective Zero-Shot Background Subtraction for Semi-Transparent Gas Leak Detection with a New Dataset}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
}
Figure