The scaling of oil pipelines over time leads to issues including diminished flow rates, wasted energy, and decreased efficiency. To take appropriate action promptly and avoid the aforementioned issues, it is crucial to determine the precise value of the scale within the pipe. Non-invasive gamma attenuation systems are one of the most accurate detection methods. To accomplish this goal, the Monte Carlo N Particle (MCNP) algorithm was used to simulate a scale thickness measurement system, which included two sodium iodide detectors, a dual-energy gamma source (241 Am and 133 Ba radioisotopes), and a test pipe. Water, gas, and oil were all used to mimic a three-phase flow in the test pipe, with the volume percentages ranging from 10% to 80%. Moreover, a scale ranging in thickness from 0 to 3 cm was inserted into the pipe, gamma rays were shone on the pipe, and on the opposite side of the pipe, photon intensity was measured by detectors. There were 252 simulations run. Fifteen time and frequency characteristics were derived from the signals collected by the detectors. The ant colony optimisation (ACO)-based approach is used to pick the ideal inputs from among the extracted characteristics for determining the thickness of the scale within the pipe. This technique led to the introduction of thirteen features that represented the ideal combination. The features introduced by ACO were introduced as inputs to a multi-layer perceptron (MLP) neural network to predict the scale thickness inside the oil pipe in centimetres. The maximum error found in calculating scale thickness was 0.017 as RMSE, which is a minor error compared to earlier studies. The accuracy of the present study in detecting scale thickness has been greatly improved by using the ACO to choose the optimal features.