In the modern era, agriculture is necessary for human existence globally, and it is imperative to work toward increasing agricultural yields. Yet, crop production may be affected due to the presence of pests, which can cause injury to crops or slow the growth of crops. As a result, pest detection and control in agriculture fields must begin immediately. Pest monitoring methods are labor-intensive, dangerous, and require a lot of physical labor. With the newest AI and IoT breakthroughs, specific upkeep jobs can be controlled automatically and radically, improving performance and reliability for pest detection in the agricultural field. This research offers a real-time remote pest detection strategy utilizing the IoT and DL architectures. The IoT and DMF-ResNet, part of the integrated pest detection approach, are the primary components that make up the architecture of the remote pest detection system. The DMF-ResNet pest detection technique is trained with the help of the sounds made by pests. The findings of this research offer new perspectives on the ambition of IoT and AI for pest monitoring in the field, and maintaining vigilance almost necessitates no active participation from a human being. The recommended DMF-ResNet system accurately automate the detection of agricultural pests based on results from experiments in large agricultural fields. It outscored the traditional works DenseNet, VGG-16, YOLOv5, DCNN, ANN, KNN, Faster RCNN, and ResNet-50 approaches for pest detection with 99.75% accuracy, 98.64% sensitivity, 98.48% specificity, 99.08% recall, 99.18% precision, and an F1 score of 99.11%.