General pipeline detectos can not solve deeply buried pipeline detection problem. A horizontal cylinder of magnetic anomalies and the magnetic gradient anomalies forward model are established. Through horizontal metal pipes magnetic anomaly vertical cross-sectional view of the magnetic and gradient anomalies vertical cross-sectional view of contrast. The "s" inflection point is of tained to determin pipeline depth discriminant flag, and in the practical application of the desired effect.