Magnetic induction (MI) communication uses the mutual inductance between coil antennas to achieve the communication process. As MI communication is not affected by most factors of the propagation environment, we can achieve the detection and monitoring tasks through a stealth operation. In the MI system, the path loss is the most important parameter when estimating the channel and the communication range. The pipeline is used to transport the liquid, and thus it is a special scenario of the underwater communication. Since the index of refraction of the boundaries is different, there are three possible scenarios at the boundaries, i.e. semi-reflection, total reflection, and no reflection. Hence, the distribution of the magnetic field is changed and the path loss is difficult to be estimated. In this paper, we build an MI-based software-defined radio (SDR) system testbed in a water tank to simulate the underwater pipeline. Then, we adopt a deep neural network (DNN) with supervised learning to estimate the path loss of the MI communication. Also we discuss the communication range in the theoretical path loss model and our proposed model.