For the problem of difficult tracking of small leaks in buried gas pipelines, a video detection of small leaks in buried gas pipelines method is proposed for the detection robot inside buried gas pipelines. Firstly, collecting images and videos of leaks inside buried gas pipelines to establish a dataset. Secondly, building a video detection model for small leaks in buried gas pipelines, introduce a bidirectional feature pyramid network into YOLOv5s (You Only Look Once), and build a feature fusion network to enhance the model's ability of fusing small leaks. Thirdly, building a small target detection layer and a small target detection head in YOLOv5s classification prediction network to enhance the model's ability of fusing small leaks. Fourthly, the video detection model for small leaks in buried gas pipelines is trained using the dataset. Lastly, the video detection effect of small leaks of the model is verified through leak detection experiments in various situations. The experimental results show that the precision rate of this method is 94.1%, the recall is 94.8%, and the average precision is 94.5%, which has a good detection effect and strong generalization ability.INDEX TERMS Video detection method, small leaks, buried gas pipelines