# US 11,120,308 B2 · Vehicle damage detection method based on image analysis, electronic device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,120,308 B2
- Document ID: US11120308B2
- Status: Granted
- Kind: B2
- Application number: 16/726,790
- Filed: 2019-12-24
- Published: 2021-06-24
- Granted: 2021-09-14
- Earliest claimed: 2019-12-24
- Assignees: Ping An Technology (Shenzhen) Co., Ltd.
- Applicants: Ping An Technology (Shenzhen) Co., Ltd.
- Inventors: Kun Li; Hao Zhang; Ruei-Sung Lin; Mei Han
- Web page: https://patentgrep.com/patent/US11120308B2

## CPC

- G06V 10/764: using classification, e.g. of video objects
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/2413: based on distances to training or reference patterns
- G06V 10/255: {Detecting or recognising potential candidate objects based on visual cues, e.g. shapes}
- G06V 2201/08: Detecting or categorising vehicles
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A vehicle damage detection method based on image analysis, an electronic device, and a storage medium are provided. In the vehicle damage detection method, query images are obtained by filtering received images through a pre-trained Single Shot MultiBox Detector (SSD) object detection model, and a feature vector of each of the query images is obtained by inputting each of the query images into a residual network. Target output data is obtained using a Transformer model, similar images of the query images are obtained by processing the target output data using a pre-trained similarity judgment model. Loss of a current vehicle damage assessment case is evaluated based on similar cases, and evaluated loss is outputted. By utilizing the vehicle damage detection method, effectiveness of the vehicle damage detection is improved, and automatic evaluation of a loss is achieved.

## Claims

### Claim 1

A vehicle damage detection method based on image analysis, the method comprising:
in response to received images of a current vehicle damage assessment case, obtaining query images by filtering the received images using a pre-trained Single Shot MultiBox Detector (SSD) object detection model, the pre-trained SSD object detection model comprising a vehicle damage component detection model and a vehicle damage classification model;
determining a vehicle damaged component in each of the query images according to output data of the vehicle damage component detection model, and a vehicle damage type of each of the query images according to output data of the vehicle damage classification model;
retrieving candidate images according to the vehicle damaged component and the vehicle damage type of each of the query images;
determining a feature vector of each of the candidate images corresponding to each of the query images;
inputting each of the query images into a residual network and obtaining a feature vector of each of the query images;
obtaining target output data by performing a codec procedure on the feature vector of each of the query images and the feature vector of each of the candidate images corresponding to each of the query images using a Transformer model;
obtaining similar images of the query images by processing the target output data using a pre-trained similarity judgment model, comprising: for each of the query images, obtaining a first embedded vector of the query image from the target output data, and a second embedded vector of the candidate image corresponding to the query image; calculating a distance between the first embedded vector and each second embedded vector; and determining candidate images those have second embedded vectors corresponding to a minimum distance, as the similar images of the query image;
determining similar cases of the current vehicle damage assessment case using the similar images;
evaluating loss of the current vehicle damage assessment case based on the similar cases;
outputting evaluated loss of the current vehicle damage assessment case.

### Claim 2 (depends on 1)

The vehicle damage detection method based on image analysis according to claim 1, further comprising:
obtaining training samples;
constructing a plurality of sets of training data according to the training samples;
obtaining the similarity judgment model by training a prototype network based on a cross entropy loss function using the plurality of sets of training data.

### Claim 3 (depends on 2)

The vehicle damage detection method based on image analysis according to claim 2, wherein the training samples correspond to a plurality of vehicle damage types, each of the plurality of vehicle damage types corresponds to a plurality of images, and the plurality of sets of the training data are constructed according to the training samples by:
randomly selecting a first preset number of vehicle damage types from the plurality of vehicle damage types to be target vehicle damage types;
constructing an initial image set based on images corresponding to the target vehicle damage types;
for each of the target vehicle damage types, randomly selecting a second preset number of images from a plurality of images corresponding to each of the target vehicle damage types;
obtaining a candidate image set by integrating selected images;
excluding the candidate image set from the initial image set;
randomly acquiring any image as a predicted image from the initial image set after excluding;
determining a combination of the predicted image and the candidate image set as a set of training data.

### Claim 4 (depends on 3)

The vehicle damage detection method based on image analysis according to claim 3, further comprising:
determining a feature vector of each image in a second preset number of images corresponding to each of the target vehicle damage types;
calculating a vector sum of the feature vector of each image and obtaining a feature vector of each of the target vehicle damage types;
determining a feature vector of the predicted image;
calculating a distance between the feature vector of the predicted image and the feature vector of each of the target vehicle damage types;
determining a target vehicle damage level corresponding to a minimum distance to be a vehicle damage level of the predicted image.

### Claim 5 (depends on 1)

