In this article, a system to detect driver drowsiness and distraction based on image sensing technique is created. With a camera used to observe the face of driver, the image processing system embedded in the Raspberry Pi 3 Kit will generate a warning sound when the driver shows drowsiness based on the eye-closed state or a yawn. To detect the closed eye state, we use the ratio of the distance between the eyelids and the ratio of the distance between the upper lip and the lower lip when yawning. A trained data set to extract 68 facial features and “frontal face detectors” in Dlib are utilized to determine the eyes and mouth positions needed to carry out identification. Experimental data from the tests of the system on Vietnamese volunteers in our University laboratory show that the system can detect at realtime the common driver states of “Normal”, “Close eyes”, “Yawn” or “Distraction”. | A driver drowsiness and distraction warning system based on raspberry Pi 3 kit