{'fraction_non_alphanumeric': 0.030205872426594668, 'fraction_numerical': 0.020755990550118123, 'mean_word_length': 4.759961127308066, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Automatically identifying a mobile phone user's position within a vehicle

Traffic-related injuries and fatalities are major health risks in the United States. Mobile phone use while driving quadruples the risk for a motor vehicle crash. This work demonstrates the feasibility of using the mobile phone camera to passively detect the location of the phone's user within a vehicle. In a large, varied dataset we were able correctly identify if the user was in the driver's seat or one of the passenger seats with 94.9% accuracy. This model could be used by application developers to selectively change or lock functionality while a user is driving, but not if the user is a passenger in a moving vehicle.


Introduction
Traffic-related injuries and fatalities are major health risks in the United States. Mobile phone use while driving (MPUWD) quadruples the risk for a motor vehicle crash [1]. In 2019 alone, 3,142 people died in crashes with distracted drivers [2]. Drivers using a smartphone have reduced ability to detect and respond to roadway stimuli and events [3][4][5][6][7]. Teens in general have a stronger tendency to use their mobile phones [8], and studies have shown that nearly half of adolescent drivers engage in MPUWD [9,10]. Legal bans on phone use while driving have shown only modest results, likely due to the difficulties of enforcement [11]. Modern mobile phones have built-in functionality to detect when a phone is in a moving vehicle; however, those libraries are unable to differentiate between drivers and passengers, and commercially available MPUWD software typically includes a simple option for users to manually disable it during drives where they are a passenger.
Related work. To overcome this limitation on current phones researchers have utilized vehicle additions or modifications to differentiate between drivers and passengers. Previous efforts to determine the seating location of a phone user have relied on either Bluetooth signals [12,13], phone sensor data [14], or car sensor data [15]. Many of these methods rely on either installing Bluetooth beacons, having the user's phone paired to the car's Bluetooth radio, or access the car's sensor bus, and the accuracy has not exceeded 93%. Another method is to use the phone's camera to determine the user's location using computer vision [16]. This work was able to reach 94% accuracy, but in a a limited dataset. Camera-based methods require no hardware installation or Bluetooth pairing by using only the user's phone camera to determine the user location within the car. We are expanding on this work by demonstrating the feasibility of a computer vision method in a larger, more varied, dataset.

arXiv:2111.06306v1 [cs.CV] 11 Nov 2021
Dataset. The seat detection dataset was collected by at a number of used car dealerships. A custom mobile phone app was written to assist users in taking a series of pictures from each seat of the vehicle with prompts for phone orientation. Multiple images were acquired from each seat using slightly different orientations. Images were acquired from driver seats as well as front and rear passenger seats. The make, model, and year of each car was recorded along with the time of day. The image acquisition times varied between full sun, overcast, dawn, dusk and night. A total of 12,042 images were acquired from 120 cars and trucks. There were 3,721 images from the driver seat and 8,321 from the passenger seats. The model years ranged from 1996 -2020. The dataset was randomly split into training, development, and testing sets using the car as the split key, so the same car did not appear in multiple sets.
CNN architecture. The neural network was implemented using Keras and Tensorflow. The architecture was MobileNet-V2 [17] feature extractor provided with Keras pretrained using the ImageNet dataset [18]. A custom head was attached to the MobileNet feature extractor that consisted of: 1) a 1 × 1 convolution followed by batch normalization [19], a ReLU activation, and dropout, 2) a 7 × 7 convolution followed by batch normalization, a ReLU activation, and dropout, and 3) a global max-pooling and a final fully connected layer.
Training procedure. The training set consisted of 9,127 images, and the development set consisted of 1,229 images. The network was trained using a binary cross-entropy loss function with a stochastic gradient descent optimizer. The optimizer had a learning rate of 1E-4 and momentum of 0.9. The model was trained until the accuracy on the development set decreased for 8 consecutive epochs, then the weights were reset to those of the epoch with maximum accuracy on the development set. The images were converted to gray-scale then rescaled and randomly cropped down to 224 × 224 pixels. Image augmentation through rotations was attempted, but it reduced performance. We hypothesize that this was because subtle perspective rotation can be a differentiator between the driver and front passenger seats.

Results
The final test set consisted of 1,686 images from a variety of cars, trucks, and lighting conditions. The network was able correctly identify a driver vs. a passenger with an accuracy of 94.9% when using a 0.5 decision threshold. Examples of correct and incorrect predictions are shown in Figure 1.

Discussion
Our results confirm and expand the results of Khurana et al. [16] and demonstrate the feasibility of using a phone's camera to determine the user's location within a vehicle. Compared to the method in Khurana et al., our method uses only the rear camera, which is typically much better in low light conditions. Our method also uses a purely neural network model compared to a geometric model, so it should generalize better to different vehicles and modes of transportation. This seat detection model could be provided as a library for application developers to use to enable or disable features or to lock the phone completely.