Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 11, No. 2, 2024 205 Vehicle Seat Adjustment System based on Body Image Recognition Yuantong Liang, Yandong Dong, Changjun Cui, Yanbing Wang and Boya Mi Pan Asia Technical Automotive Center Co., Shanghai 200125, China Abstract: A vehicle seat adjustment system based on body image recognition is designed. The system uses body image recognition algorithms to calculate the physique parameters of passengers, and automatically adjusts the vehicle seat position. Through on-site testing, the matching rate between the automatically adjusted vehicle seat position and passenger body shape reaches 98.1%, which can effectively improve the convenience and comfort of the vehicle. Keywords: Machine Vision; Automatic Seat Adjustment; Body Image Recognition. 1. Introduction The comfort and convenience of vehicle seats directly affect the user experience [1-2]. The improvement and upgrading of vehicle seat adjustment systems are increasingly important in the development of vehicles. Among the existing technologies at home and abroad, the adjustment of vehicle seats is mainly achieved by manually triggering mechanical or electronic switches on the seats by passengers [3-4], which is relatively cumbersome. Although some electric seats have seat memory function [5-6], the support for storing seat positions is very limited, the supported seat positions are very limited, only meeting the comfortable seating needs of a few specific passengers. The inefficient seat adjustment method has a negative impact on the user experience [7]. Therefore, developing a convenient and widely applicable vehicle seat adjustment system is of great significance. The designed vehicle seat adjustment system in this article utilizes a passenger's full-body photo to calculate the passenger's body parameters, and controls the vehicle seat to move to a position that matches the passenger's body shape based on these parameters. This effectively improves the convenience and comfort of vehicle rides. Next, the composition, design, and testing of the vehicle seat adjustment system based on human body image recognition will be detailed. 2. System Composition The workflow of the vehicle seat adjustment system based on body image recognition is shown in Figure 1. Before passengers board the vehicle, the system sequentially takes full-body photos of the passengers and measures the distance between the passengers and the vehicle. After the passengers sit down in the vehicle, half-body photos of the passengers on each seat are taken separately. Then, using facial recognition algorithms, the passenger's full-body and half-body photos are paired to achieve the binding of the seat, passenger identity, and full-body photos. The successfully paired full- body photos are sent to the distortion removal model and body key points recognition model. The passenger's body parameters are calculated based on the coordinates of the body key points in the image. Finally, referring to the passenger's body parameters, the system uses the lookup table method to obtain the corresponding seat adjustment amount and automatically adjusts the seat position. Fig 1. System flowchart Fig 2. System schematic In order to save costs, the system is developed based on existing parts of the vehicle. The seat adjustment system mainly consists of the following 5 modules: external wide- angle camera, Lidar, internal wide-angle camera, electronic control unit, and vehicle seats. The system schematic is 206 shown in Figure 2. Before passengers board the vehicle, external wide-angle cameras can capture full-body photos of the passengers. The wide-angle lens helps to expand the field of view and avoid missing important image information. When the Lidar detects that the distance between the passenger and the vehicle is between 0.5m and 2m, it records this distance and prompts the external wide-angle camera to take a snapshot. After the passengers sit down, internal wide-angle cameras take half-body photos of the passengers to identify their identity. Electronic control unit (ECU) is able to receive passenger image information and distance data, calculate seat position calibration and control the vehicle seat to move to the appropriate position. Vehicle seats are equipped with headrest lifting and leg rest extension functions. When receiving control signals from the electronic control unit, the motor rotates according to instructions and adjusts the seat to the target position. 3. System Design 3.1. Facial Recognition Pairing The system uses a pre-trained facial comparison model FaceNet to contrast full-body and half-body photos. As shown in Figure 3, the facial recognition model MTCNN extracts facial images from full-body and half-body photos. FaceNet utilizes deep convolutional neural networks to extract and learn Euclidean spatial features of facial images. The smaller the Euclidean distance between the feature vectors of two images, the greater the likelihood that they belong to the same person. The system sets the threshold of Euclidean distance to 1.0. When the distance is less than 1.0, it is determined that the pairing of full-body and half-body photos is successful. Otherwise, the pairing fails. Fig 3. Schematic of facial recognition module 3.2. Human Body Image Recognition. 3.2.1. Distortion Removal. The full-body photos of passengers captured by wide-angle cameras are prone to distortion, which can cause interference in the calculation of body parameters. Therefore, it is necessary to perform distortion removal on the full-body photos. Image distortion mainly includes radial distortion and tangential distortion. The distortion removal process is mainly divided into the following 5 steps. The first step is to map the pixel coordinates of the original image to the camera coordinates using formula (1). x = (u-cx) / fx y = (v-cy) / fy (1) x, y is the camera coordinate of the original image. u, v is the pixel coordinates of the original image. cx, cy, fx, fy are camera related constants. The second step is to use formula (2) to calculate the radial distortion of the image in the camera coordinate system. r2 = x2 + y2 △x1 = x * (k1r2+k2r4+k3r6) △y1 = y * (k1r2+k2r4+k3r6) (2) △x1 and △y1 are radial distortion variables. k1, k2 and k3 are camera related constants. The third step is to use formula (3) to calculate the tangential distortion of the image in the camera coordinate system. r2 = x2 + y2 △x2 = 2p1xy + p2(r2+2x2) △y2 = 2p2xy + p1(r2+2y2) (3) △x2 and △y2 are tangential distortion variables. p1 and p2 are camera related constants. The fourth step is to use formula (4) to calculate the camera coordinates of the corrected image. x’ = x +△x1+△x2 y’ = y +△y1+△y2 (4) x’ and y’ are the camera coordinates of the corrected image. The fifth step is to use formula (5) to map the camera coordinates of the corrected image back to the pixel coordinates. u’ = x’ * fx + cx v’ = y’ * fy + cy (5) u’ and v’ are the pixel coordinates of the corrected image. 3.2.2. Calculation of Passenger Body Parameters. The system uses the pre-trained body recognition model Openpose to label the positions of the passenger's head, neck, and feet. These positions provide a basis for calculating passenger body parameters. The body key points marked by Openpose are shown in Figure 4. Fig 4. Body key points marked by Openpose Calculated passenger body parameters mainly include the passenger's head and neck length and height. The length of 207 the passenger's head and neck in a full-body photo is defined as formula (6), where l is the length of the head and neck, yh is the vertical coordinate of the head position, yn is the vertical coordinate of the neck position. l = yh – yn (6) Height is defined as formula (7), where h is height, yf is the vertical coordinate of the foot position. h = yh – yf (7) The principle of camera capturing images is shown in Figure 5. From Figure 5, it can be seen that when the focal distance and object distance are constant, the actual body parameter of the passenger is directly proportional to the body parameter of the passenger in full-body photo: (8) Fig 5. The principle of camera capturing images 3.3. Seat Position Calibration Calculation. This article uses the lookup table method to calculate seat position calibration. The corresponding relationship between passenger body parameters and seat position calibration is shown in Table 1. Table 1. Physique parameters- seat position comparison Head and neck length Headrest height Height Leg rest extension length ≤20 0 ≤160 0 (20,22] 2 (160,165] 5 (22,24] 4 (165,170] 10 (24,26] 6 (170,175] 15 (26,28] 8 (175,180] 20 (28,30] 10 (180,185] 25 >30 12 >185 30 Unit: cm 4. System Test 4.1. Facial Pairing Accuracy Testing. The test set consists of full-body and half-body photos of 10 passengers, with a total of 20 images. Each experiment selects four passenger's photos for face pairing testing. It simulates the scene where four passengers board the vehicle simultaneously. By combining the combination of , it is known that the number of experiments is 210. The test results are shown in Table 2, with a pairing accuracy of 99%, it indicates that the facial comparison model can meet the system's needs. Table 2. Face pairing accuracy Correct times Error times Accuracy/ % 208 2 99 4.2. Accuracy Testing of Body Parameter Calculation. This article calculates the body parameters of passengers in 7 height ranges, each containing 30 people. When the calculated head and neck length and height fall into the correct range, the calculation is judged to be correct. Otherwise, the calculation is judged to be incorrect. The test results are shown in Table 3. Taking into account 7 height ranges, the calculation accuracy reaches 98.1%. It indicates that the body parameter calculation model can meet the system requirements. Table 3. Physique calculation accuracy Height/ cm Correct times Error times Accuracy/ % ≤160 29 1 96.7 (160,165] 29 1 96.7 (165,170] 30 0 100 (170,175] 30 0 100 (175,180] 30 0 100 (180,185] 30 0 100 >185 28 2 93.3 Total 206 4 98.1% 5. Summary Starting from user needs, this article designs a vehicle seat adjustment system based on body image recognition. It uses facial recognition algorithms to distinguish passenger identities. Based on body image recognition algorithms, it is able to calculates passenger body parameters. Then, these parameters can guide the vehicle seat to adjust to the suitable position automatically. The experiment results show that the facial pairing accuracy and body parameter calculation accuracy of the system reach 99% and 98.1% respectively, which can meet the application in practical scenarios. Compared with the traditional solutions of manual adjustment 208 and seat memory, this article greatly simplifies the seat adjustment process, which is of great significance for improving the user's riding experience. References [1] Wei Tong, Wenlong Zhao, Ping Lu, et al. Introduction to Comfort Design of Automobile Seats and Verification Methods[J]. Shanghai Automotive, 2021(7):18-21. [2] Fiorillo I, Nasti M, Naddeo A. Design for comfort and social interaction in future vehicles: A study on the leg space between facing-seats configuration[J]. International Journal of Industrial Ergonomics, 2021, 83(6):103131. [3] Xin Qi, Ling Wang. Design analysis of adjustable car seats[J]. Auto Expo, 2021(5):173. [4] Guobin Ren, Wenbin Lu. Optimization of manual fore and aft adjustment force of the second row seat of an SUV[J]. Automotive components, 2022(2):51-55. [5] Xin Li, Ziwang Xuan, Yongbin Zhang, et al. Design of Automotive Electric Seat Position Adjustment Control System Based on Embedded System Software and Hardware Automation [J]. Robot Technology and Applications, 2022 (6): 4. [6] Wenda Chen, Wenkai Huang, Jing Zhu, et al. Research on Autonomous Memory of Car Seats Based on Facial Recognition [J]. Journal of Dongguan University of Technology, 2017, 24(1):92-96. [7] Liwei Wei, Lihao Wei. Intelligent Vehicle Safety Seat Automatic Adjustment Control System[J]. Auto Expo, 2021 (17): 137-138.