Dms Driveagx
Dms Driveagx
Abstract—Driving safety has been a concern ever since the These distractions can cause severe road accidents which we
first cars started travelling down the road. According to survey can’t imagine the severity level.
by National Highway Traffic Safety Administration (NHTSA) According to recent estimates, Advanced Driver Assistance
in 2021, the driver inattention plays one of the key reason to
fatal crashes. The main factor contributing to car accidents System (ADAS) could potentially to prevent as many as thirty
are driver distraction and inattention. Distracted driving has percent of accidents on highways caused by light vehicles
significantly affected road safety because it has become one of [4]. Nowadays, the majority of commercial DMS use driving
the leading causes of vehicular accidents globally. An in-vehicle metrics, such as steering or lateral control, to assess the driver’s
real-time, unobtrusive alerting and monitoring system for driver mental state [5]. The extensive use of vision-based DMS is
fatigue with prototype is suggested to save lives during driving.
The work proposes an Artificial Intelligence (AI) based driver essential for fully or partially autonomous driving solutions
monitoring system using Convolutional Neural Network (CNN) that comply with Society of Automotive Engineers (SAE)
based algorithm. The performance of the model is optimized Levels 2-4 [6].
using the DriveWorks software development kit to make use Driver drowsiness and attention warning (DDAW) [7] sys-
of the hardware accelerators. The prototype of an AI based tems must be installed in new motor vehicles of categories M
driver fatigue monitoring system built with NVIDIA DRIVE
AGX Xavier has a 99.3% accuracy. and N beginning July 6, 2022, and all new cars beginning July
Index Terms—DRIVE AGX Xavier, Convolutional Neural Net- 7, 2024 . To accomplish this, the system must be trained to
work, eyes, drowsiness, driver. navigate autonomously. Good path-planning [8] technologies
may aid in task completion, achieving the goal while reducing
I. I NTRODUCTION capital investment . Automated and assisted driving technology
Inattention driving is the main reason for accidents all over has advanced significantly in recent years, which helps reduce
the world. The National Highway Traffic Safety Adminis- traffic accidents brought on by human mistakes.
tration (NHTSA) reported 3522 distracted driving fatalities Driver Monitoring System is one such effort featured in
in 2021 [1]. Driving is a difficult activity that necessitates the Euro New Car Assessment Program (NCAP) 2025 Road-
balancing numerous tasks at once. While remaining within map to 0 Road Casualties by 2050 [9]. It is essential in these
the permitted limits of the road, drivers must be aware of circumstances a system to monitor the driver’s actions and
other road users, anticipate potential hazards, and manage promptly alert him, which is why implementing a system
disruptions from both inside and outside the car. For ensuring to track the driver’s actions based on eye closure, in the
road safety, it is essential to comprehend how drivers perceive car is important. In proposed work, a non-intrusive, deep
the environment, how it affects their thinking, and what learning-based driver monitoring system is presented to avert
causes concentration breaks, especially in considering research such situations in real-time utilizing production-grade high
showing that momentary distractions and poor visual scanning computing hardware. Driver- in-loop setup is attached with
abilities increase the likelihood of accidents [2]. Sekonix camera to record the driver’s face at all times.
Distractions can be anything from minor to major and Using the OpenCV library, the driver’s face along with eyes
those can happen with or without driver’s intervention. Some are recognized and tracked. DRIVE AGX Xavier is used
of the causes occurred with the driver’s intervention are to validate the model in real-time. A Deep Neural Network
using mobile phones, talking with co-passengers, drinking, (DNN) framework is utilized to extract the observed face and
using mobile phone. Some of the causes which are occurred categorize it as either inattentive or attentive based on the
without the driver’s intervention are improper roads, sleeping, closure of the eyes.
unpredictable climatic conditions and rash driving of vehicles The manuscript is organised as follows: Section II reviews
on the road which driver can’t control. Among these sleeping the literature; Section III outlines the methodology ; Section
had major impact. According to the National Sleep Foundation IV analyzes the results and performance of the system; and
(NSF) survey, around 37% of drivers have fallen asleep behind Section V draws conclusions and outlines the paper’s future
the wheel, and 4% accepts drowsiness for the car accidents [3]. focus.
II. L ITERATURE R EVIEW for detection of inattentiveness of driver by using convolutional
Several studies have already been done on detecting tired- neural network [24]. In low light conditions also, the model
ness and distraction. If drivers are occupied with activities able to detect the driver’s behavior which is used in all camera-
other than driving, they may not be able to focus on driving related applications [25]. These are all detection and predic-
adequately during important occurrences [10]. M.Sunagawa tion models, trained and verified in respective hardware. No
et al. [11] proposed a scale based on the activity of driver’s work has been found with driver monitoring system deployed
drowsiness is , are represented in Table I. and validated on real-time high-computing automotive ECU
(Electronic Control Unit) grade hardware, which can directly
TABLE I be installed in the vehicle.
D ROWSINESS L EVELS A ND F EATURES Previous studies have employed many features to identify
inattention, which complicates the method. In addition, a lot
of research studies used sensors to evaluate biological factors
These sensors must be in close proximity to the driver, which
may interfere with driving. The inability to use the system in
vehicles directly is a shortcoming of several studies.
This research suggests a non-invasive method that uses a
Sekonix camera along with self-driving car hardware as a
remedy to these problems. The processing and inference time
are decreased while maintaining great accuracy and system is
validated with automotive standard camera with Drive AGX
Xavier.
III. M ETHODOLOGY
A. Hardware Components
In this article, many existing sleepiness and distraction 1) Camera: Sekonix camera is used to capture driver
detection methods are also compared. Different strategies for behavior. The sensor data is passed as input to the system
classifying and detecting sleepiness were compared by M. which is used to classify driver behavior. Table III shows the
Ramzan et al. [12]. John et al. [13] had did quality research on camera specifications.
the available algorithms and data-sets so far available related
to driver assistance is shown in Table II. Distracted types based TABLE III
on Non-Driving Related Tasks (NDRT) are C AMERA S PECIFICATIONS
1) Visual - Moving gaze away from road
Name Specification
2) Cognitive - related to thinking
Model Sekonix SF3324
3) Manual - removing hands from wheel Sensor ON Semi - AR0231
4) Visuo-Manual - combination of both visual and manual HFOV (Horizontal Field Of View) 120◦
such as drinking water and thinking something Lens Part Sekonix - NA1262
B. Collection of Drowsiness Data-set learned using a large number of both positive and negative
Sekonix camera is installed to the DIL setup in a position images, this approach is machine learning based. It is next
to capture the required region of interest by our requirement. applied to other photos to detect things. For face detection, the
The recordings are of 30fps. The recorded videos are in H.264 algorithm had been feed-ed with a lot of positive images and
format using the Nvidia DriveWorks sensor data recording negative images which had been used to train the classifier.
tool. The features had been extracted using Haar features. For
The images had been acquired and annotated based on the extraction, Haar features had been used. Thus, the face of the
following classifications. driver had been detected. After detection model will classify
• Eyes opened the driver based on eye closure and will render an output
• Eyes closed message on the cluster panel and an indication will be given
• Yawning to the driver through buzzer.
• Not-Yawning
D. Model Training
Yawning Detection Data-set (YawDD) [26] is used along
Deep Neural Network architecture is used to train the model
with our data-set, in YawDD - The driver’s dashboard is
with more than 6000 images which were converted to frames
where the camera is mounted. Each of the 29 films in this
from recorded videos with annotation. The Model had been
collection, one for each subject, covers every aspect of driving
trained to detect the inattentiveness of the driver. The Cate-
while nodding off, using a phone, and driving in silence. The
gorical cross-entropy loss function, Adam optimizer had been
package comes with 29 films altogether. The drowsiness data-
used for training. Maximum epochs had been set to 500 for
set samples is displayed in Fig. 2.
better results. With the available data-set, variety of photos was
created using a data augmentation strategy, which is crucial
for the model’s successful detection. Every epoch produced
a fresh set of images by altering each image. Zoom and
horizontal movements were accomplished without changing
image class. This stops model from being over-fitting. CNN
architecture with the following layers convolutional, max-
pooling, flatten, dropout, dense, Rectified Linear Unit (ReLU)
activation function had been used to train combined with the
collected and recorded data-set so that the model will work in
multiple scenarios. Fig. 4 shows the model visualization.
The driver’s visage is continuously videotaped in real-time
for tracking. Then, these videos are changed into frames.
Fig. 2. Data-set samples. Using the classifying model, these frames are then labeled
as inattentive or other, and an alarm is given as an indication.
C. Software Architecture E. Model Optimization
The Software architecture is illustrated in Fig. 3. Data is The model had been trained in TensorFlow framework but
captured from the Sekonix camera after that the data will for better performance converted into an Open Neural Network
be sent to DRIVE AGX Xavier for processing. After that, Exchange (ONNX) model using tf2onnx 1.14.0 release version
data will be processed so that the data need can be passed as which is a library in Python. ONNX model is optimized using
input to our model. After that we will get an inference from TensorRT Optimization [28] Tool provided by Nvidia. It is
the model and this inference is done by using the detection an software development kit comes with a run-time and deep
G. Deployment steps
In Deployment, we build the system in Host PC (Personal
Computer) after validation, deployed the system in DRIVE
AGX Xavier [29] for testing.
1) Inference Workflow:
• Build the model in Host device.
Fig. 4. Model Visualization. • Deploying system in platform/Drive.
Inference workflow for DRIVE AGX Xavier is shown in
learning inference optimizer that offer inference applications Fig. 6.
minimal latency and high throughput. ONNX version of DNN model was optimized using drive-
works TensorRT Optimization Tool in host pc to create a plan
F. Code Workflow file. This optimized model was then integrated in the code
The C Plus Plus (CPP) is the efficient and supported way of using DNN framework api’s (Application Programming Inter-
writing code to flash in an embedded device. Code workflow face) of driveworks and the complete system was validated in
Fig. 5 goes on like this, first, we imported DriveWorksSample host pc. Further similar process was followed to generate plan
which had visualization, camera and DNN framework which file for hardware and the system was validated on hardware
we used in our system. After that initialized camera sensor as well.
A. Performance Metrics
Fig. 5. Code Work-Flow of the System.
Performance metrics are used to track and assess a model’s
to capture driver behavior. The following steps had been performance throughout training and testing.
considered while initializing DNN, calculated total size needed 1) Accuracy: Classification accuracy is calculated by di-
to store input and output, got classification blob indices, viding the total number of predictions by the number of right
allocated GPU, CPU memory for reading the output of DNN predictions and multiplying the result by 100. We implemented
and initialized data conditioner. In OnProcess, we collected the this in practice by comparing ground truth values with predic-
sensor frame and classification had been done. Once Interpret tions continuously. The accuracy of the proposed system is
was done followed by rendering of sample output on screen. 99.30%, the training loss and accuracy of the model after 500
For every new frame, we reset memory and conditioner. epochs are displayed in Fig. 7.
Fig. 7. Training Accuracy & Training Loss Graph.