Real-time target detection method and device, computer equipment and storage medium

By replacing the classification head with the regression head in the target detection model and updating the loss function, the problem of insufficient detection accuracy of vehicle damage and maintenance solutions in the prior art is solved, and high accuracy detection of the degree of vehicle maintenance is achieved, which is suitable for financial technology Real-time application in the field.

CN119313884APending Publication Date: 2025-01-14PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411531255.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing universal real-time object detection framework, such as yolov7, is difficult to effectively detect the severity and repair level of vehicle damage or maintenance programs, limiting the accuracy performance of the model in the field of fintech.

Method used

By replacing the classification head of the object detection model with the regression header and regression loss function with the regression loss function, the regression header and regression loss function are used to extract and train the vehicle picture samples to identify the category information on the maintenance degree information. Calculate the loss value to update the detection model and improve the detection accuracy of the model's vehicle maintenance level.

Benefits of technology

It improves the accuracy of the model in vehicle maintenance level detection, can more accurately classify the severity of vehicle damage and maintenance solutions, meets the needs of the financial technology field, and retains the characteristics of real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313884A_ABST
    Figure CN119313884A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent decision and financial science and technology, and discloses a real-time target detection method and device, computer equipment and a storage medium, and the method comprises the steps: setting the maintenance degree information of a vehicle, and obtaining a target detection model of the vehicle; replacing the classification head with a preset regression head, replacing the classification loss function with a preset regression loss function, and performing model updating on the target detection model by using the regression head and the regression loss function; dividing the vehicle picture samples into a training set and a test set, and performing feature extraction on the vehicle picture samples in the training set; category information of the features in maintenance degree information is extracted through regression head recognition, the loss value of the category information is calculated, and model training is conducted on the updated detection model; and calculating the confidence of the training detection model on the test set, and determining a target detection result of the training detection model through the confidence. According to the invention, the attention degree of the maintenance degree level implied by the vehicle maintenance scheme can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of intelligent decision-making and financial technology, and in particular to a real-time target detection method, device, computer equipment and storage medium. Background Art

[0002] At present, the general real-time target detection framework is developing rapidly. The most commonly used one is the v7 version of the yolo series, which has even been updated to yolov11. However, this general real-time target detection framework usually defines simplified application scenario tasks, such as target detection of people, cars, animals, etc. in natural scenes. In specific task scenarios, these general models may have some defects or cannot fully meet the needs of the task. For example, in the field of financial technology, AI technology can be used to transform the traditional auto insurance loss assessment link, so as to realize vehicle intelligent claims. In the self-service loss assessment business scenario of the vehicle, the damage to the vehicle (taking sheet metal as an example, the damage can be classified into abrasions, scratches, dents, cracks and missing) or repair plans (taking sheet metal as an example, the repair plan can be divided into painting, small repair, medium repair, large repair and replacement) detection. If yolov7 is used for direct damage or repair plan detection, the implicit assumption is that the relationship between the categories of damage or repair plans is equal, which ignores the severity of the damage or the repair level of the repair plan implied by the damage or repair plan itself, which will inevitably limit the performance of the model in terms of accuracy.

[0003] In the prior art, there is a lack of an effective method to pay attention to the damage severity implied by the damage or the repair plan itself or the repair level of the repair plan. Summary of the invention

[0004] The present invention provides a real-time target detection method, device, computer equipment and storage medium, the main purpose of which is to enhance the attention to the maintenance level level implied by the vehicle maintenance plan itself.

[0005] To achieve the above object, the present invention provides a real-time target detection method, comprising:

[0006] Collecting damage information of the vehicle, setting maintenance degree information of the vehicle based on the damage information, and obtaining a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head, and a classification loss function;

[0007] The classification head is replaced with a preset regression head, and the classification loss function is replaced with a preset regression loss function, and the target detection model is updated by using the regression head and the regression loss function to obtain an updated detection model;

[0008] Collecting vehicle picture samples of the regression head and the regression loss function, dividing the vehicle picture samples into a training set and a test set, and performing feature extraction on the vehicle picture samples in the training set using the feature extraction layer to obtain extracted features;

[0009] Using the regression head to identify the category information of the extracted features on the maintenance degree information, using the regression loss function to calculate the loss value of the category information, and performing model training on the updated detection model according to the loss value to obtain a training detection model;

