We proposed a WGAN-ResNet method, which combines two deep learning networks, the Wasserstein generative adversarial network (WGAN) and residual neural network (ResNet), to detect carbendazim based on terahertz spectroscopy.