Damage detection method, device, electronic device, and medium based on material type

By distinguishing material types in the damage detection model and using different loss weights for loss calculations, the problem of reduced damage detection accuracy in a multi-material environment is solved, and the accuracy of detection and damage determination results is improved.

CN114972229BActive Publication Date: 2024-10-29PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210536714.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2024-10-29
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

With the development of automobile manufacturing, more and more materials are used on the car body, which leads to an increase in the damage categories that need to be covered by the damage detection model, and the detection accuracy decreases. It is easy to misidentify similar materials as similar materials, affecting the accuracy of the damage determination results.

Method used

By introducing the distinction between confusion type and conventional type material types in the damage detection model, and using different loss weights for loss calculation, the identification contribution of easily confused materials is reduced and the detection accuracy is improved. The specific method includes obtaining the damage image, identifying it through a pre-trained damage detection model, determining the material type, performing loss calculation based on the target loss weight and the detection material to determine the target damage material, and finally determining the damage determination result.

Benefits of technology

It effectively improves the recognition accuracy of the damage detection model in a multi-material environment, reduces the impact of easily confused materials on recognition, and ensures the accuracy of the damage determination results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972229B_ABST
    Figure CN114972229B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of artificial intelligence, and provides a damage assessment detection method, device, electronic device, and medium based on material type. The method includes: performing damage assessment identification on a damage image through a damage assessment detection model to obtain detection damage information including the detection damage type and the detection damage material; when the detection damage material belongs to a confusing type, determining the target loss weight as the first loss weight, otherwise the target loss weight is the first loss weight, wherein the detection damage material belonging to the confusing type has at least one preset associated material, and the first loss weight is greater than the second loss weight; determining the target damage assessment result according to the target loss weight and the loss calculation result of the detection damage material. According to the technical solution of this embodiment, a larger loss weight can be used for the detection damage material of the confusing type, so that the damage assessment detection model can perform damage assessment identification based on more non-confused features, effectively improving the recognition accuracy of the loss model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a damage assessment detection method, device, electronic equipment, and medium based on material type. Background Art

[0002] At present, automobile damage assessment has gradually changed from traditional manual to intelligent damage assessment. After taking photos of the damaged parts, the damage degree and repair method of the car are identified through the trained damage assessment detection model, and the damage assessment result is automatically obtained, which greatly improves the efficiency of damage assessment. However, with the development of automobile manufacturing level, there are more and more materials on the car body, which makes the damage assessment detection model cover more and more damage categories. Damage assessment detection models usually use target detection technology. The detection accuracy will decrease with the increase of damage categories. It is easy to misidentify similar materials, affecting the accuracy of subsequent damage assessment. Summary of the invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] The embodiments of the present invention provide a material type-based damage assessment detection method, device, electronic device, and medium, which can improve the material detection accuracy of the damage assessment detection model and ensure the accuracy of the damage assessment results.

[0005] In a first aspect, an embodiment of the present invention provides a damage assessment detection method based on material type, comprising:

[0006] Acquire a damage image, and input the damage image into a pre-trained damage assessment detection model;

[0007] Perform damage assessment and identification on the damage image by using the damage assessment detection model to obtain detection damage information, wherein the detection damage information includes the detection damage type and the detection damage material;

[0008] Determine the material type of the detected damaged material, the material type includes a confusion type and a regular type, the detected damaged material belonging to the confusion type has at least one preset associated material, and the detected damaged material belonging to the regular type does not have the preset associated material;

[0009] Determine a target loss weight, wherein when the detected damaged material belongs to the confusion type, the target loss weight is a first loss weight, or when the detected damaged material belongs to the regular type, the target loss weight is a second loss weight, and the first loss weight is greater than the second loss weight;

[0010] Performing loss calculation according to the target loss weight and the detected damaged material, and determining the target damaged material according to the result of the loss calculation;

[0011] The damage assessment result is determined based on the detected damage type and the target damaged material.

[0012] In some embodiments, before acquiring the damage image, the method further includes:

[0013] Acquire a plurality of training samples, each of the training samples being pre-labeled with labeled damage information, wherein the labeled damage information includes a labeled damage type and a labeled damage material;

[0014] The damage assessment detection model is trained based on the multiple training samples.

[0015] In some embodiments, the training of the damage assessment detection model according to the plurality of training samples comprises:

[0016] Obtaining predicted damage information corresponding to each of the training samples through the damage assessment detection model, wherein the predicted damage information includes predicted damage type and predicted damage material;

[0017] Determine a confused sample from the training samples, and determine the remaining training samples as regular samples, wherein the annotated damage type of the confused sample is the same as the predicted damage type, and the predicted damage material of the confused sample is a preset associated material of the annotated damage material;