The vehicle damage detection method based on image analysis according to claim 1, wherein determining the similar cases of the current vehicle damage assessment case using the similar images comprises:
determining a vehicle damage assessment case corresponding to each of the candidate images;
calculating a number of candidate images corresponding to each vehicle damage assessment case;
determining vehicle damage assessment cases corresponding to a maximum number, to be the similar cases of the current vehicle damage assessment case; or
in response that there are a plurality of vehicle damage assessment cases having a same number, calculating a sum of distances between the candidate images of each vehicle damage assessment case and a corresponding query image, and determining a vehicle damage assessment case corresponding to a minimum sum to be the similar cases of the current vehicle damage assessment case.

### Claim 6 (depends on 1)

The vehicle damage detection method based on image analysis according to claim 1:
in response that there is one similar case, wherein the method further comprises:
determining loss of the one similar case to be loss of the current vehicle damage assessment case; or
in response that there are a plurality of similar cases, wherein the method further comprises:
obtaining loss of each of the plurality of similar cases, calculating an average value of the obtained loss as the loss of the current vehicle damage assessment case; or
obtaining the loss of each of the plurality of similar cases and a weight of each of the plurality of similar cases, calculating a weighted sum of the loss of each of the plurality of similar cases and the weight of each of the plurality of similar cases as the loss of the current vehicle damage assessment case; or
obtaining the loss of each of the plurality of similar cases, obtaining maximum loss and minimum loss, and determining a data range as the loss of the current vehicle damage assessment case.

### Claim 7

An electronic device, comprising:
at least one processor; and
a memory storing a plurality of instructions, which when executed by the processor, causes the at least one processor to:
in response to received images of a current vehicle damage assessment case, obtain query images by filtering the received images using a pre-trained Single Shot MultiBox Detector (SSD) object detection model, the pre-trained SSD object detection model comprising a vehicle damage component detection model and a vehicle damage classification model;
determine a vehicle damaged component in each of the query images according to output data of the vehicle damage component detection model, and a vehicle damage type of each of the query images according to output data of the vehicle damage classification model;
retrieve candidate images according to the vehicle damaged component and the vehicle damage type of each of the query images;
determine a feature vector of each of the candidate images corresponding to each of the query images;
input each of the query images into a residual network and obtain a feature vector of each of the query images;
obtain target output data by performing a codec procedure on the feature vector of each of the query images and the feature vector of each of the candidate images corresponding to each of the query images using a Transformer model;
obtain similar images of the query images by processing the target output data using a pre-trained similarity judgment model, comprising: for each of the query images, obtaining a first embedded vector of the query image from the target output data, and a second embedded vector of the candidate image corresponding to the query image; calculating a distance between the first embedded vector and each second embedded vector; and determining candidate images those have second embedded vectors corresponding to a minimum distance, as the similar images of the query image;
determine similar cases of the current vehicle damage assessment case using the similar images;
evaluate loss of the current vehicle damage assessment case based on the similar cases;
output evaluated loss of the current vehicle damage assessment case.

### Claim 8 (depends on 7)

The electronic device according to claim 7, wherein the at least one processor is further caused to:
obtain training samples;
construct a plurality of sets of training data according to the training samples;
obtain the similarity judgment model by training a prototype network based on a cross entropy loss function using the plurality of sets of training data.

### Claim 9 (depends on 8)

The electronic device according to claim 8, wherein the training samples correspond to a plurality of vehicle damage types, each of the plurality of vehicle damage types corresponds to a plurality of images, wherein the at least one processor is further caused to:
randomly select a first preset number of vehicle damage types from the plurality of vehicle damage types to be target vehicle damage types;
construct an initial image set based on images corresponding to the target vehicle damage types;
for each of the target vehicle damage types, randomly select a second preset number of images from a plurality of images corresponding to each of the target vehicle damage types;
obtain a candidate image set by integrating selected images;
exclude the candidate image set from the initial image set;
randomly acquire any image as a predicted image from the initial image set after excluding;
determine a combination of the predicted image and the candidate image set as a set of training data.

### Claim 10 (depends on 9)

The electronic device according to claim 9, wherein the at least one processor is further caused to:
determine a feature vector of each image in a second preset number of images corresponding to each of the target vehicle damage types;
calculate a vector sum of the feature vector of each image and obtain a feature vector of each of the target vehicle damage types;
determine a feature vector of the predicted image;
calculate a distance between the feature vector of the predicted image and the feature vector of each of the target vehicle damage types;
determine a target vehicle damage level corresponding to a minimum distance to be a vehicle damage level of the predicted image.

### Claim 11 (depends on 7)

The electronic device according to claim 7, wherein the at least one processor is further caused to:
determine a vehicle damage assessment case corresponding to each of the candidate images;
calculate a number of candidate images corresponding to each vehicle damage assessment case;
determine vehicle damage assessment cases corresponding to a maximum number, to be the similar cases of the current vehicle damage assessment case; or
in response that there are a plurality of vehicle damage assessment cases having a same number, calculate a sum of distances between the candidate images of each vehicle damage assessment case and a corresponding query image, and determine a vehicle damage assessment case corresponding to a minimum sum to be the similar cases of the current vehicle damage assessment case.