[0010] The confidence of the training detection model on the test set is calculated, and a target detection result of the training detection model is determined according to the confidence, wherein the target detection result refers to a maintenance degree detection result of the training detection model on the vehicle.

[0011] In order to solve the above problems, the present invention further provides a real-time target detection device, the device comprising:

[0012] A model acquisition module, used to collect damage information of the vehicle, set maintenance degree information of the vehicle based on the damage information, and obtain a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head and a classification loss function;

[0013] A model updating module, used to replace the classification head with a preset regression head, and replace the classification loss function with a preset regression loss function, and use the regression head and the regression loss function to update the target detection model to obtain an updated detection model;

[0014] A feature extraction module, used to collect vehicle picture samples of the regression head and the regression loss function, and divide the vehicle picture samples into a training set and a test set, and use the feature extraction layer to perform feature extraction on the vehicle picture samples in the training set to obtain extracted features;

[0015] A model training module, used to use the regression head to identify the category information of the extracted features on the maintenance degree information, use the regression loss function to calculate the loss value of the category information, and perform model training on the updated detection model according to the loss value to obtain a training detection model;

[0016] The target detection module is used to calculate the confidence of the training detection model on the test set, and determine the target detection result of the training detection model according to the confidence, wherein the target detection result refers to the maintenance degree detection result of the training detection model on the vehicle.

[0017] In order to solve the above problem, the present invention further provides a computer device, the computer device comprising:

[0018] at least one processor; and,

[0019] a memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to implement the real-time target detection method described above.

[0021] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in a computer device to implement the above-mentioned real-time target detection method.

[0022] It can be seen that the embodiment of the present invention sets the maintenance degree information of the vehicle based on the damage information, so as to classify the maintenance degree of the damage of different sizes that occurs to the vehicle. In this way, it can be determined which damage information corresponds to which degree of vehicle maintenance, so as to facilitate the subsequent classification of the maintenance degree of the vehicle using the target detection model. Furthermore, the embodiment of the present invention uses the feature extraction layer to extract features from the vehicle image samples in the training set, so as to train the target detection model using the vehicle image samples, thereby improving the output accuracy of the subsequent regression head and regression loss function. The embodiment of the present invention uses the regression head to identify The category information of the extracted features on the maintenance degree information is used to predict the target category by replacing the classification head with the regression head and adopting the regression method, which can better meet the needs of users, reduce the problem of excessive differences between categories affecting the effect caused by the original classification method, and improve the accuracy of the model in scenes with deep or hierarchical relationships between categories. At the same time, the real-time detection characteristics of yolov7 are retained. Further, the embodiment of the present invention calculates the loss value of the category information by using the regression loss function, so as to replace the classification with regression to predict the category on the basis of the existing advanced target detection framework YOLOv7, and rewrite the target loss calculation. Therefore, a real-time target detection method, device, computer equipment and computer-readable storage medium proposed in the embodiment of the present invention can increase the attention to the maintenance degree level implied by the vehicle maintenance plan itself. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of an application environment of a real-time target detection method provided by an embodiment of the present invention;

[0024] Figure 2A schematic diagram of a flow chart of a real-time target detection method provided by an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of a module of a real-time target detection device provided by an embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0027] Figure 5 is another structural schematic diagram of a computer device in one embodiment of the present invention;

[0028] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] The embodiment of the present invention provides a real-time target detection method, which can be applied in Figure 1 In an application environment, wherein the client communicates with the server through a network, the server can collect damage information of the vehicle through the client, set the maintenance degree information of the vehicle based on the damage information, and obtain a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head and a classification loss function; the classification head is replaced with a preset regression head, and the classification loss function is replaced with a preset regression loss function, and the target detection model is updated by using the regression head and the regression loss function to obtain an updated detection model; vehicle image samples of the regression head and the regression loss function are collected, and the vehicle image samples are replaced with the classification head and the regression loss function. The vehicle image samples are divided into a training set and a test set, and the feature extraction layer is used to extract features from the vehicle image samples in the training set to obtain extracted features; the regression head is used to identify the category information of the extracted features on the maintenance degree information, and the regression loss function is used to calculate the loss value of the category information. According to the loss value, the updated detection model is trained to obtain a training detection model; the confidence of the training detection model on the test set is calculated, and the target detection result of the training detection model is determined by the confidence, wherein the target detection result refers to the maintenance degree detection result of the training detection model on the vehicle.