[0018] The loss of the confused sample is calculated according to the first loss weight, and the loss of the regular sample is calculated according to the second loss weight to complete the training of the damage assessment detection model.

[0019] In some embodiments, determining the confusion sample from the training sample comprises:

[0020] Acquire candidate samples from the training samples;

[0021] When the annotated damage type of the candidate sample is the same as the predicted damage type, obtaining a preset associated material table, wherein the associated material table records the preset associated material corresponding to each annotated damage material;

[0022] The target associated material corresponding to the candidate sample is determined according to the associated material table, and when the target associated material is the same as the predicted damaged material of the candidate sample, the candidate sample is determined to be the confused sample.

[0023] In some embodiments, the damage prediction model includes a ResNet50 network, and before obtaining the predicted damage information corresponding to each of the training samples through the damage assessment detection model, the method further includes:

[0024] Selecting multiple test samples from the multiple training samples, and inputting the multiple test samples into the ResNet50 network;

[0025] Obtain a feature map output by the ResNet50 network for each of the test samples;

[0026] Determine brightness information of each feature of the feature map, and determine features whose brightness information is greater than a preset threshold as key features;

[0027] The network layer in the ResNet50 network used to extract the key features is determined as the key processing layer.

[0028] In some embodiments, obtaining predicted damage information corresponding to each of the training samples through the damage assessment detection model includes:

[0029] Inputting a plurality of the training samples into the ResNet50 network;

[0030] Acquire a plurality of key feature sequences obtained by the key processing layer performing feature extraction processing on each of the training samples;

[0031] Performing feature replacement processing on the multiple key feature sequences to obtain multiple target feature sequences;

[0032] The target feature sequence corresponding to each of the training samples is input into the classifier of the ResNet50 network to obtain the predicted damage information corresponding to each of the training samples.

[0033] In some embodiments, performing feature replacement processing on the plurality of key feature sequences comprises:

[0034] Determining at least one feature to be replaced in each of the key feature sequences;

[0035] The to-be-replaced feature of one of the key feature sequences is replaced into another of the key feature sequences until the to-be-replaced features of all the key feature sequences are replaced.

[0036] In a second aspect, an embodiment of the present invention provides a damage assessment detection device based on material type, including:

[0037] An image acquisition unit, used to acquire a damage image and input the damage image into a pre-trained damage assessment detection model;

[0038] an identification unit, configured to perform damage identification on the damage image by using the damage identification detection model to obtain detection damage information, wherein the detection damage information includes a detection damage type and a detection damage material;

[0039] A material determination unit, used to determine a material type of the detected damaged material, wherein the material type includes a confusion type and a regular type, wherein the detected damaged material belonging to the confusion type has at least one preset associated material, and the detected damaged material belonging to the regular type does not have the preset associated material;

[0040] a loss weight determination unit, configured to determine a target loss weight, wherein when the detected damaged material belongs to the confusion type, the target loss weight is a first loss weight, or when the detected damaged material belongs to the regular type, the target loss weight is a second loss weight, and the first loss weight is greater than the second loss weight;

[0041] A loss calculation unit, used to perform loss calculation according to the target loss weight and the detected damaged material, and determine the target damaged material according to the result of the loss calculation;

[0042] A damage assessment unit is used to determine a damage assessment result based on the detected damage type and the target damaged material.

[0043] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the material type-based damage assessment detection method as described in the first aspect is implemented.

[0044] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is used to execute the damage assessment detection method based on material type as described in the first aspect.

[0045] An embodiment of the present invention includes: acquiring a damage image, and inputting the damage image into a pre-trained damage assessment detection model; performing damage assessment identification on the damage image through the damage assessment detection model to obtain detected damage information, wherein the detected damage information includes a detected damage type and a detected damage material; determining a material type of the detected damage material, wherein the material type includes a confusion type and a regular type, wherein the detected damage material belonging to the confusion type has at least one preset associated material, and the detected damage material belonging to the regular type does not have the preset associated material; determining a target loss weight, wherein when the detected damage material belongs to the confusion type, the target loss weight is a first loss weight, or, when the detected damage material belongs to the regular type, the target loss weight is a second loss weight, and the first loss weight is greater than the second loss weight; performing loss calculation according to the target loss weight and the detected damage material, and determining the target damage material according to the result of the loss calculation; and determining a damage assessment result according to the detected damage type and the target damage material. According to the technical solution of this embodiment, a larger loss weight can be used for the detection damage information of the confused type, thereby reducing the contribution of easily confused materials to the recognition of the damage assessment detection model, so that the damage assessment detection model can perform damage assessment and identification based on more non-confusing features, and effectively improve the recognition accuracy of the loss model when there are many materials.

