by  Andrii Struk

Simple Hydrocarbon Leak Detection: Key Methods and Best Practices

clock-icon-white  8 min read

Today, efficient hydrocarbon leak detection carries a high priority among oil and natural gas industry leaders. Oil and natural gas leaks can cost a fortune in direct economic losses to remediate, not to mention residual environmental issues and the damage caused to your company's reputation. Depending on the size of the leak, the damage it causes can range from production downtime and equipment issues to fires and explosions that can lead to irreversible environmental contamination.

There is a wide range of potential sources for hydrocarbon leaks. The outcomes can be disastrous when oil tankers sink, pipelines break, abandoned wells emit pollutants, or production facilities malfunction.

You may be able to prevent a billion-dollar environmental catastrophe by understanding the key methods of hydrocarbon leak detection and solutions. It helps you learn how your company can detect, locate, and quantify oil and natural gas leaks with the help of the Internet of Things (IoT), Artificial Intelligence (AI), Machine Learning (ML), Big Data, and Cloud analytics.

The Value of On-Time Detection of Oil and Gas Leaks

Recent technological advancements have already led to a substantial decrease in the number of oil and gas leaks worldwide. With some exceptions, massive and devastating oil spills that released millions of gallons of oil on land or into oceans have become a thing of the past. According to global statistics, only six tanker oil spill incidents occurred in all of 2021, while 61 oil tanker spills happened in 1981.

The same is true of onshore facilities. Grants and state-level investment programs have focused on pipeline safety and damage prevention, resulting in fewer onshore pipeline incidents. For example, the on-time application of data-driven hydrocarbon leak detection helps avoid massive pipeline spills, which was the case when 300,000 gallons of diesel fuel were spilled near New Orleans, Louisiana, on December 27, 2021. This spill could have been avoided if intelligent technologies had been implemented.

AI-driven hydrocarbon leak detection is essential in all energy sectors since leaks can happen, from oil and gas production to processing and distribution. Leading oil and gas companies such as ExxonMobil, Petrobras, Shell, and Chevron report that such problems exist. These companies are implementing the most effective solutions to detect oil and natural gas leaks at all levels.

Energy industry leaders strive for sustainable development and naturally decreased emissions. The IEA Methane Tracker Report estimates that oil and gas production leaks have significantly impacted the world level of methane emissions from energy sources. Reducing methane emissions from oil and gas leaks is one of the top concerns now. Timely leak detection can significantly help lower methane emissions across the entire energy value chain.

World methane emissions from energy sources, IEA estimate


During the production stage, proper oil and gas leak detection is essential in the upstream sector. Multiple issues may appear when a company transports crude oil and natural gas from the wellhead to gathering pipelines, where initial production is aggregated in central facilities or terminals. The sources of hydrocarbon leaks in the upstream sector range from aging facilities and equipment failure to oil well blow-outs and human error.


Both oil and natural gas leak detection solutions are vital. The onshore energy pipeline network in the U.S. spans approximately 3.3 million miles. Related storage facilities and transportation systems such as rail, ocean oil tankers, or highway tanker trucks require careful control and maintenance. Constant pipeline network development presupposes efficient solutions for anomaly detection. Efficient leak detection is crucial as pipelines and storage tank systems can be prone to corrosion, stress corrosion cracking, weld defects, and equipment malfunctions.


Leaks are possible in each sector of the energy value chain, including the downstream sector, during oil refining and final product distribution. Negligence can lead to terrible losses. The fire at Mitsui's ITC Houston-area terminal in 2019 serves as an example of $125 million overall damage caused by a single leak of naphtha and accidental ignition. The intelligent hydrocarbon leak detection solution could have prevented this disaster as well.

Leak detection across the entire energy value chain

Methods of Oil and Gas Leaks Identification

Manual monitoring is no longer efficient, so companies are increasingly applying intelligent technologies to detect oil and natural gas spills. This requires the constant gathering and processing of increasing volumes of data collected by IoT devices or cameras. Sophisticated algorithms process this data and ensure predictive maintenance to increase the equipment's lifespan.

Leak detection with time-series data