[0031] Reference Figure 2FIG. 1 is a flow chart of a real-time target detection method provided by an embodiment of the present invention. In the embodiment of the present invention, the real-time target detection method comprises the following steps S1-S5:

[0032] S1. Collect damage information of the vehicle, set maintenance degree information of the vehicle based on the damage information, and obtain a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head and a classification loss function.

[0033] In the embodiment of the present invention, the vehicle refers to a vehicle recorded in a vehicle management system in a historical period. It should be noted that the number of the vehicle is more than one, and it refers to as many vehicle samples as possible recorded in the vehicle management system in a historical period. The damage information refers to information on the appearance damage that has occurred to the vehicle, such as text description information, voice description information, and picture information of the damage to the vehicle.

[0034] Furthermore, the embodiment of the present invention sets the maintenance degree information of the vehicle based on the damage information, so as to classify the maintenance degree of the damage of different magnitudes occurring to the vehicle. In this way, it can be determined which damage information corresponds to which degree of vehicle maintenance, thereby facilitating the subsequent classification of the maintenance degree of the vehicle using a target detection model.

[0035] Among them, the maintenance degree information refers to the maintenance degree corresponding to the damage information of different degrees. It should be noted that the maintenance degree information refers to the maintenance level with a numerical value. For example, according to the maintenance degree information of the maintenance plan, each category is sorted from light to heavy, and the category sequence of the maintenance plan is obtained as follows: painting, minor repair, medium repair, major repair and replacement, a total of five categories and five levels, and the category codes are: 0, 1, 2, 3, 4, which correspond to the category sequence in sequence. For example, the code for painting is 0, and 0, 1, 2, 3, 4 are the maintenance degree information.

[0036] In one embodiment of the present invention, the maintenance degree information of the vehicle is set based on the damage information, including: grading the damage information to obtain a damage level; acquiring vehicle maintenance information corresponding to the damage information; identifying target maintenance information corresponding to the damage level from the vehicle maintenance information; classifying the target maintenance information to obtain a classified maintenance degree; arranging the classified maintenance degrees in order from light to heavy based on the order of the damage levels from light to heavy to obtain a maintenance degree sequence; encoding the classified maintenance degrees according to the maintenance degree sequence to obtain a coded maintenance degree; and using the coded maintenance degree as maintenance degree information.

[0037] The damage level is used to characterize the different severity of vehicle loss. For example, the damage to the vehicle, taking sheet metal as an example, can be classified into abrasions, scratches, dents, cracks and missing parts. Abrasions, scratches, dents, cracks and missing parts are used as damage levels. The vehicle maintenance information refers to the maintenance records of the vehicle recorded in a historical period, such as a maintenance plan for a certain vehicle. The target maintenance information refers to maintenance information corresponding to the damage level. For example, the vehicle maintenance information corresponding to the damage level of abrasion is painting, and the vehicle maintenance information corresponding to the damage level of scratch is a minor repair plan. The classified maintenance degree refers to the maintenance plan for a certain damage level. The process of classifying the corresponding vehicle maintenance information into one category. For example, the vehicle maintenance information corresponding to the damage level of scratch includes painting the front of the vehicle, painting the side of the vehicle, painting the rear of the vehicle, how large an area of ​​the vehicle is painted, what color the vehicle is painted, etc. Since the information on painting the front of the vehicle, painting the side of the vehicle, painting the rear of the vehicle, how large an area of ​​the vehicle is painted, what color the vehicle is painted, etc. all belong to the category of painting, therefore, the information on painting the front of the vehicle, painting the side of the vehicle, painting the rear of the vehicle, how large an area of ​​the vehicle is painted, what color the vehicle is painted, etc. is classified into the category of painting, and painting is used as the classification of the maintenance degree.

[0038] Optionally, the process of grading the damage information to obtain the damage level may be performed by grading the severity of the damage information, and the damage information may be divided into damage levels such as abrasions, scratches, dents, cracks and missing.

[0039] Exemplarily, the classified repair degrees are arranged in order from light to heavy based on the order of the damage levels from light to heavy to obtain a repair degree sequence. For example, the order of damage levels from light to heavy is abrasions, scratches, dents, cracks and missing, and each damage level has a corresponding classified repair degree. Therefore, according to the order of abrasions, scratches, dents, cracks and missing, different classified repair degrees can be arranged into a repair degree sequence such as painting, small repair, medium repair, large repair and replacement.

