Driver risk identification method and device, terminal equipment and readable storage medium
The multi-modal large language model converts video and audio information into multi-modal feature vectors, which solves the problem of insufficient driver risk identification capabilities in the existing technology, achieves more accurate risk identification and prediction, and improves road traffic safety. .
Patent Information
- Application Number
- CN202480000743.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-08-23
AI Technical Summary
Existing multi-modal models have small parameters and simple structures in driver risk identification. They cannot accurately reflect the characteristics and needs of drivers in different driving states. They have insufficient generalization capabilities and cannot capture complex data patterns and relationships.
A driver risk identification method based on a multi-modal large language model is used to convert video and audio information into multi-modal feature vectors through a video encoder, audio encoder, video adapter and audio adapter, and the large language model is used for risk identification. , enhance the ability to capture global information and identify risks.
It achieves more accurate identification of driver risk characteristics and behavior patterns, improves the robustness and accuracy of driver risk identification, can better predict and intervene in potential risk situations, and improves road traffic safety.
Smart Images

Figure CN118541685A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle safety technology, and in particular, relates to a driver risk identification method, device, terminal equipment and readable storage medium. Background Art
[0002] With the increase in traffic volume and the increasing importance of road safety, driver risk identification has become an important part of ensuring road safety. The risk identification solution aims to accurately identify and respond to various potential risk factors during driving, such as driver distraction and fatigue. Accurate risk identification can help drivers take appropriate measures in a timely manner to avoid accidents and improve road safety. Summary of the invention
[0003] Embodiments of the present application provide a driver risk identification method, apparatus, terminal device, and readable storage medium to implement driver risk identification.
[0004] In a first aspect, an embodiment of the present application provides a driver risk identification method, the driver risk identification method comprising:
[0005] Obtaining a target video feature vector of the driver's video information, wherein the target video feature vector is aligned with an embedding space of the large language model;
[0006] Acquire a target audio feature vector of audio information in the vehicle driven by the driver, wherein the target audio feature vector is aligned with an embedding space of the large language model;
[0007] The target video feature vector and the target audio feature vector are input into the large language model to obtain a risk identification result of the driver.
[0008] In a second aspect, an embodiment of the present application provides a driver risk identification device, the driver risk identification device comprising:
[0009] A first acquisition module is used to acquire a target video feature vector of the driver's video information, wherein the target video feature vector is aligned with the embedding space of the large language model;
[0010] A second acquisition module is used to acquire a target audio feature vector of the audio information in the vehicle driven by the driver, wherein the target audio feature vector is aligned with the embedding space of the large language model;
[0011] The risk identification module is used to input the target video feature vector and the target audio feature vector into the large language model to obtain the risk identification result of the driver.
[0012] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the driver risk identification method as described in the first aspect above are implemented.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the driver risk identification method as described in the first aspect above are implemented.
[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the steps of the driver risk identification method as described in the first aspect above.
[0015] As can be seen from the above, this solution obtains the target video feature vector of the driver's video information and the target audio feature vector of the driver's audio information, and the target video feature vector and the target audio feature vector are aligned with the embedding space of the large language model, so the target video feature vector and the target audio feature vector are input into the large language model to obtain the driver's risk identification result. Based on multimodal features such as the target video feature vector and the target audio feature vector, and utilizing the extraordinary understanding and reasoning capabilities of the large language model, this solution can more accurately identify the risk of the driver's driving behavior, that is, realize driver risk identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] Figure 1 This is a schematic diagram of the implementation flow of a driver risk identification method provided by an embodiment of the present application;
[0018] Figure 2 This is an example diagram of the processing flow of driver risk identification based on a multimodal large language model;
[0019] Figure 3 is a schematic diagram of the structure of a driver risk identification device provided by an embodiment of the present application;
[0020] Figure 4 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0021] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0022] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0023] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0024] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0025] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0026] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0027] Before explaining the present application scheme, in order to facilitate the reader's understanding, the terms involved in the present scheme are first explained.
[0028] At present, there are certain limitations in the driver risk identification method based on multimodal models. This type of model has a small number of parameters, a simple structure, and limited multimodal feature alignment. The learned representation information and generalization ability are insufficient, and it is impossible to capture complex data patterns and relationships. Therefore, the multimodal model has certain limitations in driver risk identification and cannot accurately reflect the characteristics and needs of the driver under different driving conditions. In order to solve this problem, the present application provides a driver risk identification method based on a multimodal large language model. The method uses a powerful large language model as a brain to perform multimodal tasks, which can better mine multimodal information, improve the model's effective capture of global information, and enhance risk identification under different driving conditions. By adopting the solution of a multimodal large language model, the present application can more accurately identify the driver's risk characteristics and behavior patterns, thereby better predicting and intervening in potential risk situations. This risk identification method based on a multimodal large language model achieves more robust driver risk identification, guides drivers to drive safely, and promotes road traffic safety.
[0029] The driver risk identification method based on a multimodal large language model provided in this application has the following scientific, technical and industrial values:
[0030] In view of the current situation that the accurate identification and intelligent judgment capabilities of driver risk identification methods are insufficient, and there is a lack of effective prevention and control technology and equipment for high-risk traffic behaviors, we focus on the multimodal information of drivers as the research focus, and build a closed-loop research framework of mechanism, key technology and integrated application. The forward-looking layout of risk monitoring and identification key technology research based on multimodal large language models has significant scientific value.
[0031] It has the following social benefits:
[0032] Although the total number of traffic accidents and deaths in my country has continued to decline in recent years, there is still a large gap between the death rate per 10,000 vehicles and the number of deaths per million kilometers compared with developed countries. Traffic accident deaths account for a very high proportion of the total number of abnormal deaths in my country, and have become one of the important unstable factors affecting social harmony and family happiness in my country. In view of this, on October 9, 2016, the State Council Safety Committee Office issued the "Opinions on Implementing the Guidelines for Preventing Major and Serious Accidents and Building a Dual Prevention Mechanism", and on December 9, 2016, the Central Committee of the Communist Party of China and the State Council issued the "Opinions on Promoting Reform and Development in the Field of Work Safety". In the same year, the Ministry of Transport issued the "Implementation Plan for Building a Dual Prevention System for Risk Grading and Management of Transportation Work Safety and Hidden Dangers". Therefore, how to effectively monitor and control driver risks has become one of the difficulties that need to be addressed in the field of traffic safety in my country at this stage and one of the focuses for effectively improving the level of traffic safety.
[0033] The multimodal large language model in this application aims to use a large language model to understand the visual content in video information and the auditory content in audio information. Before using the multimodal large language model, it is necessary to construct a multimodal dataset for driver risk identification and train it based on the designed multimodal large language model framework. Specifically, the multimodal large language model includes five components: video encoder, audio encoder, video adapter, audio adapter and large language model.
[0034] Video encoder: In real application scenarios, traditional image encoders can only focus on the information in a single image and cannot use the contextual information between the previous and next frames in the video information to fully perceive the driver's state. At present, there are many devices that support video recording during the driver's driving process, such as Advanced Driving Assistance System (ADAS) cameras and Driver Monitor System (DMS) cameras. Therefore, the use of video encoders can better learn the driver's state changes, identify and intervene in risks, and use contextual information to identify some complex driving actions and scenes. Therefore, driver risk identification algorithms based on video understanding will become a new research hotspot. For video-related tasks, the introduction of video encoders can better utilize time and contextual information and improve the performance and efficiency of the model.
[0035] The video encoder can use the pre-trained visual module in BLIP-2, which consists of a ViT (Vision Transformer) and a Q-former. During the training process, the parameters are frozen. Assuming that a video information contains N frames of images, after passing through the video encoder, N two-dimensional embedding vectors will be obtained, that is, N video feature vectors, where N is an integer greater than 1.
[0036] Video Adapter: Since the video feature vector from the visual encoder does not take into account any temporal information, we further apply position embedding as temporal information to the representations from different frames. Then, the video feature vector with position encoding information is input into a video-specific Q-former to obtain the video encoding vector. In addition, in order to adapt the video representation to the input of the large language model, a linear layer is added to convert the video encoding vector to the video query vector, so as to align the video feature vector with the language model space.
[0037] Audio encoder: In order to process the given audio information, an audio encoder is designed. Specifically, the pre-trained Imagebind is used as the audio encoder. First, K 2-second audio clips are uniformly sampled from the audio information, where K is an integer greater than 1. Then, each audio clip is converted into a spectrogram using the Mel spectrum transform. The obtained spectrogram is then input into the audio encoder to obtain the corresponding audio feature vector.
[0038] Audio adapter: Similar to the video adapter, the position encoding information representing the time information is first embedded into the audio feature vector from the audio encoder, and then the audio feature vector with the position encoding information is input into an audio-specific Q-former to obtain the audio encoding vector. Next, a linear layer is used to convert the audio encoding vector into an audio query vector, which is mapped to the embedding space of the large language model to achieve alignment between the audio feature vector and the large language model space.
[0039] Large language model: The video query vector and audio query vector are input into the large language model, and the model outputs a text description, which represents the risk identification result of the driver.
[0040] Before using the multimodal large language model for driver risk identification, the video-related components and audio-related components in the multimodal large language model need to be trained separately. Their training processes are basically the same. First, they are pre-trained using large-scale data, and then fine-tuned using high-quality instruction data sets to achieve visual language alignment and auditory language alignment. After fine-tuning both the video-related components and the audio-related components, the training of the multimodal large language model is completed, and a trained multimodal large language model is obtained.
[0041] It should be noted that the present application does not impose any restrictions on the pre-training method of the multimodal large language model. For example, a large-scale video subtitle dataset can be used to pre-train video-related components, and an audio text dataset can be used to pre-train audio-related components.
[0042] Deploy the trained multimodal large language model to the terminal device and perform 8-bit processing on the multimodal large language model, that is, reduce the number of bits in the operation process of the multimodal large language model to 8 bits, thereby speeding up the inference speed.
[0043] This application applies a multimodal large language model to the field of video understanding, integrates the multimodal features of video and audio, and utilizes the extraordinary understanding and reasoning capabilities of the large language model, so that the multimodal large language model can comprehensively perceive the driver's status and more accurately identify the driver's risk characteristics and behavior patterns. Its accuracy far exceeds that of traditional risk identification algorithms based on single-frame images. The risk identification results obtained are consistent with human perception and are more reliable and explainable.
[0044] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0045] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0046] See also Figure 1 , is a schematic diagram of the implementation flow of a driver risk identification method provided by an embodiment of the present application, and the driver risk identification method is applied to a terminal device. Figure 1 As shown, the driver risk identification method may include the following steps:
[0047] Step 101: Obtain a target video feature vector of the driver's video information.
[0048] The target video feature vector is a video feature vector that is compatible with the text input of the large language model, that is, the target video feature vector has the same dimension as the text input of the large language model. The target video feature vector is aligned with the embedding space of the large language model. This alignment ensures a high level of accuracy and understanding, enabling the large language model to generate meaningful responses based on the video information.
[0049] The video information of the driver includes N frames of images, which may be images of the driver's face or images including the driver's face and other body parts. N is an integer greater than 1.
[0050] Optionally, a video surveillance device located above the driving area may be used to collect video information of the driver, and the video surveillance device transmits the collected video information to the terminal device.
[0051] The terminal device is deployed with a trained multimodal large language model, and the target video feature vector can be obtained through the video encoder and video adapter in the multimodal large language model. Specifically: the video information is input into the video encoder to obtain N first video feature vectors, each frame of the image corresponds to one of the first video feature vectors; the N first video feature vectors are input into the video adapter to obtain a target video feature vector.
[0052] The first video feature vector is a video feature vector output by the video encoder. The video information is input into the video encoder to obtain the first video feature vector of each frame image in the video information. The first video feature vector is a two-dimensional embedding vector (ie, a two-dimensional video feature vector).
[0053] Video encoders can better utilize contextual information in video information to improve the performance and efficiency of the model.
[0054] There are many types of video surveillance devices installed on the vehicle (such as ADAS cameras, DMS cameras, etc.). When the driver is driving the vehicle, these video surveillance devices can obtain the driver's video information. Therefore, the use of video encoders can better learn the driver's state changes (for example, the driver changes from opening eyes to closing eyes), and then identify risks, and use contextual information to identify some complex driving actions and scenes.
[0055] Of course, it is understandable that a pre-trained multimodal large language model can also be deployed on the terminal device, and the pre-trained multimodal large language model can be fine-tuned through the terminal device. Specifically, the video processing component and the audio processing component in the multimodal large language model are fine-tuned separately.
[0056] In an optional embodiment, the fine-tuning scheme of the video processing component is as follows:
[0057] While freezing weight parameters of the video encoder and the large language model, fine-tune the video adapter based on a first instruction dataset and a second instruction dataset to align video features with language features (i.e., visual-language alignment), wherein the first instruction dataset includes a plurality of first video samples and a video description of each first video sample, and the second instruction dataset includes a plurality of second video samples and a question-answer pair of each second video sample;
[0058] While freezing the weight parameters of the video encoder, the video adapter and the large language model are fine-tuned simultaneously based on the first instruction data set and the second instruction data set to improve the multimodal expression capability.
[0059] The terminal device can obtain a large amount of video information of different drivers driving a vehicle, and one video information is used as a video sample. The large amount of video samples obtained are divided into multiple first video samples and multiple second video samples. The multiple first video samples and the multiple video samples can contain the same video samples or different video samples, which is not limited in this application. Multiple means at least two.
[0060] The generation process of the first instruction data set is as follows:
[0061] First, extract the key frames of each first video sample; second, input the obtained key frames and randomly selected titles into GPT4V to obtain the description of the key frames; finally, input each key frame, the title of the key frame and the description into GPT4V, and GPT4V outputs a concise, spatiotemporally related video description. The video description is used to describe the corresponding first video sample. All the above first video samples and their video descriptions constitute the first instruction data set.
[0062] For example, one of the following three titles can be randomly selected and input into GPT4V.
[0063] Title 1: This is an infrared image of the driver. Briefly describe this image. Focus on the driver's facial expressions. Don't pay attention to anyone in the car other than the driver. Do not pay attention to the environment and objects in the car. Use a complete paragraph less than 100 words for your reply.
[0064] Title 2: This is an infrared image of the driver. Provide a concise depiction of this image. Focus on the driver's facial expressions. Don't pay attention to anyone in the car other than the driver. Do not pay attention to the environment and objects in the car. Use a complete paragraph less than 100 words for your reply.
[0065] Title 3: This is an infrared image of the driver. Summarize this image less than 100 words. Focus on the driver's facial expressions. Don't pay attention to anyone in the car other than the driver. Do not pay attention to the environment and objects in the car.
[0066] The generation process of the second instruction dataset is as follows:
[0067] A question-answer pair is constructed for each second video sample. A question-answer pair includes a question and an answer corresponding to the question. The answer will be annotated by humans after watching the second video sample. For example, the question is "Whether the driver looks tired?"; the answer is "yes / no". All the above second video samples and their question-answer pairs constitute the second instruction data set.
[0068] In an optional embodiment, the video adapter includes a first position embedding layer, a first Q-former and a first linear layer; N first video feature vectors are input into the video adapter to obtain a target video feature vector, including:
[0069] Inputting the N first video feature vectors into the first position embedding layer to obtain N second video feature vectors;
[0070] Inputting N second video feature vectors into the first Q-former to obtain a third video feature vector;
[0071] The third video feature vector is input into the first linear layer to obtain the target video feature vector.
[0072] Since the first video feature vector from the video encoder does not consider the time information, after the first video feature vector is input into the video adapter, the first position embedding layer in the video adapter can use the time information as the position coding information and apply it to the representations from different frames, thereby obtaining the second video feature vector, and the second video feature vector carries the position coding information. The number of the second video feature vectors is the same as the number of the first video feature vectors, and the second video feature vector has the position coding information added compared to the first video feature vector.
[0073] The first Q-former is a Q-former unique to video, and is used to aggregate frame-level representation, and aggregate N second video feature vectors into a third video feature vector, wherein the third video feature vector is a one-dimensional video feature vector.
[0074] In order to make the third video feature vector adapt to the input of the large language model, a linear layer (i.e., the first linear layer) is added to convert the third video feature vector into a target video feature vector, so as to project the third video feature vector to the same dimension as the text embedding of the large language model, thereby achieving alignment of the video features with the large language model space.
[0075] Step 102 : obtaining a target audio feature vector of audio information in a vehicle driven by a driver.
[0076] The target audio feature vector is an audio feature vector compatible with the text input of the large language model, that is, the target audio feature vector has the same dimension as the text input of the large language model. The target audio feature vector is aligned with the embedding space of the large language model. This alignment ensures a high level of accuracy and understanding, enabling the large language model to generate meaningful responses based on the audio information.
[0077] The audio information in the vehicle may be the audio information of all persons in the vehicle, or may be the audio information of the driver, which is not limited in this application.
[0078] Optionally, an audio monitoring device (such as a microphone, an audio recorder, etc.) located in the vehicle can be used to collect audio information in the vehicle, and the audio monitoring device sends the collected audio information to the terminal device. For example, an audio monitoring device located in front of the driving area can be used to collect video information of the driver.
[0079] For devices that can record video and audio at the same time (i.e., video and audio recording devices), the video and audio recording devices can be installed in the vehicle. The installation location needs to ensure that the video and audio recording devices can capture the driver. The driver's audio and video information can be collected through the video and audio recording devices. The audio and video information includes the driver's video information and the audio information in the vehicle.
[0080] It should be noted that in order to improve the accuracy of driver risk identification, it is necessary to simultaneously collect the driver's video information and the audio information in the vehicle driven by the driver, that is, the collection time of the video information is the same as the collection time of the audio information.
[0081] The terminal device is deployed with a trained multimodal large language model, so the target audio feature vector can be obtained through the audio encoder and audio adapter in the multimodal large language model. Specifically: K audio clips are sampled from the audio information, where K is an integer greater than 1; the K audio clips are converted into spectrograms respectively to obtain K spectrograms; the K spectrograms are input into the audio encoder to obtain K first audio feature vectors, where one spectrogram corresponds to one first audio feature vector; the K first audio feature vectors are input into the audio adapter to obtain a target audio feature vector.
[0082] The first audio feature vector is an audio feature vector output by the audio encoder, and the first audio feature vector is a two-dimensional audio feature vector. The terminal device can uniformly sample K audio clips from the audio information, and the audio duration of each audio clip is a preset duration (for example, 2 seconds), and then use Mel spectrum transformation to convert the K audio clips into corresponding spectrograms, respectively, to obtain K spectrograms, and then input each spectrogram into the audio encoder to obtain the corresponding first audio feature vector, and obtain K first audio feature vectors.
[0083] When a pre-trained multimodal large language model is deployed on the terminal device, the fine-tuning scheme of the audio processing component is as follows:
[0084] While freezing the weight parameters of the audio encoder and the large language model, fine-tune the audio adapter based on a third instruction data set and a fourth instruction data set to align audio features with language features (i.e., auditory language alignment), the third instruction data set comprising a plurality of first audio samples and an audio description of each first audio sample, and the fourth instruction data set comprising a plurality of second audio samples and a question-answer pair for each second audio sample;
[0085] While freezing the weight parameters of the audio encoder, the audio adapter and the large language model are fine-tuned based on the third instruction dataset and the fourth instruction dataset to improve the multimodal expression capability.
[0086] While acquiring a large amount of video information of different drivers driving a vehicle, the terminal device can also acquire audio information in the vehicle, with one piece of audio information being regarded as an audio sample. The large amount of acquired audio samples are divided into a plurality of first audio samples and a plurality of second audio samples. The first audio sample is an audio sample collected at the same time as the first video sample, so the video description of the first video sample can be used as the audio description of the corresponding first audio sample. The second audio sample is an audio sample collected at the same time as the second video sample, so the question-answer pair of the second video sample can be used as the question-answer pair of the corresponding second audio sample.
[0087] The third instruction data set includes all first audio samples and their audio descriptions. The fourth instruction data set includes all second audio samples and their question-answer pairs.
[0088] In an optional embodiment, the audio adapter includes a second position embedding layer, a second Q-former, and a second linear layer; K first audio feature vectors are input into the audio adapter to obtain a target audio feature vector, including:
[0089] Inputting the K first audio feature vectors into the second position embedding layer to obtain K second audio feature vectors;
[0090] Inputting the K second audio feature vectors into a second Q-former to obtain a third audio feature vector;
[0091] The third audio feature vector is input into the second linear layer to obtain the target audio feature vector.
[0092] Since the first audio feature vector from the audio encoder does not consider the time information, after the first audio feature vector is input into the audio adapter, the second position embedding layer in the audio adapter can use the time information as position coding information and apply it to representations from different audio clips to obtain a second audio feature vector, which carries the position coding information.
[0093] The second Q-former is a Q-former unique to audio and is used to fuse second audio feature vectors of different audio clips, and fuse K second audio feature vectors into a third audio feature vector.
[0094] In order to adapt the third audio feature vector to the input of the large language model, a linear layer (i.e., the second linear layer) is added to convert the third audio feature vector into a target audio feature vector to achieve alignment of the audio features with the large language model space.
[0095] Step 103: input the target video feature vector and the target audio feature vector into the large language model to obtain the risk identification result of the driver.
[0096] Among them, the above-mentioned risk identification result is a text indicating that there is a driving risk or there is no driving risk.
[0097] Since the target video feature vector and the target audio feature vector are aligned with the embedding space of the large language model, the target video feature vector and the target audio feature vector can be used as the input of the large language model. The target video feature vector and the target audio feature vector are input into the large language model, and the large language model can output the risk identification result of the driver. Figure 2 The figure shows an example of the processing flow of driver risk identification based on a multimodal large language model. Figure 2 The audio and video information includes the video information of the driver and the audio information in the vehicle driven by the driver. Figure 2 “Yes, the driver looks tired” is a risk identification result, indicating that the driver has driving risks.
[0098] If the risk identification result indicates that there is a driving risk, the terminal device sends an intervention instruction to the vehicle. The intervention instruction is used to intervene in the driver's driving behavior to ensure the driver's safe driving.
[0099] After receiving the intervention command, the vehicle can issue a voice alarm to remind the driver to drive safely; it can also reduce the speed of the vehicle driven by the driver to ensure safe driving.
[0100] This embodiment is based on multimodal features such as target video feature vectors and target audio feature vectors, and utilizes the extraordinary understanding and reasoning capabilities of a large language model to more accurately identify the risks of the driver's driving behavior, that is, to achieve driver risk identification.
[0101] See also Figure 3 , is a schematic diagram of the structure of a driver risk identification device provided in an embodiment of the present application. For the sake of convenience of explanation, only the parts related to the embodiment of the present application are shown.
[0102] The above-mentioned driver risk identification device comprises:
[0103] A first acquisition module 31 is used to acquire a target video feature vector of the driver's video information, wherein the target video feature vector is aligned with the embedding space of the large language model;
[0104] A second acquisition module 32 is used to acquire a target audio feature vector of audio information in a vehicle driven by a driver, wherein the target audio feature vector is aligned with an embedding space of a large language model;
[0105] The risk identification module 33 is used to input the target video feature vector and the target audio feature vector into the large language model to obtain the risk identification result of the driver.
[0106] Optionally, the video information includes N frames of images, where N is an integer greater than 1, and the first acquisition module 31 includes:
[0107] A first input unit, used to input video information into a video encoder to obtain N first video feature vectors, where each frame of image corresponds to one first video feature vector;
[0108] The second input unit is used to input the N first video feature vectors into the video adapter to obtain a target video feature vector.
[0109] Optionally, the video adapter includes a first position embedding layer, a first Q-former and a first linear layer; the second input unit is specifically used for:
[0110] Inputting the N first video feature vectors into the first position embedding layer to obtain N second video feature vectors;
[0111] Inputting N second video feature vectors into the first Q-former to obtain a third video feature vector;
[0112] The third video feature vector is input into the first linear layer to obtain the target video feature vector.
[0113] Optionally, the above-mentioned driver risk identification device further includes:
[0114] A first fine-tuning module is configured to fine-tune the video adapter based on a first instruction data set and a second instruction data set while freezing weight parameters of the video encoder and the large language model, wherein the first instruction data set includes a plurality of first video samples and a video description of each first video sample, and the second instruction data set includes a plurality of second video samples and a question-answer pair of each second video sample;
[0115] The second fine-tuning module is used to fine-tune the video adapter and the large language model based on the first instruction data set and the second instruction data set while freezing the weight parameters of the video encoder.
[0116] Optionally, the second acquisition module 32 includes:
[0117] An audio sampling module, used for sampling K audio segments from the audio information, where K is an integer greater than 1;
[0118] An audio conversion module, used for converting the K audio clips into spectrograms respectively to obtain K spectrograms;
[0119] A third input module is used to input the K spectrograms into an audio encoder to obtain K first audio feature vectors, where one spectrogram corresponds to one first audio feature vector;
[0120] The fourth input module is used to input the K first audio feature vectors into the audio adapter to obtain a target audio feature vector.
[0121] Optionally, the audio adapter includes a second position embedding layer, a second Q-former and a second linear layer; the fourth input module is specifically used for:
[0122] Inputting the K first audio feature vectors into the second position embedding layer to obtain K second audio feature vectors;
[0123] Inputting the K second audio feature vectors into a second Q-former to obtain a third audio feature vector;
[0124] The third audio feature vector is input into the second linear layer to obtain the target audio feature vector.
[0125] Optionally, the driver risk identification device further includes:
[0126] A third fine-tuning module, configured to fine-tune the audio adapter based on a third instruction data set and a fourth instruction data set while freezing the weight parameters of the audio encoder and the large language model, wherein the third instruction data set includes a plurality of first audio samples and an audio description of each first audio sample, and the fourth instruction data set includes a plurality of second audio samples and a question-answer pair of each second audio sample;
[0127] The fourth fine-tuning module is used to fine-tune the audio adapter and the large language model based on the third instruction data set and the fourth instruction data set while freezing the weight parameters of the audio encoder.
[0128] The driver risk identification device provided in the embodiment of the present application can be applied in the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0129] See also Figure 4 , is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 4 As shown, the terminal device 4 of this embodiment includes: one or more processors 40 (only one is shown in the figure), a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned driver risk identification method embodiment are implemented.
[0130] The terminal device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of the terminal device 4 and does not constitute a limitation on the terminal device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0131] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0132] The memory 41 may be an internal storage unit of the terminal device 4, such as a hard disk or memory of the terminal device 4. The memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used to store the computer program and other programs and data required by the terminal device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
[0133] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0134] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0135] The embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0136] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0137] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0138] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0140] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0141] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A driver risk identification method, It is characterized in that The driver risk identification method comprises: Obtaining a target video feature vector of the driver's video information, wherein the target video feature vector is aligned with an embedding space of the large language model; Acquire a target audio feature vector of audio information in the vehicle driven by the driver, wherein the target audio feature vector is aligned with an embedding space of the large language model; The target video feature vector and the target audio feature vector are input into the large language model to obtain the risk identification result of the driver.
2. The driver risk identification method according to claim 1, It is characterized in that The video information includes N frames of images, where N is an integer greater than 1. The target video feature vector for obtaining the driver's video information includes: Inputting the video information into a video encoder to obtain N first video feature vectors, where each frame of image corresponds to one first video feature vector; Input the N first video feature vectors into the video adapter to obtain one target video feature vector.
3. The driver risk identification method according to claim 2, It is characterized in that The video adapter includes a first position embedding layer, a first Q-former and a first linear layer; the step of inputting the N first video feature vectors into the video adapter to obtain a target video feature vector includes: Inputting the N first video feature vectors into the first position embedding layer to obtain N second video feature vectors; Inputting N second video feature vectors into the first Q-former to obtain a third video feature vector; The third video feature vector is input into the first linear layer to obtain the target video feature vector.
4. The driver risk identification method according to claim 2, It is characterized in that Before inputting the N first video feature vectors into the video adapter, the method further includes: While freezing the weight parameters of the video encoder and the large language model, fine-tuning the video adapter based on a first instruction data set and a second instruction data set, the first instruction data set comprising a plurality of first video samples and a video description of each of the first video samples, the second instruction data set comprising a plurality of second video samples and a question-answer pair for each of the second video samples; The video adapter and the large language model are fine-tuned based on the first instruction data set and the second instruction data set while freezing the weight parameters of the video encoder.
5. The driver risk identification method according to any one of claims 1 to 4, It is characterized in that The step of obtaining a target audio feature vector of audio information in a vehicle driven by the driver includes: Sampling K audio clips from the audio information, where K is an integer greater than 1; Convert the K audio clips into spectrograms respectively to obtain K spectrograms; Inputting the K spectrograms into an audio encoder to obtain K first audio feature vectors, wherein one of the spectrograms corresponds to one of the first audio feature vectors; Input K of the first audio feature vectors into the audio adapter to obtain one of the target audio feature vectors.
6. The driver risk identification method according to claim 5, It is characterized in that The audio adapter comprises a second position embedding layer, a second Q-former and a second linear layer; the step of inputting the K first audio feature vectors into the audio adapter to obtain a target audio feature vector comprises: Inputting the K first audio feature vectors into the second position embedding layer to obtain K second audio feature vectors; Inputting K of the second audio feature vectors into the second Q-former to obtain a third audio feature vector; The third audio feature vector is input into the second linear layer to obtain the target audio feature vector.
7. The driver risk identification method according to claim 5, It is characterized in that Before inputting the K first audio feature vectors into the audio adapter, the method further includes: While freezing the weight parameters of the audio encoder and the large language model, fine-tuning the audio adapter based on a third instruction data set and a fourth instruction data set, the third instruction data set comprising a plurality of first audio samples and an audio description of each of the first audio samples, the fourth instruction data set comprising a plurality of second audio samples and a question-answer pair for each of the second audio samples; The audio adapter and the large language model are fine-tuned based on the third instruction data set and the fourth instruction data set while freezing the weight parameters of the audio encoder.
8. A driver risk identification device, It is characterized in that The driver risk identification device comprises: A first acquisition module is used to acquire a target video feature vector of the driver's video information, wherein the target video feature vector is aligned with the embedding space of the large language model; A second acquisition module is used to acquire a target audio feature vector of the audio information in the vehicle driven by the driver, wherein the target audio feature vector is aligned with the embedding space of the large language model; The risk identification module is used to input the target video feature vector and the target audio feature vector into the large language model to obtain the risk identification result of the driver.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the driver risk identification method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the driver risk identification method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Fatigue driving identification method and system, electronic equipment and storage medium
CN115331204A
Cited By
Dangerous behavior identification and early warning method based on multi-modal analysis
CN119360278A
A dangerous behavior recognition and early warning method based on multi-modal analysis
CN119360278B
Speech synthesis method, speech synthesis model training method and related device
CN120356452A
Urban traffic management intelligent evaluation system and method based on large language model
CN121122011A
Method for training driving risk recognition model, and driving risk recognition method and apparatus
EP4769183A4
