Traffic accidents are usually caused by the driver's fatigue driving and non-standard driving.In response to the problem of driver fatigue driving,timely detection and warning should be carried out when the driver is fatigued to eliminate safety hazards.At present,deep learning detection algorithms are relatively mature,and using the YOLOv8 detection model for object detection is an effective means to solve this problem.Based on the YOLOv8n model,a DWR module modified with DilatedRepamBlock is introduced in C2f,and MLCA attention mechanism is added to the backbone network.The experimental data using the improved model detection shows that compared with the original model YOLOv8n,the YOLOv8n-C2f_DWR_DRB-MLCA model has mAP@0.5 and mAP@0.5-0.95 They are 88.1%and 39.5%respectively,which are 4.1%and 1.6%higher than the original model,effectively improving the speed and accuracy of detecting driver's eye closure and yawning caused by fatigue during driving.