[0040] Exemplarily, the process of performing maintenance degree coding on the classified maintenance degree according to the maintenance degree sequence to obtain the coded maintenance degree is as follows: according to the maintenance degree information of the maintenance plan, each category is sorted from light to heavy, and the category sequence of the maintenance plan is obtained as follows: painting, minor repair, medium repair, major repair and replacement, a total of five categories and five levels. The category codes are: 0, 1, 2, 3, 4, which correspond to the category sequence in sequence, such as the code of painting is 0.

[0041] Furthermore, in an embodiment of the present invention, the target detection model refers to a YOLOV7 model. Furthermore, the feature extraction layer refers to the remaining part of the target detection model except the classification head and the classification loss function. The classification head refers to the classification head in the target detection model. The classification loss function refers to the classification loss Lcls in the target detection model.

[0042] S2. Replace the classification head with a preset regression head, and replace the classification loss function with a preset regression loss function, and use the regression head and the regression loss function to update the target detection model to obtain an updated detection model.

[0043] In the embodiment of the present invention, the regression head refers to a regression head.

[0044] Optionally, the process of replacing the classification head with a preset regression head refers to replacing the classification head with a regression head on a common target detection model based on level or depth information between detection categories.

[0045] Furthermore, in the embodiment of the present invention, the regression loss function refers to the regression loss Lreg obtained based on regression calculation.

[0046] Optionally, the process of replacing the classification loss function with a preset regression loss function refers to replacing an original classification-related loss function with a regression-related loss function.

[0047] S3. Collect vehicle picture samples of the regression head and the regression loss function, and divide the vehicle picture samples into a training set and a test set, and use the feature extraction layer to perform feature extraction on the vehicle picture samples in the training set to obtain extracted features.

[0048] In the embodiment of the present invention, the vehicle image samples refer to a large amount of image data showing vehicle damage.

[0049] Furthermore, an embodiment of the present invention divides the vehicle image samples into a training set and a test set, so as to use the training set to perform parameter training and optimization on the target detection model, and uses the test set to test the accuracy of the output results of the trained target detection model under unfamiliar training data that has never appeared before.

[0050] Furthermore, the embodiment of the present invention uses the feature extraction layer to perform feature extraction on the vehicle image samples in the training set to obtain extracted features, which are used to train the target detection model using the vehicle image samples, thereby improving the output accuracy of subsequent regression heads and regression loss functions.

[0051] Among them, the feature extraction layer mainly includes a backbone network and a neck network.

[0052] In one embodiment of the present invention, the feature extraction layer is used to perform feature extraction on vehicle image samples in the training set to obtain extracted features, including: obtaining a backbone network and a neck network in the feature extraction layer; using the backbone network to extract initial features of the vehicle image samples in the training set; and using the neck network to perform feature fusion on the initial features to obtain extracted features.

[0053] Among them, the backbone network refers to the BackBone network, which is the main component of the model, usually a convolutional neural network (CNN) or a residual neural network (ResNet), etc. The BackBone network is responsible for extracting the features of the input image for subsequent processing and analysis. The BackBone network usually has many layers and many parameters, and can extract high-level feature representations of the image. Furthermore, the neck network refers to the Neck network, which is the intermediate layer connecting the BackBone network and the head. The main function of the Neck network is to reduce the dimension or adjust the features from the BackBone network to better adapt to the task requirements. The Neck network can use convolutional layers, pooling layers or fully connected layers, etc.

[0054] Optionally, the process of using the backbone network to extract initial features of the vehicle image samples in the training set refers to the process of extracting image features using convolution, E-ELAN module, MPConv module and SPPCSPC module in the BackBone network.

[0055] Optionally, the process of using the neck network to fuse the initial features to obtain extracted features refers to the process of using the neck network to fuse and reduce the dimension of the initial features.

[0056] S4. Using the regression head to identify the category information of the extracted features on the maintenance degree information, using the regression loss function to calculate the loss value of the category information, and performing model training on the updated detection model according to the loss value to obtain a trained detection model.

[0057] The embodiment of the present invention utilizes the regression head to identify the category information of the extracted features on the maintenance degree information, so as to replace the classification head with the regression head and adopt regression method to perform target category prediction, which can better meet the needs of users, reduce the problem of excessive differences between categories affecting the effect caused by the original classification method, and improve the accuracy of the model in scenarios with deep or hierarchical relationships between categories. At the same time, the real-time detection characteristics of yolov7 are retained.

