The invasion of trunk-boring insects halts tree growth and causes tree death, making it a key factor in forest destruction. To address the issue of low detection accuracy due to the small size and high concealment of trunk-boring insects, a combined driving algorithm based on BP-UNet is proposed. The BP algorithm exhibits high sensitivity to relative permittivity, enabling the detection of smaller insects. By learning the implicit geometric features from the BP results, UNet can accurately reconstruct the size and shape of the insects. To demonstrate the performance of the proposed algorithm, the BP-UNet is compared with the BP and UNet algorithms, and its generalisation ability in different scenarios is tested. Experimental results show that the BP-UNet algorithm has good generalisation and achieves a detection accuracy of over 80% even in the presence of noise, providing quantitative images of trunk-boring insects within 1 second.