Determining the volume percentages of flows passing through the oil transmission lines is one of the most essential problems in the oil, gas, and petrochemical industries. This article proposes a detecting system made of a Pyrex-glass pipe between an X-ray tube and a NaI detector to record the photons. This geometry was modeled using the MCNP version X algorithm. Three liquid-gas two-phase flow regimes named annular, homogeneous, and stratified were simulated in percentages ranging from 5 to 95%. Five time characteristics, three frequency characteristics, and five wavelet characteristics were extracted from the signals obtained from the simulation. X-ray radiation-based two-phase flowmeters’ accuracy has been improved by PSO to choose the best case among thirteen characteristics. The proposed feature selection method introduced seven features as the best combination. The void fraction inside the pipe could be predicted using the GMDH neural network, with the given characteristics as inputs to the network. The novel aspect of the current study is the application of a PSO-based feature selection method to calculate volume percentages, which yields outcomes such as the following: (1) presenting seven suitable time, frequency, and wavelet characteristics for calculating volume percentages; (2) the presented method accurately predicted the volume fraction of the two-phase flow components with RMSE and MSE of less than 0.30 and 0.09, respectively; (3) dramatically reducing the amount of calculations applied to the detection system. This research shows that the simultaneous use of time, frequency, and wavelet characteristics, as well as the use of the PSO method as a feature selection system, can significantly help to improve the accuracy of the detection system.