[0058] Among them, the category information refers to the probability data output by the regression head under different categories of the maintenance level information. For example, when the maintenance level information is 0, 1, and 2, the category information refers to the probability A corresponding to 0, the probability B corresponding to 1, and the probability C corresponding to 2 output by the regression head.

[0059] In one embodiment of the present invention, the step of using the regression head to identify the category information of the extracted features on the maintenance degree information includes: obtaining the number of categories corresponding to the maintenance degree information; obtaining the activation function and the regression head hyperparameter in the regression head; and calculating the category information of the extracted features on the maintenance degree information using the following formula according to the number of categories, the activation function and the regression head hyperparameter:

[0060] y=sigmoid(x)nα+β

[0061] Among them, y represents category information, sigmoid represents activation function, n represents the number of categories, α and β represent regression head hyperparameters, the value of α is 1, and the value of β is 0.

[0062] The number of categories refers to the number of the maintenance level information. For example, when the maintenance level information is 0, 1, 2, 3, 4, and 5, the number of categories is 6.

[0063] Furthermore, the embodiment of the present invention calculates the loss value of the category information by using the regression loss function, so as to rewrite the target loss calculation after replacing classification with regression to predict the category based on the existing advanced target detection framework YOLOv7.

[0064] In one embodiment of the present invention, the use of the regression loss function to calculate the loss value of the category information includes: obtaining the true category corresponding to the category information on the training set; obtaining the grid target loss function and the regression box loss function in the updated detection model; using the grid target loss function to calculate the grid target loss between the category information and the true category; using the regression box loss function to calculate the regression box loss between the category information and the true category; using the regression loss function to calculate the regression loss between the category information and the true category; according to the grid target loss, the regression box loss and the regression loss, the loss value of the category information is calculated using the following formula:

[0065] Loss=α'Lobj+β'Lbox+γ'Lreg

[0066] Among them, Loss represents the loss value, α', β', and γ' represent the hyperparameters in the updated detection model, Lobj represents the grid target loss, Lbox represents the regression box loss, and Lreg represents the regression loss.

[0067] Furthermore, the embodiment of the present invention performs model training on the updated detection model according to the loss value to obtain a trained detection model for adjusting parameters in the target detection model whose structure has been replaced, thereby ensuring that the output result of the target detection model after the structure has been replaced is consistent with the actual output result.

[0068] In one embodiment of the present invention, the update detection model is trained according to the loss value to obtain a training detection model, including: judging whether the loss value is less than a preset loss threshold; when the loss value is not less than the loss threshold, calculating the adjustment distance of the hyperparameters in the update detection model according to the loss value using a preset gradient descent algorithm; adjusting the hyperparameters using the adjustment distance to obtain adjustment parameters, so as to complete the model training of the update detection model through the adjustment parameters to obtain a training detection model; when the loss value is less than the loss threshold, using the update detection model as a training detection model.

[0069] The loss threshold is set according to actual conditions, for example, it can be set to 0.1, and the adjustment distance refers to the adjustment size of the hyperparameter.

[0070] S5. Calculate the confidence of the training detection model on the test set, and determine the target detection result of the training detection model according to the confidence, wherein the target detection result refers to the maintenance degree detection result of the training detection model on the vehicle.

[0071] The embodiment of the present invention calculates the confidence of the training detection model on the test set, so as to use the confidence to evaluate the accuracy of the output results of the trained target detection model under unfamiliar training data that has never appeared.

[0072] The confidence level refers to the degree of certainty that the model has about its single prediction result, which is usually expressed as a probability value. For example, in a classification task, the confidence level indicates how likely the model believes its prediction is correct. The confidence level of a prediction may be very high.

[0073] Optionally, the process of calculating the confidence of the training detection model on the test set can be calculated by a confidence function.

[0074] In one embodiment of the present invention, determining the target detection result of the training detection model through the confidence level includes: judging whether the confidence level is less than a preset confidence threshold; when the confidence level is less than the confidence threshold, returning to the step of performing model training on the updated detection model to obtain the training detection model; when the confidence level is not less than the confidence threshold, obtaining the output result of the training detection model on the vehicle corresponding to the confidence level; rounding the output result to obtain a rounded result; obtaining maintenance degree information; querying the target degree information corresponding to the rounded result in the maintenance degree information; obtaining the classified maintenance degree corresponding to the maintenance degree information; querying the target degree category corresponding to the target degree information in the classified maintenance degree; and using the target degree category as the target detection result of the training detection model.