[0046] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0048] Figure 1 is a flow chart of a damage assessment and detection method based on material type provided by an embodiment of the present invention;

[0049] Figure 2 is a flowchart of obtaining training samples for a damage assessment detection model provided by another embodiment of the present invention;

[0050] Figure 3 is a flowchart of a damage assessment detection model training provided by another embodiment of the present invention;

[0051] Figure 4 is a flowchart of determining a confused sample provided by another embodiment of the present invention;

[0052] Figure 5 is a flow chart of determining a key processing layer provided by another embodiment of the present invention;

[0053] Figure 6 is a schematic diagram of a ResNet50 network provided by another embodiment of the present invention;

[0054] Figure 7 is a flow chart of determining predicted damage information provided by another embodiment of the present invention;

[0055] Figure 8 is a flow chart of feature replacement provided by another embodiment of the present invention;

[0056] Fig. 9 is a schematic diagram of feature replacement provided by another embodiment of the present invention;

[0057] Fig.10 is a structural diagram of a damage assessment and detection device based on material type provided by another embodiment of the present invention;

[0058] Fig.11 This is a device diagram of an electronic device provided by another embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0060] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0061] The present invention provides a damage assessment detection method, device, electronic device, and medium based on material type, the method comprising: performing damage assessment identification on the damage image through the damage assessment detection model to obtain detection damage information, the detection damage information comprising detection damage type and detection damage material; determining the material type of the detection damage material, the material type comprising confusion type and regular type, the detection damage material belonging to the confusion type having at least one preset associated material, and the detection damage material belonging to the regular type not having the preset associated material; determining a target loss weight, wherein when the detection damage material belongs to the confusion type, the target loss weight is a first loss weight, or, when the detection damage material belongs to the regular type, the target loss weight is a second loss weight, and the first loss weight is greater than the second loss weight; performing loss calculation according to the target loss weight and the detection damage material, and determining the target damage material according to the result of the loss calculation; determining a damage assessment result according to the detection damage type and the target damage material. According to the technical solution of this embodiment, a larger loss weight can be used for the detection damage material of the confusing type, thereby reducing the contribution of the easily confused material to the recognition of the damage assessment detection model, so that the damage assessment detection model can perform damage assessment and recognition based on more non-confusing features, and effectively improve the recognition accuracy of the loss model when there are many materials.

[0062] The embodiments of the present application can compile, acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application device that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0063] The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction devices, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0064] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0065] Computer vision technology (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to the use of cameras and computers to replace human eyes to identify, track and measure targets, and further perform image processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and mapping, automatic driving, smart transportation and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0066] The target detection algorithm is an algorithm for detecting targets from images, for example, it can be implemented through two-stage target detection algorithms such as the region detection algorithm based on convolutional neural network features (R-CNN) and the fast region detection algorithm based on convolutional neural network features (Faster R-CNN), or it can be implemented through a one-stage target detection algorithm such as the You Only Look Once (YOLO) algorithm and the Single Shot MultiBox Detector (SSD) algorithm.

[0067] It should be noted that the model of the embodiment of the present invention can be stored in a server. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0068] like Figure 1As shown, Figure 1 The flowchart of a damage detection method based on material type provided by an embodiment of the present invention includes but is not limited to the following steps:

[0069] Step S110, obtaining a damage image, and inputting the damage image into a pre-trained damage assessment detection model;

[0070] Step S120, performing damage assessment and identification on the damage image through the damage assessment detection model to obtain detection damage information, where the detection damage information includes the detection damage type and the detection damage material;

[0071] Step S130, determining the material type of the detected damaged material, the material type includes a confusing type and a regular type, the detected damaged material belonging to the confusing type has at least one preset associated material, and the detected damaged material belonging to the regular type has no preset associated material;

[0072] Step S140, determining a target loss weight, wherein when the detected damaged material belongs to the confusion type, the target loss weight is a first loss weight, or when the detected damaged material belongs to the regular type, the target loss weight is a second loss weight, and the first loss weight is greater than the second loss weight;

[0073] Step S150, performing loss calculation according to the target loss weight and the detected damaged material, and determining the target damaged material according to the result of the loss calculation;

[0074] Step S160, determining the damage assessment result according to the detected damage type and the target damaged material.

[0075] It should be noted that the damage image can be taken by the user through the smart terminal of the vehicle and uploaded to the server, and the damage assessment result can be output through the damage assessment detection model deployed on the server. Of course, the damage image can also be obtained by system import and input into the damage assessment detection model. This embodiment does not impose too many restrictions on the method of obtaining the damage image.

