Abstract:As the medium of oil and gas transportation, the stress concentration in the defects of the metal pipeline will cause safety hazards. In order to realize the non-contact quantitative detection of metal pipeline defects, a magnetic memory detection method has been studied. Adopt the magnetic anomaly gradient matrix to locate the defects with stress concentration; use translation invariant wavelet denoising (TI) and feature extraction for signal processing. Sparrow search algorithm (SSA) optimizes the BP neural network to achieve defect size inversion. Experiments show that compared with wavelet threshold denoising, the translational invariant wavelet denoising can increase the signal-to-noise ratio by 1. 56% and reduce the mean square error by 4. 87%; the mean square error of SSA_BP neural network inversion is 67. 2% lower than that of BP neural network. The detection method can detect pipeline defects in real time in the lift-off state and invert the defect size.