[0075] Among them, the confidence threshold is set according to the actual situation, and the rounding result refers to the result obtained by taking the integer of the output result. Because the regression head predicts a continuous real number with a decimal part, it is rounded to obtain an integer, that is, the category code, which is the predicted category of the model output.

[0076] It can be seen that the embodiment of the present invention sets the maintenance degree information of the vehicle based on the damage information, so as to classify the maintenance degree of the damage of different sizes that occurs to the vehicle. In this way, it can be determined which damage information corresponds to which degree of vehicle maintenance, so as to facilitate the subsequent classification of the maintenance degree of the vehicle using the target detection model. Furthermore, the embodiment of the present invention uses the feature extraction layer to extract features from the vehicle image samples in the training set, so as to train the target detection model using the vehicle image samples, thereby improving the output accuracy of the subsequent regression head and regression loss function. The embodiment of the present invention uses the regression head to identify The category information of the extracted features on the maintenance degree information is used to predict the target category by replacing the classification head with the regression head and adopting the regression method, which can better meet the needs of users, reduce the problem of excessive differences between categories affecting the effect caused by the original classification method, and improve the accuracy of the model in scenes with deep or hierarchical relationships between categories. At the same time, the real-time detection characteristics of yolov7 are retained. Further, the embodiment of the present invention calculates the loss value of the category information by using the regression loss function, so as to replace the classification with regression to predict the category on the basis of the existing advanced target detection framework YOLOv7, and rewrite the target loss calculation. Therefore, a real-time target detection method, device, computer equipment and computer-readable storage medium proposed in the embodiment of the present invention can increase the attention to the maintenance degree level implied by the vehicle maintenance plan itself.

[0077] It should be understood that the order of execution of the steps in the above embodiment does not necessarily 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 invention.

[0078] In one embodiment, a real-time target detection device is provided, and the real-time target detection device corresponds one-to-one with a real-time target detection method in the above embodiment. Figure 3 The figure shows a functional module diagram of a real-time target detection device of the present invention.

[0079] The real-time target detection device 100 of the present invention can be installed in a computer device. According to the functions to be implemented, the real-time target detection device can include a model acquisition module 101, a model update module 102, a feature extraction module 103, a model training module 104 and a target detection module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of a computer device and can complete fixed functions, which are stored in the memory of the computer device.

[0080] In this embodiment, the functions of each module / unit are as follows:

[0081] The model acquisition module 101 is used to collect damage information of the vehicle, set the maintenance degree information of the vehicle based on the damage information, and obtain the target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head and a classification loss function;

[0082] The model updating module 102 is used to replace the classification head with a preset regression head, and replace the classification loss function with a preset regression loss function, and use the regression head and the regression loss function to update the target detection model to obtain an updated detection model;

[0083] The feature extraction module 103 is used to collect the vehicle picture samples of the regression head and the regression loss function, and divide the vehicle picture samples into a training set and a test set, and use the feature extraction layer to extract features from the vehicle picture samples in the training set to obtain extracted features;

[0084] The model training module 104 is used to use the regression head to identify the category information of the extracted features on the maintenance degree information, use the regression loss function to calculate the loss value of the category information, and perform model training on the updated detection model according to the loss value to obtain a training detection model;

[0085] The target detection module 105 is used to calculate the confidence of the training detection model on the test set, and determine the target detection result of the training detection model according to the confidence, wherein the target detection result refers to the maintenance degree detection result of the training detection model on the vehicle.

[0086] In one embodiment of the present invention, when the model acquisition module 101 identifies the indicator data of the historical user from the historical browsing records, it is used to: collect damage information of the vehicle, set the maintenance degree information of the vehicle based on the damage information, and obtain the target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head and a classification loss function.

[0087] In one embodiment of the present invention, when the model update module 102 executes the model update of the target detection model using the regression head and the regression loss function to obtain an updated detection model, it is used to: replace the classification head with a preset regression head, and replace the classification loss function with a preset regression loss function, and update the target detection model using the regression head and the regression loss function to obtain an updated detection model.

[0088] In one embodiment of the present invention, when the feature extraction module 103 uses the feature extraction layer to perform feature extraction on the vehicle picture samples in the training set to obtain the extracted features, it is used to: collect the vehicle picture samples of the regression head and the regression loss function, and divide the vehicle picture samples into a training set and a test set, and use the feature extraction layer to perform feature extraction on the vehicle picture samples in the training set to obtain the extracted features.

