A pipeline measurement robot(PMR) is an important tool for pipeline shape measurement and disease detection. Flexible pipelines in the horizontal plane inside dams are used for internal deformation monitoring, which is characterized by small caliber, no ground marking assistance, and higher accuracy requirements, so the accuracy of the data fusion algorithm needs to be improved. In this paper, we propose a pipeline inertial measurement odometry correction method based on pipeline junction detection, which establishes a reference model of pipeline junction locations, detects pipeline junction gap locations along the measurement route using k-mean clustering, corrects odometer data based on the difference between the detected and reference locations, fuses IMU and odometer data and evaluates the internal compliance accuracy. The proposed method is validated using the measured data of the internal pipeline of Tianchi Dam, and the results show that the method proposed in this paper reduces the root-mean-square error (RMSE) by about 46% compared with the results without detection correction and direct fusion. Therefore, the method has good results and practical applications.