To address difficulties in the early detection of small gas pipeline leaks, a method is proposed for the image recognition of micropores inside small gas pipelines. First, we design a feature fusion network (Neck) for a small gas pipeline internal micropores identification network model, introducing BiFPN (bi-directional feature pyramid network) into the Neck, and enhancing the micropores feature fusion capability of the network model using cross-scale feature information fusion. Second, we design a classification prediction network (Head) for a small gas pipeline internal micropores identification network model, constructing a small target detection layer in the classification prediction network, and improving the microporosity detection rate of the network model by improving the detection capability for small leakages. Then, micropore datasets are fed into the network model separately to train the model. Finally, comparison and ablation experiments are used to verify the micropore recognition ability of the network model. The experimental results show that the precision of the image recognition method for micropores inside small gas pipelines is 94.7%, the detection rate is 96.6%, and the average precision is 95.5%, which can better realize the early detection of leakages in small gas pipelines.