### Claim 12 (depends on 7)

The electronic device f according to claim 7:
in response that there is one similar case, wherein the at least one processor is further caused to:
determine loss of the one similar case to be loss of the current vehicle damage assessment case; or
in response that there are a plurality of similar cases, wherein the at least one processor is further caused to:
obtain loss of each of the plurality of similar cases, calculate an average value of obtained loss as the loss of the current vehicle damage assessment case; or
obtain the loss of each of the plurality of similar cases and a weight of each of the plurality of similar cases, calculate a weighted sum of the loss of each of the plurality of similar cases and the weight of each of the plurality of similar cases as the loss of the current vehicle damage assessment case; or
obtain the loss of each of the plurality of similar cases, obtain maximum loss and minimum loss, and determine a data range as the loss of the current vehicle damage assessment case.

### Claim 13

A non-transitory storage medium having stored thereon instructions that, when executed by a processor of an electronic device, causes the processor of the electronic device to perform a vehicle damage detection method based on image analysis, the method comprising:
in response to received images of a current vehicle damage assessment case, obtaining query images by filtering the received images using a pre-trained Single Shot MultiBox Detector (SSD) object detection model, the pre-trained SSD object detection model comprising a vehicle damage component detection model and a vehicle damage classification model;
determining a vehicle damaged component in each of the query images according to output data of the vehicle damage component detection model, and a vehicle damage type of each of the query images according to output data of the vehicle damage classification model;
retrieving candidate images according to the vehicle damaged component and the vehicle damage type of each of the query images;
determining a feature vector of each of the candidate images corresponding to each of the query images;
inputting each of the query images into a residual network and obtaining a feature vector of each of the query images;
obtaining target output data by performing a codec procedure on the feature vector of each of the query images and the feature vector of each of the candidate images corresponding to each of the query images using a Transformer model;
obtaining similar images of the query images by processing the target output data using a pre-trained similarity judgment mode, comprising: for each of the query images, obtaining a first embedded vector of the query image from the target output data, and a second embedded vector of the candidate image corresponding to the query image; calculating a distance between the first embedded vector and each second embedded vector; and determining candidate images those have second embedded vectors corresponding to a minimum distance, as the similar images of the query image 1;
determining similar cases of the current vehicle damage assessment case using the similar images;
evaluating loss of the current vehicle damage assessment case based on the similar cases;
outputting evaluated loss of the current vehicle damage assessment case.

### Claim 14 (depends on 13)

The non-transitory storage medium according to claim 13, the method further comprising:
obtaining training samples;
constructing a plurality of sets of training data according to the training samples;
obtaining the similarity judgment model by training a prototype network based on a cross entropy loss function using the plurality of sets of training data.

### Claim 15 (depends on 14)

The non-transitory storage medium according to claim 14, wherein the training samples correspond to a plurality of vehicle damage types, each of the plurality of vehicle damage types corresponds to a plurality of images, and the plurality of sets of the training data are constructed according to the training samples by:
randomly selecting a first preset number of vehicle damage types from the plurality of vehicle damage types to be target vehicle damage types;
constructing an initial image set based on images corresponding to the target vehicle damage types;
for each of the target vehicle damage types, randomly selecting a second preset number of images from a plurality of images corresponding to each of the target vehicle damage types;
obtaining a candidate image set by integrating selected images;
excluding the candidate image set from the initial image set;
randomly acquiring any image as a predicted image from the initial image set after excluding;
determining a combination of the predicted image and the candidate image set as a set of training data.

### Claim 16 (depends on 15)

The non-transitory storage medium according to claim 15, the method further comprising:
determining a feature vector of each image in a second preset number of images corresponding to each of the target vehicle damage types;
calculating a vector sum of the feature vector of each image and obtaining a feature vector of each of the target vehicle damage types;
determining a feature vector of the predicted image;
calculating a distance between the feature vector of the predicted image and the feature vector of each of the target vehicle damage types;
determining a target vehicle damage level corresponding to a minimum distance to be a vehicle damage level of the predicted image.

### Claim 17 (depends on 13)

The non-transitory storage medium according to claim 13, wherein determining the similar cases of the current vehicle damage assessment case using the similar images comprises:
determining a vehicle damage assessment case corresponding to each of the candidate images;
calculating a number of candidate images corresponding to each vehicle damage assessment case;
determining vehicle damage assessment cases corresponding to a maximum number, to be the similar cases of the current vehicle damage assessment case; or
in response that there are a plurality of vehicle damage assessment cases having a same number, calculating a sum of distances between the candidate images of each vehicle damage assessment case and a corresponding query image, and determining a vehicle damage assessment case corresponding to a minimum sum to be the similar cases of the current vehicle damage assessment case.