[0089] In one embodiment of the present invention, when the model training module 104 performs model training on the updated detection model according to the loss value to obtain the trained detection model, it is used to: use the regression head to identify the category information of the extracted feature on the maintenance degree information, use the regression loss function to calculate the loss value of the category information, and according to the loss value, perform model training on the updated detection model to obtain the trained detection model.

[0090] In one embodiment of the present invention, when the target detection module 105 determines the target detection result of the training detection model through the confidence level, it is used to: calculate the confidence level of the training detection model on the test set, and determine the target detection result of the training detection model through the confidence level, wherein the target detection result refers to the maintenance degree detection result of the training detection model on the vehicle.

[0091] In detail, the modules in the real-time target detection device 100 in the embodiment of the present invention adopt the same technical means as the real-time target detection method described in the accompanying drawings when used, and can produce the same technical effects, which will not be repeated here.

[0092] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of a real-time target detection method are implemented.

[0093] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, the functions or steps on the client side of a real-time target detection method are implemented.

[0094] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0095] Collecting damage information of the vehicle, setting maintenance degree information of the vehicle based on the damage information, and obtaining a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head, and a classification loss function;

[0096] The classification head is replaced with a preset regression head, and the classification loss function is replaced with a preset regression loss function, and the target detection model is updated by using the regression head and the regression loss function to obtain an updated detection model;

[0097] Collecting vehicle picture samples of the regression head and the regression loss function, dividing the vehicle picture samples into a training set and a test set, and performing feature extraction on the vehicle picture samples in the training set using the feature extraction layer to obtain extracted features;

[0098] Using the regression head to identify the category information of the extracted features on the maintenance degree information, using the regression loss function to calculate the loss value of the category information, and performing model training on the updated detection model according to the loss value to obtain a training detection model;

[0099] The confidence of the training detection model on the test set is calculated, and a target detection result of the training detection model is determined according to the confidence, wherein the target detection result refers to a maintenance degree detection result of the training detection model on the vehicle.

[0100] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0101] Collecting damage information of the vehicle, setting maintenance degree information of the vehicle based on the damage information, and obtaining a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head, and a classification loss function;

[0102] The classification head is replaced with a preset regression head, and the classification loss function is replaced with a preset regression loss function, and the target detection model is updated by using the regression head and the regression loss function to obtain an updated detection model;

[0103] Collecting vehicle picture samples of the regression head and the regression loss function, dividing the vehicle picture samples into a training set and a test set, and performing feature extraction on the vehicle picture samples in the training set using the feature extraction layer to obtain extracted features;

[0104] Using the regression head to identify the category information of the extracted features on the maintenance degree information, using the regression loss function to calculate the loss value of the category information, and performing model training on the updated detection model according to the loss value to obtain a training detection model;

[0105] The confidence of the training detection model on the test set is calculated, and a target detection result of the training detection model is determined according to the confidence, wherein the target detection result refers to a maintenance degree detection result of the training detection model on the vehicle.

[0106] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0108] Those skilled in the art 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. In actual applications, the above-mentioned functions can be distributed and 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.

[0109] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should be included in the protection scope of the present invention. It should be noted that if software tools or components other than those of the company appear in the embodiments of this application, they are only used for illustration and do not represent actual use.

Claims

1. A real-time target detection method, characterized in that: The method comprises: Collecting damage information of the vehicle, setting maintenance degree information of the vehicle based on the damage information, and obtaining a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head, and a classification loss function; The classification head is replaced with a preset regression head, and the classification loss function is replaced with a preset regression loss function, and the target detection model is updated by using the regression head and the regression loss function to obtain an updated detection model; Collecting vehicle picture samples of the regression head and the regression loss function, dividing the vehicle picture samples into a training set and a test set, and performing feature extraction on the vehicle picture samples in the training set using the feature extraction layer to obtain extracted features; Using the regression head to identify the category information of the extracted features on the maintenance degree information, using the regression loss function to calculate the loss value of the category information, and performing model training on the updated detection model according to the loss value to obtain a training detection model; The confidence of the training detection model on the test set is calculated, and a target detection result of the training detection model is determined according to the confidence, wherein the target detection result refers to a maintenance degree detection result of the training detection model on the vehicle.