[0076] It should be noted that in order to achieve damage assessment identification, the damage assessment detection model can use the target detection algorithm to detect the damaged part. After determining the damaged area, the damage type and the damaged material are determined through image recognition. Among them, the recognition accuracy of the damage type is usually high and will not have much impact on the damage assessment result. The damaged material is likely to cause misidentification. Therefore, it is necessary to adjust the loss weight according to the material type. For example, when the material of the damaged part is rubber or frosted, the two have a high similarity at the image recognition level and are easily confused. Therefore, the above two materials can be pre-set as preset associated materials, and the first loss weight with a larger value is used for loss calculation during the identification process to reduce the contribution of the material to material identification, so that the damage assessment detection model can combine more features to determine the target damage material, and ensure the accuracy of the damage assessment detection model in more and more material usage scenarios. The preset associated material can be set during the configuration of the damage assessment detection model. The number of preset associated materials for each material can be arbitrary, and no restrictions are made here.

[0077] It should be noted that the conventional type is a type that does not have a preset associated material, that is, it will not cause confusion with other materials. Therefore, a default loss weight can be pre-set as the weight of the conventional type, that is, the second loss weight, to ensure that the damage assessment detection model can complete the identification normally. When it is determined that the detected material type is a confusing type, the additionally set first loss weight can be obtained, or the first loss weight can be calculated based on the confusion coefficient and the second loss weight according to the pre-set confusion coefficient. The specific method can be determined according to actual needs.

[0078] In addition, refer to Figure 2 In one embodiment, when executing Figure 1 Before step S110 in the illustrated embodiment, the following steps are also included but not limited to:

[0079] Step S210, obtaining a plurality of training samples, each training sample is pre-labeled with labeled damage information, the labeled damage information including labeled damage type and labeled damage material;

[0080] Step S220: training the damage assessment detection model according to the plurality of training samples.

[0081] It should be noted that the labeled damage information of the training sample can be labeled by a labeling box or by text information. The specific labeling method can be selected according to actual needs, and this embodiment does not make any restrictions here. It is worth noting that the number of labeled damage information of each training sample can be arbitrary. For example, if an image of a training sample contains multiple damages, the damage information can be labeled for each damage separately, and its damage type and the material of the damaged part can be labeled. For example, the labeled damage type can be a common automobile damage type such as dents, abrasions, and scratches, and the labeled damage material can be a sheet metal, rubber parts, frosted parts and other materials commonly used in automobiles. It should be noted that the labeled damage information can also be text information labeled in a fixed format, and the labeled damage type and the labeled damage material can be obtained by simple text segmentation. For example, if the labeled damage information is "sheet metal scratches", the labeled damage material can be segmented as sheet metal and the labeled damage type can be scratches. The specific labeling method can be selected according to actual needs, and this embodiment does not make any restrictions here.

[0082] In addition, refer to Figure 3 , in one embodiment, Figure 2 Step S220 of the illustrated embodiment further includes but is not limited to the following steps:

[0083] Step S310, obtaining predicted damage information corresponding to each training sample through a damage assessment detection model, where the predicted damage information includes predicted damage type and predicted damage material;

[0084] Step S320, determining a confused sample from the training samples, and determining the remaining training samples as regular samples, wherein the annotated damage type of the confused sample is the same as the predicted damage type, and the predicted damage material of the confused sample is a preset associated material of the annotated damage material;

[0085] Step S330, performing loss calculation on the confused samples according to the first loss weight, and performing loss calculation on the regular samples according to the second loss weight, so as to complete the training of the damage assessment detection model.

[0086] It should be noted that in the training process of the damage assessment detection model, it is necessary to first extract features from the training samples, make predictions based on the extracted features, obtain predicted damage information, and then calculate the loss based on the predicted damage information, and then classify it through a classifier to obtain the prediction result. Therefore, the predicted damage information is not the final training result of the damage assessment detection model, but the intermediate information extracted from its network structure. The specific network layer for extracting the predicted damage information can be determined according to the network structure of the damage assessment detection model. For example, when the damage assessment detection model adopts the ResNet50 network, the information output by the intermediate recognition layer of the network carries a more significant feature sequence. The feature sequence can be extracted from the intermediate recognition layer as the predicted damage information, so that the features with dominant characteristics can be used for loss calculation through a larger loss weight, weakening the contribution of the features with dominant characteristics in the training process, thereby reducing the degree of confusion and improving the accuracy of the damage assessment detection model. Those skilled in the art are familiar with how to obtain output information from a certain layer of the network, and will not elaborate on it here.

[0087] It should be noted that the prediction of the damage type can be determined by image recognition technology. For example, if the image recognition technology is used to determine that there are changes in the plane in the image, then the damage type can be determined to be a depression; the damaged material can be determined by image recognition technology. For example, if the image recognition technology is used to determine that the surface of the damaged part is granular, then it can be determined to be a frosted part, etc. The specific damage prediction method is not an improvement of the present embodiment and will not be elaborated here.

