Belt transportation is a crucial component of underground coal mining, and the entry of large objects such as anchor rods into the conveyor can lead to accidents like belt scratching and tearing, severely affecting the normal coal production process. In response to the low accuracy and poor timeliness of foreign object detection in coal mine conveyor transportation, a method for underground foreign object recognition based on Convolutional Neural Networks (CNNs) is proposed.This object detection method explores image preprocessing using wavelet denoising and introduces a network structure that combines lightweight networks and attention mechanism modules. It improves the Yolov4 object detection method specifically for underground foreign object detection in coal mines. Finally, the proposed method is evaluated through simulation experiments and analysis using a dataset of large objects and anchor rods found in coal mines. The performance is assessed in terms of object detection accuracy and efficiency.The experimental results demonstrate that the proposed method outperforms traditional algorithms, achieving an object detection accuracy of 81.15% and an FPS (Frames Per Second) of 45.34.