2. The real-time target detection method according to claim 1, characterized in that: The step of setting the maintenance degree information of the vehicle based on the damage information includes: Performing damage classification on the damage information to obtain a damage level; Obtaining vehicle maintenance information corresponding to the damage information; Identifying target maintenance information corresponding to the damage level from the vehicle maintenance information; Classifying the target maintenance information to obtain a classified maintenance degree; Based on the order of the damage levels from light to heavy, the classified maintenance degrees are arranged in order from light to heavy to obtain a maintenance degree sequence; According to the maintenance degree sequence, the classified maintenance degree is coded to obtain a coded maintenance degree; The coded maintenance degree is used as maintenance degree information.

3. The real-time target detection method according to claim 1, characterized in that: The step of using the feature extraction layer to extract features from the vehicle image samples in the training set to obtain extracted features includes: Obtaining a backbone network and a neck network in the feature extraction layer; Extracting initial features of vehicle image samples in the training set using the backbone network; The neck network is used to perform feature fusion on the initial features to obtain extracted features.

4. The real-time target detection method according to claim 1, characterized in that: The step of using the regression head to identify the category information of the extracted features on the maintenance degree information includes: Obtaining the number of categories corresponding to the maintenance degree information; Obtaining the activation function and regression head hyperparameters in the regression head; According to the number of categories, the activation function and the regression head hyperparameter, category information of the extracted features on the maintenance degree information is calculated.

5. The real-time target detection method according to claim 1, characterized in that: The calculating the loss value of the category information by using the regression loss function includes: Obtaining the true category corresponding to the category information in the training set; Get the grid target loss function and regression box loss function in the updated detection model; Calculating the grid target loss between the category information and the true category using the grid target loss function; Calculating the regression box loss between the category information and the true category using the regression box loss function; Calculating the regression loss between the category information and the true category using the regression loss function; The loss value of the category information is calculated according to the grid target loss, the regression box loss and the regression loss.

6. The real-time target detection method according to claim 1, characterized in that: The step of performing model training on the updated detection model according to the loss value to obtain a training detection model includes: Determining whether the loss value is less than a preset loss threshold; When the loss value is not less than the loss threshold, calculating the adjustment distance of the hyperparameters in the update detection model according to the loss value using a preset gradient descent algorithm; Using the adjustment distance to adjust the hyperparameter to obtain the adjustment parameter, so as to complete the model training of the updated detection model through the adjustment parameter to obtain the training detection model; When the loss value is less than the loss threshold, the updated detection model is used as a training detection model.

7. The real-time target detection method according to claim 1, characterized in that: Determining the target detection result of the training detection model by the confidence level includes: Determining whether the confidence level is less than a preset confidence level threshold; When the confidence level is less than the confidence level threshold, returning to the step of performing model training on the updated detection model to obtain a trained detection model; When the confidence level is not less than the confidence level threshold, obtaining an output result of the training detection model on the vehicle corresponding to the confidence level; Performing rounding processing on the output result to obtain a rounding result; Obtain maintenance level information; querying the target degree information corresponding to the rounding result in the maintenance degree information; Obtain the classified maintenance degree corresponding to the maintenance degree information; Querying the target level category corresponding to the target level information in the classified maintenance level; The target degree category is used as the target detection result of the training detection model.

8. A real-time target detection device, characterized in that: The device comprises: A model acquisition module, used to collect damage information of the vehicle, set maintenance degree information of the vehicle based on the damage information, and obtain a target detection model of the vehicle, wherein the target detection model includes a feature extraction layer, a classification head and a classification loss function; A model updating module, used to replace the classification head with a preset regression head, and replace the classification loss function with a preset regression loss function, and use the regression head and the regression loss function to update the target detection model to obtain an updated detection model; A feature extraction module, used to collect vehicle picture samples of the regression head and the regression loss function, and divide the vehicle picture samples into a training set and a test set, and use the feature extraction layer to perform feature extraction on the vehicle picture samples in the training set to obtain extracted features; A model training module, used to use the regression head to identify the category information of the extracted features on the maintenance degree information, use the regression loss function to calculate the loss value of the category information, and perform model training on the updated detection model according to the loss value to obtain a training detection model; The target detection module is used to calculate the confidence of the training detection model on the test set, and determine the target detection result of the training detection model according to the confidence, wherein the target detection result refers to the maintenance degree detection result of the training detection model on the vehicle.

9. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the real-time target detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the real-time target detection method according to any one of claims 1 to 7 is implemented.