GLAD (Gas Leak Aerial Detector) is an IoT-based aerial inspection system designed to safely monitor, localize, and report hazardous gas emissions in high-risk industrial environments such as oil refineries, pipelines, chemical plants, and mining facilities.
The platform combines a manually piloted quadcopter with onboard gas sensing, computer vision, and machine learning to detect atmospheric anomalies while keeping human personnel entirely out of harm's way.
The system leverages a distributed edge-computing architecture: an ESP32 handles real-time, low-latency sensor acquisition (NDIR gas and MLX thermal arrays), while an onboard Raspberry Pi 4 acts as the main brain for computer vision and machine learning-driven sensor fusion. Telemetry is streamed wirelessly via an MQTT pipeline to a live web dashboard, allowing operators to monitor gas concentrations, leak confidence scores, environmental metrics, and live visual feeds in real time.
- Edge AI Inference: Raspberry Pi 4 edge computing for machine learning inference without cloud dependence.
- Multi-Modal Sensor Fusion: Intelligent algorithms combining gas, temperature, and vision data.
- Remote Inspection Video: Live digital camera stream enabling safe structural and infrastructure inspection.
- Vegetation Chlorosis Detection: Automated computer vision pipeline (OpenCV) evaluating aerial imagery.
- Leak Confidence Score: Generation of a definitive hazard metric fusing deterministic hard thresholds with ML insights.
- Zero Worker Exposure: Drone-based inspection eliminating direct worker exposure to hazardous environments.
- Embedded System: ESP32 (C++)
- Edge Computing: Raspberry Pi 4 (Python)
- Communication Protocols: MQTT, WebSockets
- Computer Vision: OpenCV
- Machine Learning: PyTorch (Sensor Fusion / CNN / MobileNetV2)
- Frontend: HTML, CSS
- Airframe: Custom Quadcopter Frame
- Motors: Holybro 2216-880KV Brushless Motors
- ESCs: 30A Electronic Speed Controllers
- Propellers: 10×4.5 Propellers
- Primary Sensors: NDIR Gas Sensor, MLX Thermal Sensor
- Onboard Vision: Raspberry Pi Camera Module
The system operates via a distributed data pipeline, shifting heavy processing loads to the edge computer while keeping the data collection layer lightweight and rapid:
The ESP32 continuously acquires gas concentration and temperature data from onboard sensors. These sensor readings are dynamically packaged into lightweight JSON messages to minimize network overhead.
Telemetry is transmitted over Wi-Fi using the publish-subscribe MQTT protocol, ensuring reliable data delivery with low communication overhead.
The Raspberry Pi serves as the core processing hub:
- Processes live camera footage using OpenCV.
- Visual analysis identifies vegetation chlorosis as a secondary indicator of underground gas leakage.
- Gas sensor readings, thermal information, and computer vision outputs are fused using a machine learning model to generate a Leak Confidence Score.
Processed telemetry is streamed to a browser-based dashboard via WebSockets. Operators receive live gas concentration graphs, environmental readings, and hazard notifications instantly.
The project utilizes a CNN-based image classification model specifically trained for chlorosis detection in vegetation to identify prolonged gas exposure.
- Architecture: Built using MobileNetV2 with transfer learning in PyTorch.
- Function: Analyzes aerial images captured by the onboard camera to identify vegetation stress caused by prolonged gas exposure. The model output is fused with gas concentration and temperature data to generate a leak confidence score.
- Performance: Achieved 80.56% validation accuracy and 82.08% test accuracy on a custom dataset of 5,348 banana leaf images.
- Documentation: Detailed information on the dataset, model architecture, training process, and evaluation metrics is available in the
ML_Modeldirectory.
Below are the Fusion360 renders and schematics detailing the custom quadcopter frame assembly and sensor arrays:
Ensure you have the following installed:
- PlatForm Io
- Python 3.10+
- Visual Studio Code
- MQTT Broker (Mosquitto)
- Raspberry Pi
- OpenCv
- Torch Vision
git clone [https://github.com/]/<username>/GLAD.git
cd GLAD- Open Visual Studio Code.
- Install the PlatformIO IDE extension.
- Open the
Drone Gas Leak/srcfolder. - Wait for PlatformIO to initialize.
- Connect the ESP32 via USB.
- Build the firmware:
pio runor click Build in PlatformIO.
- Upload firmware:
pio run --target upload- Monitor Serial Output
pio device monitorInstall dependencies:
pip install opencv-python
pip install paho-mqtt
pip install flask
pip install numpy
pip install torch torchvisionRun processing:
python sensor_fusion.pycd DashboardOpen
python -m http.server 8000
http://localhost:8000/Dashboard.html
- Power on ESP32.
- Boot Raspberry Pi.
- Start Mosquitto Broker.
- Run
main.py. - Launch dashboard.
- Start drone.
- Monitor telemetry.



