Driver fatigue is a significant cause of road accidents. Effective real-time fatigue detection systems are necessary to improve road safety. Utilizing a lightweight and fast model and creating an effective fatigue judgment rule is important in detecting fatigue in real-time. In this research, we propose a fatigue detection model based on You Look Only Once version 8 (YOLOv8) model to detect driver's facial features and use percentage of eyelid closure over the pupil over time (PERCLOS) and Percentage of Open Mouth (POM) indicators to identify fatigue. This research is divided into two parts. The first part involves creating, labeling, and preprocessing the dataset. We use the YawDD dataset as the original dataset and manually label a new dataset using the Roboflow platform. We then preprocessed the new dataset to train the YOLOv8 model for face features detection. In the second part, we established a multi-indicator fatigue determination rule that uses PERCLOS and POM indicators and set a threshold to determine whether the driver is fatigue. By combining the YOLOv8 model with the fatigue determination rules based on PERCLOS and POM, we successfully built a model to identify a driver's fatigue. Finally, the fatigue detection model based on YOLOv8 achieves a high accuracy rate of 96.9% and a high speed of 11.4 ms/frame in face features detection, surpassing other traditional models and previous generations of YOLO models. This model can effectively detect fatigue in both driver-driving pictures and videos.