Vehicle anomaly detection method, device, equipment, storage medium and program product
By introducing adaptive time context modeling and anomaly score prediction module from coarse to fine, the limitations of existing weakly supervised learning methods in detecting common and rare anomaly events are solved, and more accurate and robust vehicle anomaly detection is achieved.
Patent Information
- Application Number
- CN202411532275.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-04
AI Technical Summary
Existing vehicle driving video detection methods are mostly based on weak supervision learning, and have certain limitations, making it difficult to effectively detect common and rare abnormal events.
A vehicle abnormality detection method is proposed. By obtaining the driving video of the autonomous driving vehicle end, using the feature preprocessing network to extract the video action features, the adaptive time context modeling module optimizes the features, and finally generates the vehicle abnormality label from the coarse to fine anomaly score prediction module.
Accurate detection of vehicle abnormal events in autonomous driving scenarios is realized, and the accuracy and robustness of abnormality detection are improved through adaptive time context modeling and abnormality score prediction from coarse to fine.
Smart Images

Figure CN119559598A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle status detection, and in particular to a vehicle abnormality detection method, device, equipment, storage medium and program product. Background Art
[0002] The key to safe driving of autonomous vehicles is to accurately and timely identify the driving scenes around the vehicle. As a key technology in autonomous driving systems, vehicle anomaly detection is of great significance to improving the safety of autonomous driving systems. However, in actual scenarios, vehicle abnormal events usually present a long-tail distribution, that is, the probability of abnormal events is much lower than that of normal events. Therefore, a safe and reliable intelligent driving system needs to respond to both common and rare events in a timely manner.
[0003] In order to solve the above problems, vehicle abnormal behavior detection based on computer vision technology has received extensive attention and research. At present, according to the fineness of the label information on which video anomaly detection technology relies, it can be divided into three categories: strongly supervised learning methods, weakly supervised learning methods, and unsupervised learning methods. Among them, the weakly supervised framework based on multi-instance learning is the mainstream method of current video anomaly detection. It uses coarse-grained labels at the video level to mark normal or abnormal events, thereby guiding the model to learn the characteristics of normal and abnormal behaviors. However, although the weakly supervised learning method is superior to the unsupervised method in terms of detection accuracy and does not require the use of fine-grained video labels, it still has certain limitations. Summary of the invention
[0004] The main purpose of this application is to provide a vehicle anomaly detection method, device, equipment, storage medium and program product, aiming to solve the technical problem that existing vehicle driving video detection methods are mostly based on weak supervision learning and have certain limitations.
[0005] To achieve the above objectives, the present application proposes a vehicle abnormality detection method, the vehicle abnormality detection method comprising:
[0006] Obtain driving video from the self-driving car;
[0007] Inputting the driving video into a feature preprocessing network to obtain video action features;
[0008] The video action feature is optimized by an adaptive temporal context modeling module to obtain a global action feature;
[0009] The global action feature is input into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
[0010] In one embodiment, the step of optimizing the video motion feature by an adaptive temporal context modeling module to obtain a global motion feature comprises:
[0011] Performing a linear transformation on the video action feature through an adaptive temporal context modeling module to obtain a linear feature vector;
[0012] Determining an attention score based on the linear feature vector;
[0013] Normalizing the attention scores to obtain global attention weights;
[0014] A global action feature is determined based on the global attention weight and the linear feature vector.
[0015] In one embodiment, the linear feature vector includes a first linear feature vector, a second linear feature vector and a third linear feature vector;
[0016] The step of determining an attention score based on the linear feature vector comprises:
[0017] determining an attention score based on the first linear feature vector and the second linear feature vector;
[0018] The step of determining a global action feature based on the global attention weight and the linear feature vector comprises:
[0019] A global action feature is determined based on the global attention weight and the third linear feature vector.
[0020] In one embodiment, after the step of determining the global action feature based on the global attention weight and the third linear feature vector, the method further includes:
[0021] Get the preset time mask;
[0022] Determining a local attention score based on the preset time mask and the attention score;
[0023] Determine a local attention feature according to the local attention score and the third linear feature vector;
[0024] Fusing the local attention feature and the global action feature based on a learnable parameter to obtain a fused feature;
[0025] Performing residual processing based on the fusion feature and the video motion feature to obtain an aggregated feature;
[0026] Accordingly, the step of inputting the global action feature into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label includes:
[0027] The aggregated features are input into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
[0028] In one embodiment, the step of inputting the aggregated features into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label includes:
[0029] Inputting the aggregated features into a coarse classifier for preliminary prediction to obtain an abnormal vehicle label;
[0030] Selecting aggregate features of several instances with top vehicle anomaly score values to form a high anomaly set;
[0031] Selecting aggregate features of several instances with lower anomaly score values of the vehicle to form a low anomaly set;
[0032] The data in the high anomaly set and the low anomaly set are processed respectively to obtain vehicle anomaly labels.
[0033] In one embodiment, the step of obtaining the driving video of the autonomous driving vehicle includes:
[0034] Obtain the initial driving video of the autonomous vehicle;
[0035] Adding a binary label to the initial driving video to obtain a labeled driving video;
[0036] The labeled driving video is standardized in the time dimension to obtain a driving video with a fixed dimension.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle abnormality detection device, the vehicle abnormality detection device comprising:
[0038] A video acquisition module is used to acquire driving videos of the autonomous driving vehicle.
[0039] A feature acquisition module, used for inputting the driving video into a feature preprocessing network to obtain video action features;
[0040] A feature processing module, used for optimizing the video action feature through an adaptive time context modeling module to obtain a global action feature;
[0041] The anomaly prediction module is used to input the global action features into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label; the anomaly score value is used to represent the abnormal probability of the vehicle.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle abnormality detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the vehicle abnormality detection method described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the vehicle abnormality detection method described above are implemented.
[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the vehicle abnormality detection method described above are implemented.
[0045] One or more technical solutions proposed in this application have at least the following technical effects:
[0046] This application obtains driving videos from the self-driving car; inputs the driving videos into a feature preprocessing network to obtain video motion features; optimizes the video motion features through an adaptive temporal context modeling module to obtain global motion features; inputs the global motion features into a coarse-to-fine anomaly score prediction module to obtain vehicle anomaly labels. By designing an adaptive temporal context modeling module, local calibration is performed while modeling long-distance temporal dependencies; and a more refined anomaly score prediction module is used to achieve more precise anomaly score prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the vehicle abnormality detection method of the present application;
[0050] Figure 2 A flow chart of the second embodiment of the vehicle abnormality detection method of the present application;
[0051] Figure 3A schematic diagram of the architecture of an adaptive time context modeling module in one implementation of the vehicle anomaly detection method of the present application;
[0052] Figure 4 A flow chart of the third embodiment of the vehicle abnormality detection method of the present application;
[0053] Figure 5-1 , Figure 5-2 , Figure 5-3 , Figure 5-4 , Figure 5-5 A schematic diagram of the network structure of a coarse-to-fine anomaly score prediction module in one implementation of the present application;
[0054] Figure 6 This is a schematic diagram of the module structure of the vehicle abnormality detection device according to an embodiment of the present application;
[0055] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the vehicle abnormality detection method in the embodiment of the present application.
[0056] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0059] The main solution of the embodiment of the present application is: obtaining driving video of the autonomous driving vehicle; inputting the driving video into a feature preprocessing network to obtain video motion features; optimizing the video motion features through an adaptive time context modeling module to obtain global motion features; inputting the global motion features into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label; the anomaly score value is used to represent the abnormal probability of the vehicle.
[0060] In existing solutions, since the videos collected by vehicles usually present a long-tail distribution, abnormal behaviors usually appear sparsely in video events. The coarse-grained video labels at the video level will cause the model learning to be biased, making it difficult to effectively learn the characteristics of abnormal behaviors, resulting in inaccurate positioning of abnormal events. At the same time, the actual traffic road scene is relatively complex, including various vehicles, pedestrians, road signs, etc., which may produce different environmental changes and cause certain interference to the detection of anomalies. Therefore, in order to cope with the above technical difficulties, the present invention proposes a coarse-fine weakly supervised vehicle anomaly detection method in an autonomous driving scenario.
[0061] The present application provides a coarse-to-fine weakly supervised vehicle anomaly detection method based on an autonomous driving scenario. The method is based on a weakly supervised framework based on multi-instance learning to achieve accurate abnormal event classification and refined abnormal time interval prediction. In order to address the problem that conventional TCN networks are difficult to adaptively balance long-term and short-term dependencies, the present application proposes an adaptive time context modeling module that performs local calibration while modeling long-distance time dependencies. In order to alleviate the long-tail distribution problem of abnormal videos in driving scenarios, the present invention designs a coarse-to-fine anomaly score prediction module, groups video features according to the anomaly scores of video clips, and designs constrained cross entropy loss functions and contrast loss functions for training to achieve more refined anomaly score predictions.
[0062] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a vehicle-mounted computing terminal, a server connected to the vehicle-mounted computing terminal, etc., or an electronic device capable of realizing the above functions, a virtual device, etc. The following takes a vehicle abnormality detection device (hereinafter referred to as the detection device) as an example to illustrate this embodiment and the following embodiments.
[0063] Based on this, the embodiment of the present application provides a vehicle abnormality detection method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the vehicle abnormality detection method of the present application.
[0064] In this embodiment, the vehicle abnormality detection method includes steps S10 to S40:
[0065] Step S10, obtaining the driving video of the autonomous driving vehicle.
[0066] It should be noted that the above-mentioned autonomous driving car end can be an autonomous driving vehicle, and video sensors or radar sensors can be deployed on the autonomous driving vehicle. Through the sensors deployed on the autonomous driving car end, the driving video of the autonomous driving car end can be collected.
[0067] In some implementations of the present application, each input driving video may be given A corresponding binary label Y v ∈{0,1}, where T means that the driving video is evenly divided into T segments v irepresents the ith driving video segment (Video Segment), label 0 represents that the driving video contains only normal segments (Nomal video), and label 1 represents that the driving video contains both normal segments and abnormal segments (Anomaly video). Each driving video V can be regarded as a driving video package, in which the abnormal driving video can be regarded as a positive package B a (Positive Bag), while the normal driving video is regarded as the negative bag B n (Negative Bag), the video clips in each driving video bag are regarded as instances.
[0068] In some implementations of the embodiments of the present application, the driving video clips can be standardized in the time dimension by interpolation or mean sampling to ensure that the video data tensor before encoding has a fixed dimension. That is, the step of obtaining the driving video of the autonomous driving vehicle includes:
[0069] Obtain the initial driving video of the autonomous vehicle;
[0070] Adding a binary label to the initial driving video to obtain a labeled driving video;
[0071] The labeled driving video is standardized in the time dimension to obtain a driving video with a fixed dimension.
[0072] In a specific implementation, the detection device can obtain the initial driving video of the autonomous vehicle and add binary labels to the initial driving video. At the same time, the RGB driving video clips can be standardized in the time dimension by interpolation or uniform sampling to ensure that the video data tensor before encoding has a fixed dimension.
[0073] Step S20: input the driving video into a feature preprocessing network to obtain video action features.
[0074] It should be noted that the feature preprocessing network is a feature network that can encode the input driving video, and the motion features of each driving video are extracted by using the pre-trained model as an encoder.
[0075] In some implementations of the embodiments of the present application, a pre-trained model based on X-CLIP can be used as an encoder Specifically, for each input driving video V = {v1, v2, v3, ... v T}, we can get the corresponding video action feature F = {f1,f2,f3,...f T}. The specific process can be described as follows:
[0076]
[0077] In a specific implementation, the detection device can input the driving video into a preset feature preprocessing network for encoding to obtain video motion features. By encoding the video, the video features can be extracted.
[0078] Step S30, optimizing the video motion feature through an adaptive temporal context modeling module to obtain a global motion feature.
[0079] Step S40: input the global action feature into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
[0080] It should be noted that optimizing the above-mentioned video action feature F through an adaptive temporal context modeling module can help the network adaptively learn temporal information across different distances, thereby improving the feature expression capability of the model.
[0081] It should be explained that a coarse-to-fine anomaly score prediction module is designed in the embodiment of the present application, which gradually narrows the scope of abnormal data through multi-stage anomaly score prediction to improve the prediction accuracy. Specifically, a coarse classifier can be set to classify the input global action features to determine the vehicle anomaly score value, and then the global action features after coarse classification are further trained through a loss function to determine the vehicle anomaly label.
[0082] The embodiment of the present application obtains the driving video of the self-driving car; inputs the driving video into the feature preprocessing network to obtain the video action feature; optimizes the video action feature through the adaptive time context modeling module to obtain the global action feature; inputs the global action feature into the coarse-to-fine anomaly score prediction module to obtain the vehicle anomaly label. By designing an adaptive time context modeling module, local calibration is performed while modeling long-distance time dependency; through the coarse-to-fine anomaly score prediction module, a more refined anomaly score prediction is achieved.
[0083] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 In the embodiment of the present application, the step of optimizing the video action feature by the adaptive temporal context modeling module to obtain the global action feature includes:
[0084] Step S31, performing a linear transformation on the video action feature through an adaptive time context modeling module to obtain a linear feature vector;
[0085] Step S32, determining an attention score based on the linear feature vector;
[0086] Step S33, normalizing the attention score to obtain a global attention weight;
[0087] Step S34, determining a global action feature based on the global attention weight and the linear feature vector.
[0088] It should be noted that the embodiment of the present application can use an adaptive temporal context modeling module to optimize the above video action features, help the network adaptively learn time information across different distances, and improve the feature expression ability of the model. Figure 3 , a linear transformation can be performed on the video action feature F of the input video to achieve video encoding, and a linear feature vector after the linear transformation can be obtained. Specifically, the linear feature vector may include: a first linear feature vector Q, a second linear feature vector K, and a third linear feature vector V. The calculation process can be as follows:
[0089] Q=W q F;
[0090] K=W k F;
[0091] V=W v F;
[0092] Among them, W q , W k and W v represents the linear transformation weight.
[0093] In some implementations of the embodiments of the present application, the attention score P (Attention Matrix) can be calculated based on the first linear feature vector and the second linear feature vector. By performing Softmax normalization on the attention score P, the global attention weight (Global Attention) can be obtained. The global attention feature F can be obtained by the global attention weight and the third linear feature vector. a , specifically:
[0094] P=Q·K T ;
[0095] P a =Softmax(X);
[0096] F a =P a ·V.
[0097] That is, the step of determining the attention score based on the linear feature vector includes:
[0098] determining an attention score based on the first linear feature vector and the second linear feature vector;
[0099] The step of determining a global action feature based on the global attention weight and the linear feature vector comprises:
[0100] A global action feature is determined based on the global attention weight and the third linear feature vector.
[0101] In some implementations of the embodiments of the present application, after the step of determining the global action feature based on the global attention weight and the third linear feature vector, the method further includes:
[0102] Get the preset time mask;
[0103] Determining a local attention score based on the preset time mask and the attention score;
[0104] Determine a local attention feature according to the local attention score and the third linear feature vector;
[0105] Fusing the local attention feature and the global action feature based on a learnable parameter to obtain a fused feature;
[0106] Performing residual processing based on the fusion feature and the video motion feature to obtain an aggregated feature;
[0107] Accordingly, the step of inputting the global action feature into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label includes:
[0108] The aggregated features are input into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
[0109] It should be noted that since the process of obtaining global context features may bring long-distance noise, a pre-set time mask can be further used to perform local calibration on the global context information. Specifically, the preset time mask M and the attention score P can be dot-multiplied to obtain the local attention score (LovalAttention), and then the local attention score can be multiplied with the third linear feature vector to finally obtain the local attention feature F l :
[0110] F l =V·Softmax(X⊙M).
[0111] It should be understood that a temporal mask is a masking effect produced by an excitation that can vary with time. In the field of video processing, the temporal mask effect can be used to reduce redundant information between frames.
[0112] Furthermore, in order to enable the model to balance the global temporal information and the local differences, the embodiment of the present application uses a learnable parameter γ to dynamically adjust the weights of the global attention feature and the local attention feature and fuse them to obtain the fused feature F g By integrating the fusion feature F g Perform residual processing with the original video action feature F to obtain the aggregated feature F c , the specific formula can be shown as follows:
[0113] F g =γF a +(1-γ)F l ;
[0114] F c =LN(F+σ(F g ));
[0115] Wherein, σ represents a feedforward neural network, and LN represents a layer normalization operation. In this application, through an adaptive temporal context modeling module, the model can learn contextual information around the sequence and flexibly learn short-term and long-term temporal relationships.
[0116] The embodiment of the present application performs a linear transformation on the video action feature through an adaptive temporal context modeling module to obtain a linear feature vector; determines an attention score based on the linear feature vector; normalizes the attention score to obtain a global attention weight; and determines a global action feature based on the global attention weight and the linear feature vector. The present application uses an adaptive temporal context modeling module to perform local calibration while modeling long-distance temporal dependencies, thereby improving the accuracy of anomaly detection.
[0117] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the above-mentioned first embodiment and / or the second embodiment can refer to the above introduction, and will not be repeated later. Figure 4 In the embodiment of the present application, the step of inputting the aggregated features into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label includes:
[0118] Step S41, inputting the aggregated features into a coarse classifier for preliminary prediction to obtain a vehicle abnormality label;
[0119] Step S42, selecting aggregate features of several instances with top vehicle anomaly score values to form a high anomaly set;
[0120] Step S43, selecting aggregate features of several instances with lower vehicle anomaly score values to form a low anomaly set;
[0121] Step S44, processing the data in the high anomaly set and the low anomaly set respectively to obtain vehicle anomaly labels.
[0122] It should be noted that the network structure of the coarse-to-fine anomaly score prediction module of the present application can be shown in FIG5. Referring to FIG5, in the embodiment of the present application, a coarse classifier C composed of a fully connected layer can be trained to predict the anomaly score value (Anomaly score) of the feature input to the coarse classifier. For each input video clip v i , we can perform multiple dimensionality reductions (such as from 512 to 32) through the Dropout0.7 operation to predict the corresponding abnormal score value y i =C(v i ).
[0123] It can be understood that the input video clip (global action feature) can be marked by the vehicle anomaly label to determine whether the clip belongs to the high anomaly collection or the low anomaly collection.
[0124] It should be explained that when training the anomaly score prediction module from coarse to fine, the K instances with the highest anomaly score values can be selected for the obtained anomaly scores. The corresponding aggregate features form a high anomaly set (Top-K Set) H, and select L instances with the lowest anomaly score values The aggregated features form a low anomaly set (Bottom-L Set) B, which is obtained by minimizing the binary cross entropy loss function L ce Conduct training, specifically:
[0125]
[0126] in, y={0,1} is the label of the corresponding video, y=0 indicates a normal video, and y=1 indicates an abnormal video. Using the above cross entropy loss function for training can expand the gap between the abnormal scores of normal and abnormal instances.
[0127] Furthermore, since the above training process is only performed on the high anomaly set H with a large anomaly score value, while ignoring the low anomaly set B with a low anomaly score value, such a training process may result in inaccurate results of the coarse classifier C. Therefore, in order to achieve more accurate prediction, the present invention separates the fragment features in the instance set B into two clusters, a normal cluster and an abnormal cluster, in an unsupervised manner.
[0128] In some implementations of the embodiments of the present application, a separator S is designed based on the fully connected layer, which aggregates the features. As input, it outputs the probability of being in the normal cluster and the abnormal cluster respectively. At the same time, the dot product of the feature prediction value is used to measure the similarity of its prediction results. p , use cosine similarity to measure the similarity between feature vectors d c , specifically:
[0129]
[0130] in,
[0131] In some implementations of the present application, in order to determine the similarity between feature vectors, the present application constructs a contrast loss function to optimize the separator S. Specifically, the feature vectors are and Intrinsic cosine similarity d c The label y is defined as the contrastive loss function:
[0132]
[0133] Among them, τ is an adjustable similarity threshold.
[0134] Furthermore, we can minimize the contrast loss function L cons To train the separator S, it can be specifically as follows:
[0135]
[0136] Where m represents the margin parameter, which is used to limit the interval of anomaly scores.
[0137] In some implementations of the embodiments of the present application, in order to optimize the coarse classifier C and improve its prediction accuracy, the prediction score value generated by the separator S can be used as a pseudo label (pseudo label) generated by the aggregated feature. The generated pseudo label can be supervised to assist in training the coarse classifier C. The specific process can be expressed as follows:
[0138]
[0139]
[0140] Among them, L conc is the contrast loss function for supervised auxiliary training, represents the aggregation feature, l i Aggregate feature The corresponding pseudo labels.
[0141] In some implementations of the embodiments of the present application, the overall loss function of the present architecture can be defined as:
[0142] L=L ce +αL cons +βL conc ;
[0143] Among them, α and β are adjustable parameters. By reasonably adjusting these two parameters, the training of the anomaly score prediction module from coarse to fine in this application can achieve the optimal effect.
[0144] The embodiment of the present application obtains the vehicle abnormality label by inputting the aggregated features into the coarse classifier for preliminary prediction; selects the aggregated features of several instances with the highest vehicle abnormality score values to form a high abnormality set; selects the aggregated features of several instances with the lowest vehicle abnormality score values to form a low abnormality set; and processes the data in the high abnormality set and the low abnormality set respectively to obtain the vehicle abnormality label. In order to alleviate the long-tail distribution problem of abnormal videos in driving scenes, the present application designs a coarse-to-fine abnormality score prediction module, groups video features according to the abnormality score of the video clip, and designs a constrained cross entropy loss function and a contrast loss function for training to achieve more refined abnormality score prediction.
[0145] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the vehicle abnormality detection method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0146] This application also provides a vehicle abnormality detection device, please refer to Figure 6 , the vehicle abnormality detection device comprises:
[0147] The video acquisition module 10 is used to acquire the driving video of the autonomous driving vehicle;
[0148] A feature acquisition module 20, used for inputting the driving video into a feature preprocessing network to obtain video action features;
[0149] A feature processing module 30, configured to optimize the video action feature through an adaptive temporal context modeling module to obtain a global action feature;
[0150] The anomaly prediction module 40 is used to input the global action features into the coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label; the anomaly score value is used to represent the abnormal probability of the vehicle.
[0151] The vehicle anomaly detection device provided by the present application adopts the vehicle anomaly detection method in the above embodiment, which can solve the technical problem that the existing vehicle driving video detection methods are mostly based on weakly supervised learning and have certain limitations. Compared with the prior art, the beneficial effects of the vehicle anomaly detection device provided by the present application are the same as the beneficial effects of the vehicle anomaly detection method provided by the above embodiment, and the other technical features in the vehicle anomaly detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0152] The present application provides a vehicle abnormality detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the vehicle abnormality detection method in the above-mentioned embodiment one.
[0153] Reference below Figure 7 , which shows a schematic diagram of the structure of a vehicle abnormality detection device suitable for implementing the embodiment of the present application. The vehicle abnormality detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The vehicle abnormality detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0154] like Figure 7As shown, the vehicle abnormality detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the vehicle abnormality detection device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the vehicle abnormality detection device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a vehicle abnormality detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0155] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0156] The vehicle anomaly detection device provided by the present application adopts the vehicle anomaly detection method in the above embodiment, which can solve the technical problem that the existing vehicle driving video detection methods are mostly based on weakly supervised learning and have certain limitations. Compared with the prior art, the beneficial effects of the vehicle anomaly detection device provided by the present application are the same as the beneficial effects of the vehicle anomaly detection method provided by the above embodiment, and the other technical features in the vehicle anomaly detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0157] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0158] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0159] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the vehicle abnormality detection method in the above-mentioned embodiment.
[0160] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0161] The computer-readable storage medium may be included in the vehicle abnormality detection device; or may exist independently without being assembled into the vehicle abnormality detection device.
[0162] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the vehicle abnormality detection device, the vehicle abnormality detection device:
[0163] Obtain driving video from the self-driving car;
[0164] Inputting the driving video into a feature preprocessing network to obtain video action features;
[0165] The video action feature is optimized by an adaptive temporal context modeling module to obtain a global action feature;
[0166] The global action feature is input into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
[0167] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0168] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0169] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0170] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned vehicle anomaly detection method, and can solve the technical problem that the existing vehicle driving video detection methods are mostly based on weakly supervised learning and have certain limitations. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the vehicle anomaly detection method provided by the above-mentioned embodiment, and will not be repeated here.
[0171] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned vehicle abnormality detection method when executed by a processor.
[0172] The computer program product provided by this application can solve the technical problem that the existing vehicle driving video detection methods are mostly based on weakly supervised learning and have certain limitations. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the vehicle anomaly detection method provided by the above embodiment, which will not be repeated here.
[0173] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A vehicle abnormality detection method, characterized in that: The method comprises: Obtain driving video from the self-driving car; Inputting the driving video into a feature preprocessing network to obtain video action features; The video action feature is optimized by an adaptive temporal context modeling module to obtain a global action feature; The global action feature is input into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
2. The vehicle abnormality detection method according to claim 1, characterized in that: The step of optimizing the video action feature by an adaptive temporal context modeling module to obtain a global action feature comprises: Performing a linear transformation on the video action feature through an adaptive temporal context modeling module to obtain a linear feature vector; Determining an attention score based on the linear feature vector; Normalizing the attention scores to obtain global attention weights; A global action feature is determined based on the global attention weight and the linear feature vector.
3. The vehicle abnormality detection method according to claim 2, characterized in that: The linear feature vectors include a first linear feature vector, a second linear feature vector and a third linear feature vector; The step of determining an attention score based on the linear feature vector comprises: determining an attention score based on the first linear feature vector and the second linear feature vector; The step of determining a global action feature based on the global attention weight and the linear feature vector comprises: A global action feature is determined based on the global attention weight and the third linear feature vector.
4. The vehicle abnormality detection method according to claim 3, characterized in that: After the step of determining the global action feature based on the global attention weight and the third linear feature vector, the method further includes: Get the preset time mask; Determining a local attention score based on the preset time mask and the attention score; Determine a local attention feature according to the local attention score and the third linear feature vector; Fusing the local attention feature and the global action feature based on a learnable parameter to obtain a fused feature; Performing residual processing based on the fusion feature and the video motion feature to obtain an aggregated feature; Accordingly, the step of inputting the global action feature into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label includes: The aggregated features are input into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label.
5. The vehicle abnormality detection method according to claim 4, characterized in that: The step of inputting the aggregated features into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label comprises: Inputting the aggregated features into a coarse classifier for preliminary prediction to obtain an abnormal vehicle label; Selecting aggregate features of several instances with top vehicle anomaly score values to form a high anomaly set; Selecting aggregate features of several instances with lower anomaly score values of the vehicle to form a low anomaly set; The data in the high anomaly set and the low anomaly set are processed respectively to obtain vehicle anomaly labels.
6. The vehicle abnormality detection method according to claim 1, characterized in that: The step of obtaining the driving video of the autonomous driving vehicle includes: Obtain the initial driving video of the autonomous vehicle; Adding a binary label to the initial driving video to obtain a labeled driving video; The labeled driving video is standardized in the time dimension to obtain a driving video with a fixed dimension.
7. A vehicle abnormality detection device, characterized in that: The vehicle abnormality detection device comprises: A video acquisition module is used to acquire driving videos of the autonomous driving vehicle. A feature acquisition module, used for inputting the driving video into a feature preprocessing network to obtain video action features; A feature processing module, used for optimizing the video action feature through an adaptive time context modeling module to obtain a global action feature; The anomaly prediction module is used to input the global action features into a coarse-to-fine anomaly score prediction module to obtain a vehicle anomaly label; the anomaly score value is used to represent the abnormal probability of the vehicle.
8. A vehicle abnormality detection device, characterized in that: The device comprises: a memory, a processor, and a vehicle abnormality detection program stored in the memory and executable on the processor, wherein the vehicle abnormality detection program is configured to implement the steps of the vehicle abnormality detection method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores a vehicle abnormality detection program, and when the vehicle abnormality detection program is executed by the processor, the steps of the vehicle abnormality detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the vehicle abnormality detection method according to any one of claims 1 to 6 are implemented.