The erosion behavior of trunk borers leads to the destruction of trunk structure and the formation of internal defects, which significantly impacts the ecological and economic value of trees. Traditional non-destructive testing (NDT) methods are costly and have low resolution, whereas electromagnetic NDT methods are more suitable for high-resolution detection and imaging. However, solving the highly nonlinear electromagnetic inverse scattering problems (ISPs) for small-sized defects with high contrast is challenging. Therefore, this paper proposes an improved subspace optimization algorithm based on a ResNet network called SOM-ResNet. SOM-ResNet incorporates physical principles into deep learning networks by simulating the iterative process of induced current and contrast, thereby enhancing its ability to accurately detect small objects with high contrast. Experimental results demonstrate that SOM-ResNet outperforms single inversion algorithms in detecting complex scatterers with small to medium-sized targets, validating its excellent performance.