Abstract: Drunkenness or exhaustion is a leading cause of car accidents, with severe implications for road safety. More fatal accidents could be avoided if fatigued drivers were warned ahead of time. Several drowsiness detection technologies to monitor for signs of inattention while driving and notifying the driver can be adopted. Sensors in self-driving cars must detect if a driver is sleepy, angry, or experiencing extreme changes in their emotions, such as anger. These sensors must constantly monitor the driver’s facial expressions and detect facial landmarks in order to extract the driver’s state of expression presentation and determine whether they are driving safely. As soon as the system detects such changes, it takes control of the vehicle, immediately slows it down, and alerts the driver by sounding an alarm to make them aware of the situation. The proposed system will be integrated with the vehicle’s electronics, tracking the vehicle’s statistics and providing more accurate results. In this paper, we have implemented real-time image segmentation and drowsiness using machine learning methodologies. In the proposed work, an emotion detection method based on Support Vector Machines (SVM) has been implemented using facial expressions. The algorithm was tested under variable luminance conditions and outperformed current research in terms of accuracy. We have achieved 83.25 % to detect the facial expression change.