[0088] It should be noted that due to the high accuracy of damage type recognition, when the labeled damage type and the predicted damage type are different, it can be determined that the training sample is an incorrectly recognized sample, and subsequent training with negative samples does not cause confusion. Therefore, this embodiment does not discuss the situation of incorrect damage type recognition.

[0089] It is worth noting that in order to improve the recognition accuracy of the damage assessment detection model for damaged materials, after obtaining the damage prediction information, it is possible to first determine whether each training sample is a confused sample. On the premise that the labeled damage type and the predicted damage type are the same, if the labeled damage material and the predicted damage material are different, it may be that the training of the damage assessment detection model has not converged and the prediction is wrong, or the model training has converged, but the two materials are easily confused. In order to exclude the first situation, this embodiment sets a preset associated material for each material. When the labeled damage material and the predicted damage material are preset associated materials, it can be determined that the training sample is a confused sample. If subsequent training is performed with the training sample, it is likely to cause the damage assessment detection model to misidentify the material during use. Therefore, in order to improve the recognition accuracy of the damage assessment detection model, after determining the confused sample, a first loss weight with a larger value is used for the confused sample to weaken the characteristics of the confused sample and reduce the contribution of the confused sample to the model training, so that the damage assessment detection model can learn more features from conventional samples, thereby improving the recognition accuracy of the damage assessment detection model.

[0090] In addition, refer to Figure 4 , in one embodiment, Figure 3 Step S320 of the illustrated embodiment also includes but is not limited to the following steps:

[0091] Step S410, obtaining candidate samples from training samples;

[0092] Step S420: when the annotated damage type of the candidate sample is the same as the predicted damage type, a preset associated material table is obtained, where the associated material table records the preset associated materials corresponding to each annotated damage material;

[0093] Step S430, determining the target associated material corresponding to the candidate sample according to the associated material table, and when the target associated material is the same as the predicted damaged material of the candidate sample, determining that the candidate sample is a confused sample.

[0094] It should be noted that, as the types of materials used in automobiles are increasing, this embodiment determines the preset associated materials by importing the associated material table, which can effectively improve the accuracy of the damage assessment detection model in identifying automobile materials. Of course, after obtaining the associated material table and the training samples, the target associated material corresponding to each training sample can be added to the annotated damage information to improve the efficiency of determining confusing samples.

[0095] It should be noted that, since there are many training samples, the obfuscated samples can be determined by traversing the training samples. For example, each training sample is determined as a candidate sample in turn, and the obfuscated samples are determined for the candidate samples, which can ensure the comprehensiveness of the determination of the obfuscated samples.

[0096] It should be noted that after determining the candidate samples, a table lookup operation can be performed from the associated material table according to the marked damaged material of the candidate samples to determine the target associated material. There can be multiple target associated materials, and this embodiment does not limit the specific number.

[0097] In addition, in one embodiment, the damage prediction model includes a ResNet50 network, referring to Figure 5 , in execution Figure 3 Before step S310 in the illustrated embodiment, the following steps are also included but not limited to:

[0098] Step S510, selecting multiple test samples from multiple training samples, and inputting the multiple test samples into the ResNet50 network;

[0099] Step S520, obtaining a feature map output by the ResNet50 network for each test sample;

[0100] Step S530, determining the brightness information of each feature of the feature map, and determining the features whose brightness information is greater than a preset threshold as key features;

[0101] Step S540, determining the network layer used to extract key features in the ResNet50 network as the key processing layer.

[0102] It should be noted that the ResNet50 network is a commonly used classification network. Its network structure can be referred to Figure 6 As shown, of course, Figure 6 This is only an example of the network structure and does not limit the specific network structure. Those skilled in the art are motivated to adjust the network structure according to actual conditions, so no further details will be given here.

[0103] It is worth noting that in order to determine the predicted damage information, it is necessary to first determine the key processing layer in the ResNet50 network, and use the output of the key processing layer as the predicted damage information, so that the predicted damage information can carry more key features, making the predicted damage material of the training sample more accurate, thereby improving the confidence of the confused sample.

[0104] It should be noted that the key processing layer of the ResNet50 network is usually fixed, so it can be determined by test samples during the first training and directly used in the subsequent use process. This embodiment does not limit this. It should be noted that in order to determine the key processing layer, several test samples can be obtained from the training samples. Of course, in order to improve the accuracy of the feature map, all training samples can also be used as test samples, which can be selected according to actual needs.

