In recent years, convolutional neural network (CNN) has been successfully applied to reconstruct image from the speckle, which is generated as an object passes through a scattering medium or a multimode fiber (MMF). To reconstruct image from the speckle, the CNN must be trained with a large number of object-speckle pairs (training dataset), and the trained CNN is capable of reconstructing image from dataset (test dataset), which is taken in the same condition as the training dataset. However, in some cases, data type and the scattering medium may vary with the situation. In this case, the CNN has to be retrained using a large number of new data taken from the new scattering media for reconstructing image. In this paper, we develop a CNN called as Mobiledense-net (MDN) to realize the mutual transfer learning. Specifically, the MDN is first pre-trained with a large number of object-speckle pairs taken from MMF or scattering slab, then tuned with quite small number of object-speckle pairs from scattering slab or MMF. It is shown that in this case the MDN can reconstruct image from the speckle with quite good quality, in which the speckle is taken from MMF or the scattering slab. We also show that using a more complex dataset for pre-training, the amount of data for pre-training can be largely reduced and reconstruction quality can be further improved. Using transfer learning, the reconstruction quality is quite good, being up to 99% . The results in this paper provide a more generalized method for studying the imaging through scattering imaging or MMF by using CNN.INDEX TERMS Imaging, convolutional neural network (CNN), Mobiledense-net (MDN), transfer learning, scattering medium, multimode fiber (MMF).