Time-series data is essential for gathering meaningful statistics and subsequent oil and natural gas leak detection. Widespread IoT implementation in the energy industry assumes the availability of important telemetry data to make an informed decision. Various sensors collect this data to control critically essential parameters such as:

  • Pressure
  • Temperature
  • Flowrate
  • Vibration
  • Humidity
  • Noise
  • Strain

Gathering this time-series metric data is necessary to track changes over time so that there is a possibility to measure, analyze, and tag them. This potential makes the quick identification of potential problems, diagnostic measures, and subsequent hydrocarbon leak detection easier. Time-series tags readings can be performed by implementing several techniques:

  1. Training the anomaly detection model to detect outliers and high peaks, unexpected trends, level changes, increase or decrease of dispersion, and then interpret and map anomalies to leak events.
  2. Building the supervised binary classification model that can be trained using ML techniques. This data is divided into two categories: leaks and normal functioning. It allows companies to perform equipment and pipeline integrity monitoring to predict whether the leak is happening in the system using specific labels that represent leak situations.
Leak detection with time-series data

Leak detection using image video-stream data

Another opportunity to ensure on-time hydrocarbon leak detections is the video data, and raw images gathered using computer vision technology. These visual datasets are used for automated visual inspection and anomaly detection by supervised classification models with the help of ML adopting one of the following approaches:

  • Classification, object detection, or segmentation tasks to train the model using labeled data.
  • Comparing tasks that presuppose using images from the same camera to spot anomalies, ensure correct equipment, or detect pipeline leaks. Infrared detectors and thermal cameras are important instruments for gas leak detection because gas leaks are often invisible to the naked eye. They allow the identification of methane and other volatile organic compound (VOC) gas leaks quickly and easily.
Leak detection with computer vision

Best Practices for Implementing Hydrocarbon Leak Detection

Hydrocarbon leak prevention requires technical expertise and domain knowledge at every stage of the energy value chain. A comprehensive approach should include the application of AI and ML, IoT, edge computing, computer vision, and data science. Combining these technologies helps detect, locate, and quantify oil and gas leaks. The preparation and implementation process for such a solution should consist of these steps:

  • Set main goals and technical requirements
  • Develop architecture design
  • Implement telemetry data capturing and processing
  • Configure data storage
  • Prepare tag reading for ML to spot anomalies
  • Apply leak detection ML techniques
  • Process data and build a dataset
  • Perform edge/cloud analytics
  • Train a computer vision model
  • Build a dashboard to visualize information

Developing an innovative and reliable hydrocarbon leak detection solution requires the expertise of a multi-functional team working in cooperation at all levels: business, IT, and management.

Leverage SoftServe's Expertise for Effective Hydrocarbon Leak Detection

Developing complex solutions requires substantial experience in creating AI/ML models for the oil and gas domain. SoftServe has a proven track record in helping energy companies innovate at scale, achieve operational efficiency, and drive revenue growth by improving their oil leak detection strategies. Our results-driven expertise in AI and ML, computer vision, IoT, data science, and big data analytics stems from thousands of successful projects ranging from strategy to implementation:

  1. SoftServe has been a leader in the global IT market since 1993.
  2. We have partnered with Fortune 500 companies, tech giants, and global enterprises to help them transform and digitize their energy value chains.
  3. SoftServe has delivered more than 100 projects in the energy industry since 2019.
  4. Our experts possess proven experience with such technologies as Big Data, data science, artificial intelligence, and machine learning to help energy companies fuel business growth.
  5. SoftServe is a certified AWS Premier Consulting Partner, an AWS Premier Consulting Partner, a Google Cloud Premier Partner, a Salesforce Partner, a Gold Microsoft Partner, and a VMware Principal Partner.
  6. In 2021, SoftServe achieved AWS Energy Competency, recognizing our deep expertise and technical proficiency in developing solutions across the energy value chain.
  7. SoftServe is compliant with infosecurity regulations, including PCI DSS, ISO 9001, ISO 27001, and GDPR.
  8. More than 20 energy companies trust SoftServe.
  9. SoftServe has 86 NPS among energy clients at SoftServe in Q1, 2022.

If you are seeking a partner to build a robust hydrocarbon leak detection engine, LET'S TALK! Share your specific use case—we will be happy to help your business succeed and gain a competitive edge.