[0105] It is worth noting that after feature extraction of the test sample, the area with more features is usually the key area. Due to the large number of features, it will be highlighted in the visual feature map, that is, the brightness information is high. Based on this, the key features can be screened by setting a preset threshold to determine the neurons with dominant characteristics. For example, for Figure 6 The network structure shown in the figure, according to the key features, determines that the extracted network layer is the identification block 3x, then the identification block 3x can be determined as the key processing layer, and its output is obtained as the predicted damage information. When the key features are known, those skilled in the art are familiar with how to determine the network layer to extract the key features, and this embodiment will not be elaborated here.

[0106] In addition, refer to Figure 7 , in one embodiment, Figure 3 Step S310 of the illustrated embodiment also includes but is not limited to the following steps:

[0107] Step S710, inputting multiple training samples into the ResNet50 network;

[0108] Step S720, obtaining a plurality of key feature sequences obtained by performing feature extraction processing on each training sample by the key processing layer;

[0109] Step S730, performing feature replacement processing on multiple key feature sequences to obtain multiple target feature sequences;

[0110] Step S740, input the target feature sequence corresponding to each training sample into the classifier of the ResNet50 network to obtain the predicted damage information corresponding to each training sample.

[0111] It should be noted that in order to enable the damage assessment detection model to identify damage based on more features, it is necessary to weaken the contribution of key features to damage identification to a certain extent. In addition to using larger loss weights for confused samples, key features that play a key role can also be replaced to suppress neurons with dominant characteristics, so that the determined confused samples have higher confidence.

[0112] It should be noted that after determining the key processing layer, the key feature sequence output by the key processing layer for each training sample can be obtained. Each key feature sequence includes the key features of the corresponding training sample. Since the key features are for specific training samples, that is, the key features of key feature sequence 1 do not form a key contribution in key feature sequence 2, the contribution of the key features to the prediction results can be weakened by replacing features between multiple key feature sequences. In this case, if the training sample is still determined to be a confused sample, it can be determined that the material of the confused sample is an easily confused material, so that the loss calculation is performed according to a larger loss weight, thereby improving the recognition accuracy of the damage assessment detection model.

[0113] It should be noted that there are usually multiple features in a key feature sequence, and feature replacement can be performed in any form, as long as the replaced features come from other key feature sequences, for example Fig. 9 As shown, in the case of three key feature sequences, the features of key feature sequence 1 can be replaced according to the features of key feature sequence 2, or can be replaced by the features of key feature sequence 3, or several features can be obtained from key feature sequence 2 and key feature sequence 3 at the same time for replacement. The specific replacement method can be selected according to actual needs, and this embodiment does not impose any restrictions on this.

[0114] It should be noted that the classifier of the ResNet50 network can be Figure 6 The fully connected layer in the network structure shown, after obtaining the prediction result obtained by loss calculation, is classified according to the features to determine the prediction result. This process is a step well known to those skilled in the art and will not be repeated here for the sake of simplicity.

[0115] In addition, refer to Figure 8 , in one embodiment, Figure 7 Step S830 of the illustrated embodiment also includes but is not limited to the following steps:

[0116] Step S810, determining at least one feature to be replaced in each key feature sequence;

[0117] Step S820: Replace the to-be-replaced features of one key feature sequence with another key feature sequence until the to-be-replaced features of all key feature sequences are replaced.

[0118] It should be noted that the feature replacement of this embodiment can be carried out in a random replacement manner, that is, N features to be replaced are selected from a key feature sequence, and a total of N features to be replaced are obtained from other key feature sequences for replacement. In order to better illustrate the technical solution of this embodiment, the following is combined with Fig. 9 To come up with a specific example:

[0119] This example includes 3 training samples. Figure 6 Taking the ResNet50 network shown in the figure as an example, after inputting three training samples into the ResNet50 network, the recognition block 3x is used as the key processing layer to obtain the three key feature sequences output by the recognition block as follows: Fig. 9 As shown, each key feature sequence includes 5 features, and 2 features to be replaced are determined from each key feature sequence, namely features 1-2 and 1-4 in key feature sequence 1, features 2-2 and 2-4 in key feature sequence 2, and features 3-2 and 3-4 in key feature sequence 3; features 2-2 and 2-4 in key feature sequence 2 are replaced with key feature sequence 3 to obtain target feature sequence 3, features 3-2 and 3-4 in key feature sequence 3 are replaced with key feature sequence 1 to obtain target feature sequence 1, and features 1-2 and 1-4 in key feature sequence 1 are replaced with key feature sequence 2 to obtain target feature sequence 2.

[0120] It is worth noting that the features to be replaced in the key feature sequence can be replaced by any other key feature sequence, ensuring that the number of features in each key feature sequence remains consistent after the feature replacement process, and that each key feature sequence completes the feature replacement process to obtain the target feature sequence.

