WO2021135499A1 - Damage detection model training and vehicle damage detection methods, device, apparatus, and medium - Google Patents

Damage detection model training and vehicle damage detection methods, device, apparatus, and medium Download PDF

Info

Publication number
WO2021135499A1
WO2021135499A1 PCT/CN2020/120757 CN2020120757W WO2021135499A1 WO 2021135499 A1 WO2021135499 A1 WO 2021135499A1 CN 2020120757 W CN2020120757 W CN 2020120757W WO 2021135499 A1 WO2021135499 A1 WO 2021135499A1
Authority
WO
WIPO (PCT)
Prior art keywords
damage
mask
loss value
model
sample
Prior art date
Application number
PCT/CN2020/120757
Other languages
French (fr)
Chinese (zh)
Inventor
康甲
刘莉红
刘玉宇
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021135499A1 publication Critical patent/WO2021135499A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Definitions

  • This application relates to the field of artificial intelligence classification models, and in particular to a damage detection model training, a vehicle damage detection method, device, computer equipment, and storage medium.
  • insurance companies generally manually identify the images taken by the owner or business personnel of the vehicle damage after the traffic accident , That is, to manually identify and determine the damage type and damaged area of the damaged part of the vehicle in the image.
  • the artificially recognized damage type and damaged area may not match; for example: Because it is difficult to distinguish between dents and scratches through visual images, damage assessment personnel can easily determine the type of damage caused by the dent as the type of scratch damage.
  • the miscalculation caused by the above conditions will greatly reduce the accuracy of the damage assessment; While it may cause cost losses for the insurance company, it will also reduce the satisfaction of car owners or customers; in addition, the manual loss determination workload is huge and the loss determination efficiency is low. When a certain loss determination accuracy needs to be met, Will further increase the workload and reduce work efficiency.
  • This application provides a damage detection model training, a vehicle damage detection method, device, computer equipment, and storage medium, which can accurately and quickly identify the damage type and damage area in the image containing the damage location, and improve the alignment
  • the accuracy and reliability of the determination of the loss type and the area of the fixed loss reduce the cost and improve the training efficiency.
  • a damage detection model training method includes:
  • the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group;
  • the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
  • the damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated;
  • the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
  • the damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model;
  • the training result includes at least one sample damage type and at least one sample damage rectangular area;
  • the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
  • a vehicle damage detection method including:
  • the car damage image is input into the damage detection model trained as described in the above damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final The result includes the damage type and the damage area, and the final result characterizes the damage type and the damage area of all the damage positions in the car damage image.
  • a damage detection model training device includes:
  • the acquisition module is used to acquire a damage sample set;
  • the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group;
  • the damage label group includes at least one damage label type and the damage label
  • the mask marking map corresponding to the type and at least one rectangular frame area;
  • the input module is configured to input the damage sample image into a damage detection model containing the first parameter, and extract damage features in the damage sample image from the damage detection model and generate an intermediate convolution feature map;
  • the damage detection model It is a deep convolutional neural network model based on the YOLOV3 model framework;
  • a branching module configured to input the intermediate convolution feature map into a mask prediction branch model containing a second parameter
  • the output module is configured to output the training result according to the damage feature through the damage detection model, and at the same time obtain the mask result through the mask prediction branch model;
  • the training result includes at least one sample damage type and at least one sample damage rectangle Region;
  • the mask result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, the mask result includes at least one mask damage type and the corresponding mask damage type Mask tensor map;
  • the loss module is used to input all the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas of the damaged sample image into the first loss model to obtain the first loss Value, and input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into the second loss model at the same time to obtain the second loss model.
  • Loss value is used to input all the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas of the damaged sample image into the first loss model to obtain the first loss Value, and input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into the second loss model at the same time to obtain the second loss model.
  • a determining module configured to determine a total loss value according to the first loss value and the second loss value
  • the convergence module is configured to iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model when the total loss value does not reach the preset convergence condition, until the total loss value When the preset convergence condition is reached, the damage detection model after convergence is recorded as a damage detection model that has been trained.
  • a vehicle damage detection device including:
  • the receiving module is used to receive the car damage detection instruction and obtain the car damage image
  • the detection module is used to input the car damage image into the damage detection model trained by the above damage detection model training method, extract damage features from the damage detection model, and obtain the final output of the damage detection model according to the damage feature Result; the final result includes the damage type and the damage area, and the final result characterizes the damage type and the damage area of all the damage positions in the car damage image.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group;
  • the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
  • the damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated;
  • the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
  • the damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model;
  • the training result includes at least one sample damage type and at least one sample damage rectangular area;
  • the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor further implements the following steps when the processor executes the computer-readable instructions:
  • the car damage image is input to the damage detection model trained by the damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final result Including the damage type and the damage area, the final result represents the damage type and the damage area of all the damage positions in the car damage image.
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group;
  • the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
  • the damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated;
  • the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
  • the damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model;
  • the training result includes at least one sample damage type and at least one sample damage rectangular area;
  • the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors further execute the following steps:
  • the car damage image is input to the damage detection model trained by the damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final result Including the damage type and the damage area, the final result represents the damage type and the damage area of all the damage positions in the car damage image.
  • the damage detection model training method, device, computer equipment and storage medium provided in this application train the damage detection model based on the YOLOV3 model architecture by acquiring damage sample images containing damage label groups, and extract the damage features of the damage sample images The training result and the intermediate convolution feature map are obtained, and the damage mask feature is extracted from the intermediate convolution feature map through the mask prediction branch model to obtain the mask result. According to the damage label group, the training result and the mask As a result, the total loss value is determined, and the damage detection model is continuously iteratively trained by judging whether the total loss value reaches the preset convergence condition, and the damage detection model after convergence is recorded as the training damage detection model. Therefore, it provides A model training method is proposed.
  • the number of sample collections can be reduced and the recognition accuracy and reliability can be improved, and the damage type in the image containing the damage location can be accurately and quickly identified.
  • the damage area improve the accuracy and reliability of determining the type and area of the damage, reduce the cost, and improve the training efficiency.
  • the vehicle damage detection method, device, computer equipment, and storage medium provided in the present application acquire a vehicle damage image, input the vehicle damage image into the above-mentioned trained damage detection model, extract damage features through the damage detection model, and obtain all
  • the damage detection model outputs a final result including damage type and damage area according to the damage feature; the final result represents the damage type and damage area of all damage positions in the car damage image, thus improving recognition Speed, thereby improving identification efficiency, reducing costs, and improving customer satisfaction.
  • FIG. 1 is a schematic diagram of an application environment of a damage detection model training method or a car damage detection method in an embodiment of the present application;
  • FIG. 2 is a flowchart of a method for training a damage detection model in an embodiment of the present application
  • step S10 of the damage detection model training method in an embodiment of the present application is a flowchart of step S10 of the damage detection model training method in an embodiment of the present application
  • step S40 of the damage detection model training method in an embodiment of the present application is a flowchart of step S40 of the damage detection model training method in an embodiment of the present application
  • FIG. 5 is a flowchart of step S401 of the damage detection model training method in an embodiment of the present application.
  • Fig. 6 is a flowchart of a vehicle damage detection method in an embodiment of the present application.
  • Fig. 7 is a schematic block diagram of a damage detection model training device in an embodiment of the present application.
  • Fig. 8 is a schematic block diagram of a vehicle damage detection device in an embodiment of the present application.
  • Fig. 9 is a schematic diagram of a computer device in an embodiment of the present application.
  • the damage detection model training method provided by this application can be applied in the application environment as shown in Fig. 1, where the client (computer equipment) communicates with the server through the network.
  • the client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a method for training a recognition model is provided, and the technical solution mainly includes the following steps S10-S70:
  • the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type corresponding to the damage label type
  • the mask marks the map and at least one rectangular frame area.
  • the damage sample set includes a plurality of damage sample images
  • the damage sample set is a collection of all the damage sample images
  • the damage sample images may be historically collected and contain a vehicle in a traffic accident.
  • the damaged vehicle image or photo can also be a fused image according to requirements.
  • One damage sample image corresponds to one damage label group, and the damage label group includes the damage label type and the mask label.
  • the damage label types include scratches, scratches, dents, wrinkles, dead folds, tears, missing, etc.
  • the mask marked image shows through each damage label type
  • the corresponding mask value replaces each pixel value in the area range of the damage location, that is, according to the type of damage label corresponding to each damage location, the mask value corresponding to the damage label type is used to fill the area of the damage location.
  • the pixel value with the same mask value is translated to a channel image of the same size as the damage sample image to form 7 channel images containing the mask value corresponding to the damage label type.
  • the rectangular frame area is the coordinate area that can cover the damage location through a rectangular frame with the smallest area.
  • the method before the step S10, that is, before the damage sample set is obtained, the method includes:
  • S101 Obtain a sample image and a public data image; the sample image is a shot image containing a damage location, and the public data image is an image randomly selected from a KITTI data set.
  • the sample image is an image taken in history and contains the location of damage left by the vehicle after a traffic accident
  • the public data image is an image randomly extracted from the KITTI data set
  • the KITTI data The set is a collection of images related to the public smart vehicle.
  • the size of the public data image is converted to the same size as the sample image through the resize method.
  • the resize method can be set according to requirements, such as resize
  • the methods are nearest neighbor interpolation algorithm, bilinear interpolation algorithm, bicubic interpolation algorithm, interpolation algorithm based on pixel region relationship, Lanzos interpolation interpolation algorithm, and so on.
  • S102 Perform fusion processing on the sample image and the public data image by using a mixup method to obtain a fused sample image.
  • the mixup method is to perform weighting processing and fusion processing for each pixel value in the sample and image and the corresponding pixel value in the public data image through a preset ratio to generate the fusion
  • the pixel value of the sample image the fusion processing is to weight each pixel value in the sample and image with the corresponding pixel value in the public data image and then sum up to obtain the corresponding in the fused sample image The pixel value.
  • S103 Determine the fused sample image as a damaged sample image corresponding to the sample image, and store the damaged sample image in a blockchain.
  • the fused sample image is marked as the damaged sample image, and the damaged sample image is stored in the blockchain.
  • the damaged sample image can also be stored in a node of the blockchain.
  • Blockchain essentially a decentralized database
  • Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the decentralized and fully distributed DNS service provided by the blockchain can realize the query and resolution of domain names through the point-to-point data transmission service between various nodes in the network, which can be used to ensure that the operating system and firmware of an important infrastructure are not available.
  • This application uses the mixup method to perform fusion processing on the sample image and the public data image (randomly extracted from the KITTI data set) to obtain a fusion sample image, and determine the fusion sample image as the damaged sample corresponding to the sample image And storing the damaged sample image in the blockchain can improve the security of the damaged sample image, prevent it from being tampered with, prevent the damaged sample image from overfitting in the subsequent recognition process, and improve the recognition accuracy.
  • the damage detection model is a YOLOV3 model-based deep convolutional neural network model that recognizes the sample damage type and the sample damage rectangular area in the damage sample image, that is, the network structure of the damage detection model and the YOLOV3 model
  • the network structure is the same.
  • the damage features include seven types of damage including scratches, scratches, dents, folds, deadfolds, tears, and missing.
  • the first parameters of the damage detection model can be performed according to requirements. Setting, for example, the first parameter can obtain all the parameters of the YOLOV3 model through the transfer learning method, or all can be set to a preset value.
  • the mask prediction branch model is a preset convolutional neural network model
  • the second parameter of the mask prediction branch model can be set according to requirements, for example, the second parameter is random The parameter value.
  • the damage detection model predicts according to the extracted damage feature to obtain the training result.
  • the training result includes the sample damage type and the sample damage rectangular area, and the sample damage rectangular area is the same as the sample damage rectangular area.
  • the area coordinate range corresponding to the damage type through the mask prediction branch model, the extraction of damage mask features can be increased, and the identification of the mask damage type can be enhanced, and the damage mask feature is the mask value corresponding to the damage label type
  • the mask result includes the mask damage type and the mask tensor map.
  • the code tensor map is a feature vector map that identifies the damage location of the same damage type in the damage sample image, and also refers to the feature vector map corresponding to the masked damage type.
  • the sample damage types include 7 types of damage, including scratches, scratches, dents, folds, dead folds, tears, and missing.
  • the mask damage types include scratches, scratches, dents, folds, and dead folds. 7 types of injuries including, tearing and missing.
  • step S40 that is, obtaining the mask result through the mask prediction branch model includes:
  • the expansion module is to obtain the multi-channel feature map by extracting the damage mask feature from the 32 ⁇ 32 sized feature vector graph, and the multi-channel feature
  • the graph contains multiple 256 ⁇ 256 feature vector graphs (also tensor graphs in the full text).
  • the intermediate convolution feature map is input to the expansion module in the mask prediction branch model, and the intermediate convolution is performed by the expansion module.
  • the feature map is expanded to obtain a multi-channel feature map, including:
  • the expansion module includes a first convolutional layer, a first sampling layer, a second convolutional layer, a second sampling layer, a third convolutional layer, and a third sampling layer
  • the first convolutional layer includes A 256-channel 3 ⁇ 3 convolution kernel and a 128-channel 1 ⁇ 1 convolution kernel
  • the first convolution layer convolves the intermediate convolution feature map through a 256-channel 3 ⁇ 3 convolution kernel
  • a 128-channel 1 ⁇ 1 convolution kernel is used for convolution, so as to extract the damage mask feature.
  • the up-sampling process is to perform size expansion and filling processing on a feature vector image to a preset size.
  • the first sampling image is a 64 ⁇ 64 feature vector image, and the first sampling layer can be updated. Obtain the damage mask feature with a high probability, thereby preventing overfitting and improving generalization.
  • the second convolutional layer includes a 128-channel 3 ⁇ 3 convolution kernel and a 64-channel 1 ⁇ 1 convolution kernel.
  • the second convolution layer passes through a The 128-channel 3 ⁇ 3 convolution kernel performs convolution and then passes through a 64-channel 1 ⁇ 1 convolution kernel to perform convolution, so as to extract the damage mask feature.
  • the up-sampling process is to perform size expansion and filling processing on a feature vector image to a preset size
  • the second sampling image is a 128 ⁇ 128 feature vector image
  • the second sampling layer can be updated.
  • the third convolution layer includes a 64-channel 3 ⁇ 3 convolution kernel and a 32-channel 1 ⁇ 1 convolution kernel, and the third convolution layer passes through a The 64-channel 3 ⁇ 3 convolution kernel performs convolution and then passes through a 32-channel 1 ⁇ 1 convolution kernel to perform convolution, so as to further extract the damage mask feature.
  • S40106 Perform up-sampling processing on the third feature map through the third sampling layer in the expansion module to obtain a multi-channel feature map.
  • the multi-channel feature map is a 256 ⁇ 256 feature vector map
  • the third sampling layer can further obtain the damage mask feature, thereby preventing overfitting and improving generalization.
  • S402. Input the multi-channel feature map to a classification module in the mask prediction branch model, and perform classification and prediction processing on the multi-channel feature map through the classification module to obtain the corresponding intermediate convolution feature map.
  • Mask prediction result Input the multi-channel feature map to a classification module in the mask prediction branch model, and perform classification and prediction processing on the multi-channel feature map through the classification module to obtain the corresponding intermediate convolution feature map.
  • Mask prediction result Input the multi-channel feature map to a classification module in the mask prediction branch model, and perform classification and prediction processing on the multi-channel feature map through the classification module to obtain the corresponding intermediate convolution feature map.
  • the mask damage prediction type includes 7 damage types such as scratches, scratches, dents, wrinkles, dead-folds, tears, and missing.
  • the classification module in the branch model is predicted by the mask.
  • the multi-channel feature map is classified, that is, the feature vector map in the multi-channel feature map is classified to obtain the feature vector map corresponding to all mask prediction damage types, and the feature vector corresponding to the mask prediction damage type is obtained Figure, predicts the mask prediction tensor map corresponding to the mask prediction damage type, the mask prediction tensor diagram is a channel containing the predicted pixel value corresponding to each pixel and is related to the mask prediction damage type
  • the feature vector map of the mask, the mask prediction result includes the mask prediction damage type and the mask prediction tensor map.
  • S403 Determine the mask result corresponding to the damaged sample image according to the mask prediction result corresponding to the intermediate convolution feature map.
  • the mask prediction tensor map conforming to the probability value is retained, and all the mask prediction tensor maps after retention are determined as The mask tensor map corresponding to the damage sample image, so that the mask prediction damage type corresponding to the mask prediction tensor map is determined to be the damage sample according to the retained mask prediction tensor map
  • the mask damage type corresponding to the image, and all the mask tensor maps and the corresponding mask damage types are determined as the mask result of the damage sample image.
  • This application performs damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module in the mask prediction branch model to obtain a multi-channel feature map; and then predicts the classification in the branch model through the mask
  • the module classifies and predicts the multi-channel feature map to obtain the mask prediction result corresponding to the intermediate convolution feature map; determines the damage sample image according to the mask prediction result corresponding to the intermediate convolution feature map
  • a mask prediction branch model is provided to extract the damage mask feature and obtain the mask result, which provides a method to improve the accuracy of the subsequent training of the damage detection model, and reduces the damage detection.
  • the first loss model includes the first loss function, and all the damage label types, all the rectangular box areas, all the sample damage types, and all the sample damage rectangular areas are input into the The first loss function, the first loss value is calculated by the cross-entropy method; the second loss value model includes the second loss function, and all the damage label types and all the damage label types of the damage sample image are calculated.
  • the mask annotation map, all the mask damage types, and all the mask tensor maps are input to the second loss function, and the second loss value is calculated by a cross-entropy method.
  • S60 Determine a total loss value according to the first loss value and the second loss value.
  • the first loss value and the second loss value are input to a loss model containing a total loss function.
  • the total loss function in the loss model can be set according to requirements, and the loss model is for generating the A model of the total loss value, and the total loss value is calculated by the total loss function.
  • the step 60 that is, the determining the total loss value according to the first loss value and the second loss value, includes:
  • X1 is the first loss value
  • X2 is the second loss value
  • w 1 is the weight of the first loss value
  • w 2 is the weight of the second loss value.
  • the convergence condition may be a condition that the value of the total loss value is small and will not drop after 9000 calculations, that is, the value of the total loss value is small and will not decrease after 9000 calculations. When it will no longer fall, stop training, and record the damage detection model after convergence as the completed damage detection model; the convergence condition can also be the condition that the total loss value is less than the set threshold, that is, the damage detection model When the total loss value is less than the set threshold, the training is stopped, and the damage detection model after convergence is recorded as the training completed damage detection model.
  • the first parameter of the damage detection model and the second parameter of the mask prediction branch model are continuously updated and iterated, so that the accurate results can be continuously moved closer. Make the recognition accuracy higher and higher.
  • the method further includes:
  • the damage detection model when the total loss value reaches the preset convergence condition, it indicates that the total loss value has reached the optimal result. At this time, the damage detection model has converged, and the damage detection model after convergence will be The record is a trained damage detection model. In this way, according to the damage sample image in the damage sample set, the trained damage detection model is obtained through continuous training, which can improve the accuracy and reliability of recognition.
  • This application obtains a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type corresponding to the damage label type And at least one rectangular frame area; input the damage sample image into a damage detection model containing the first parameter, and extract the damage feature in the damage sample image through the damage detection model and generate an intermediate convolution feature Figure;
  • the damage detection model is a deep convolutional neural network model based on the YOLOV3 model framework; the intermediate convolution feature map is input to the mask prediction branch model containing the second parameter; the damage detection model is based on the damage
  • the feature output contains the training result of the sample damage type and the sample damage rectangular area, and at the same time, the mask result containing the sample damage type and the sample damage rectangular area is obtained through the mask prediction branch model; the mask result is based on the intermediate The damage mask feature extracted from the convolution feature map is obtained and output.
  • the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type; All the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas are input into the first loss model to obtain the first loss value, and at the same time, all the damage samples in the damaged sample image are input to the first loss model.
  • This application realizes that by acquiring damage sample images containing damage label groups, training a damage detection model based on the YOLOV3 model architecture, extracting the damage features of the damage sample image and obtaining the training result and the intermediate convolution feature map, through the The mask prediction branch model extracts the damage mask feature from the intermediate convolution feature map to obtain the mask result, and determines the total loss value according to the damage label group, the training result and the mask result, and determines the total loss value Whether the preset convergence condition is reached, the damage detection model is continuously iteratively trained, and the damage detection model after convergence is recorded as the training damage detection model. Therefore, a model training method is provided to predict the branch model by adding a mask Training can reduce the number of sample collections and improve the accuracy and reliability of recognition. It can accurately and quickly identify the damage type and damage area in the image containing the damage location, and improve the damage assessment type and damage area. The accuracy and reliability of the determination reduces the cost and improves the training efficiency.
  • the vehicle damage detection method provided in this application can be applied in the application environment as shown in Fig. 1, in which the client (computer equipment) communicates with the server through the network.
  • the client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices.
  • the server can be implemented as an independent server or a server cluster composed of multiple servers.
  • a vehicle damage detection method is provided, and the technical solution mainly includes the following steps S100-S200:
  • the vehicle will leave traces of damage.
  • the staff of the insurance company will take photos related to the traffic accident. These photos include photos of the vehicle damage.
  • the staff upload the photos of the vehicle damage to the server.
  • To trigger the vehicle damage detection instruction to obtain the vehicle damage image contained in the vehicle damage detection instruction, where the vehicle damage image is a photograph of the vehicle damage taken.
  • the damage detection model is based on the damage feature in the car damage image.
  • the final result is output, and the final result characterizes the damage type and damage area of all damage positions in the car damage image.
  • the mask prediction branch model does not need to be used, which speeds up the recognition speed. Improved recognition efficiency.
  • This application acquires a car damage image, inputs the car damage image into the above-mentioned trained damage detection model, extracts damage features from the damage detection model, and obtains the damage type output by the damage detection model according to the damage feature And the final result of the damage area; the final result characterizes the damage type and damage area of all the damage locations in the car damage image, so that the recognition speed is improved, thereby improving the recognition efficiency, reducing the cost, and improving the customer Satisfaction.
  • a damage detection model training device is provided, and the damage detection model training device corresponds to the damage detection model training method in the above-mentioned embodiment in a one-to-one correspondence.
  • the damage detection model training device includes an acquisition module 11, an input module 12, a branch module 13, an output module 14, a loss module 15, a determination module 16 and a convergence module 17.
  • the detailed description of each functional module is as follows:
  • the acquisition module 11 is configured to acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type that is related to the damage The mask label corresponding to the label type and at least one rectangular frame area;
  • the input module 12 is configured to input the damage sample image into a damage detection model containing the first parameter, and extract damage features in the damage sample image through the damage detection model and generate an intermediate convolution feature map;
  • the damage detection The model is a deep convolutional neural network model based on the YOLOV3 model framework;
  • the branch module 13 is configured to input the intermediate convolution feature map into a mask prediction branch model containing the second parameter;
  • the output module 14 is configured to output the training result according to the damage feature through the damage detection model, and at the same time obtain the mask result through the mask prediction branch model;
  • the training result includes at least one sample damage type and at least one sample damage Rectangular area;
  • the mask result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, the mask result includes at least one mask damage type and corresponding to the mask damage type The mask tensor map;
  • the loss module 15 is configured to input all the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas of the damaged sample image into a first loss model to obtain a first loss model. Loss value, and input all the damage label types, all the mask annotation maps, all the mask damage types and all the mask tensor maps of the damage sample image into the second loss model at the same time, to obtain the first loss model Two loss value;
  • the determining module 16 is configured to determine a total loss value according to the first loss value and the second loss value;
  • the convergence module 17 is configured to iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model when the total loss value does not reach the preset convergence condition, until the total loss When the value reaches the preset convergence condition, the damage detection model after convergence is recorded as the training completed damage detection model.
  • the determining module 16 includes:
  • the calculation unit is configured to input the first loss value and the second loss value into a preset loss model, and calculate the total loss value through the total loss function in the loss model; the total loss function is :
  • X1 is the first loss value
  • X2 is the second loss value
  • w 1 is the weight of the first loss value
  • w 2 is the weight of the second loss value.
  • the acquisition module 11 includes:
  • An acquiring unit for acquiring a sample image and a public data image the sample image is a photographed image containing the damage location, and the public data image is an image randomly extracted from the KITTI data set;
  • the fusion unit is configured to perform fusion processing on the sample image and the public data image by a mixup method to obtain a fusion sample image;
  • the determining unit is configured to determine the fused sample image as the damaged sample image corresponding to the sample image, and store the damaged sample image in the blockchain.
  • the output module 14 includes:
  • the branching unit is configured to input the intermediate convolution feature map into an expansion module in the mask prediction branch model, and perform damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module to obtain Multi-channel feature map;
  • the prediction unit is configured to input the multi-channel feature map into the classification module in the mask prediction branch model, and perform classification and prediction processing on the multi-channel feature map through the classification module to obtain the intermediate convolution feature The mask prediction result corresponding to the graph;
  • the output unit is configured to determine the mask result corresponding to the damaged sample image according to the mask prediction result corresponding to the intermediate convolution feature map.
  • the branch unit includes:
  • the first convolution subunit is configured to input the intermediate convolution feature map into the first convolution layer in the expansion module, and perform the damage on the intermediate convolution feature map through the first convolution layer Mask feature extraction to obtain the first feature map;
  • the first sampling subunit is configured to perform up-sampling processing on the first feature map 1 through the first sampling layer in the expansion module to obtain a first sampling map;
  • the second convolution subunit is configured to input the first sample image into the second convolution layer in the expansion module, and perform the damage mask on the first sample image through the second convolution layer Feature extraction to obtain a second feature map;
  • the second sampling subunit is configured to perform up-sampling processing on the second feature map through the second sampling layer in the expansion module to obtain a second sampling map;
  • the third convolution subunit is used to input the second sample image into the third convolution layer in the expansion module, and perform the damage mask on the second sample image through the third convolution layer Feature extraction to obtain the third feature map;
  • the third sampling subunit is configured to perform up-sampling processing on the third feature map through the third sampling layer in the expansion module to obtain a multi-channel feature map.
  • Each module in the above-mentioned damage detection model training device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a vehicle damage detection device is provided, and the vehicle damage detection device corresponds to the vehicle damage detection method in the above-mentioned embodiment in a one-to-one correspondence.
  • the vehicle damage detection device includes an acquisition module 101 and a detection module 102.
  • the detailed description of each functional module is as follows:
  • the receiving module 101 is configured to receive a car damage detection instruction and obtain a car damage image
  • the detection module 102 is configured to input the car damage image into the damage detection model trained as the above damage detection model training method, extract damage features from the damage detection model, and obtain the output of the damage detection model according to the damage feature.
  • Final result includes damage type and damage area, and the final result characterizes the damage type and damage area of all damage locations in the car damage image.
  • the various modules in the vehicle damage detection device described above can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a readable storage medium and an internal memory.
  • the readable storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instruction is executed by the processor to realize a damage detection model training method or a vehicle damage detection method.
  • the readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer-readable instructions, the damage in the above-mentioned embodiment is realized.
  • the detection model training method, or the processor executes the computer-readable instructions to implement the vehicle damage detection method in the above embodiment.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, the one or more processors implement the damage detection model training method in the above-mentioned embodiments, or the computer When the program is executed by the processor, the vehicle damage detection method in the foregoing embodiment is implemented.
  • a person of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be implemented by instructing relevant hardware through computer-readable instructions.
  • the computer-readable instructions can be stored in a non-volatile computer.
  • a readable storage medium or a volatile readable storage medium when the computer readable instruction is executed, it may include the processes of the above-mentioned method embodiments.
  • any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • 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 chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Finance (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Multimedia (AREA)
  • Evolutionary Biology (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Image Analysis (AREA)

Abstract

Damage detection model training and vehicle damage detection methods, a device, an apparatus, and a medium. The training method comprises: acquiring a damage sample set (S10); inputting damage sample images into a damage detection model containing a first parameter, extracting, by means of the damage detection model, damage features from the damage sample images, and generating an intermediate convolution feature map (S20); inputting the intermediate convolution feature map into a mask prediction branch model containing a second parameter (S30); outputting, by means of the damage detection model, a training result according to the damage features, and acquiring a mask result by means of the mask prediction branch model (S40); calculating a first loss value and a second loss value (S50); determining a total loss value according to the first loss value and the second loss value (S60); and if the total loss value does not meet a preset convergence condition, iteratively updating the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value meets the preset convergence condition, and recording the converged damage detection model as a trained damage detection model (S70). The invention enables fast identification of damage types and damage regions. The invention further relates to the blockchain technique, and enables damage sample images to be stored in a blockchain.

Description

损伤检测模型训练、车损检测方法、装置、设备及介质Damage detection model training, vehicle damage detection methods, devices, equipment and media
本申请要求于2020年6月8日提交中国专利局、申请号为202010514057.9,发明名称为“损伤检测模型训练、车损检测方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on June 8, 2020, the application number is 202010514057.9, and the invention title is "damage detection model training, vehicle damage detection methods, devices, equipment and media", all of which The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及人工智能的分类模型领域,尤其涉及一种损伤检测模型训练、车损检测方法、装置、计算机设备及存储介质。This application relates to the field of artificial intelligence classification models, and in particular to a damage detection model training, a vehicle damage detection method, device, computer equipment, and storage medium.
背景技术Background technique
发明人发现在车辆发生交通事故后,车辆的某些部位会留下破损、刮伤等损伤的痕迹,目前,保险公司一般是人工识别由车主或业务人员拍摄的交通事故之后的车辆损伤的图像,即对图像中车辆的损伤部位的损伤类型及损伤区域进行人工识别并判定,如此,可能由于存在标准理解不一、观察经验不足等影响,导致人工识别的损伤类型及损伤区域不符;例如:由于凹陷和刮擦难以通过目测图像加以分辨,定损人员很容易就将凹陷的损伤类型确定为刮擦的损伤类型,上述情况下导致的定损失误,会大大降低了定损的准确性;在可能会导致保险公司的成本损失的同时,也会降低车主或客户的满意度;此外,人工定损的工作量巨大,定损效率低下,在需要满足一定的定损准确度的情况下,会进一步提升工作量,降低工作效率。The inventor found that after a traffic accident occurs in a vehicle, some parts of the vehicle will leave traces of damage, such as damage, scratches, etc. At present, insurance companies generally manually identify the images taken by the owner or business personnel of the vehicle damage after the traffic accident , That is, to manually identify and determine the damage type and damaged area of the damaged part of the vehicle in the image. In this way, due to the influence of inconsistent standard understanding and insufficient observation experience, the artificially recognized damage type and damaged area may not match; for example: Because it is difficult to distinguish between dents and scratches through visual images, damage assessment personnel can easily determine the type of damage caused by the dent as the type of scratch damage. The miscalculation caused by the above conditions will greatly reduce the accuracy of the damage assessment; While it may cause cost losses for the insurance company, it will also reduce the satisfaction of car owners or customers; in addition, the manual loss determination workload is huge and the loss determination efficiency is low. When a certain loss determination accuracy needs to be met, Will further increase the workload and reduce work efficiency.
发明内容Summary of the invention
本申请提供一种损伤检测模型训练、车损检测方法、装置、计算机设备及存储介质,实现了准确地、快速地识别出包含的损伤位置的图像中的损伤类型和损伤区域,提升了对定损类型和定损区域进行确定的准确率及可靠性,减少了成本,提高了训练效率。This application provides a damage detection model training, a vehicle damage detection method, device, computer equipment, and storage medium, which can accurately and quickly identify the damage type and damage area in the image containing the damage location, and improve the alignment The accuracy and reliability of the determination of the loss type and the area of the fixed loss reduce the cost and improve the training efficiency.
一种损伤检测模型训练方法,包括:A damage detection model training method includes:
获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated; the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;Input the intermediate convolution feature map into the mask prediction branch model containing the second parameter;
通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damage sample image into the first loss model to obtain the first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value;
根据所述第一损失值和所述第二损失值,确定总损失值;Determine a total loss value according to the first loss value and the second loss value;
在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和 所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。When the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the preset When the convergence condition is set, the damage detection model after convergence is recorded as the training completed damage detection model.
一种车损检测方法,包括:A vehicle damage detection method, including:
接收到车损检测指令,获取车损图像;Receive car damage detection instructions and obtain car damage images;
将所述车损图像输入如上述损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The car damage image is input into the damage detection model trained as described in the above damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final The result includes the damage type and the damage area, and the final result characterizes the damage type and the damage area of all the damage positions in the car damage image.
一种损伤检测模型训练装置,包括:A damage detection model training device includes:
获取模块,用于获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;The acquisition module is used to acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and the damage label The mask marking map corresponding to the type and at least one rectangular frame area;
输入模块,用于将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The input module is configured to input the damage sample image into a damage detection model containing the first parameter, and extract damage features in the damage sample image from the damage detection model and generate an intermediate convolution feature map; the damage detection model It is a deep convolutional neural network model based on the YOLOV3 model framework;
分支模块,用于将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;A branching module, configured to input the intermediate convolution feature map into a mask prediction branch model containing a second parameter;
输出模块,用于通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The output module is configured to output the training result according to the damage feature through the damage detection model, and at the same time obtain the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangle Region; the mask result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, the mask result includes at least one mask damage type and the corresponding mask damage type Mask tensor map;
损失模块,用于将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;The loss module is used to input all the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas of the damaged sample image into the first loss model to obtain the first loss Value, and input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into the second loss model at the same time to obtain the second loss model. Loss value
确定模块,用于根据所述第一损失值和所述第二损失值,确定总损失值;A determining module, configured to determine a total loss value according to the first loss value and the second loss value;
收敛模块,用于在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。The convergence module is configured to iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model when the total loss value does not reach the preset convergence condition, until the total loss value When the preset convergence condition is reached, the damage detection model after convergence is recorded as a damage detection model that has been trained.
一种车损检测装置,包括:A vehicle damage detection device, including:
接收模块,用于接收到车损检测指令,获取车损图像;The receiving module is used to receive the car damage detection instruction and obtain the car damage image;
检测模块,用于将所述车损图像输入如上述损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The detection module is used to input the car damage image into the damage detection model trained by the above damage detection model training method, extract damage features from the damage detection model, and obtain the final output of the damage detection model according to the damage feature Result; the final result includes the damage type and the damage area, and the final result characterizes the damage type and the damage area of all the damage positions in the car damage image.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated; the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;Input the intermediate convolution feature map into the mask prediction branch model containing the second parameter;
通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支 模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damage sample image into the first loss model to obtain the first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value;
根据所述第一损失值和所述第二损失值,确定总损失值;Determine a total loss value according to the first loss value and the second loss value;
在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。When the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the preset When the convergence condition is set, the damage detection model after convergence is recorded as the training completed damage detection model.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时还实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor further implements the following steps when the processor executes the computer-readable instructions:
接收到车损检测指令,获取车损图像;Receive car damage detection instructions and obtain car damage images;
将所述车损图像输入通过损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The car damage image is input to the damage detection model trained by the damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final result Including the damage type and the damage area, the final result represents the damage type and the damage area of all the damage positions in the car damage image.
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated; the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;Input the intermediate convolution feature map into the mask prediction branch model containing the second parameter;
通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damage sample image into the first loss model to obtain the first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value;
根据所述第一损失值和所述第二损失值,确定总损失值;Determine a total loss value according to the first loss value and the second loss value;
在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。When the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the preset When the convergence condition is set, the damage detection model after convergence is recorded as the training completed damage detection model.
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors further execute the following steps:
接收到车损检测指令,获取车损图像;Receive car damage detection instructions and obtain car damage images;
将所述车损图像输入通过损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤 位置的损伤类型和损伤区域。The car damage image is input to the damage detection model trained by the damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final result Including the damage type and the damage area, the final result represents the damage type and the damage area of all the damage positions in the car damage image.
本申请提供的损伤检测模型训练方法、装置、计算机设备及存储介质,通过获取含有损伤标签组的损伤样本图像,对基于YOLOV3模型架构的损伤检测模型进行训练,提取所述损伤样本图像的损伤特征并得到训练结果和中间卷积特征图,通过所述掩码预测分支模型对所述中间卷积特征图进行损伤掩码特征的提取,得到掩码结果,根据损伤标签组、训练结果和掩码结果,确定总损失值,通过判断所述总损失值是否达到预设的收敛条件,不断迭代训练损伤检测模型,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型,因此,提供了一种模型训练方法,通过增加掩码预测分支模型进行训练能够减少样本收集数量及提升了识别准确性和可靠性,实现了准确地、快速地识别出包含的损伤位置的图像中的损伤类型和损伤区域,提升了对定损类型和定损区域进行确定的准确率及可靠性,减少了成本,提高了训练效率。The damage detection model training method, device, computer equipment and storage medium provided in this application train the damage detection model based on the YOLOV3 model architecture by acquiring damage sample images containing damage label groups, and extract the damage features of the damage sample images The training result and the intermediate convolution feature map are obtained, and the damage mask feature is extracted from the intermediate convolution feature map through the mask prediction branch model to obtain the mask result. According to the damage label group, the training result and the mask As a result, the total loss value is determined, and the damage detection model is continuously iteratively trained by judging whether the total loss value reaches the preset convergence condition, and the damage detection model after convergence is recorded as the training damage detection model. Therefore, it provides A model training method is proposed. By increasing the mask prediction branch model for training, the number of sample collections can be reduced and the recognition accuracy and reliability can be improved, and the damage type in the image containing the damage location can be accurately and quickly identified. And the damage area, improve the accuracy and reliability of determining the type and area of the damage, reduce the cost, and improve the training efficiency.
本申请提供的车损检测方法、装置、计算机设备及存储介质,通过获取车损图像,将所述车损图像输入上述训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的包含有损伤类型和损伤区域的最终结果;所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域,如此,提高了识别速度,从而提高了识别效率,减少了成本,提高了客户满意度。The vehicle damage detection method, device, computer equipment, and storage medium provided in the present application acquire a vehicle damage image, input the vehicle damage image into the above-mentioned trained damage detection model, extract damage features through the damage detection model, and obtain all The damage detection model outputs a final result including damage type and damage area according to the damage feature; the final result represents the damage type and damage area of all damage positions in the car damage image, thus improving recognition Speed, thereby improving identification efficiency, reducing costs, and improving customer satisfaction.
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。The details of one or more embodiments of the present application are presented in the following drawings and description, and other features and advantages of the present application will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1是本申请一实施例中损伤检测模型训练方法或车损检测方法的应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a damage detection model training method or a car damage detection method in an embodiment of the present application;
图2是本申请一实施例中损伤检测模型训练方法的流程图;2 is a flowchart of a method for training a damage detection model in an embodiment of the present application;
图3是本申请一实施例中损伤检测模型训练方法的步骤S10的流程图;3 is a flowchart of step S10 of the damage detection model training method in an embodiment of the present application;
图4是本申请一实施例中损伤检测模型训练方法的步骤S40的流程图;4 is a flowchart of step S40 of the damage detection model training method in an embodiment of the present application;
图5是本申请一实施例中损伤检测模型训练方法的步骤S401的流程图;FIG. 5 is a flowchart of step S401 of the damage detection model training method in an embodiment of the present application;
图6是本申请一实施例中车损检测方法的流程图;Fig. 6 is a flowchart of a vehicle damage detection method in an embodiment of the present application;
图7是本申请一实施例中损伤检测模型训练装置的原理框图;Fig. 7 is a schematic block diagram of a damage detection model training device in an embodiment of the present application;
图8是本申请一实施例中车损检测装置的原理框图;Fig. 8 is a schematic block diagram of a vehicle damage detection device in an embodiment of the present application;
图9是本申请一实施例中计算机设备的示意图。Fig. 9 is a schematic diagram of a computer device in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请提供的损伤检测模型训练方法,可应用在如图1的应用环境中,其中,客户端(计算机设备)通过网络与服务器进行通信。其中,客户端(计算机设备)包括但不限于为各种个人计算机、笔记本电脑、智能手机、平板电脑、摄像头和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The damage detection model training method provided by this application can be applied in the application environment as shown in Fig. 1, where the client (computer equipment) communicates with the server through the network. Among them, the client (computer equipment) includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种识别模型训练方法,其技术方案主要包括以下步骤S10-S70:In an embodiment, as shown in FIG. 2, a method for training a recognition model is provided, and the technical solution mainly includes the following steps S10-S70:
S10,获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域。S10. Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type corresponding to the damage label type The mask marks the map and at least one rectangular frame area.
可理解地,所述损伤样本集包含多个所述损伤样本图像,所述损伤样本集为所有所述损伤样本图像的集合,所述损伤样本图像可以为历史收集的并且含有车辆在发生交通事故后留下损伤的车辆图像或者照片,也可以为根据需求进行融合后的图像,一个所述损伤样本图像对应一个损伤标签组,所述损伤标签组包括所述损伤标签类型、所述掩码标注图和所述矩形框区域,所述损伤标签类型包括划痕、刮擦、凹陷、褶皱、死折、撕裂、缺失等7种损伤类型,所述掩码标注图为通过每种损伤标签类型对应的掩码值替代损伤位置的区域范围中的每个像素值,即根据每个损伤位置对应标注的损伤标签类型,用与损伤标签类型对应的掩码值填充满损伤位置的区域范围中的每个像素值,再将相同所述掩码值的像素值平移至一个与所述损伤样本图像等大小的通道图,形成7个含有与损伤标签类型对应的掩码值的通道图,所述矩形框区域为通过一个最小面积的矩形框能覆盖损伤位置的坐标区域范围。Understandably, the damage sample set includes a plurality of damage sample images, the damage sample set is a collection of all the damage sample images, and the damage sample images may be historically collected and contain a vehicle in a traffic accident. The damaged vehicle image or photo can also be a fused image according to requirements. One damage sample image corresponds to one damage label group, and the damage label group includes the damage label type and the mask label. Figure and the rectangular frame area, the damage label types include scratches, scratches, dents, wrinkles, dead folds, tears, missing, etc. 7 types of damage, the mask marked image shows through each damage label type The corresponding mask value replaces each pixel value in the area range of the damage location, that is, according to the type of damage label corresponding to each damage location, the mask value corresponding to the damage label type is used to fill the area of the damage location. For each pixel value, the pixel value with the same mask value is translated to a channel image of the same size as the damage sample image to form 7 channel images containing the mask value corresponding to the damage label type. The rectangular frame area is the coordinate area that can cover the damage location through a rectangular frame with the smallest area.
在一实施例中,如图3所示,所述步骤S10之前,即获取损伤样本集之前,包括:In one embodiment, as shown in FIG. 3, before the step S10, that is, before the damage sample set is obtained, the method includes:
S101,获取样本图像和公开数据图像;所述样本图像为拍摄的含有损伤位置的图像,所述公开数据图像为KITTI数据集中随机抽取的图像。S101: Obtain a sample image and a public data image; the sample image is a shot image containing a damage location, and the public data image is an image randomly selected from a KITTI data set.
可理解地,所述样本图像为历史拍摄的且含有车辆在发生交通事故后留下损伤的损伤位置的图像,所述公开数据图像为随机从所述KITTI数据集中抽取的图像,所述KITTI数据集为公开的智能车辆相关的图像的集合,通过resize方式,将所述公开数据图像的尺寸大小转换成与所述样本图像的尺寸大小相同,所述resize方式可以根据需求进行设定,比如resize方式为最近邻插值算法、双线性插值算法、双三次插值算法、基于像素区域关系插值算法、兰索斯插值插值算法等等。Understandably, the sample image is an image taken in history and contains the location of damage left by the vehicle after a traffic accident, the public data image is an image randomly extracted from the KITTI data set, and the KITTI data The set is a collection of images related to the public smart vehicle. The size of the public data image is converted to the same size as the sample image through the resize method. The resize method can be set according to requirements, such as resize The methods are nearest neighbor interpolation algorithm, bilinear interpolation algorithm, bicubic interpolation algorithm, interpolation algorithm based on pixel region relationship, Lanzos interpolation interpolation algorithm, and so on.
S102,通过mixup方法,将所述样本图像与所述公开数据图像进行融合处理,得到融合样本图像。S102: Perform fusion processing on the sample image and the public data image by using a mixup method to obtain a fused sample image.
可理解地,所述mixup方法为将所述样本跟图像中的每个像素值与所述公开数据图像中的对应的像素值通过预设的比例进行加权处理以及进行融合处理,生成所述融合样本图像的像素值,所述融合处理为将所述样本跟图像中的每个像素值与所述公开数据图像中的对应的像素值进行加权处理之后进行求和得到所述融合样本图像中对应的像素值。Understandably, the mixup method is to perform weighting processing and fusion processing for each pixel value in the sample and image and the corresponding pixel value in the public data image through a preset ratio to generate the fusion The pixel value of the sample image, the fusion processing is to weight each pixel value in the sample and image with the corresponding pixel value in the public data image and then sum up to obtain the corresponding in the fused sample image The pixel value.
S103,将所述融合样本图像确定为所述样本图像对应的损伤样本图像,并将所述损伤样本图像存储在区块链中。S103: Determine the fused sample image as a damaged sample image corresponding to the sample image, and store the damaged sample image in a blockchain.
可理解地,将所述融合样本图像标记为所述损伤样本图像,并且将所述损伤样本图像存储在区块链中。Understandably, the fused sample image is marked as the damaged sample image, and the damaged sample image is stored in the blockchain.
需要强调的是,为进一步保证上述损伤样本图像的私密和安全性,上述损伤样本图像还可以存储于区块链的节点中。It should be emphasized that, in order to further ensure the privacy and security of the damaged sample image, the damaged sample image can also be stored in a node of the blockchain.
其中,本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。区块链提供的去中心化的完全分布式DNS服务通过网络中各个节点之间的点对点数据传输服务就能实现域名的查询和解析,可用于确保某个重要的基础设施的操作系统和固件没有被篡改,可以监控数据的状态和完整性,发现不良的篡改,并确保所传输的数据没用经过篡改,将所述损伤样本图像存储在区块链中,能够确保损伤样本图像的私密和安全性。Among them, the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer. The decentralized and fully distributed DNS service provided by the blockchain can realize the query and resolution of domain names through the point-to-point data transmission service between various nodes in the network, which can be used to ensure that the operating system and firmware of an important infrastructure are not available. If it is tampered with, it can monitor the status and integrity of the data, find bad tampering, and ensure that the transmitted data has not been tampered with. Store the damaged sample image in the blockchain, which can ensure the privacy and security of the damaged sample image Sex.
本申请通过mixup方法,将所述样本图像与所述公开数据图像(从KITTI数据集中随 机抽取)进行融合处理,得到融合样本图像,将所述融合样本图像确定为所述样本图像对应的损伤样本图像,并将所述损伤样本图像存储在区块链中,能够提高损伤样本图像的安全性,防止被篡改,能够防止损伤样本图像在后续的识别过程中过拟合,提高了识别准确率。This application uses the mixup method to perform fusion processing on the sample image and the public data image (randomly extracted from the KITTI data set) to obtain a fusion sample image, and determine the fusion sample image as the damaged sample corresponding to the sample image And storing the damaged sample image in the blockchain can improve the security of the damaged sample image, prevent it from being tampered with, prevent the damaged sample image from overfitting in the subsequent recognition process, and improve the recognition accuracy.
S20,将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型。S20. Input the damage sample image to a damage detection model containing the first parameter, extract damage features in the damage sample image through the damage detection model and generate an intermediate convolution feature map; the damage detection model is based on YOLOV3 The deep convolutional neural network model of the model architecture.
可理解地,所述损伤检测模型为识别所述损伤样本图像中样本损伤类型和样本损伤矩形区域的基于YOLOV3模型的深度卷积神经网络模型,即所述损伤检测模型的网络结构与YOLOV3模型的网络结构相同,所述损伤特征为包括划痕、刮擦、凹陷、褶皱、死折、撕裂、缺失等7种损伤类型的特征,所述损伤检测模型的所述第一参数可以根据需求进行设定,比如第一参数可以通过迁移学习方法获取YOLOV3模型的所有参数,也可以全部设置为预设的一个数值。Understandably, the damage detection model is a YOLOV3 model-based deep convolutional neural network model that recognizes the sample damage type and the sample damage rectangular area in the damage sample image, that is, the network structure of the damage detection model and the YOLOV3 model The network structure is the same. The damage features include seven types of damage including scratches, scratches, dents, folds, deadfolds, tears, and missing. The first parameters of the damage detection model can be performed according to requirements. Setting, for example, the first parameter can obtain all the parameters of the YOLOV3 model through the transfer learning method, or all can be set to a preset value.
S30,将所述中间卷积特征图输入含有第二参数的掩码预测分支模型。S30: Input the intermediate convolution feature map into a mask prediction branch model containing a second parameter.
可理解地,所述掩码预测分支模型为预设的卷积神经网络模型,所述掩码预测分支模型的所述第二参数可以根据需求进行设定,比如所述第二参数为随机的参数值。Understandably, the mask prediction branch model is a preset convolutional neural network model, and the second parameter of the mask prediction branch model can be set according to requirements, for example, the second parameter is random The parameter value.
S40,通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图。S40. Output a training result according to the damage feature through the damage detection model, and at the same time obtain a mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; The mask result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask corresponding to the mask damage type.量图。 Volume chart.
可理解地,所述损伤检测模型根据提取的所述损伤特征进行预测,得到所述训练结果,所述训练结果包括样本损伤类型和样本损伤矩形区域,所述样本损伤矩形区域为与所述样本损伤类型对应的区域坐标范围,通过所述掩码预测分支模型能够增加损伤掩码特征的提取,能够增强掩码损伤类型的识别,所述损伤掩码特征为与损伤标签类型对应的掩码值相关的特征,即增加了一个掩码预测分支进行识别,能够提升损伤识别的准确性和精确性,所述掩码结果包括所述掩码损伤类型和所述掩码张量图,所述掩码张量图为识别出所述损伤样本图像中相同损伤类型的损伤位置对应的特征向量图,也指与所述掩码损伤类型对应的特征向量图。Understandably, the damage detection model predicts according to the extracted damage feature to obtain the training result. The training result includes the sample damage type and the sample damage rectangular area, and the sample damage rectangular area is the same as the sample damage rectangular area. The area coordinate range corresponding to the damage type, through the mask prediction branch model, the extraction of damage mask features can be increased, and the identification of the mask damage type can be enhanced, and the damage mask feature is the mask value corresponding to the damage label type Related features, that is, the addition of a mask prediction branch for recognition can improve the accuracy and precision of damage recognition. The mask result includes the mask damage type and the mask tensor map. The code tensor map is a feature vector map that identifies the damage location of the same damage type in the damage sample image, and also refers to the feature vector map corresponding to the masked damage type.
其中,所述样本损伤类型包括划痕、刮擦、凹陷、褶皱、死折、撕裂、缺失等7种损伤类型,所述掩码损伤类型包括划痕、刮擦、凹陷、褶皱、死折、撕裂、缺失等7种损伤类型。Among them, the sample damage types include 7 types of damage, including scratches, scratches, dents, folds, dead folds, tears, and missing. The mask damage types include scratches, scratches, dents, folds, and dead folds. 7 types of injuries including, tearing and missing.
在一实施例中,如图4所示,所述步骤S40中,即所述通过所述掩码预测分支模型获取掩码结果,包括:In an embodiment, as shown in FIG. 4, in the step S40, that is, obtaining the mask result through the mask prediction branch model includes:
S401,将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行损伤掩码特征提取及扩大处理,得到多通道特征图。S401. Input the intermediate convolution feature map to an expansion module in the mask prediction branch model, and perform damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module to obtain a multi-channel feature Figure.
可理解地,所述扩展模块为将所述中间卷积特征图由32×32尺寸的特征向量图通过提取所述损伤掩码特征进行扩充处理得到所述多通道特征图,所述多通道特征图包含多个256×256尺寸的特征向量图(也为全文中的张量图)。Understandably, the expansion module is to obtain the multi-channel feature map by extracting the damage mask feature from the 32×32 sized feature vector graph, and the multi-channel feature The graph contains multiple 256×256 feature vector graphs (also tensor graphs in the full text).
在一实施例中,如图5所示,所述步骤S401中,即将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行扩大处理,得到多通道特征图,包括:In one embodiment, as shown in FIG. 5, in the step S401, the intermediate convolution feature map is input to the expansion module in the mask prediction branch model, and the intermediate convolution is performed by the expansion module. The feature map is expanded to obtain a multi-channel feature map, including:
S40101,将所述中间卷积特征图输入所述扩展模块中的第一卷积层,通过所述第一卷积层对所述中间卷积特征图进行所述损伤掩码特征提取,得到第一特征图;S40101. Input the intermediate convolutional feature map to the first convolutional layer in the expansion module, and perform the damage mask feature extraction on the intermediate convolutional feature map through the first convolutional layer to obtain the first convolutional feature map. A feature map;
可理解地,所述扩展模块包括第一卷积层、第一采样层、第二卷积层、第二采样层、第三卷积层和第三采样层,所述第一卷积层包括一个256通道的3×3卷积核和一个128 通道的1×1卷积核,所述第一卷积层对所述中间卷积特征图经过一个256通道的3×3卷积核进行卷积后再经过一个128通道的1×1卷积核进行卷积,从而提取所述损伤掩码特征。Understandably, the expansion module includes a first convolutional layer, a first sampling layer, a second convolutional layer, a second sampling layer, a third convolutional layer, and a third sampling layer, and the first convolutional layer includes A 256-channel 3×3 convolution kernel and a 128-channel 1×1 convolution kernel, the first convolution layer convolves the intermediate convolution feature map through a 256-channel 3×3 convolution kernel After the integration, a 128-channel 1×1 convolution kernel is used for convolution, so as to extract the damage mask feature.
S40102,通过所述扩展模块中的第一采样层对所述第一特征图一进行上采样处理,得到第一采样图;S40102, performing up-sampling processing on the first feature map 1 through the first sampling layer in the expansion module to obtain a first sampling map;
可理解地,所述上采样处理为对一个特征向量图进行尺寸扩大填充处理直到预设的尺寸大小,所述第一采样图为64×64的特征向量图,所述第一采样层能够更大可能性地获取所述损伤掩码特征,从而防止过拟合和提高泛化性。Understandably, the up-sampling process is to perform size expansion and filling processing on a feature vector image to a preset size. The first sampling image is a 64×64 feature vector image, and the first sampling layer can be updated. Obtain the damage mask feature with a high probability, thereby preventing overfitting and improving generalization.
S40103,将所述第一采样图输入所述扩展模块中的第二卷积层,通过所述第二卷积层对所述第一采样图进行所述损伤掩码特征提取,得到第二特征图;S40103. Input the first sampling image to a second convolutional layer in the expansion module, and perform the damage mask feature extraction on the first sampling image through the second convolutional layer to obtain a second feature Figure;
可理解地,所述第二卷积层包括一个128通道的3×3卷积核和一个64通道的1×1卷积核,所述第二卷积层对所述第一采样图经过一个128通道的3×3卷积核进行卷积后再经过一个64通道的1×1卷积核进行卷积,从而提取所述损伤掩码特征。Understandably, the second convolutional layer includes a 128-channel 3×3 convolution kernel and a 64-channel 1×1 convolution kernel. The second convolution layer passes through a The 128-channel 3×3 convolution kernel performs convolution and then passes through a 64-channel 1×1 convolution kernel to perform convolution, so as to extract the damage mask feature.
S40104,通过所述扩展模块中的第二采样层对所述第二特征图进行上采样处理,得到第二采样图;S40104, performing up-sampling processing on the second feature map through the second sampling layer in the expansion module to obtain a second sampling map;
可理解地,所述上采样处理为对一个特征向量图进行尺寸扩大填充处理直到预设的尺寸大小,所述第二采样图为128×128的特征向量图,所述第二采样层能够更大可能性地获取所述损伤掩码特征,从而防止过拟合和提高泛化性。Understandably, the up-sampling process is to perform size expansion and filling processing on a feature vector image to a preset size, the second sampling image is a 128×128 feature vector image, and the second sampling layer can be updated. Obtain the damage mask feature with a high probability, thereby preventing overfitting and improving generalization.
S40105,将所述第二采样图输入所述扩展模块中的第三卷积层,通过所述第三卷积层对所述第二采样图进行所述损伤掩码特征提取,得到第三特征图;S40105. Input the second sampling image to a third convolutional layer in the expansion module, and perform the damage mask feature extraction on the second sampling image through the third convolutional layer to obtain a third feature Figure;
可理解地,所述第三卷积层包括一个64通道的3×3卷积核和一个32通道的1×1卷积核,所述第三卷积层对所述第二采样图经过一个64通道的3×3卷积核进行卷积后再经过一个32通道的1×1卷积核进行卷积,从而更进一步提取所述损伤掩码特征。Understandably, the third convolution layer includes a 64-channel 3×3 convolution kernel and a 32-channel 1×1 convolution kernel, and the third convolution layer passes through a The 64-channel 3×3 convolution kernel performs convolution and then passes through a 32-channel 1×1 convolution kernel to perform convolution, so as to further extract the damage mask feature.
S40106,通过所述扩展模块中的第三采样层对所述第三特征图进行上采样处理,得到多通道特征图。S40106: Perform up-sampling processing on the third feature map through the third sampling layer in the expansion module to obtain a multi-channel feature map.
可理解地,所述多通道特征图为256×256的特征向量图,所述第三采样层能够进一步地获取所述损伤掩码特征,从而防止过拟合和提高泛化性。Understandably, the multi-channel feature map is a 256×256 feature vector map, and the third sampling layer can further obtain the damage mask feature, thereby preventing overfitting and improving generalization.
S402,将所述多通道特征图输入所述掩码预测分支模型中的分类模块,通过所述分类模块对所述多通道特征图进行分类及预测处理,得到所述中间卷积特征图对应的掩码预测结果。S402. Input the multi-channel feature map to a classification module in the mask prediction branch model, and perform classification and prediction processing on the multi-channel feature map through the classification module to obtain the corresponding intermediate convolution feature map. Mask prediction result.
可理解地,所述掩码损伤预测类型包括划痕、刮擦、凹陷、褶皱、死折、撕裂、缺失等7种损伤类型,通过所述掩码预测分支模型中的所述分类模块对所述多通道特征图进行分类,即通过所述多通道特征图中的特征向量图进行分类,得到与所有掩码预测损伤类型对应的特征向量图,根据与掩码预测损伤类型对应的特征向量图,预测出该掩码预测损伤类型对应的掩码预测张量图,所述掩码预测张量图为一个通道的含有预测出每个像素点对应的像素值并与掩码预测损伤类型相关的特征向量图,所述掩码预测结果包括所述掩码预测损伤类型和掩码预测张量图。Understandably, the mask damage prediction type includes 7 damage types such as scratches, scratches, dents, wrinkles, dead-folds, tears, and missing. The classification module in the branch model is predicted by the mask. The multi-channel feature map is classified, that is, the feature vector map in the multi-channel feature map is classified to obtain the feature vector map corresponding to all mask prediction damage types, and the feature vector corresponding to the mask prediction damage type is obtained Figure, predicts the mask prediction tensor map corresponding to the mask prediction damage type, the mask prediction tensor diagram is a channel containing the predicted pixel value corresponding to each pixel and is related to the mask prediction damage type The feature vector map of the mask, the mask prediction result includes the mask prediction damage type and the mask prediction tensor map.
S403,根据所述中间卷积特征图对应的掩码预测结果,确定所述损伤样本图像对应的掩码结果。S403: Determine the mask result corresponding to the damaged sample image according to the mask prediction result corresponding to the intermediate convolution feature map.
可理解地,根据所述掩码预测结果与预设的概率值进行对比,将符合所述概率值的掩码预测张量图保留,将所有保留之后的所述掩码预测张量图确定为所述损伤样本图像对应的掩码张量图,从而根据保留的所述掩码预测张量图确定与所述掩码预测张量图对应的所述掩码预测损伤类型确定为所述损伤样本图像对应的掩码损伤类型,将所有所述掩码张量图及对应的所述掩码损伤类型确定为所述所述损伤样本图像的所述掩码结果。Understandably, according to the comparison between the mask prediction result and the preset probability value, the mask prediction tensor map conforming to the probability value is retained, and all the mask prediction tensor maps after retention are determined as The mask tensor map corresponding to the damage sample image, so that the mask prediction damage type corresponding to the mask prediction tensor map is determined to be the damage sample according to the retained mask prediction tensor map The mask damage type corresponding to the image, and all the mask tensor maps and the corresponding mask damage types are determined as the mask result of the damage sample image.
本申请通过所述掩码预测分支模型中的扩展模块对所述中间卷积特征图进行损伤掩 码特征提取及扩大处理,得到多通道特征图;再通过所述掩码预测分支模型中的分类模块对所述多通道特征图进行分类及预测处理,得到所述中间卷积特征图对应的掩码预测结果;根据所述中间卷积特征图对应的掩码预测结果,确定所述损伤样本图像对应的掩码结果,如此,提供了一种掩码预测分支模型实现损伤掩码特征提取并得出掩码结果,为后续的损伤检测模型的训练提供了提升准确率的方法,减少了损伤检测模型的训练时间及样本数,从而减少了成本。This application performs damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module in the mask prediction branch model to obtain a multi-channel feature map; and then predicts the classification in the branch model through the mask The module classifies and predicts the multi-channel feature map to obtain the mask prediction result corresponding to the intermediate convolution feature map; determines the damage sample image according to the mask prediction result corresponding to the intermediate convolution feature map Corresponding to the mask result, in this way, a mask prediction branch model is provided to extract the damage mask feature and obtain the mask result, which provides a method to improve the accuracy of the subsequent training of the damage detection model, and reduces the damage detection. The training time of the model and the number of samples, thereby reducing the cost.
S50,将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值。S50. Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damaged sample image into a first loss model to obtain a first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value.
可理解地,所述第一损失模型包括所述第一损失函数,将所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入所述第一损失函数,通过交叉熵方法计算出所述第一损失值;所述第二损失值模型包括所述第二损失函数,将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入所述第二损失函数,通过交叉熵方法计算出所述第二损失值。Understandably, the first loss model includes the first loss function, and all the damage label types, all the rectangular box areas, all the sample damage types, and all the sample damage rectangular areas are input into the The first loss function, the first loss value is calculated by the cross-entropy method; the second loss value model includes the second loss function, and all the damage label types and all the damage label types of the damage sample image are calculated. The mask annotation map, all the mask damage types, and all the mask tensor maps are input to the second loss function, and the second loss value is calculated by a cross-entropy method.
S60,根据所述第一损失值和所述第二损失值,确定总损失值。S60: Determine a total loss value according to the first loss value and the second loss value.
可理解地,将所述第一损失值和所述第二损失值输入含有总损失函数的损失模型,所述损失模型中的总损失函数可以根据需求设定,所述损失模型为生成所述总损失值的模型,通过所述总损失函数计算出所述总损失值。Understandably, the first loss value and the second loss value are input to a loss model containing a total loss function. The total loss function in the loss model can be set according to requirements, and the loss model is for generating the A model of the total loss value, and the total loss value is calculated by the total loss function.
在一实施例中,所述步骤60中,即所述根据所述第一损失值和所述第二损失值,确定总损失值,包括:In an embodiment, the step 60, that is, the determining the total loss value according to the first loss value and the second loss value, includes:
S601,将所述第一损失值和所述第二损失值输入预设的损失模型,通过所述损失模型中的总损失函数计算出所述总损失值;所述总损失函数为:S601. Input the first loss value and the second loss value into a preset loss model, and calculate the total loss value through the total loss function in the loss model; the total loss function is:
L=w 1×X1+w 2×X2 L=w 1 ×X1+w 2 ×X2
其中,among them,
X1为第一损失值;X1 is the first loss value;
X2为第二损失值;X2 is the second loss value;
w 1为第一损失值的权重; w 1 is the weight of the first loss value;
w 2为第二损失值的权重。 w 2 is the weight of the second loss value.
S70,在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。S70: When the total loss value does not reach a preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the When the convergence condition is preset, the damage detection model after convergence is recorded as the damage detection model that has been trained.
可理解地,所述收敛条件可以为所述总损失值经过了9000次计算后值为很小且不会再下降的条件,即在所述总损失值经过9000次计算后值为很小且不会再下降时,停止训练,并将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型;所述收敛条件也可以为所述总损失值小于设定阈值的条件,即在所述总损失值小于设定阈值时,停止训练,并将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。Understandably, the convergence condition may be a condition that the value of the total loss value is small and will not drop after 9000 calculations, that is, the value of the total loss value is small and will not decrease after 9000 calculations. When it will no longer fall, stop training, and record the damage detection model after convergence as the completed damage detection model; the convergence condition can also be the condition that the total loss value is less than the set threshold, that is, the damage detection model When the total loss value is less than the set threshold, the training is stopped, and the damage detection model after convergence is recorded as the training completed damage detection model.
如此,在所述总损失值未达到预设的收敛条件时,不断更新迭代所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,可以不断向准确的结果靠拢,让识别的准确率越来越高。In this way, when the total loss value does not reach the preset convergence condition, the first parameter of the damage detection model and the second parameter of the mask prediction branch model are continuously updated and iterated, so that the accurate results can be continuously moved closer. Make the recognition accuracy higher and higher.
在一实施例中,所述步骤S60之后,即所述根据所述第一损失值和所述第二损失值,确定总损失值之后,还包括:In an embodiment, after the step S60, that is, after the total loss value is determined according to the first loss value and the second loss value, the method further includes:
S80,在所述总损失值达到预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。S80: When the total loss value reaches a preset convergence condition, record the converged damage detection model as a trained damage detection model.
可理解地,在所述总损失值达到预设的收敛条件时,说明所述总损失值已经达到最优的结果,此时所述损伤检测模型已经收敛,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型,如此,根据所述损伤样本集中的所述损伤样本图像,通过不断训练获得训练完成的损伤检测模型,能够提升识别的准确率和可靠性。Understandably, when the total loss value reaches the preset convergence condition, it indicates that the total loss value has reached the optimal result. At this time, the damage detection model has converged, and the damage detection model after convergence will be The record is a trained damage detection model. In this way, according to the damage sample image in the damage sample set, the trained damage detection model is obtained through continuous training, which can improve the accuracy and reliability of recognition.
本申请通过获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;通过所述损伤检测模型根据所述损伤特征输出含有样本损伤类型和样本损伤矩形区域的训练结果,同时通过所述掩码预测分支模型获取含有样本损伤类型和样本损伤矩形区域的掩码结果;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;根据所述第一损失值和所述第二损失值,确定总损失值;在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。This application obtains a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type corresponding to the damage label type And at least one rectangular frame area; input the damage sample image into a damage detection model containing the first parameter, and extract the damage feature in the damage sample image through the damage detection model and generate an intermediate convolution feature Figure; The damage detection model is a deep convolutional neural network model based on the YOLOV3 model framework; the intermediate convolution feature map is input to the mask prediction branch model containing the second parameter; the damage detection model is based on the damage The feature output contains the training result of the sample damage type and the sample damage rectangular area, and at the same time, the mask result containing the sample damage type and the sample damage rectangular area is obtained through the mask prediction branch model; the mask result is based on the intermediate The damage mask feature extracted from the convolution feature map is obtained and output. The mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type; All the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas are input into the first loss model to obtain the first loss value, and at the same time, all the damage samples in the damaged sample image are input to the first loss model. Input the damage label type, all the mask annotation graphs, all the mask damage types, and all the mask tensor graphs into the second loss model to obtain a second loss value; according to the first loss value and the The second loss value determines the total loss value; when the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model, Until the total loss value reaches the preset convergence condition, the damage detection model after convergence is recorded as the trained damage detection model.
本申请实现了通过获取含有损伤标签组的损伤样本图像,对基于YOLOV3模型架构的损伤检测模型进行训练,提取所述损伤样本图像的损伤特征并得到训练结果和中间卷积特征图,通过所述掩码预测分支模型对所述中间卷积特征图进行损伤掩码特征的提取,得到掩码结果,根据损伤标签组、训练结果和掩码结果,确定总损失值,通过判断所述总损失值是否达到预设的收敛条件,不断迭代训练损伤检测模型,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型,因此,提供了一种模型训练方法,通过增加掩码预测分支模型进行训练能够减少样本收集数量及提升了识别准确性和可靠性,实现了准确地、快速地识别出包含的损伤位置的图像中的损伤类型和损伤区域,提升了对定损类型和定损区域进行确定的准确率及可靠性,减少了成本,提高了训练效率。This application realizes that by acquiring damage sample images containing damage label groups, training a damage detection model based on the YOLOV3 model architecture, extracting the damage features of the damage sample image and obtaining the training result and the intermediate convolution feature map, through the The mask prediction branch model extracts the damage mask feature from the intermediate convolution feature map to obtain the mask result, and determines the total loss value according to the damage label group, the training result and the mask result, and determines the total loss value Whether the preset convergence condition is reached, the damage detection model is continuously iteratively trained, and the damage detection model after convergence is recorded as the training damage detection model. Therefore, a model training method is provided to predict the branch model by adding a mask Training can reduce the number of sample collections and improve the accuracy and reliability of recognition. It can accurately and quickly identify the damage type and damage area in the image containing the damage location, and improve the damage assessment type and damage area. The accuracy and reliability of the determination reduces the cost and improves the training efficiency.
本申请提供的车损检测方法,可应用在如图1的应用环境中,其中,客户端(计算机设备)通过网络与服务器进行通信。其中,客户端(计算机设备)包括但不限于为各种个人计算机、笔记本电脑、智能手机、平板电脑、摄像头和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The vehicle damage detection method provided in this application can be applied in the application environment as shown in Fig. 1, in which the client (computer equipment) communicates with the server through the network. Among them, the client (computer equipment) includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices. The server can be implemented as an independent server or a server cluster composed of multiple servers.
在一实施例中,如图6示,提供一种车损检测方法,其技术方案主要包括以下步骤S100-S200:In an embodiment, as shown in FIG. 6, a vehicle damage detection method is provided, and the technical solution mainly includes the following steps S100-S200:
S100,接收到车损检测指令,获取车损图像;S100, receiving a car damage detection instruction, and acquiring a car damage image;
可理解地,在车辆发生交通事故后,车辆会留下损伤的痕迹,保险公司的工作人员会拍摄交通事故的相关照片,这些照片包括车辆损伤的照片,工作人员将车辆损伤的照片上传至服务器,以触发所述车损检测指令,获取所述车损检测指令中含有的所述车损图像,所述车损图像为拍摄的车辆损伤的照片。Understandably, after a traffic accident, the vehicle will leave traces of damage. The staff of the insurance company will take photos related to the traffic accident. These photos include photos of the vehicle damage. The staff upload the photos of the vehicle damage to the server. To trigger the vehicle damage detection instruction to obtain the vehicle damage image contained in the vehicle damage detection instruction, where the vehicle damage image is a photograph of the vehicle damage taken.
S200,将所述车损图像输入上述训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。S200. Input the car damage image into the above-mentioned trained damage detection model, extract damage features from the damage detection model, and obtain a final result output by the damage detection model according to the damage feature; the final result includes the damage type And the damage area, the final result characterizes the damage type and damage area of all the damage positions in the car damage image.
可理解地,只需将所述车损图像输入训练完成的损伤检测模型,通过该损伤检测模型进行所述损伤特征的提取,所述损伤检测模型根据所述车损图像中的所述损伤特征输出所述最终结果,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域,在此过程中无需使用到所述掩码预测分支模型,加快了识别速度,从而提高了识别效率。Understandably, it is only necessary to input the car damage image into a trained damage detection model, and extract the damage feature through the damage detection model. The damage detection model is based on the damage feature in the car damage image. The final result is output, and the final result characterizes the damage type and damage area of all damage positions in the car damage image. In this process, the mask prediction branch model does not need to be used, which speeds up the recognition speed. Improved recognition efficiency.
本申请通过获取车损图像,将所述车损图像输入上述训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的包含有损伤类型和损伤区域的最终结果;所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域,如此,提高了识别速度,从而提高了识别效率,减少了成本,提高了客户满意度。This application acquires a car damage image, inputs the car damage image into the above-mentioned trained damage detection model, extracts damage features from the damage detection model, and obtains the damage type output by the damage detection model according to the damage feature And the final result of the damage area; the final result characterizes the damage type and damage area of all the damage locations in the car damage image, so that the recognition speed is improved, thereby improving the recognition efficiency, reducing the cost, and improving the customer Satisfaction.
在一实施例中,提供一种损伤检测模型训练装置,该损伤检测模型训练装置与上述实施例中损伤检测模型训练方法一一对应。如图7所示,该损伤检测模型训练装置包括获取模块11、输入模块12、分支模块13、输出模块14、损失模块15、确定模块16和收敛模块17。各功能模块详细说明如下:In one embodiment, a damage detection model training device is provided, and the damage detection model training device corresponds to the damage detection model training method in the above-mentioned embodiment in a one-to-one correspondence. As shown in FIG. 7, the damage detection model training device includes an acquisition module 11, an input module 12, a branch module 13, an output module 14, a loss module 15, a determination module 16 and a convergence module 17. The detailed description of each functional module is as follows:
获取模块11,用于获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;The acquisition module 11 is configured to acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type that is related to the damage The mask label corresponding to the label type and at least one rectangular frame area;
输入模块12,用于将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The input module 12 is configured to input the damage sample image into a damage detection model containing the first parameter, and extract damage features in the damage sample image through the damage detection model and generate an intermediate convolution feature map; the damage detection The model is a deep convolutional neural network model based on the YOLOV3 model framework;
分支模块13,用于将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;The branch module 13 is configured to input the intermediate convolution feature map into a mask prediction branch model containing the second parameter;
输出模块14,用于通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The output module 14 is configured to output the training result according to the damage feature through the damage detection model, and at the same time obtain the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage Rectangular area; the mask result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, the mask result includes at least one mask damage type and corresponding to the mask damage type The mask tensor map;
损失模块15,用于将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;The loss module 15 is configured to input all the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas of the damaged sample image into a first loss model to obtain a first loss model. Loss value, and input all the damage label types, all the mask annotation maps, all the mask damage types and all the mask tensor maps of the damage sample image into the second loss model at the same time, to obtain the first loss model Two loss value;
确定模块16,用于根据所述第一损失值和所述第二损失值,确定总损失值;The determining module 16 is configured to determine a total loss value according to the first loss value and the second loss value;
收敛模块17,用于在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。The convergence module 17 is configured to iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model when the total loss value does not reach the preset convergence condition, until the total loss When the value reaches the preset convergence condition, the damage detection model after convergence is recorded as the training completed damage detection model.
在一实施例中,所述确定模块16包括:In an embodiment, the determining module 16 includes:
计算单元,用于将所述第一损失值和所述第二损失值输入预设的损失模型,通过所述损失模型中的总损失函数计算出所述总损失值;所述总损失函数为:The calculation unit is configured to input the first loss value and the second loss value into a preset loss model, and calculate the total loss value through the total loss function in the loss model; the total loss function is :
L=w 1×X1+w 2×X2 L=w 1 ×X1+w 2 ×X2
其中,among them,
X1为第一损失值;X1 is the first loss value;
X2为第二损失值;X2 is the second loss value;
w 1为第一损失值的权重; w 1 is the weight of the first loss value;
w 2为第二损失值的权重。 w 2 is the weight of the second loss value.
在一实施例中,所述获取模块11包括:In an embodiment, the acquisition module 11 includes:
获取单元,用于获取样本图像和公开数据图像;所述样本图像为拍摄的含有损伤位置的图像,所述公开数据图像为KITTI数据集中随机抽取的图像;An acquiring unit for acquiring a sample image and a public data image; the sample image is a photographed image containing the damage location, and the public data image is an image randomly extracted from the KITTI data set;
融合单元,用于通过mixup方法,将所述样本图像与所述公开数据图像进行融合处理,得到融合样本图像;The fusion unit is configured to perform fusion processing on the sample image and the public data image by a mixup method to obtain a fusion sample image;
确定单元,用于将所述融合样本图像确定为所述样本图像对应的损伤样本图像,并将所述损伤样本图像存储在区块链中。The determining unit is configured to determine the fused sample image as the damaged sample image corresponding to the sample image, and store the damaged sample image in the blockchain.
在一实施例中,所述输出模块14包括:In an embodiment, the output module 14 includes:
分支单元,用于将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行损伤掩码特征提取及扩大处理,得到多通道特征图;The branching unit is configured to input the intermediate convolution feature map into an expansion module in the mask prediction branch model, and perform damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module to obtain Multi-channel feature map;
预测单元,用于将所述多通道特征图输入所述掩码预测分支模型中的分类模块,通过所述分类模块对所述多通道特征图进行分类及预测处理,得到所述中间卷积特征图对应的掩码预测结果;The prediction unit is configured to input the multi-channel feature map into the classification module in the mask prediction branch model, and perform classification and prediction processing on the multi-channel feature map through the classification module to obtain the intermediate convolution feature The mask prediction result corresponding to the graph;
输出单元,用于根据所述中间卷积特征图对应的掩码预测结果,确定所述损伤样本图像对应的掩码结果。The output unit is configured to determine the mask result corresponding to the damaged sample image according to the mask prediction result corresponding to the intermediate convolution feature map.
在一实施例中,所述分支单元包括:In an embodiment, the branch unit includes:
第一卷积子单元,用于将所述中间卷积特征图输入所述扩展模块中的第一卷积层,通过所述第一卷积层对所述中间卷积特征图进行所述损伤掩码特征提取,得到第一特征图;The first convolution subunit is configured to input the intermediate convolution feature map into the first convolution layer in the expansion module, and perform the damage on the intermediate convolution feature map through the first convolution layer Mask feature extraction to obtain the first feature map;
第一采样子单元,用于通过所述扩展模块中的第一采样层对所述第一特征图一进行上采样处理,得到第一采样图;The first sampling subunit is configured to perform up-sampling processing on the first feature map 1 through the first sampling layer in the expansion module to obtain a first sampling map;
第二卷积子单元,用于将所述第一采样图输入所述扩展模块中的第二卷积层,通过所述第二卷积层对所述第一采样图进行所述损伤掩码特征提取,得到第二特征图;The second convolution subunit is configured to input the first sample image into the second convolution layer in the expansion module, and perform the damage mask on the first sample image through the second convolution layer Feature extraction to obtain a second feature map;
第二采样子单元,用于通过所述扩展模块中的第二采样层对所述第二特征图进行上采样处理,得到第二采样图;The second sampling subunit is configured to perform up-sampling processing on the second feature map through the second sampling layer in the expansion module to obtain a second sampling map;
第三卷积子单元,用于将所述第二采样图输入所述扩展模块中的第三卷积层,通过所述第三卷积层对所述第二采样图进行所述损伤掩码特征提取,得到第三特征图;The third convolution subunit is used to input the second sample image into the third convolution layer in the expansion module, and perform the damage mask on the second sample image through the third convolution layer Feature extraction to obtain the third feature map;
第三采样子单元,用于通过所述扩展模块中的第三采样层对所述第三特征图进行上采样处理,得到多通道特征图。The third sampling subunit is configured to perform up-sampling processing on the third feature map through the third sampling layer in the expansion module to obtain a multi-channel feature map.
关于损伤检测模型训练装置的具体限定可以参见上文中对于损伤检测模型训练方法的限定,在此不再赘述。上述损伤检测模型训练装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the damage detection model training device, please refer to the above definition of the damage detection model training method, which will not be repeated here. Each module in the above-mentioned damage detection model training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一实施例中,提供一种车损检测装置,该车损检测装置与上述实施例中车损检测方法一一对应。如图8所示,该车损检测装置包括获取模块101和检测模块102。各功能模块详细说明如下:In one embodiment, a vehicle damage detection device is provided, and the vehicle damage detection device corresponds to the vehicle damage detection method in the above-mentioned embodiment in a one-to-one correspondence. As shown in FIG. 8, the vehicle damage detection device includes an acquisition module 101 and a detection module 102. The detailed description of each functional module is as follows:
接收模块101,用于接收到车损检测指令,获取车损图像;The receiving module 101 is configured to receive a car damage detection instruction and obtain a car damage image;
检测模块102,用于将所述车损图像输入如上述损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The detection module 102 is configured to input the car damage image into the damage detection model trained as the above damage detection model training method, extract damage features from the damage detection model, and obtain the output of the damage detection model according to the damage feature. Final result; the final result includes damage type and damage area, and the final result characterizes the damage type and damage area of all damage locations in the car damage image.
关于车损检测装置的具体限定可以参见上文中对于车损检测方法的限定,在此不再赘述。上述车损检测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the vehicle damage detection device, please refer to the above limitation of the vehicle damage detection method, which will not be repeated here. The various modules in the vehicle damage detection device described above can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和 数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括可读存储介质、内存储器。该可读存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种损伤检测模型训练方法,或者车损检测方法。本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 9. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer readable instructions in the readable storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer-readable instruction is executed by the processor to realize a damage detection model training method or a vehicle damage detection method. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中损伤检测模型训练方法,或者处理器执行计算机可读指令时实现上述实施例中车损检测方法。In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor. When the processor executes the computer-readable instructions, the damage in the above-mentioned embodiment is realized. The detection model training method, or the processor executes the computer-readable instructions to implement the vehicle damage detection method in the above embodiment.
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质;该可读存储介质上存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现上述实施例中损伤检测模型训练方法,或者计算机程序被处理器执行时实现上述实施例中车损检测方法。In one embodiment, one or more readable storage media storing computer readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage. Medium; the readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, the one or more processors implement the damage detection model training method in the above-mentioned embodiments, or the computer When the program is executed by the processor, the vehicle damage detection method in the foregoing embodiment is implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质或易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be implemented by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer. In a readable storage medium or a volatile readable storage medium, when the computer readable instruction is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a 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 chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as required. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种损伤检测模型训练方法,其中,包括:A damage detection model training method, which includes:
    获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
    将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated; the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
    将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;Input the intermediate convolution feature map into the mask prediction branch model containing the second parameter;
    通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
    将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damage sample image into the first loss model to obtain the first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value;
    根据所述第一损失值和所述第二损失值,确定总损失值;Determine a total loss value according to the first loss value and the second loss value;
    在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。When the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the preset When the convergence condition is set, the damage detection model after convergence is recorded as the training completed damage detection model.
  2. 如权利要求1所述的损伤检测模型训练方法,其中,所述根据所述第一损失值和所述第二损失值,确定总损失值,包括:The damage detection model training method according to claim 1, wherein the determining the total loss value according to the first loss value and the second loss value comprises:
    将所述第一损失值和所述第二损失值输入预设的损失模型,通过所述损失模型中的总损失函数计算出所述总损失值;所述总损失函数为:The first loss value and the second loss value are input into a preset loss model, and the total loss value is calculated by the total loss function in the loss model; the total loss function is:
    L=w 1×X1+w 2×X2 L=w 1 ×X1+w 2 ×X2
    其中,among them,
    X1为第一损失值;X1 is the first loss value;
    X2为第二损失值;X2 is the second loss value;
    w 1为第一损失值的权重; w 1 is the weight of the first loss value;
    w 2为第二损失值的权重。 w 2 is the weight of the second loss value.
  3. 如权利要求1所述的损伤检测模型训练方法,其中,获取损伤样本集之前,包括:The damage detection model training method according to claim 1, wherein before obtaining the damage sample set, it comprises:
    获取样本图像和公开数据图像;所述样本图像为拍摄的含有损伤位置的图像,所述公开数据图像为KITTI数据集中随机抽取的图像;Acquire sample images and public data images; the sample images are images taken with damage locations, and the public data images are randomly selected images in the KITTI data set;
    通过mixup方法,将所述样本图像与所述公开数据图像进行融合处理,得到融合样本图像;Fusion processing the sample image and the public data image by using a mixup method to obtain a fused sample image;
    将所述融合样本图像确定为所述样本图像对应的损伤样本图像,并将所述损伤样本图像存储在区块链中。The fusion sample image is determined as the damaged sample image corresponding to the sample image, and the damaged sample image is stored in the blockchain.
  4. 如权利要求1所述的损伤检测模型训练方法,其中,所述通过所述掩码预测分支模型获取掩码结果,包括:The damage detection model training method according to claim 1, wherein said obtaining a mask result through the mask prediction branch model comprises:
    将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行损伤掩码特征提取及扩大处理,得到多通道特征图;Input the intermediate convolution feature map to an expansion module in the mask prediction branch model, and perform damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module to obtain a multi-channel feature map;
    将所述多通道特征图输入所述掩码预测分支模型中的分类模块,通过所述分类模块对所述多通道特征图进行分类及预测处理,得到所述中间卷积特征图对应的掩码预测结果;The multi-channel feature map is input to the classification module in the mask prediction branch model, and the multi-channel feature map is classified and predicted by the classification module to obtain the mask corresponding to the intermediate convolution feature map forecast result;
    根据所述中间卷积特征图对应的掩码预测结果,确定所述损伤样本图像对应的掩码结果。According to the mask prediction result corresponding to the intermediate convolution feature map, the mask result corresponding to the damaged sample image is determined.
  5. 如权利要求4所述的损伤检测模型训练方法,其中,将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行扩大处理,得到多通道特征图,包括:The damage detection model training method according to claim 4, wherein the intermediate convolution feature map is input to an expansion module in the mask prediction branch model, and the intermediate convolution feature map is processed by the expansion module. Expand processing to obtain multi-channel feature maps, including:
    将所述中间卷积特征图输入所述扩展模块中的第一卷积层,通过所述第一卷积层对所述中间卷积特征图进行所述损伤掩码特征提取,得到第一特征图;The intermediate convolution feature map is input to the first convolution layer in the expansion module, and the damage mask feature extraction is performed on the intermediate convolution feature map through the first convolution layer to obtain the first feature Figure;
    通过所述扩展模块中的第一采样层对所述第一特征图一进行上采样处理,得到第一采样图;Up-sampling the first feature map 1 through the first sampling layer in the expansion module to obtain a first sampling map;
    将所述第一采样图输入所述扩展模块中的第二卷积层,通过所述第二卷积层对所述第一采样图进行所述损伤掩码特征提取,得到第二特征图;Input the first sampling image to the second convolutional layer in the expansion module, and perform the damage mask feature extraction on the first sampling image through the second convolutional layer to obtain a second feature image;
    通过所述扩展模块中的第二采样层对所述第二特征图进行上采样处理,得到第二采样图;Performing up-sampling processing on the second feature map through the second sampling layer in the expansion module to obtain a second sampling map;
    将所述第二采样图输入所述扩展模块中的第三卷积层,通过所述第三卷积层对所述第二采样图进行所述损伤掩码特征提取,得到第三特征图;Input the second sampling image to the third convolutional layer in the expansion module, and perform the damage mask feature extraction on the second sampling image through the third convolutional layer to obtain a third feature image;
    通过所述扩展模块中的第三采样层对所述第三特征图进行上采样处理,得到多通道特征图。Up-sampling processing is performed on the third feature map through the third sampling layer in the expansion module to obtain a multi-channel feature map.
  6. 一种车损检测方法,其中,包括:A vehicle damage detection method, which includes:
    接收到车损检测指令,获取车损图像;Receive car damage detection instructions and obtain car damage images;
    将所述车损图像输入如权利要求1至5任一项所述损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The car damage image is input into the damage detection model trained by the damage detection model training method according to any one of claims 1 to 5, the damage feature is extracted from the damage detection model, and the damage detection model is obtained according to the damage The final result of the feature output; the final result includes the damage type and the damage area, and the final result represents the damage type and the damage area of all the damage positions in the car damage image.
  7. 一种损伤检测模型训练装置,其中,包括:A damage detection model training device, which includes:
    获取模块,用于获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;The acquisition module is used to acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and the damage label The mask marking map corresponding to the type and at least one rectangular frame area;
    输入模块,用于将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The input module is configured to input the damage sample image into a damage detection model containing the first parameter, and extract damage features in the damage sample image from the damage detection model and generate an intermediate convolution feature map; the damage detection model It is a deep convolutional neural network model based on the YOLOV3 model framework;
    分支模块,用于将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;A branching module, configured to input the intermediate convolution feature map into a mask prediction branch model containing a second parameter;
    输出模块,用于通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The output module is configured to output the training result according to the damage feature through the damage detection model, and at the same time obtain the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangle Region; the mask result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, the mask result includes at least one mask damage type and the corresponding mask damage type Mask tensor map;
    损失模块,用于将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;The loss module is used to input all the damage label types, all the rectangular frame areas, all the sample damage types, and all the sample damage rectangular areas of the damaged sample image into the first loss model to obtain the first loss Value, and input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into the second loss model at the same time to obtain the second loss model. Loss value
    确定模块,用于根据所述第一损失值和所述第二损失值,确定总损失值;A determining module, configured to determine a total loss value according to the first loss value and the second loss value;
    收敛模块,用于在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。The convergence module is configured to iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model when the total loss value does not reach the preset convergence condition, until the total loss value When the preset convergence condition is reached, the damage detection model after convergence is recorded as a damage detection model that has been trained.
  8. 一种车损检测装置,其中,包括:A vehicle damage detection device, which includes:
    接收模块,用于接收到车损检测指令,获取车损图像;The receiving module is used to receive the car damage detection instruction and obtain the car damage image;
    检测模块,用于将所述车损图像输入如权利要求1至5任一项所述损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The detection module is configured to input the car damage image into the damage detection model trained by the damage detection model training method according to any one of claims 1 to 5, and extract damage features from the damage detection model to obtain the damage detection The model outputs a final result according to the damage feature; the final result includes a damage type and a damage area, and the final result represents the damage type and damage area of all damage locations in the car damage image.
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:A computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, wherein the processor implements the following steps when the processor executes the computer-readable instructions:
    获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
    将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated; the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
    将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;Input the intermediate convolution feature map into the mask prediction branch model containing the second parameter;
    通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
    将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和所有所述掩码张量图输入第二损失模型,得到第二损失值;Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damage sample image into the first loss model to obtain the first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value;
    根据所述第一损失值和所述第二损失值,确定总损失值;Determine a total loss value according to the first loss value and the second loss value;
    在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。When the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the preset When the convergence condition is set, the damage detection model after convergence is recorded as the training completed damage detection model.
  10. 如权利要求9所述的计算机设备,其中,所述根据所述第一损失值和所述第二损失值,确定总损失值,包括:9. The computer device according to claim 9, wherein said determining the total loss value according to the first loss value and the second loss value comprises:
    将所述第一损失值和所述第二损失值输入预设的损失模型,通过所述损失模型中的总损失函数计算出所述总损失值;所述总损失函数为:The first loss value and the second loss value are input into a preset loss model, and the total loss value is calculated by the total loss function in the loss model; the total loss function is:
    L=w 1×X1+w 2×X2 L=w 1 ×X1+w 2 ×X2
    其中,among them,
    X1为第一损失值;X1 is the first loss value;
    X2为第二损失值;X2 is the second loss value;
    w 1为第一损失值的权重; w 1 is the weight of the first loss value;
    w 2为第二损失值的权重。 w 2 is the weight of the second loss value.
  11. 如权利要求9所述的计算机设备,其中,获取损伤样本集之前,所述处理器执行所述计算机可读指令时还实现如下步骤:9. The computer device according to claim 9, wherein, before acquiring the damage sample set, the processor further implements the following steps when executing the computer-readable instructions:
    获取样本图像和公开数据图像;所述样本图像为拍摄的含有损伤位置的图像,所述公开数据图像为KITTI数据集中随机抽取的图像;Acquire sample images and public data images; the sample images are images taken with damage locations, and the public data images are randomly selected images in the KITTI data set;
    通过mixup方法,将所述样本图像与所述公开数据图像进行融合处理,得到融合样本图像;Fusion processing the sample image and the public data image by using a mixup method to obtain a fused sample image;
    将所述融合样本图像确定为所述样本图像对应的损伤样本图像,并将所述损伤样本图像存储在区块链中。The fusion sample image is determined as the damaged sample image corresponding to the sample image, and the damaged sample image is stored in the blockchain.
  12. 如权利要求9所述的计算机设备,其中,所述通过所述掩码预测分支模型获取掩码 结果,包括:The computer device according to claim 9, wherein said obtaining the mask result through the mask prediction branch model comprises:
    将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行损伤掩码特征提取及扩大处理,得到多通道特征图;Input the intermediate convolution feature map to an expansion module in the mask prediction branch model, and perform damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module to obtain a multi-channel feature map;
    将所述多通道特征图输入所述掩码预测分支模型中的分类模块,通过所述分类模块对所述多通道特征图进行分类及预测处理,得到所述中间卷积特征图对应的掩码预测结果;The multi-channel feature map is input to the classification module in the mask prediction branch model, and the multi-channel feature map is classified and predicted by the classification module to obtain the mask corresponding to the intermediate convolution feature map forecast result;
    根据所述中间卷积特征图对应的掩码预测结果,确定所述损伤样本图像对应的掩码结果。According to the mask prediction result corresponding to the intermediate convolution feature map, the mask result corresponding to the damaged sample image is determined.
  13. 如权利要求12所述的计算机设备,其中,将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行扩大处理,得到多通道特征图,包括:The computer device according to claim 12, wherein the intermediate convolution feature map is input to an expansion module in the mask prediction branch model, and the intermediate convolution feature map is expanded by the expansion module, Obtain multi-channel feature maps, including:
    将所述中间卷积特征图输入所述扩展模块中的第一卷积层,通过所述第一卷积层对所述中间卷积特征图进行所述损伤掩码特征提取,得到第一特征图;The intermediate convolution feature map is input to the first convolution layer in the expansion module, and the damage mask feature extraction is performed on the intermediate convolution feature map through the first convolution layer to obtain the first feature Figure;
    通过所述扩展模块中的第一采样层对所述第一特征图一进行上采样处理,得到第一采样图;Up-sampling the first feature map 1 through the first sampling layer in the expansion module to obtain a first sampling map;
    将所述第一采样图输入所述扩展模块中的第二卷积层,通过所述第二卷积层对所述第一采样图进行所述损伤掩码特征提取,得到第二特征图;Input the first sampling image to the second convolutional layer in the expansion module, and perform the damage mask feature extraction on the first sampling image through the second convolutional layer to obtain a second feature image;
    通过所述扩展模块中的第二采样层对所述第二特征图进行上采样处理,得到第二采样图;Performing up-sampling processing on the second feature map through the second sampling layer in the expansion module to obtain a second sampling map;
    将所述第二采样图输入所述扩展模块中的第三卷积层,通过所述第三卷积层对所述第二采样图进行所述损伤掩码特征提取,得到第三特征图;Input the second sampling image to the third convolutional layer in the expansion module, and perform the damage mask feature extraction on the second sampling image through the third convolutional layer to obtain a third feature image;
    通过所述扩展模块中的第三采样层对所述第三特征图进行上采样处理,得到多通道特征图。Up-sampling processing is performed on the third feature map through the third sampling layer in the expansion module to obtain a multi-channel feature map.
  14. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时还实现如下步骤:A computer device includes a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, wherein the processor further implements the following steps when executing the computer readable instructions :
    接收到车损检测指令,获取车损图像;Receive car damage detection instructions and obtain car damage images;
    将所述车损图像输入通过损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The car damage image is input to the damage detection model trained by the damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final result Including the damage type and the damage area, the final result represents the damage type and the damage area of all the damage positions in the car damage image.
  15. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
    获取损伤样本集;所述损伤样本集包括损伤样本图像,一个所述损伤样本图像与一个损伤标签组关联;所述损伤标签组包括至少一个损伤标签类型、与所述损伤标签类型对应的掩码标注图和至少一个矩形框区域;Acquire a damage sample set; the damage sample set includes damage sample images, and one damage sample image is associated with a damage label group; the damage label group includes at least one damage label type and a mask corresponding to the damage label type Mark the map and at least one rectangular frame area;
    将所述损伤样本图像输入含有第一参数的损伤检测模型,通过所述损伤检测模型提取所述损伤样本图像中的损伤特征并生成中间卷积特征图;所述损伤检测模型为基于YOLOV3模型构架的深度卷积神经网络模型;The damage sample image is input into a damage detection model containing the first parameter, and the damage feature in the damage sample image is extracted through the damage detection model and an intermediate convolution feature map is generated; the damage detection model is based on the YOLOV3 model framework Deep convolutional neural network model;
    将所述中间卷积特征图输入含有第二参数的掩码预测分支模型;Input the intermediate convolution feature map into the mask prediction branch model containing the second parameter;
    通过所述损伤检测模型根据所述损伤特征输出训练结果,同时通过所述掩码预测分支模型获取掩码结果;所述训练结果包括至少一个样本损伤类型和至少一个样本损伤矩形区域;所述掩码结果为根据自所述中间卷积特征图中提取的损伤掩码特征获取并输出,所述掩码结果包括至少一个掩码损伤类型和与所述掩码损伤类型对应的掩码张量图;The damage detection model outputs the training result according to the damage feature, and at the same time obtains the mask result through the mask prediction branch model; the training result includes at least one sample damage type and at least one sample damage rectangular area; the mask The code result is obtained and output according to the damage mask feature extracted from the intermediate convolution feature map, and the mask result includes at least one mask damage type and a mask tensor map corresponding to the mask damage type ;
    将所述损伤样本图像的所有所述损伤标签类型、所有所述矩形框区域、所有所述样本损伤类型和所有所述样本损伤矩形区域输入第一损失模型,得到第一损失值,同时将所述损伤样本图像的所有所述损伤标签类型、所有所述掩码标注图、所有所述掩码损伤类型和 所有所述掩码张量图输入第二损失模型,得到第二损失值;Input all the damage label types, all the rectangular frame areas, all the sample damage types and all the sample damage rectangular areas of the damage sample image into the first loss model to obtain the first loss value, and at the same time Input all the damage label types, all the mask annotation maps, all the mask damage types, and all the mask tensor maps of the damage sample image into a second loss model to obtain a second loss value;
    根据所述第一损失值和所述第二损失值,确定总损失值;Determine a total loss value according to the first loss value and the second loss value;
    在所述总损失值未达到预设的收敛条件时,迭代更新所述损伤检测模型的第一参数和所述掩码预测分支模型的第二参数,直至所述总损失值达到所述预设的收敛条件时,将收敛之后的所述损伤检测模型记录为训练完成的损伤检测模型。When the total loss value does not reach the preset convergence condition, iteratively update the first parameter of the damage detection model and the second parameter of the mask prediction branch model until the total loss value reaches the preset When the convergence condition is set, the damage detection model after convergence is recorded as the training completed damage detection model.
  16. 如权利要求15所述的可读存储介质,其中,所述根据所述第一损失值和所述第二损失值,确定总损失值,包括:15. The readable storage medium of claim 15, wherein the determining the total loss value according to the first loss value and the second loss value comprises:
    将所述第一损失值和所述第二损失值输入预设的损失模型,通过所述损失模型中的总损失函数计算出所述总损失值;所述总损失函数为:The first loss value and the second loss value are input into a preset loss model, and the total loss value is calculated by the total loss function in the loss model; the total loss function is:
    L=w 1×X1+w 2×X2 L=w 1 ×X1+w 2 ×X2
    其中,among them,
    X1为第一损失值;X1 is the first loss value;
    X2为第二损失值;X2 is the second loss value;
    w 1为第一损失值的权重; w 1 is the weight of the first loss value;
    w 2为第二损失值的权重。 w 2 is the weight of the second loss value.
  17. 如权利要求15所述的可读存储介质,其中,获取损伤样本集之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:15. The readable storage medium of claim 15, wherein, before obtaining the damage sample set, when the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the following steps:
    获取样本图像和公开数据图像;所述样本图像为拍摄的含有损伤位置的图像,所述公开数据图像为KITTI数据集中随机抽取的图像;Acquire sample images and public data images; the sample images are images taken with damage locations, and the public data images are randomly selected images in the KITTI data set;
    通过mixup方法,将所述样本图像与所述公开数据图像进行融合处理,得到融合样本图像;Fusion processing the sample image and the public data image by using a mixup method to obtain a fused sample image;
    将所述融合样本图像确定为所述样本图像对应的损伤样本图像,并将所述损伤样本图像存储在区块链中。The fusion sample image is determined as the damaged sample image corresponding to the sample image, and the damaged sample image is stored in the blockchain.
  18. 如权利要求15所述的可读存储介质,其中,所述通过所述掩码预测分支模型获取掩码结果,包括:15. The readable storage medium according to claim 15, wherein the obtaining the mask result through the mask prediction branch model comprises:
    将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行损伤掩码特征提取及扩大处理,得到多通道特征图;Input the intermediate convolution feature map to an expansion module in the mask prediction branch model, and perform damage mask feature extraction and expansion processing on the intermediate convolution feature map through the expansion module to obtain a multi-channel feature map;
    将所述多通道特征图输入所述掩码预测分支模型中的分类模块,通过所述分类模块对所述多通道特征图进行分类及预测处理,得到所述中间卷积特征图对应的掩码预测结果;The multi-channel feature map is input to the classification module in the mask prediction branch model, and the multi-channel feature map is classified and predicted by the classification module to obtain the mask corresponding to the intermediate convolution feature map forecast result;
    根据所述中间卷积特征图对应的掩码预测结果,确定所述损伤样本图像对应的掩码结果。According to the mask prediction result corresponding to the intermediate convolution feature map, the mask result corresponding to the damaged sample image is determined.
  19. 如权利要求18所述的可读存储介质,其中,将所述中间卷积特征图输入所述掩码预测分支模型中的扩展模块,通过所述扩展模块对所述中间卷积特征图进行扩大处理,得到多通道特征图,包括:The readable storage medium according to claim 18, wherein the intermediate convolution feature map is input to an expansion module in the mask prediction branch model, and the intermediate convolution feature map is expanded by the expansion module Processing to obtain a multi-channel feature map, including:
    将所述中间卷积特征图输入所述扩展模块中的第一卷积层,通过所述第一卷积层对所述中间卷积特征图进行所述损伤掩码特征提取,得到第一特征图;The intermediate convolution feature map is input to the first convolution layer in the expansion module, and the damage mask feature extraction is performed on the intermediate convolution feature map through the first convolution layer to obtain the first feature Figure;
    通过所述扩展模块中的第一采样层对所述第一特征图一进行上采样处理,得到第一采样图;Up-sampling the first feature map 1 through the first sampling layer in the expansion module to obtain a first sampling map;
    将所述第一采样图输入所述扩展模块中的第二卷积层,通过所述第二卷积层对所述第一采样图进行所述损伤掩码特征提取,得到第二特征图;Input the first sampling image to the second convolutional layer in the expansion module, and perform the damage mask feature extraction on the first sampling image through the second convolutional layer to obtain a second feature image;
    通过所述扩展模块中的第二采样层对所述第二特征图进行上采样处理,得到第二采样图;Performing up-sampling processing on the second feature map through the second sampling layer in the expansion module to obtain a second sampling map;
    将所述第二采样图输入所述扩展模块中的第三卷积层,通过所述第三卷积层对所述第二采样图进行所述损伤掩码特征提取,得到第三特征图;Input the second sampling image to the third convolutional layer in the expansion module, and perform the damage mask feature extraction on the second sampling image through the third convolutional layer to obtain a third feature image;
    通过所述扩展模块中的第三采样层对所述第三特征图进行上采样处理,得到多通道特 征图。Up-sampling of the third feature map is performed through the third sampling layer in the expansion module to obtain a multi-channel feature map.
  20. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:One or more readable storage media storing computer readable instructions, where when the computer readable instructions are executed by one or more processors, the one or more processors further execute the following steps:
    接收到车损检测指令,获取车损图像;Receive car damage detection instructions and obtain car damage images;
    将所述车损图像输入通过损伤检测模型训练方法训练完成的损伤检测模型,通过所述损伤检测模型提取损伤特征,获取所述损伤检测模型根据所述损伤特征输出的最终结果;所述最终结果包括损伤类型和损伤区域,所述最终结果表征了所述车损图像中的所有损伤位置的损伤类型和损伤区域。The car damage image is input to the damage detection model trained by the damage detection model training method, the damage feature is extracted from the damage detection model, and the final result output by the damage detection model according to the damage feature is obtained; the final result Including the damage type and the damage area, the final result represents the damage type and the damage area of all the damage positions in the car damage image.
PCT/CN2020/120757 2020-06-08 2020-10-14 Damage detection model training and vehicle damage detection methods, device, apparatus, and medium WO2021135499A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010514057.9 2020-06-08
CN202010514057.9A CN111667011B (en) 2020-06-08 2020-06-08 Damage detection model training and vehicle damage detection method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2021135499A1 true WO2021135499A1 (en) 2021-07-08

Family

ID=72385794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/120757 WO2021135499A1 (en) 2020-06-08 2020-10-14 Damage detection model training and vehicle damage detection methods, device, apparatus, and medium

Country Status (2)

Country Link
CN (1) CN111667011B (en)
WO (1) WO2021135499A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113762393A (en) * 2021-09-08 2021-12-07 杭州网易智企科技有限公司 Model training method, gaze point detection method, medium, device, and computing device
CN113780335A (en) * 2021-07-26 2021-12-10 华南师范大学 Small sample commodity image classification method, device, equipment and storage medium
CN113807353A (en) * 2021-09-29 2021-12-17 中国平安人寿保险股份有限公司 Image conversion model training method, device, equipment and storage medium
CN114842198A (en) * 2022-05-31 2022-08-02 平安科技(深圳)有限公司 Intelligent loss assessment method, device and equipment for vehicle and storage medium
CN114972771A (en) * 2022-06-22 2022-08-30 平安科技(深圳)有限公司 Vehicle loss assessment and claim settlement method and device, electronic equipment and storage medium
CN115272763A (en) * 2022-07-27 2022-11-01 四川大学 Bird identification method based on fine-grained feature fusion
CN115661052A (en) * 2022-10-13 2023-01-31 高峰医疗器械(无锡)有限公司 Alveolar bone detection method, alveolar bone detection device, alveolar bone detection equipment and storage medium
WO2023151333A1 (en) * 2022-02-08 2023-08-17 腾讯科技(深圳)有限公司 Video processing method and apparatus, device and storage medium
CN116976423A (en) * 2023-06-09 2023-10-31 清华大学 Training method of pre-accident risk assessment model fusing post-accident vehicle dynamics
CN117874905A (en) * 2023-12-14 2024-04-12 广州民航职业技术学院 Method, system, equipment and storage medium for predicting damage of airplane windshield

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111667011B (en) * 2020-06-08 2023-07-14 平安科技(深圳)有限公司 Damage detection model training and vehicle damage detection method, device, equipment and medium
CN112131421B (en) * 2020-09-23 2023-09-15 平安科技(深圳)有限公司 Medical image classification method, device, equipment and storage medium
CN112330621A (en) * 2020-10-30 2021-02-05 康键信息技术(深圳)有限公司 Method and device for carrying out abnormity classification on skin image based on artificial intelligence
CN112308150B (en) * 2020-11-02 2022-04-15 平安科技(深圳)有限公司 Target detection model training method and device, computer equipment and storage medium
CN112560427B (en) * 2020-12-16 2023-09-22 平安银行股份有限公司 Problem expansion method, device, electronic equipment and medium
CN112668462B (en) * 2020-12-25 2024-05-07 平安科技(深圳)有限公司 Vehicle damage detection model training, vehicle damage detection method, device, equipment and medium
CN112651453B (en) * 2020-12-30 2023-10-13 北京百度网讯科技有限公司 Self-adapting method, device, equipment and storage medium of loss function
CN112801951A (en) * 2021-01-15 2021-05-14 深圳市商汤科技有限公司 Target component damage detection method, device, equipment and storage medium
CN112907576B (en) * 2021-03-25 2024-02-02 平安科技(深圳)有限公司 Vehicle damage grade detection method and device, computer equipment and storage medium
CN113505648B (en) * 2021-06-10 2023-12-19 深圳市优必选科技股份有限公司 Pedestrian detection method, device, terminal equipment and storage medium
CN113470124B (en) * 2021-06-30 2023-09-22 北京达佳互联信息技术有限公司 Training method and device for special effect model, and special effect generation method and device
CN113657193A (en) * 2021-07-27 2021-11-16 中铁工程装备集团有限公司 Segment damage detection method and system based on computer vision and shield machine
CN113657409A (en) * 2021-08-16 2021-11-16 平安科技(深圳)有限公司 Vehicle loss detection method, device, electronic device and storage medium
CN113706545B (en) * 2021-08-23 2024-03-26 浙江工业大学 Semi-supervised image segmentation method based on dual-branch nerve discrimination dimension reduction
CN114972229A (en) * 2022-05-17 2022-08-30 平安科技(深圳)有限公司 Loss assessment detection method and device based on material type, electronic equipment and medium
CN114898155B (en) * 2022-05-18 2024-05-28 平安科技(深圳)有限公司 Vehicle damage assessment method, device, equipment and storage medium
CN115272746B (en) * 2022-06-30 2023-04-07 哈尔滨工业大学 Universal identification method and system for multiple types of damage of bridge guided by small sample circulation consistency
CN114936327B (en) * 2022-07-22 2022-10-28 腾讯科技(深圳)有限公司 Element recognition model acquisition method and device, computer equipment and storage medium
CN117710379B (en) * 2024-02-06 2024-05-10 杭州灵西机器人智能科技有限公司 Nondestructive testing model construction method, nondestructive testing device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921068A (en) * 2018-06-22 2018-11-30 深源恒际科技有限公司 A kind of automatic damage identification method of automobile appearance based on deep neural network and system
CN109325531A (en) * 2018-09-17 2019-02-12 平安科技(深圳)有限公司 Car damage identification method, device, equipment and storage medium based on image
CN109949317A (en) * 2019-03-06 2019-06-28 东南大学 Based on the semi-supervised image instance dividing method for gradually fighting study
US20190205606A1 (en) * 2016-07-21 2019-07-04 Siemens Healthcare Gmbh Method and system for artificial intelligence based medical image segmentation
CN110287768A (en) * 2019-05-06 2019-09-27 浙江君嘉智享网络科技有限公司 Digital image recognition car damage identification method
CN111667011A (en) * 2020-06-08 2020-09-15 平安科技(深圳)有限公司 Damage detection model training method, damage detection model training device, damage detection method, damage detection device, damage detection equipment and damage detection medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111160379B (en) * 2018-11-07 2023-09-15 北京嘀嘀无限科技发展有限公司 Training method and device of image detection model, and target detection method and device
CN110874594B (en) * 2019-09-23 2023-06-30 平安科技(深圳)有限公司 Human body appearance damage detection method and related equipment based on semantic segmentation network
CN111079632A (en) * 2019-12-12 2020-04-28 上海眼控科技股份有限公司 Training method and device of text detection model, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190205606A1 (en) * 2016-07-21 2019-07-04 Siemens Healthcare Gmbh Method and system for artificial intelligence based medical image segmentation
CN108921068A (en) * 2018-06-22 2018-11-30 深源恒际科技有限公司 A kind of automatic damage identification method of automobile appearance based on deep neural network and system
CN109325531A (en) * 2018-09-17 2019-02-12 平安科技(深圳)有限公司 Car damage identification method, device, equipment and storage medium based on image
CN109949317A (en) * 2019-03-06 2019-06-28 东南大学 Based on the semi-supervised image instance dividing method for gradually fighting study
CN110287768A (en) * 2019-05-06 2019-09-27 浙江君嘉智享网络科技有限公司 Digital image recognition car damage identification method
CN111667011A (en) * 2020-06-08 2020-09-15 平安科技(深圳)有限公司 Damage detection model training method, damage detection model training device, damage detection method, damage detection device, damage detection equipment and damage detection medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PETR HURTIK; VOJTECH MOLEK; JAN HULA; MAREK VAJGL; PAVEL VLASANEK; TOMAS NEJEZCHLEBA: "Poly-YOLO: higher speed, more precise detection and instance segmentation for YOLOv3", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 29 May 2020 (2020-05-29), 201 Olin Library Cornell University Ithaca, NY 14853, XP081684280 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780335B (en) * 2021-07-26 2023-09-29 华南师范大学 Small sample commodity image classification method, device, equipment and storage medium
CN113780335A (en) * 2021-07-26 2021-12-10 华南师范大学 Small sample commodity image classification method, device, equipment and storage medium
CN113762393A (en) * 2021-09-08 2021-12-07 杭州网易智企科技有限公司 Model training method, gaze point detection method, medium, device, and computing device
CN113762393B (en) * 2021-09-08 2024-04-30 杭州网易智企科技有限公司 Model training method, gaze point detection method, medium, device and computing equipment
CN113807353A (en) * 2021-09-29 2021-12-17 中国平安人寿保险股份有限公司 Image conversion model training method, device, equipment and storage medium
CN113807353B (en) * 2021-09-29 2023-08-01 中国平安人寿保险股份有限公司 Image conversion model training method, device, equipment and storage medium
WO2023151333A1 (en) * 2022-02-08 2023-08-17 腾讯科技(深圳)有限公司 Video processing method and apparatus, device and storage medium
CN114842198A (en) * 2022-05-31 2022-08-02 平安科技(深圳)有限公司 Intelligent loss assessment method, device and equipment for vehicle and storage medium
CN114972771A (en) * 2022-06-22 2022-08-30 平安科技(深圳)有限公司 Vehicle loss assessment and claim settlement method and device, electronic equipment and storage medium
CN115272763A (en) * 2022-07-27 2022-11-01 四川大学 Bird identification method based on fine-grained feature fusion
CN115661052A (en) * 2022-10-13 2023-01-31 高峰医疗器械(无锡)有限公司 Alveolar bone detection method, alveolar bone detection device, alveolar bone detection equipment and storage medium
CN115661052B (en) * 2022-10-13 2023-09-12 高峰医疗器械(无锡)有限公司 Alveolar bone detection method, device, equipment and storage medium
CN116976423A (en) * 2023-06-09 2023-10-31 清华大学 Training method of pre-accident risk assessment model fusing post-accident vehicle dynamics
CN117874905A (en) * 2023-12-14 2024-04-12 广州民航职业技术学院 Method, system, equipment and storage medium for predicting damage of airplane windshield

Also Published As

Publication number Publication date
CN111667011B (en) 2023-07-14
CN111667011A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
WO2021135499A1 (en) Damage detection model training and vehicle damage detection methods, device, apparatus, and medium
US11710293B2 (en) Target detection method and apparatus, computer-readable storage medium, and computer device
US11244435B2 (en) Method and apparatus for generating vehicle damage information
WO2022213879A1 (en) Target object detection method and apparatus, and computer device and storage medium
WO2021114809A1 (en) Vehicle damage feature detection method and apparatus, computer device, and storage medium
WO2020177480A1 (en) Vehicle accident identification method and apparatus, and electronic device
CN111950329A (en) Target detection and model training method and device, computer equipment and storage medium
CN109543627A (en) A kind of method, apparatus and computer equipment judging driving behavior classification
CN110516541B (en) Text positioning method and device, computer readable storage medium and computer equipment
CN112115783A (en) Human face characteristic point detection method, device and equipment based on deep knowledge migration
WO2021212658A1 (en) Ocr image sample generation method and apparatus, print font verification method and apparatus, and device and medium
CN111651992A (en) Named entity labeling method and device, computer equipment and storage medium
WO2021114612A1 (en) Target re-identification method and apparatus, computer device, and storage medium
WO2022057309A1 (en) Lung feature recognition method and apparatus, computer device, and storage medium
WO2022134354A1 (en) Vehicle loss detection model training method and apparatus, vehicle loss detection method and apparatus, and device and medium
WO2021189959A1 (en) Brain midline recognition method and apparatus, and computer device and storage medium
WO2021135552A1 (en) Segmentation effect assessment method and apparatus based on deep learning, and device and medium
CN111178358A (en) Text recognition method and device, computer equipment and storage medium
CN113837151A (en) Table image processing method and device, computer equipment and readable storage medium
CN114550051A (en) Vehicle loss detection method and device, computer equipment and storage medium
CN112016502A (en) Safety belt detection method and device, computer equipment and storage medium
CN112232336A (en) Certificate identification method, device, equipment and storage medium
CN117115823A (en) Tamper identification method and device, computer equipment and storage medium
CN114241411B (en) Counting model processing method and device based on target detection and computer equipment
CN116091596A (en) Multi-person 2D human body posture estimation method and device from bottom to top

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20910940

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20910940

Country of ref document: EP

Kind code of ref document: A1