Intelligent video surveillance has been widely used in underground coal mine safety control, and personnel risky behavior detection is an important part of coal mine safety production and the construction of intelligent mines. Affected by the complex working conditions, equipment shielding, uneven illumination and dust in underground coal mines, the existing target detection algorithms in the detection of dangerous behaviors of personnel have problems such as sample extraction difficulties and feature extraction inaccuracies, resulting in low detection accuracy and lack of robustness. For this reason, this paper proposes a YOLOv8-based method PMR-YOLO for detecting dangerous behaviors of people underground in coal mines, in order to improve the detection accuracy and robustness. The method mainly includes feature extraction enhancement based on Partial Convolution (PConv), feature capture enhancement based on Mixed Local Channel Attention (MLCA) and feature capture enhancement based on Receptive-Field Attention Convolution (RAFCA). Attention Convolution (RAFCAonv) based recognition enhancement in three parts. First, PConv is used to replace the standard convolution to recognize the occluded content of the image, and a mask is introduced for adaptive recognition and filling to improve the occlusion resistance of the model. Then, to address the problem of too many features in the dataset without focus preference, MLCA is introduced in the feature extraction link to fuse spatial and channel information to further model characterization ability and detection performance. In addition, RAFCAonv is used to replace the detection head module of the original algorithm, combining spatial attention and sensory field features to enhance the model's adaptability to images of different scales and complexity. The experimental results show that compared with the YOLOv8 model, the PMR-YOLO model improves the accuracy, precision and recall by 6.3%, 13.7% and 10.1%, respectively. The method significantly improves the precision of detecting hazardous behaviors of people underground in coal mines, and provides a new idea for detecting hazardous behaviors of people in complex working environments.