[0121] It should be noted that, since the key feature sequences and training samples are one-to-one corresponding, the number of key feature sequences is the same as the number of training samples. In order to improve training efficiency, the number of replacement sequences can be set in advance, and a number of target replacement feature sequences that need to be feature-processed are screened out from all training samples. The specific value of the number of replacement sequences can be adjusted according to actual needs. Of course, all key feature sequences can also be selected as target replacement feature sequences, and this embodiment does not impose any restrictions on this.

[0122] In addition, refer to Fig.10 The embodiment of the present invention provides a material type-based damage detection device, and the material type-based damage detection device 1000 includes:

[0123] An image acquisition unit 1010 is used to acquire a damage image and input the damage image into a pre-trained damage assessment detection model;

[0124] The identification unit 1020 is used to perform damage identification on the damage image through the damage identification detection model to obtain detection damage information, where the detection damage information includes the detection damage type and the detection damage material;

[0125] A material determination unit 1030 is used to determine a material type of the detected damaged material, where the material type includes a confusing type and a regular type. The detected damaged material belonging to the confusing type has at least one preset associated material, and the detected damaged material belonging to the regular type has no preset associated material.

[0126] The loss weight determination unit 1040 is used to determine a target loss weight, wherein when the detected damaged material belongs to the obfuscated type, the target loss weight is a first loss weight, or when the detected damaged material belongs to the conventional type, the target loss weight is a second loss weight, and the first loss weight is greater than the second loss weight;

[0127] The loss calculation unit 1050 is used to perform loss calculation according to the target loss weight and the detected damaged material, and determine the target damaged material according to the result of the loss calculation;

[0128] The damage assessment unit 1060 is used to determine the damage assessment result according to the detected damage type and the target damaged material.

[0129] In addition, refer to Fig.11 An embodiment of the present invention further provides an electronic device, the electronic device 1100 comprising: a memory 1110, a processor 1120, and a computer program stored in the memory 1110 and executable on the processor 1120.

[0130] The processor 1120 and the memory 1110 may be connected via a bus or other means.

[0131] The non-transient software program and instructions required to implement the material type-based damage detection method of the above embodiment are stored in the memory 1110. When executed by the processor 1120, the material type-based damage detection method of the above embodiment is executed, for example, the above-described Figure 1 Steps S110 to S160 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S430 of the method, Figure 5 Steps S510 to S540 of the method, Figure 7 Steps S710 to S740 of the method, Figure 8 Method steps S810 to S820.

[0132] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor or a controller, for example, by a processor in the above electronic device embodiment, so that the above processor can execute the material type-based damage detection method in the above embodiment, for example, execute the above described Figure 1 Steps S110 to S160 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Steps S310 to S330 of the method, Figure 4 Steps S410 to S430 of the method, Figure 5 Steps S510 to S540 of the method, Figure 7 Steps S710 to S740 of the method, Figure 8 Method steps S810 to S820 in the method. It will be appreciated by those skilled in the art that all or some of the steps and devices in the method disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory storage medium) and a communication storage medium (or a temporary storage medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable storage media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other storage medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication storage media generally contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery storage media.

[0134] The present embodiment can be used in many general or special computer device environments or configurations. For example: personal computers, server computers, handheld electronic devices or portable electronic devices, tablet electronic devices, multiprocessor devices, microprocessor-based devices, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above devices or electronic devices, etc. The present application can be described in the general context of a computer program executed by a computer, such as a program module. Generally, a program module includes routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing electronic devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage electronic devices.

[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the devices, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more programs for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases.

[0137] It should be noted that, although several modules or units of the electronic device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0138] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing electronic device (which can be a personal computer, a server, a touch terminal, or a network electronic device, etc.) to execute the method according to the implementation method of the present application.

[0139] The electronic device of this embodiment may include: a radio frequency (RF) circuit, a memory, an input unit, a display unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a processor, and a power supply. The RF circuit can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is processed by the processor; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc. The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, a phone book, etc.).

[0140] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0141] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0142] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A damage assessment detection method based on material type, characterized in that: include: Acquire a damage image, and input the damage image into a pre-trained damage assessment detection model; Perform damage assessment and identification on the damage image by using the damage assessment detection model to obtain detection damage information, wherein the detection damage information includes the detection damage type and the detection damage material; Determine the material type of the detected damaged material, the material type includes a confusion type and a regular type, the detected damaged material belonging to the confusion type has at least one preset associated material, the detected damaged material belonging to the regular type does not have the preset associated material, and different preset associated materials have high similarity at the image recognition level; Determine a target loss weight, wherein when the detected damaged material belongs to the confusion type, the target loss weight is a first loss weight, and when the detected damaged material belongs to the conventional type, the target loss weight is a second loss weight, the first loss weight is greater than the second loss weight, the value of the second loss weight is preset, the value of the first loss weight is preset, or is calculated according to a preset confusion coefficient and the second loss weight; Performing loss calculation according to the target loss weight and the detected damaged material, and determining the target damaged material according to the result of the loss calculation; The damage assessment result is determined based on the detected damage type and the target damaged material.

