###### Abstract  
One of the factors that significantly affects the efficiency of oil and gas industry equipment is the scales formed in the pipelines. In this innovative, non-invasive system, the inclusion of a dual-energy gamma source and two sodium iodide detectors was investigated with the help of artificial intelligence to determine the flow pattern and volume percentage in a two-phase flow by considering the thickness of the scale in the tested pipeline. In the proposed structure, a dual-energy gamma source consisting of barium-133 and cesium-137 isotopes emit photons, one detector recorded transmitted photons and a second detector recorded the scattered photons. After simulating the mentioned structure using Monte Carlo N-Particle (MCNP) code, time characteristics named 4 th order moment, kurtosis and skewness were extracted from the recorded data of both the transmission detector (TD) and scattering detector (SD). These characteristics were considered as inputs of the multilayer perceptron (MLP) neural network. Two neural networks that were able to determine volume percentages with high accuracy, as well as classify all flow regimes correctly, were trained. artificial intelligence; feature extraction; scale thickness; two-phase flow; MLP neural network +
Footnote †: journal: Applied sciences  
* One of the requirements for optimizing the separation process in the oil and gas industry is to have quantitative and sufficient information about the volume fraction of the gas and oil phases. * Understanding the type of flow pattern along with determining the volume fraction of gas and oil phases is a requisite of transfer processes because it is straightforwardly related to a large part of the project economy. * The efficiency of the separation process is highly influenced by the type of flow regime. * Whether the drilling process should continue or stop at any time can only be determined by understanding the volume fraction of each component. One of the studies conducted years ago to flow metering and determine volume percentage was a study published in 1999 by [PERSON] et al. [1]. Determination of void fraction was done by [PERSON] et al. using low-energy gamma-ray Americium-241 instead of the traditional Caesium-137 source. They tried to determine which detector positions best serve the purpose and placed three detectors at angles of 140-degree, 154-degree, and 180-degree to the source. The EGS4 software package has been chosen as a substrate for volumetric percentage determination with a 3% error for all flow regimes. In 2020, [PERSON] and his colleagues were able to simulate three common flow regimes in the volumetric percentage of 5-90% using a structure containing a detector and a cesium-137 source [2]. They performed two independent GMDH neural networks to detect volume percentages and flow regimes. In the beginning, they passed the photon spectrum extracted from the detector through a Savitzky-Golay filter to eliminate the existing high-frequency noise, then extracted 7 time-domain characteristics from this spectrum to give them as input of the neural network. This approach could eventually achieve the type of flow regimes and volume percentage prediction with a root mean square error of less than 1.11. Some studies in recent years have shown that gamma radiation can be used as a technique to detect these internal deposits in oil and gas pipelines. [PERSON] et al. used a structure with a NaI detector and a source of cesium-137 to inspect the scale deposited pipe in 2015 [3]. In the discussed approach, the detector and the source move simultaneously in 0.5 cm increments. At each stop, the detector records the gamma spectrum passed through the pipe for one minute. The results showed that the presence and thickness of scale in the pipe could be predicted.