This document presents a method for detecting natural gas pipeline leaks using a binary matrix analyzer and neural network. The method involves gathering image data of pipelines, extracting binary data from the images using a matrix analyzer, inputting the binary data into the Matlab neural network toolbox to train and test an artificial neural network model. The trained neural network was able to detect pipeline leaks with 98.52% accuracy based on simulations. The method provides an intelligent system for automating natural gas pipeline leak detection as a safer and more cost-effective alternative to traditional inspection methods.