2. A damage assessment detection method based on material type according to claim 1, characterized in that: Before acquiring the damage image, the method further includes: Acquire a plurality of training samples, each of the training samples being pre-labeled with labeled damage information, wherein the labeled damage information includes a labeled damage type and a labeled damage material; The damage assessment detection model is trained based on the plurality of training samples.

3. The method according to claim 2, characterized in that The step of training the damage assessment detection model according to the plurality of training samples comprises: Obtaining predicted damage information corresponding to each of the training samples through the damage assessment detection model, wherein the predicted damage information includes predicted damage type and predicted damage material; Determine a confused sample from the training samples, and determine the remaining training samples as regular samples, wherein the annotated damage type of the confused sample is the same as the predicted damage type, and the predicted damage material of the confused sample is the preset associated material of the annotated damage material; The loss of the confused sample is calculated according to the first loss weight, and the loss of the regular sample is calculated according to the second loss weight to complete the training of the damage assessment detection model.

4. A damage assessment detection method based on material type according to claim 3, characterized in that: The determining of the confusion sample from the training sample comprises: Acquire candidate samples from the training samples; When the annotated damage type of the candidate sample is the same as the predicted damage type, obtaining a preset associated material table, wherein the associated material table records the preset associated material corresponding to each annotated damage material; The target associated material corresponding to the candidate sample is determined according to the associated material table, and when the target associated material is the same as the predicted damaged material of the candidate sample, the candidate sample is determined to be the confused sample.

5. The damage assessment detection method based on material type according to claim 3 is characterized in that: The damage prediction model includes a ResNet50 network. Before obtaining the predicted damage information corresponding to each of the training samples through the damage assessment detection model, the method further includes: Selecting multiple test samples from the multiple training samples, and inputting the multiple test samples into the ResNet50 network; Obtain a feature map output by the ResNet50 network for each of the test samples; Determine brightness information of each feature of the feature map, and determine features whose brightness information is greater than a preset threshold as key features; The network layer in the ResNet50 network used to extract the key features is determined as the key processing layer.

6. A damage assessment detection method based on material type according to claim 5, characterized in that: The obtaining of predicted damage information corresponding to each of the training samples through the damage assessment detection model includes: Inputting a plurality of the training samples into the ResNet50 network; Acquire a plurality of key feature sequences obtained by the key processing layer performing feature extraction processing on each of the training samples; Performing feature replacement processing on the multiple key feature sequences to obtain multiple target feature sequences; The target feature sequence corresponding to each of the training samples is input into the classifier of the ResNet50 network to obtain the predicted damage information corresponding to each of the training samples.

7. A damage assessment detection method based on material type according to claim 6, characterized in that: The performing feature replacement processing on the plurality of key feature sequences comprises: Determining at least one feature to be replaced in each of the key feature sequences; The to-be-replaced feature of one of the key feature sequences is replaced into another of the key feature sequences until the to-be-replaced features of all the key feature sequences are replaced.

8. A damage detection device based on material type, characterized in that: include: An image acquisition unit, used to acquire a damage image and input the damage image into a pre-trained damage assessment detection model; an identification unit, configured to perform damage identification on the damage image by using the damage identification detection model to obtain detection damage information, wherein the detection damage information includes a detection damage type and a detection damage material; A material determination unit, used to determine the material type of the detected damaged material, wherein the material type includes a confusion type and a regular type, the detected damaged material belonging to the confusion type has at least one preset associated material, and the detected damaged material belonging to the regular type does not have the preset associated material, and different preset associated materials have high similarity at the image recognition level; A loss weight determination unit, used to determine a target loss weight, wherein when the detected damaged material belongs to the confusion type, the target loss weight is a first loss weight, and when the detected damaged material belongs to the conventional type, the target loss weight is a second loss weight, the first loss weight is greater than the second loss weight, the value of the second loss weight is preset, the value of the first loss weight is preset, or is calculated according to a preset confusion coefficient and the second loss weight; A loss calculation unit, used to perform loss calculation according to the target loss weight and the detected damaged material, and determine the target damaged material according to the result of the loss calculation; A damage assessment unit is used to determine a damage assessment result based on the detected damage type and the target damaged material.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the material type-based damage assessment detection method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: The computer program is used to execute the material type-based damage assessment detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for training damage identification model

    CN110570316A

  • Damage detection model training method and device, vehicle damage detection method and device, equipment and medium

    CN111667011A