WO2023035538A1 - Vehicle damage detection method, device, apparatus and storage medium - Google Patents

Vehicle damage detection method, device, apparatus and storage medium Download PDF

Info

Publication number
WO2023035538A1
WO2023035538A1 PCT/CN2022/072367 CN2022072367W WO2023035538A1 WO 2023035538 A1 WO2023035538 A1 WO 2023035538A1 CN 2022072367 W CN2022072367 W CN 2022072367W WO 2023035538 A1 WO2023035538 A1 WO 2023035538A1
Authority
WO
WIPO (PCT)
Prior art keywords
damage
region candidate
target
vehicle
frame
Prior art date
Application number
PCT/CN2022/072367
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 WO2023035538A1 publication Critical patent/WO2023035538A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the present application relates to the technical field of artificial intelligence, in particular to a method, device, equipment and storage medium for detecting vehicle damage.
  • the main purpose of this application is to provide a detection method, device, equipment and storage medium for vehicle damage, aiming to solve the problem that in the prior art, the damage of the vehicle cannot be accurately identified without pre-training the vehicle models that need to be damaged, resulting in vehicle damage.
  • the present application proposes a method for detecting vehicle damage, the method comprising: acquiring a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage label information; acquiring a target image, Perform pre-identification on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage; according to different regions, the candidate frame The positional relationship between each region candidate frame is identified in the target image corresponding to the target lesion; the region candidate frame is aggregated and calculated respectively, and the region candidate frame is aggregated to the target lesion The aggregated embedding value and the aggregated confidence degree; according to the aggregated embedded value and the aggregated confidence degree, the region candidate frames corresponding to the same target lesion are merged to obtain the target lesion corresponding to Prototype characterization information: through the detection model, the prototype characterization information and the standard damage labeling information of each vehicle type are respectively inter-domain aligned, and the standard damage label
  • the present application also proposes a vehicle damage detection device, including: a data set acquisition module, used to obtain a standard data set, wherein the standard data set includes several different types of vehicles with different standard damage labeling information Data; an image acquisition module, configured to acquire a target image, perform pre-identification on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several unmarked damage The vehicle image; the target damage part recognition module, used to identify the target damage part corresponding to each of the region candidate frames in the target image according to the positional relationship between the different regions candidate frames; the aggregation calculation module, It is used to perform aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target damage site; Said aggregation confidence degree, merge each of the region candidate frames corresponding to the same target damage part, and obtain the prototype representation information corresponding to the target damage part; the domain alignment module is used
  • the present application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned method for detecting vehicle damage are realized, including: obtaining the standard A data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information; the target image is acquired, the target image is pre-identified, and each pre-identified as a damaged area The part mark region candidate frame, wherein, the target image includes several vehicle images without damage labeling; according to the positional relationship between the different region candidate frames, identify each region candidate frame in the target The corresponding target damage part in the image; perform aggregation calculation on the region candidate frames respectively, and obtain the aggregation embedding value and aggregation confidence when the region candidate frame is aggregated to the target damage part; according to the aggregation embedding value and the Said aggregation confidence, merge each of the region candidate frames corresponding to the same target damage part, and obtain the prototype representation
  • the present application also proposes a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned vehicle damage detection method are implemented, including: acquiring a standard data set, wherein, The standard data set includes vehicle data of several different vehicle types with different standard damage labeling information; the target image is acquired, the target image is pre-recognized, and each part pre-recognized as a damaged region is marked as a region candidate frame, wherein the target image includes several vehicle images that have not been marked with damage; according to the positional relationship between the different candidate regions, identify the target corresponding to each candidate region frame in the target image Lesion site; perform aggregation calculation on the region candidate frames respectively, to obtain the aggregated embedding value and the aggregated confidence degree when the region candidate frame is aggregated to the target lesion site; according to the aggregated embedded value and the aggregated confidence degree, merging each of the region candidate frames corresponding to the same target damage part to obtain the prototype representation information
  • the vehicle damage detection method, device, equipment, and storage medium of the present application obtain a vehicle damage image that has not been marked with damage as a target image, and generate several area candidate frames for the target image, thereby realizing automatic detection of possible vehicle damage areas.
  • Recognition by identifying the positional relationship of each region candidate frame, it is determined whether different region candidate frames correspond to the same damaged target damage site, which improves the integrity of target damage site identification; through aggregation calculation of the region candidate frames, And obtain the prototype representation information corresponding to different target damage parts, thereby enhancing the robustness of region recognition and avoiding the problem of incorrect recognition of damaged regions caused by the labeling errors of individual region candidate frames;
  • the vehicle damage information corresponding to the prototype representation information is output, which improves the accuracy of vehicle damage detection.
  • FIG. 1 is a schematic flow chart of a vehicle damage detection method according to an embodiment of the present application
  • FIG. 2 is a schematic flow diagram of a vehicle damage detection method according to a specific embodiment of the present application.
  • Fig. 3 is a schematic structural block diagram of a vehicle damage detection device according to an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • an embodiment of the present application provides a method for detecting vehicle damage in order to achieve the above-mentioned purpose of the invention, the method comprising:
  • S1 Obtain a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage label information;
  • S2 Acquire a target image, perform pre-recognition on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage;
  • S3 Identify the target lesion corresponding to each of the candidate region frames in the target image according to the positional relationship between the different candidate region frames;
  • S4 Carry out aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target lesion site;
  • S6 Align the prototype characterization information with the standard damage labeling information of each vehicle type through the detection model, and use the standard damage labeling information with the smallest alignment distance as the vehicle damage corresponding to the prototype characterization information information.
  • step S1 this embodiment is usually applied in the field of vehicle damage detection and recording.
  • the embodiment of this application can acquire and process vehicle images based on artificial intelligence technology .
  • artificial intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
  • the above-mentioned vehicle data with standard damage annotation information is usually a business scenario data set with a large number of annotations, such as vehicle data of different vehicle types with damage annotations, so that the above-mentioned different vehicle types with damage annotations
  • the vehicle data serves as the source domain to facilitate domain alignment with the target domain formed from subsequent target images.
  • the above-mentioned vehicle damage image without damage labeling may be a vehicle data set without labeling of difficult-to-recognize vehicle types.
  • the unlabeled vehicle data set that is difficult to distinguish the vehicle type can be used as the target domain, and the source domain formed by the vehicle data of the known vehicle type with the damage label is used for domain alignment, that is, the known vehicle type with the damage label Damage prediction is performed on unlabeled vehicle data of unknown vehicle types.
  • the pre-trained image recognition model can be used to pre-recognize the damage of the target image of unknown vehicle type.
  • the target image can be image recognized, and the above-mentioned vehicles can be identified according to parameters such as color, shape, and texture. Parts in the damaged image that may be damaged regions are selected, and each part identified as a damaged region is framed to obtain several region candidate frames.
  • this embodiment adopts Construct a graph of the positional relationship between the region candidate frames, and construct a graph (graph) data structure according to the positional relationship between each region candidate frame, which contains a collection of vertices connected by a series of edges , where a vertex is a region candidate frame, and the length of the edge connected between the vertices is the distance between two region candidate frames;
  • this embodiment uses distance screening to distinguish whether different region candidate frames correspond to the same damage Part, specifically, delete the edge whose length is greater than the preset edge length threshold, that is, cancel the connection of the region candidate boxes at both ends of the edge, and finally retain the vertices corresponding to the connected edges, that is, the region candidate boxes with a closer positional relationship,
  • the region candidate frames that are still connected to each other can be divided into regions to obtain several mutually
  • step S4 after corresponding the region candidate frames, although the integrity of the identified damage parts can be improved, due to the recognition deviation, some region candidate frames are often distributed around the damage parts, which leads to a single candidate frame The inaccuracy of characterizing an object.
  • the candidate boxes belonging to the same target lesion should be aggregated into a complete marquee, so that the images in the complete marquee can form a relatively complete image of the lesion.
  • the aggregated embedding value represents the degree of influence of the region candidate frame on a certain target lesion
  • the aggregate confidence represents the possibility that the region candidate frame belongs to the target lesion.
  • step S5 by using the aggregated confidence as the weight of the aggregated embedding value, the weighted calculation of several area candidate frames corresponding to a target damage site is performed based on the above weights, and the weighted calculation result is the combined result of each area candidate frame, thus completing
  • the feature representation of the region candidate frame is aggregated at the instance level.
  • the image of the target damage part corresponding to the aggregation result often includes visual modality information.
  • the modes reflected by different target damage parts State information should be integrated into prototype representation information, so that it can be used as a substitute for each target damage site in subsequent inter-domain alignment.
  • prototype representation information is a data-based parameter of human visual features, used to represent Feature information of the image part corresponding to the damaged part.
  • step S6 the source domain and the target domain are aligned through the preset vehicle damage detection model, wherein the source domain is the vehicle data of the known vehicle type with standard damage label information, and the target domain adopts the above step S5
  • the obtained prototype representation information is replaced, and after several source domains and several target domains are aligned, several interrelated source domain-target domain pairs can be obtained, among which, in the same source domain-target domain pair, the target domain
  • the damage cause of the domain is the same as that of the source domain, and the smaller the alignment distance between the source domain and the target domain, the closer the two domains are, that is, the closer the vehicle types are, and vice versa.
  • this embodiment will align the source domain with the smallest distance
  • the domain-target domain pair is the closest detection result; at this time, since the source domain is the vehicle data with standard damage label information, the standard damage label can be used as the target corresponding to the closest target domain to the source domain The cause of the damage of the damaged part, thus realizing the damage detection of foreign damaged vehicles that are difficult to obtain training samples.
  • the identifying the target lesion S3 corresponding to each of the candidate area frames in the target image according to the positional relationship between the different candidate area frames includes:
  • S31 In the same target image, select two different candidate regions as the first recognition frame and the second recognition frame;
  • S32 Calculate an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
  • intersection-over-union ratio is greater than a preset ratio threshold, determine that the target lesion corresponding to the first recognition frame and the second recognition frame are the same;
  • S34 Select two different candidate regions as the first recognition frame and the second recognition frame again, and perform the calculation of the intersection ratio and the determination of the ratio threshold until the target image
  • Each of the region candidate frames completes the intersection-over-union ratio calculation and the ratio threshold determination with the rest of the region candidate frames.
  • step S31 in the actual vehicle damage, there may be multiple smaller damages.
  • the distance between two area candidate frames is used to determine whether they belong to the same template unit, it will often result in multiple smaller damages.
  • Small independent lesions are identified as the same piece of lesions. Therefore, in this embodiment, it is further determined whether different region candidate frames correspond to the same damage site by way of cross-over-merge ratio.
  • step S32 after two identification frames are selected, the intersection area and union area of the two are calculated, and the ratio of the intersection area to the union area is taken as the above-mentioned intersection-union ratio.
  • step S33 it can be understood that since the intersection ratio is closer to 1, the probability of overlap between the two is greater. Therefore, when the intersection ratio is greater than the preset ratio threshold, it is identified that there is a larger overlap area between the two recognition frames , so it can be determined that the target lesion corresponding to the first recognition frame and the second recognition frame are the same.
  • step S34 after the calculation of the current two recognition frames is completed, the rest of the region candidate frames are selected again to perform the above intersection calculation and judgment, until a judgment is completed between any two region candidate frames.
  • the calculation method S4 of the aggregated embedded value includes:
  • an adjacency matrix is used to calculate aggregated embedding values between candidate frames in different regions, so that more accurate damage instance information can be expressed.
  • the above-mentioned adjacency matrix can be obtained according to the above-mentioned graph (graph) data structure.
  • the adjacency matrix usually includes a two-dimensional array, and the one-dimensional array in the two-dimensional array stores all vertex data in the graph (graph) data structure.
  • the dimension array stores the data of the relationship (edge) between vertices, so as to obtain the distance between the quantified region candidate frames, and then determine the degree of aggregation between the region candidate frames.
  • the feature embedding value of the above-mentioned region candidate frame can be calculated by a feature selection algorithm (Embedded), which can obtain the feature combination of the region candidate frame, find the optimal feature combination in the feature combination and return the feature embedding value
  • a feature selection algorithm Embedded
  • the vector features used to describe different region candidate frames that is, the above-mentioned feature embedding values can reduce the data dimension to a fixed-size vector feature representation for easy processing and calculation; Extract the feature embedding value of the image to facilitate the subsequent aggregation calculation.
  • the calculation method S4 of the aggregation confidence includes:
  • an adjacency matrix is used to calculate aggregated embedding values between candidate frames in different regions, so that more accurate damage instance information can be further expressed.
  • classification confidence levels are generated for the images framed by each candidate area frame, and the above classification confidence levels represent the possibility that a candidate area frame belongs to a predetermined target lesion.
  • the image classification model can be preset, and the image classification model can be used to determine whether the image in the region candidate frame is corresponding to a certain target damage part, and calculate the possibility that the region candidate frame is corresponding to the target damage part , that is, the above-mentioned classification confidence.
  • the above-mentioned aggregation confidence is: under the spatial correlation provided by the adjacency matrix, the possibility that the region candidate frame belongs to the target lesion.
  • the aggregated embedding value and the aggregated confidence are combined for each of the region candidate frames corresponding to the same target lesion to obtain the prototype corresponding to the target lesion.
  • Characterization information S5 including:
  • S52 Perform weighted average calculation on the aggregated embedding value according to the combination weight to obtain the prototype representation information.
  • the weighted calculation is performed according to the combination weight to obtain the weighted prototype representation information, so as to obtain the prototype representation information that is more prominent for the region candidate frames with higher confidence.
  • step S52 in order to highlight the modal information corresponding to the region candidate frames that are more important to a specific category, the application uses the aggregation confidence of each region candidate frame as the merging weight for merging, so that different region candidate frames are combined according to the aggregation confidence Merging is carried out to obtain the prototype representation information of the above-mentioned target damage site.
  • said passing the detection model, performing inter-domain alignment S6 on the prototype representation information and the standard damage labeling information of each vehicle type including:
  • feature distribution alignment is performed through inter-class loss constraints, so as to obtain a domain alignment result considering class imbalance.
  • the core idea is to minimize the intra-class loss (denoted as L intra ) calculation by constraining the inter-class loss, so as to reduce the distance between two prototype representation information.
  • the distance between different prototype representations is constrained by another inter-class loss (denoted as L inter ).
  • L intra intra-class loss
  • L inter another inter-class loss
  • the marking method S2 of the region candidate frame includes:
  • S21 Based on the Faster R-CNN target detection framework, perform feature extraction of foreground and background features on the region candidate network of the target image to generate region candidate frames.
  • the feature extraction of foreground and background features is performed on the region candidate network of the target image, thereby generating accurate region candidate frames.
  • an initial vehicle damage detection model based on Convolutional Neural Networks can be established, and a Graph-induced Prototype Alignment (Graph-induced Prototype Alignment) framework can be used to unsupervised the initial vehicle damage detection model Adaptive learning to improve the accuracy of the initial vehicle damage detection model on target domain data.
  • CNN Convolutional Neural Networks
  • Graph-induced Prototype Alignment Graph-induced Prototype Alignment
  • the present application also proposes a detection device for vehicle damage, including:
  • a data set acquisition module 100 configured to acquire a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information;
  • the image acquisition module 200 is configured to acquire a target image, perform pre-recognition on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several parts that have not been marked with damage. vehicle image;
  • a target lesion identification module 300 configured to identify the target lesion corresponding to each of the candidate area frames in the target image according to the positional relationship between the different candidate area frames;
  • Aggregation calculation module 400 configured to perform aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and aggregation confidence when the region candidate frames are aggregated to the target lesion site;
  • the merge calculation module 500 is configured to merge the region candidate frames corresponding to the same target lesion according to the aggregated embedding value and the aggregate confidence to obtain prototype representation information corresponding to the target lesion ;
  • the domain alignment module 600 is configured to perform inter-domain alignment on the prototype representation information and the standard damage annotation information of each vehicle type through the detection model, and use the standard damage annotation information with the smallest alignment distance as the prototype representation The vehicle damage information corresponding to the information.
  • the target lesion identification module 300 includes:
  • a candidate frame distinguishing unit configured to select two different region candidate frames in the same target image as the first recognition frame and the second recognition frame
  • an intersection ratio calculation unit configured to calculate an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
  • a damage determination unit configured to determine that the target damage site corresponding to the first recognition frame and the second recognition frame are the same if the intersection-over-union ratio is greater than a preset ratio threshold
  • a threshold determination unit configured to select two different candidate regions as the first identification frame and the second identification frame, and perform the intersection-over-union ratio calculation and the ratio threshold determination until the Each of the region candidate frames in the target image completes the intersection-over-union ratio calculation and the ratio threshold determination with the rest of the region candidate frames.
  • the aggregation calculation module 400 includes:
  • a matrix component unit configured to construct an adjacency matrix between the region candidate frames through the intersection-over-union ratio
  • An embedding value calculation unit configured to obtain the feature embedding value of the region candidate frame, and calculate the aggregate embedding value corresponding to the feature embedding value by the following formula:
  • the aggregation calculation module 400 includes:
  • An aggregation confidence calculation unit configured to obtain the classification confidence of the region candidate frame, and calculate the aggregation confidence corresponding to the classification confidence by the following formula:
  • the combined calculation module 500 includes:
  • a merging weight calculation unit configured to use the aggregation confidence as the merging weight of the region candidate frame
  • the characterization information calculation unit is configured to perform weighted average calculation on the aggregated embedded values according to the merging weight to obtain the prototype characterization information.
  • the domain alignment module 600 includes:
  • the feature alignment unit is configured to perform feature distribution alignment on the prototype representation information and the standard damage label information through a built-in detection model with inter-class loss constraints.
  • the image acquisition module 200 is also used for:
  • the feature extraction unit is used to perform feature extraction of foreground and background features on the region candidate network of the target image based on the Faster R-CNN target detection framework to generate a region candidate frame.
  • an embodiment of the present application also provides a computer device, which may be a server, and its internal structure may be as shown in FIG. 4 .
  • the computer device includes a processor, memory, network interface and database connected by a system bus. Among them, the processor designed by the computer is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer programs and databases.
  • the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store data such as detection methods of vehicle damage.
  • the network interface of the computer device is used to communicate with the external terminal through the network connection.
  • the vehicle damage detection method includes: obtaining a standard data set, wherein the standard data set includes several vehicle data with standard damage label information; obtaining a target image, and generating several region candidate frames for the target image , wherein, the target image includes several vehicle damage images that have not been marked with damage; according to the positional relationship between the different candidate regions, identify the target corresponding to each candidate region frame in the target image Lesion site; performing aggregation calculations on the region candidate frames respectively to obtain the aggregation embedding value and the aggregation confidence degree corresponding to the region candidate frame; according to the aggregation embedding value and the aggregation confidence degree, for the same target damage
  • the region candidate frames corresponding to the parts are merged to obtain the prototype representation information of the cluster corresponding to the target damage part; through the detection model, the prototype representation information and the standard damage label information are inter-domain aligned, and the output The vehicle damage information corresponding to the prototype characterization information.
  • An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, a vehicle damage detection method is implemented, including the steps of: acquiring a standard data set, wherein the The standard data set includes vehicle data of several different vehicle types with different standard damage labeling information; the target image is acquired, the target image is pre-recognized, and each part pre-recognized as a damaged area is marked with a region candidate frame, Wherein, the target image includes several vehicle images that have not been marked with damage; according to the positional relationship between the different candidate regions, identify the target damage part corresponding to each candidate region frame in the target image ; Carry out aggregation calculations on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target damage site; according to the aggregation embedding value and the aggregation confidence, for the same Merge each of the region candidate frames corresponding to a
  • a vehicle damage image without damage labeling is obtained as a target image, and several area candidate frames are generated for the target image, thereby realizing automatic identification of possible damage areas of the vehicle;
  • the positional relationship of each region candidate frame is identified to determine whether different region candidate frames correspond to the same damaged target damage part, which improves the integrity of target damage part identification;
  • region candidate frames different targets are obtained Prototype representation information corresponding to the damaged parts, thereby enhancing the robustness of region recognition and avoiding the problem of incorrect recognition of damaged regions caused by labeling errors in individual region candidate frames; through inter-domain alignment of prototype representation information and standard damage labeling information, the output
  • the vehicle damage information corresponding to the prototype representation information improves the accuracy of vehicle damage detection.
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SSRSDRAM Double Data Rate SDRAM
  • ESDRAM Enhanced SDRAM
  • SLDRAM Synchronous Link (Synchlink) DRAM
  • SLDRAM Synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Biology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

A vehicle damage detection method, a device, an apparatus and a storage medium, the method comprising: obtaining a standard data set, wherein the standard data set comprises vehicle data for a plurality of different vehicle types with various standard damage label information; acquiring a target image, performing pre-identification on the target image, and for each site pre-identified to be a damage region, marking with a candidate region box, wherein the target image comprises a plurality of vehicle images which have not yet undergone damage labeling; in accordance with the positional relationships between various candidate region boxes, identifying a target damage site corresponding to each candidate region box in the target image; respectively performing aggregation calculations on the candidate region boxes to obtain an aggregate embedded value and an aggregation confidence score for when a candidate region box is aggregated to a target damage site; in accordance with the aggregate embedded value and the aggregation confidence score, merging each of the candidate region boxes corresponding to the same target damage site, thus obtaining prototype characterization information corresponding to the target damage site; using a detection model to respectively perform inter-domain alignment on the prototype characterization information and on the standard damage label information of each vehicle type, and using the standard damage label information having the smallest alignment distance as vehicle damage information corresponding to the prototype characterization information.

Description

车辆损伤的检测方法、装置、设备及存储介质Vehicle damage detection method, device, equipment and storage medium
本申请要求于2021年9月8日提交中国专利局、申请号为202111058959.7,发明名称为“车辆损伤的检测方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111058959.7 filed on September 8, 2021, and the title of the invention is "vehicle damage detection method, device, equipment and storage medium", the entire content of which is incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及到人工智能技术领域,特别是涉及到一种车辆损伤的检测方法、装置、设备及存储介质。The present application relates to the technical field of artificial intelligence, in particular to a method, device, equipment and storage medium for detecting vehicle damage.
背景技术Background technique
在汽车的日常驾驶中,受天气情况、道路环境和驾驶人员个体差异等因素的影响,汽车受损是不可避免的。因此,确定受损车辆的受损部位和受损程度是不可或缺的,其不仅会影响到后续车辆维修方案的确定,也会影响到事故相关方的经济赔偿额度确认。In the daily driving of a car, it is inevitable that the car will be damaged due to factors such as weather conditions, road environment and individual differences of drivers. Therefore, it is indispensable to determine the damaged part and degree of damage of the damaged vehicle, which will not only affect the determination of the subsequent vehicle maintenance plan, but also affect the determination of the amount of economic compensation for the parties involved in the accident.
近年来,随着人工智能技术的发展,已有一部分机构摒弃了依赖人工判断的定损方法,转而采用基于人工智能视觉检测等方法为受损车辆定损。但是发明人意识到,基于人工智能视觉检测等方法需要预先获取不同车型下,大量带标注的车辆图片进行模型训练,在生产实践中,若人工智能视觉检测模型未预先对需要定损的车型进行训练,则无法准确识别车辆的损伤情况,导致车辆损伤检测的精确度降低。In recent years, with the development of artificial intelligence technology, some institutions have abandoned the damage assessment method relying on manual judgment, and instead adopted methods such as artificial intelligence-based visual inspection to assess the damage of damaged vehicles. However, the inventor realized that methods based on artificial intelligence visual inspection need to obtain in advance a large number of marked vehicle pictures of different models for model training. If the training is used, the damage of the vehicle cannot be accurately identified, resulting in a decrease in the accuracy of vehicle damage detection.
技术问题technical problem
本申请的主要目的为提供一种车辆损伤的检测方法、装置、设备及存储介质,旨在解决现有技术中未预先对需要定损的车型进行训练则无法准确识别车辆的损伤情况,导致车辆损伤检测的精确度降低的技术问题。The main purpose of this application is to provide a detection method, device, equipment and storage medium for vehicle damage, aiming to solve the problem that in the prior art, the damage of the vehicle cannot be accurately identified without pre-training the vehicle models that need to be damaged, resulting in vehicle damage. A technical problem that reduces the accuracy of damage detection.
技术解决方案technical solution
本申请提出一种车辆损伤的检测方法,所述方法包括:获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。The present application proposes a method for detecting vehicle damage, the method comprising: acquiring a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage label information; acquiring a target image, Perform pre-identification on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage; according to different regions, the candidate frame The positional relationship between each region candidate frame is identified in the target image corresponding to the target lesion; the region candidate frame is aggregated and calculated respectively, and the region candidate frame is aggregated to the target lesion The aggregated embedding value and the aggregated confidence degree; according to the aggregated embedded value and the aggregated confidence degree, the region candidate frames corresponding to the same target lesion are merged to obtain the target lesion corresponding to Prototype characterization information: through the detection model, the prototype characterization information and the standard damage labeling information of each vehicle type are respectively inter-domain aligned, and the standard damage labeling information with the smallest alignment distance is used as the corresponding prototype characterization information Vehicle damage information.
本申请还提出了一种车辆损伤的检测装置,包括:数据集获取模块,用于获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;图像获取模块,用于获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;目标损伤部位识别模块,用于根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;聚合计算模块,用于分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;合并计算模块,用于根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;域对齐模块,用于通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。The present application also proposes a vehicle damage detection device, including: a data set acquisition module, used to obtain a standard data set, wherein the standard data set includes several different types of vehicles with different standard damage labeling information Data; an image acquisition module, configured to acquire a target image, perform pre-identification on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several unmarked damage The vehicle image; the target damage part recognition module, used to identify the target damage part corresponding to each of the region candidate frames in the target image according to the positional relationship between the different regions candidate frames; the aggregation calculation module, It is used to perform aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target damage site; Said aggregation confidence degree, merge each of the region candidate frames corresponding to the same target damage part, and obtain the prototype representation information corresponding to the target damage part; the domain alignment module is used to use the detection model to respectively combine the The prototype characterization information is inter-domain aligned with the standard damage labeling information of each vehicle type, and the standard damage labeling information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype characterization information.
本申请还提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所 述处理器执行所述计算机程序时实现上述一种车辆损伤的检测方法的步骤,包括:获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。The present application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned method for detecting vehicle damage are realized, including: obtaining the standard A data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information; the target image is acquired, the target image is pre-identified, and each pre-identified as a damaged area The part mark region candidate frame, wherein, the target image includes several vehicle images without damage labeling; according to the positional relationship between the different region candidate frames, identify each region candidate frame in the target The corresponding target damage part in the image; perform aggregation calculation on the region candidate frames respectively, and obtain the aggregation embedding value and aggregation confidence when the region candidate frame is aggregated to the target damage part; according to the aggregation embedding value and the Said aggregation confidence, merge each of the region candidate frames corresponding to the same target damage part, and obtain the prototype representation information corresponding to the target damage part; through the detection model, respectively combine the prototype representation information with each The standard damage labeling information of the vehicle type is aligned between domains, and the standard damage labeling information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype characterization information.
本申请还提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述一种车辆损伤的检测方法的步骤,包括:获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。The present application also proposes a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned vehicle damage detection method are implemented, including: acquiring a standard data set, wherein, The standard data set includes vehicle data of several different vehicle types with different standard damage labeling information; the target image is acquired, the target image is pre-recognized, and each part pre-recognized as a damaged region is marked as a region candidate frame, wherein the target image includes several vehicle images that have not been marked with damage; according to the positional relationship between the different candidate regions, identify the target corresponding to each candidate region frame in the target image Lesion site; perform aggregation calculation on the region candidate frames respectively, to obtain the aggregated embedding value and the aggregated confidence degree when the region candidate frame is aggregated to the target lesion site; according to the aggregated embedded value and the aggregated confidence degree, merging each of the region candidate frames corresponding to the same target damage part to obtain the prototype representation information corresponding to the target damage part; through the detection model, respectively combining the prototype representation information with each of the vehicle types The standard damage label information is aligned between domains, and the standard damage label information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype characterization information.
有益效果Beneficial effect
本申请的车辆损伤的检测方法、装置、设备及存储介质,通过获取未进行损伤标注的车辆损伤图像作为目标图像,对目标图像生成若干个区域候选框,从而实现了对车辆可能损伤区域的自动识别;通过对每一个区域候选框的位置关系进行识别,从而判定不同的区域候选框是否对应同一个损伤目标损伤部位,提高了目标损伤部位识别的完整性;通过对区域候选框进行聚合计算,并得到不同目标损伤部位分别对应的原型表征信息,从而增强了区域识别的鲁棒性,避免个别区域候选框标注误差导致损伤区域识别错误的问题;通过对原型表征信息和标准损伤标注信息进行域间对齐,输出原型表征信息对应的车辆损伤信息,从而提高了车辆损伤检测的精确度。The vehicle damage detection method, device, equipment, and storage medium of the present application obtain a vehicle damage image that has not been marked with damage as a target image, and generate several area candidate frames for the target image, thereby realizing automatic detection of possible vehicle damage areas. Recognition; by identifying the positional relationship of each region candidate frame, it is determined whether different region candidate frames correspond to the same damaged target damage site, which improves the integrity of target damage site identification; through aggregation calculation of the region candidate frames, And obtain the prototype representation information corresponding to different target damage parts, thereby enhancing the robustness of region recognition and avoiding the problem of incorrect recognition of damaged regions caused by the labeling errors of individual region candidate frames; The vehicle damage information corresponding to the prototype representation information is output, which improves the accuracy of vehicle damage detection.
附图说明Description of drawings
图1为本申请一实施例的车辆损伤的检测方法的流程示意图;FIG. 1 is a schematic flow chart of a vehicle damage detection method according to an embodiment of the present application;
图2为本申请一具体实施方式的车辆损伤的检测方法的流程示意图;2 is a schematic flow diagram of a vehicle damage detection method according to a specific embodiment of the present application;
图3为本申请一实施例的车辆损伤的检测装置的结构示意框图;Fig. 3 is a schematic structural block diagram of a vehicle damage detection device according to an embodiment of the present application;
图4为本申请一实施例的计算机设备的结构示意框图。FIG. 4 is a schematic block diagram of a computer device according to an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
参照图1,本申请实施例中提供一种为了实现上述发明目的,本申请提出一种车辆损伤的检测方法,所述方法包括:Referring to Fig. 1, an embodiment of the present application provides a method for detecting vehicle damage in order to achieve the above-mentioned purpose of the invention, the method comprising:
S1:获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;S1: Obtain a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage label information;
S2:获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;S2: Acquire a target image, perform pre-recognition on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage;
S3:根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;S3: Identify the target lesion corresponding to each of the candidate region frames in the target image according to the positional relationship between the different candidate region frames;
S4:分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;S4: Carry out aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target lesion site;
S5:根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;S5: According to the aggregated embedding value and the aggregated confidence, merge the region candidate frames corresponding to the same target lesion to obtain prototype representation information corresponding to the target lesion;
S6:通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。S6: Align the prototype characterization information with the standard damage labeling information of each vehicle type through the detection model, and use the standard damage labeling information with the smallest alignment distance as the vehicle damage corresponding to the prototype characterization information information.
本实施例通过获取未进行损伤标注的车辆损伤图像作为目标图像,对目标图像生成若干个区域候选框,从而实现了对车辆可能损伤区域的自动识别;通过对每一个区域候选框的位置关系进行识别,从而判定不同的区域候选框是否对应同一个损伤目标损伤部位,提高了目标损伤部位识别的完整性;通过对区域候选框进行聚合计算,并得到不同目标损伤部位分别对应的原型表征信息,从而增强了区域识别的鲁棒性,避免个别区域候选框标注误差导致损伤区域识别错误的问题;通过对原型表征信息和标准损伤标注信息进行域间对齐,输出原型表征信息对应的车辆损伤信息,从而提高了车辆损伤检测的精确度。In this embodiment, by acquiring a vehicle damage image without damage labeling as the target image, several region candidate frames are generated for the target image, thereby realizing the automatic identification of the possible damage region of the vehicle; Recognition, so as to determine whether different region candidate frames correspond to the same damage target damage part, which improves the integrity of target damage part recognition; through aggregation calculation of region candidate frames, and obtaining prototype representation information corresponding to different target damage parts, In this way, the robustness of area recognition is enhanced, and the problem of incorrect identification of damaged areas caused by labeling errors of individual area candidate frames is avoided; by inter-domain alignment of prototype representation information and standard damage label information, the vehicle damage information corresponding to prototype representation information is output, Therefore, the accuracy of vehicle damage detection is improved.
对于步骤S1,本实施例通常应用在车辆损伤检测记录领域,为了对车辆损伤情况进行评定,往往需要对车辆图像进行采集和识别;本申请实施例可以基于人工智能技术对车辆图像进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。具体来说,上述带有标准损伤标注信息的车辆数据,通常为带有大量标注的业务场景数据集,例如带损伤标注的不同车辆类型的车辆数据,从而将上述带损伤标注的不同车辆类型的车辆数据作为源域,以便于与后续目标图像形成的目标域进行域对齐。For step S1, this embodiment is usually applied in the field of vehicle damage detection and recording. In order to evaluate the vehicle damage, it is often necessary to collect and identify vehicle images; the embodiment of this application can acquire and process vehicle images based on artificial intelligence technology . Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. . Specifically, the above-mentioned vehicle data with standard damage annotation information is usually a business scenario data set with a large number of annotations, such as vehicle data of different vehicle types with damage annotations, so that the above-mentioned different vehicle types with damage annotations The vehicle data serves as the source domain to facilitate domain alignment with the target domain formed from subsequent target images.
对于步骤S2,上述未进行损伤标注的车辆损伤图像,可以为不带标注的难以识别车辆类型的车辆数据集。具体来说,在日常的车辆损伤检测中,由于部分车辆较为老旧或损伤较为严重,导致其类型的训练数据难以获取。因此可以将不带标注的难以区分车辆类型的车辆数据集作为目标域,与上述带损伤标注的已知车辆类型的车辆数据形成的源域进行域对齐,即通过带损伤标注的已知车辆类型的车辆数据对未标注的未知车辆类型的车辆数据进行损伤预测。For step S2, the above-mentioned vehicle damage image without damage labeling may be a vehicle data set without labeling of difficult-to-recognize vehicle types. Specifically, in daily vehicle damage detection, because some vehicles are relatively old or damaged, it is difficult to obtain training data of their type. Therefore, the unlabeled vehicle data set that is difficult to distinguish the vehicle type can be used as the target domain, and the source domain formed by the vehicle data of the known vehicle type with the damage label is used for domain alignment, that is, the known vehicle type with the damage label Damage prediction is performed on unlabeled vehicle data of unknown vehicle types.
当获取到目标图像后,可通过预训练的图像识别模型对未知车辆类型的目标图像进行损伤预识别,具体来说,可以对目标图像进行图像识别,根据颜色、形状、纹路等参数识别上述车辆损伤图像中可能为损伤区域的部分,并对每一个识别为损伤区域的部分进行框选,得到若干个区域候选框。After the target image is acquired, the pre-trained image recognition model can be used to pre-recognize the damage of the target image of unknown vehicle type. Specifically, the target image can be image recognized, and the above-mentioned vehicles can be identified according to parameters such as color, shape, and texture. Parts in the damaged image that may be damaged regions are selected, and each part identified as a damaged region is framed to obtain several region candidate frames.
对于步骤S3,由于在实际的损伤检测中,区域候选框往往存在偏差,无法完全准确地框选到完整的损伤区域,导致框选的部分包含的目标实例信息不够充分,因此,本实施例通过构建区域候选框之间的位置关系图,根据各个区域候选框之间的位置关系,构建成一个图(graph)数据结构,该数据结构包含一些顶点的集合,顶点之间通过一系列的边连接,其中,一个顶点即一个区域候选框,顶点之间连接的边的长度即两个区域候选框之间的距离;本实施例采用距离筛选的方式,区分不同的区域候选框是否对应同一个损伤部位,具体地,将长度大于预设的边长阈值的边进行删除,即取消该条边两端的区域候选框的连接,最终保留连接的边对应的顶点即位置关系较靠近的区域候选框,此时可以分别将仍相互连接的区域 候选框进行区域划分,得到若干个相互独立的区域,而各个区域中包含有若干个存在连接关系的区域候选框,一个独立的区域即可视为一个上述目标损伤部位,一个目标损伤部位即一个实际损伤部位在目标图像上对应的影像。For step S3, since in the actual damage detection, the area candidate frames often have deviations, and the complete damage area cannot be completely and accurately framed, resulting in insufficient target instance information contained in the framed part. Therefore, this embodiment adopts Construct a graph of the positional relationship between the region candidate frames, and construct a graph (graph) data structure according to the positional relationship between each region candidate frame, which contains a collection of vertices connected by a series of edges , where a vertex is a region candidate frame, and the length of the edge connected between the vertices is the distance between two region candidate frames; this embodiment uses distance screening to distinguish whether different region candidate frames correspond to the same damage Part, specifically, delete the edge whose length is greater than the preset edge length threshold, that is, cancel the connection of the region candidate boxes at both ends of the edge, and finally retain the vertices corresponding to the connected edges, that is, the region candidate boxes with a closer positional relationship, At this time, the region candidate frames that are still connected to each other can be divided into regions to obtain several mutually independent regions, and each region contains several region candidate frames that are connected, and an independent region can be regarded as one of the above The target damage part, a target damage part is an image corresponding to an actual damage part on the target image.
对于步骤S4,对区域候选框进行对应后,虽然能够提高识别到的损伤部位的完整度,但是由于识别偏差,有一部分区域候选框往往会分布在损伤部位的周围,这就导致了单个候选框表征一个物体的不准确性。为了实现更精确的实例水平的特征表征,属于同一个目标损伤部位的候选框应该聚合为一个完整的选框,从而使得该完整的选框内的图像能够形成一个较为完整的损伤部位影像,本实施例中,聚合嵌入值表示该区域候选框对于某一个目标损伤部位而言的影响程度,而聚合置信度表示该区域候选框归属于该目标损伤部位的可能性。For step S4, after corresponding the region candidate frames, although the integrity of the identified damage parts can be improved, due to the recognition deviation, some region candidate frames are often distributed around the damage parts, which leads to a single candidate frame The inaccuracy of characterizing an object. In order to achieve more accurate feature representation at the instance level, the candidate boxes belonging to the same target lesion should be aggregated into a complete marquee, so that the images in the complete marquee can form a relatively complete image of the lesion. In an embodiment, the aggregated embedding value represents the degree of influence of the region candidate frame on a certain target lesion, and the aggregate confidence represents the possibility that the region candidate frame belongs to the target lesion.
对于步骤S5,通过将聚合置信度作为聚合嵌入值的权重,将一个目标损伤部位对应的若干个区域候选框基于上述权重进行加权计算,加权计算结果即各个区域候选框的合并结果,从而完成了对区域候选框的特征表征在实例水平的聚合,然而聚合结果对应的目标损伤部位的图像往往是包括视觉的模态信息,为了便于后续域间对齐的量化计算,不同目标损伤部位反映出的模态信息应被整合成原型表征信息,从而在后续的域间对齐中作为每个目标损伤部位的代替物,本实施例中,原型表征信息是对人类视觉特征进行数据化参数,用于表示目标损伤部位对应的图像部位的特征信息。For step S5, by using the aggregated confidence as the weight of the aggregated embedding value, the weighted calculation of several area candidate frames corresponding to a target damage site is performed based on the above weights, and the weighted calculation result is the combined result of each area candidate frame, thus completing The feature representation of the region candidate frame is aggregated at the instance level. However, the image of the target damage part corresponding to the aggregation result often includes visual modality information. In order to facilitate the quantitative calculation of subsequent inter-domain alignment, the modes reflected by different target damage parts State information should be integrated into prototype representation information, so that it can be used as a substitute for each target damage site in subsequent inter-domain alignment. In this embodiment, prototype representation information is a data-based parameter of human visual features, used to represent Feature information of the image part corresponding to the damaged part.
对于步骤S6,通过预设的车辆损伤检测模型,对上述源域和目标域进行对齐,其中,源域即上述带有标准损伤标注信息的已知车辆类型的车辆数据,目标域采用上述步骤S5得到的原型表征信息进行替代,对若干个源域和若干个目标域进行对齐后,能够得到若干个相互关联的源域-目标域对,其中,在同一个源域-目标域对中,目标域的损伤原因与源域相同,而源域-目标域的对齐距离越小,表示这两个域越靠近,即车辆类型越相近,反之亦然,因此,本实施例将对齐距离最小的源域-目标域对作为最接近的检测结果;此时,由于源域为带有标准损伤标注信息的车辆数据,因此可以将该标准损伤标注作为与该源域最接近的目标域所对应的目标损伤部位的损伤原因,从而实现了对难以获取训练样本的国外损伤车辆的损伤检测。For step S6, the source domain and the target domain are aligned through the preset vehicle damage detection model, wherein the source domain is the vehicle data of the known vehicle type with standard damage label information, and the target domain adopts the above step S5 The obtained prototype representation information is replaced, and after several source domains and several target domains are aligned, several interrelated source domain-target domain pairs can be obtained, among which, in the same source domain-target domain pair, the target domain The damage cause of the domain is the same as that of the source domain, and the smaller the alignment distance between the source domain and the target domain, the closer the two domains are, that is, the closer the vehicle types are, and vice versa. Therefore, this embodiment will align the source domain with the smallest distance The domain-target domain pair is the closest detection result; at this time, since the source domain is the vehicle data with standard damage label information, the standard damage label can be used as the target corresponding to the closest target domain to the source domain The cause of the damage of the damaged part, thus realizing the damage detection of foreign damaged vehicles that are difficult to obtain training samples.
在一个实施例中,所述根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位S3,包括:In one embodiment, the identifying the target lesion S3 corresponding to each of the candidate area frames in the target image according to the positional relationship between the different candidate area frames includes:
S31:在同一个所述目标图像中,选取两个不同的所述区域候选框作为第一识别框和第二识别框;S31: In the same target image, select two different candidate regions as the first recognition frame and the second recognition frame;
S32:根据所述第一识别框和所述第二识别框的位置关系,计算所述第一识别框和所述第二识别框之间的交并比;S32: Calculate an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
S33:若所述交并比大于预设的比例阈值,判定所述第一识别框和所述第二识别框对应的目标损伤部位相同;S33: If the intersection-over-union ratio is greater than a preset ratio threshold, determine that the target lesion corresponding to the first recognition frame and the second recognition frame are the same;
S34:再次选取两个不同的所述区域候选框作为所述第一识别框和所述第二识别框,并进行所述交并比计算和所述比例阈值判定,直至所述目标图像中的每一个所述区域候选框均与其余所述区域候选框完成所述交并比计算和所述比例阈值判定。S34: Select two different candidate regions as the first recognition frame and the second recognition frame again, and perform the calculation of the intersection ratio and the determination of the ratio threshold until the target image Each of the region candidate frames completes the intersection-over-union ratio calculation and the ratio threshold determination with the rest of the region candidate frames.
本实施例通过交并比的方式进一步确定不同的区域候选框是否对应同一个目标损伤部位,提高了目标损伤部位识别的准确性。In this embodiment, it is further determined whether different region candidate frames correspond to the same target lesion by way of cross-merge ratio, which improves the accuracy of identifying the target lesion.
对于步骤S31,在实际的车辆损伤中,有可能会存在多个较小的损伤,此时若仅按照两个区域候选框之间的距离判定是否属于同一个模板单元,往往会导致多个较小的独立损伤被识别为同一片损伤,因此,本实施例通过交并比的方式进一步确定不同的区域候选框是否对应为同一个损伤部位。For step S31, in the actual vehicle damage, there may be multiple smaller damages. At this time, if only the distance between two area candidate frames is used to determine whether they belong to the same template unit, it will often result in multiple smaller damages. Small independent lesions are identified as the same piece of lesions. Therefore, in this embodiment, it is further determined whether different region candidate frames correspond to the same damage site by way of cross-over-merge ratio.
对于步骤S32,选定两个识别框后,计算二者的交集面积以及并集面积,将交集面积与并集面积的比值作为上述交并比。For step S32, after two identification frames are selected, the intersection area and union area of the two are calculated, and the ratio of the intersection area to the union area is taken as the above-mentioned intersection-union ratio.
对于步骤S33,可以理解地,由于交并比越接近1,二者的重合概率越大,因此当交并比大于预设的比例阈值时,标识两个识别框之间存在较大的重合区域,因此可以判定第一识别框和第二识别框对应的目标损伤部位相同。For step S33, it can be understood that since the intersection ratio is closer to 1, the probability of overlap between the two is greater. Therefore, when the intersection ratio is greater than the preset ratio threshold, it is identified that there is a larger overlap area between the two recognition frames , so it can be determined that the target lesion corresponding to the first recognition frame and the second recognition frame are the same.
对于步骤S34,当前两个识别框计算完成后,再次选取其余的区域候选框进行上述交并比计算和判定,直至两两区域候选框之间均完成一次判定。For step S34, after the calculation of the current two recognition frames is completed, the rest of the region candidate frames are selected again to perform the above intersection calculation and judgment, until a judgment is completed between any two region candidate frames.
在一个实施例中,所述聚合嵌入值的计算方法S4,包括:In one embodiment, the calculation method S4 of the aggregated embedded value includes:
S41:通过所述交并比构建所述区域候选框之间的邻接矩阵;S41: Construct an adjacency matrix between the region candidate frames through the intersection-over-union ratio;
S42:获取所述区域候选框的特征嵌入值,并通过下式计算所述特征嵌入值对应的所述聚合嵌入值:S42: Obtain the feature embedding value of the region candidate frame, and calculate the aggregate embedding value corresponding to the feature embedding value by the following formula:
Figure PCTCN2022072367-appb-000001
Figure PCTCN2022072367-appb-000001
式中,
Figure PCTCN2022072367-appb-000002
为所述聚合嵌入值,F为所述特征嵌入值,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
In the formula,
Figure PCTCN2022072367-appb-000002
is the aggregation embedding value, F is the feature embedding value, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
本实施例通过邻接矩阵计算不同区域候选框之间的聚合嵌入值,从而能够表达更精确的损伤实例信息。In this embodiment, an adjacency matrix is used to calculate aggregated embedding values between candidate frames in different regions, so that more accurate damage instance information can be expressed.
对于步骤S41,上述邻接矩阵可以根据上述图(graph)数据结构得到,邻接矩阵通常包括一个二维数组,该二维数组中的一维数组存放图(graph)数据结构中所有顶点数据,一个二维数组存放顶点间关系(边)的数据,从而得到量化的区域候选框之间的距离,进而判定区域候选框之间的聚合度。For step S41, the above-mentioned adjacency matrix can be obtained according to the above-mentioned graph (graph) data structure. The adjacency matrix usually includes a two-dimensional array, and the one-dimensional array in the two-dimensional array stores all vertex data in the graph (graph) data structure. The dimension array stores the data of the relationship (edge) between vertices, so as to obtain the distance between the quantified region candidate frames, and then determine the degree of aggregation between the region candidate frames.
对于步骤S42,可以通过特征选择算法(Embedded)计算上述区域候选框的特征嵌入值,该算法能够获取区域候选框的特征组合,并在特征组合中找出最优的特征组合然后返回特征嵌入值结果,以用于描述不同的区域候选框的矢量特征,即上述特征嵌入值能够将数据降维为固定大小的矢量特征表示,以便于处理和计算;因此,本实施例先对区域候选框中的图像进行特征嵌入值提取,以便于后续聚合计算。For step S42, the feature embedding value of the above-mentioned region candidate frame can be calculated by a feature selection algorithm (Embedded), which can obtain the feature combination of the region candidate frame, find the optimal feature combination in the feature combination and return the feature embedding value As a result, the vector features used to describe different region candidate frames, that is, the above-mentioned feature embedding values can reduce the data dimension to a fixed-size vector feature representation for easy processing and calculation; Extract the feature embedding value of the image to facilitate the subsequent aggregation calculation.
在一个实施例中,所述聚合置信度的计算方法S4,包括:In one embodiment, the calculation method S4 of the aggregation confidence includes:
S43:获取所述区域候选框的分类置信度,并通过下式计算所述分类置信度对应的所述聚合置信度:S43: Obtain the classification confidence of the region candidate frame, and calculate the aggregation confidence corresponding to the classification confidence by the following formula:
Figure PCTCN2022072367-appb-000003
Figure PCTCN2022072367-appb-000003
式中,
Figure PCTCN2022072367-appb-000004
为所述聚合置信度,P为所述分类置信度,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
In the formula,
Figure PCTCN2022072367-appb-000004
is the aggregation confidence, P is the classification confidence, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
本实施例通过邻接矩阵计算不同区域候选框之间的聚合嵌入值,从而能够进一步表达更精确的损伤实例信息。In this embodiment, an adjacency matrix is used to calculate aggregated embedding values between candidate frames in different regions, so that more accurate damage instance information can be further expressed.
对于步骤S43,对每个区域候选框所框选的图像分别生成分类置信度,上述分类置信度代表一个区域候选框属于预定目标损伤部位的可能性。具体来说,可以预设图像分类模型,通过该图像分类模型判定区域候选框中的图像是否与某一目标损伤部位为对应关系,并计算该区域候选框与该目标损伤部位为对应关系的可能性,即上述分类置信度。上述聚合置信度即:在邻接矩阵所提供的空间相关性下,该区域候选框属于该目标损伤部位的可能性。For step S43 , classification confidence levels are generated for the images framed by each candidate area frame, and the above classification confidence levels represent the possibility that a candidate area frame belongs to a predetermined target lesion. Specifically, the image classification model can be preset, and the image classification model can be used to determine whether the image in the region candidate frame is corresponding to a certain target damage part, and calculate the possibility that the region candidate frame is corresponding to the target damage part , that is, the above-mentioned classification confidence. The above-mentioned aggregation confidence is: under the spatial correlation provided by the adjacency matrix, the possibility that the region candidate frame belongs to the target lesion.
在一个实施例中,参照图2,所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息S5,包括:In one embodiment, referring to FIG. 2, the aggregated embedding value and the aggregated confidence are combined for each of the region candidate frames corresponding to the same target lesion to obtain the prototype corresponding to the target lesion. Characterization information S5, including:
S51:将所述聚合置信度作为所述区域候选框的合并权重;S51: Using the aggregated confidence as the merging weight of the region candidate frame;
S52:根据所述合并权重,对所述聚合嵌入值进行加权平均计算,得到所述原型表征信息。S52: Perform weighted average calculation on the aggregated embedding value according to the combination weight to obtain the prototype representation information.
本实施例按照合并权重进行加权计算并得到加权后的原型表征信息,从而得到对置信度较高的区域候选框更为突出的原型表征信息。In this embodiment, the weighted calculation is performed according to the combination weight to obtain the weighted prototype representation information, so as to obtain the prototype representation information that is more prominent for the region candidate frames with higher confidence.
对于步骤S52,为了突出对特定类别比较重要的区域候选框对应的模态信息,本申请以每个区域候选框的聚合置信度作为合并权重进行合并,从而按照聚合置信度对不同的区域候选框进行合并,得到上述目标损伤部位的原型表征信息。For step S52, in order to highlight the modal information corresponding to the region candidate frames that are more important to a specific category, the application uses the aggregation confidence of each region candidate frame as the merging weight for merging, so that different region candidate frames are combined according to the aggregation confidence Merging is carried out to obtain the prototype representation information of the above-mentioned target damage site.
在一个实施例中,所述通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐S6,包括:In one embodiment, said passing the detection model, performing inter-domain alignment S6 on the prototype representation information and the standard damage labeling information of each vehicle type, including:
S61:通过内置有类间损失约束的检测模型,对所述原型表征信息和所述标准损伤标注信息进行特征分布对齐。S61: Using a built-in detection model with inter-class loss constraints, perform feature distribution alignment on the prototype representation information and the standard damage label information.
本实施例通过类间损失约束来进行特征分布对齐,从而得到考虑类别不平衡性的域对齐结果。In this embodiment, feature distribution alignment is performed through inter-class loss constraints, so as to obtain a domain alignment result considering class imbalance.
对于步骤S61,其核心思想是通过对类间损失约束,进行最小化类内的损失(记为L intra)计算,来缩小两个原型表征信息的距离。另外,不同原型表征信息之间的距离被另一个类间损失(记为L inter)约束。而且考虑到类别不平衡性的存在,可以通过设置两个类间损失的参数调整不同类别的影响。 For step S61 , the core idea is to minimize the intra-class loss (denoted as L intra ) calculation by constraining the inter-class loss, so as to reduce the distance between two prototype representation information. In addition, the distance between different prototype representations is constrained by another inter-class loss (denoted as L inter ). And considering the existence of category imbalance, the influence of different categories can be adjusted by setting the parameters of the loss between the two categories.
在一个实施例中,所述区域候选框的标记方法S2,包括:In one embodiment, the marking method S2 of the region candidate frame includes:
S21:基于Faster R-CNN目标检测框架,对所述目标图像的区域候选网络进行前景与背景特征的特征提取,生成区域候选框。S21: Based on the Faster R-CNN target detection framework, perform feature extraction of foreground and background features on the region candidate network of the target image to generate region candidate frames.
本实施例通过Faster R-CNN目标检测框架,对目标图像的区域候选网络进行前景与背景特征的特征提取,从而生成准确的区域候选框。In this embodiment, through the Faster R-CNN target detection framework, the feature extraction of foreground and background features is performed on the region candidate network of the target image, thereby generating accurate region candidate frames.
对于步骤S21,可以建立基于卷积神经网络(Convolutional Neural Networks,CNN)的初始车辆损伤检测模型,并使用图诱导原型对齐(Graph-induced Prototype Alignment)框架来对初始车辆损伤检测模型进行无监督域自适应学习,提升初始车辆损伤检测模型在目标域数据上的精度。For step S21, an initial vehicle damage detection model based on Convolutional Neural Networks (CNN) can be established, and a Graph-induced Prototype Alignment (Graph-induced Prototype Alignment) framework can be used to unsupervised the initial vehicle damage detection model Adaptive learning to improve the accuracy of the initial vehicle damage detection model on target domain data.
参照图3,本申请还提出了一种车辆损伤的检测装置,包括:Referring to Fig. 3, the present application also proposes a detection device for vehicle damage, including:
数据集获取模块100,用于获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;A data set acquisition module 100, configured to acquire a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information;
图像获取模块200,用于获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;The image acquisition module 200 is configured to acquire a target image, perform pre-recognition on the target image, and mark a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several parts that have not been marked with damage. vehicle image;
目标损伤部位识别模块300,用于根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;A target lesion identification module 300, configured to identify the target lesion corresponding to each of the candidate area frames in the target image according to the positional relationship between the different candidate area frames;
聚合计算模块400,用于分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度; Aggregation calculation module 400, configured to perform aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and aggregation confidence when the region candidate frames are aggregated to the target lesion site;
合并计算模块500,用于根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;The merge calculation module 500 is configured to merge the region candidate frames corresponding to the same target lesion according to the aggregated embedding value and the aggregate confidence to obtain prototype representation information corresponding to the target lesion ;
域对齐模块600,用于通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。The domain alignment module 600 is configured to perform inter-domain alignment on the prototype representation information and the standard damage annotation information of each vehicle type through the detection model, and use the standard damage annotation information with the smallest alignment distance as the prototype representation The vehicle damage information corresponding to the information.
本实施例通过获取未进行损伤标注的车辆损伤图像作为目标图像,对目标图像生成若干个区域候选框,从而实现了对车辆可能损伤区域的自动识别;通过对每一个区域候选框的位置关系进行识别,从而判定不同的区域候选框是否对应同一个损伤目标损伤部位,提高了目标损伤部位识别的完整性;通过对区域候选框进行聚合计算,并得到不同目标损伤部位分别 对应的原型表征信息,从而增强了区域识别的鲁棒性,避免个别区域候选框标注误差导致损伤区域识别错误的问题;通过对原型表征信息和标准损伤标注信息进行域间对齐,输出原型表征信息对应的车辆损伤信息,从而提高了车辆损伤检测的精确度。In this embodiment, by acquiring a vehicle damage image without damage labeling as the target image, several region candidate frames are generated for the target image, thereby realizing the automatic identification of the possible damage region of the vehicle; Recognition, so as to determine whether different region candidate frames correspond to the same damage target damage part, which improves the integrity of target damage part recognition; through aggregation calculation of region candidate frames, and obtaining prototype representation information corresponding to different target damage parts, In this way, the robustness of area recognition is enhanced, and the problem of incorrect identification of damaged areas caused by labeling errors of individual area candidate frames is avoided; by inter-domain alignment of prototype representation information and standard damage label information, the vehicle damage information corresponding to prototype representation information is output, Therefore, the accuracy of vehicle damage detection is improved.
在一个实施例中,目标损伤部位识别模块300,包括:In one embodiment, the target lesion identification module 300 includes:
候选框区分单元,用于在同一个所述目标图像中,选取两个不同的所述区域候选框作为第一识别框和第二识别框;A candidate frame distinguishing unit, configured to select two different region candidate frames in the same target image as the first recognition frame and the second recognition frame;
交并比计算单元,用于根据所述第一识别框和所述第二识别框的位置关系,计算所述第一识别框和所述第二识别框之间的交并比;an intersection ratio calculation unit, configured to calculate an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
损伤判定单元,用于若所述交并比大于预设的比例阈值,判定所述第一识别框和所述第二识别框对应的目标损伤部位相同;A damage determination unit, configured to determine that the target damage site corresponding to the first recognition frame and the second recognition frame are the same if the intersection-over-union ratio is greater than a preset ratio threshold;
阈值判定单元,用于再次选取两个不同的所述区域候选框作为所述第一识别框和所述第二识别框,并进行所述交并比计算和所述比例阈值判定,直至所述目标图像中的每一个所述区域候选框均与其余所述区域候选框完成所述交并比计算和所述比例阈值判定。a threshold determination unit, configured to select two different candidate regions as the first identification frame and the second identification frame, and perform the intersection-over-union ratio calculation and the ratio threshold determination until the Each of the region candidate frames in the target image completes the intersection-over-union ratio calculation and the ratio threshold determination with the rest of the region candidate frames.
在一个实施例中,所述聚合计算模块400,包括:In one embodiment, the aggregation calculation module 400 includes:
矩阵构件单元,用于通过所述交并比构建所述区域候选框之间的邻接矩阵;a matrix component unit, configured to construct an adjacency matrix between the region candidate frames through the intersection-over-union ratio;
嵌入值计算单元,用于获取所述区域候选框的特征嵌入值,并通过下式计算所述特征嵌入值对应的所述聚合嵌入值:An embedding value calculation unit, configured to obtain the feature embedding value of the region candidate frame, and calculate the aggregate embedding value corresponding to the feature embedding value by the following formula:
Figure PCTCN2022072367-appb-000005
Figure PCTCN2022072367-appb-000005
式中,
Figure PCTCN2022072367-appb-000006
为所述聚合嵌入值,F为所述特征嵌入值,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
In the formula,
Figure PCTCN2022072367-appb-000006
is the aggregation embedding value, F is the feature embedding value, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
在一个实施例中,所述聚合计算模块400,包括:In one embodiment, the aggregation calculation module 400 includes:
聚合置信度计算单元,用于获取所述区域候选框的分类置信度,并通过下式计算所述分类置信度对应的所述聚合置信度:An aggregation confidence calculation unit, configured to obtain the classification confidence of the region candidate frame, and calculate the aggregation confidence corresponding to the classification confidence by the following formula:
Figure PCTCN2022072367-appb-000007
Figure PCTCN2022072367-appb-000007
式中,
Figure PCTCN2022072367-appb-000008
为所述聚合置信度,P为所述分类置信度,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
In the formula,
Figure PCTCN2022072367-appb-000008
is the aggregation confidence, P is the classification confidence, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
在一个实施例中,所述合并计算模块500,包括:In one embodiment, the combined calculation module 500 includes:
合并权重计算单元,用于将所述聚合置信度作为所述区域候选框的合并权重;a merging weight calculation unit, configured to use the aggregation confidence as the merging weight of the region candidate frame;
表征信息计算单元,用于根据所述合并权重,对所述聚合嵌入值进行加权平均计算,得到所述原型表征信息。The characterization information calculation unit is configured to perform weighted average calculation on the aggregated embedded values according to the merging weight to obtain the prototype characterization information.
在一个实施例中,所述域对齐模块600,包括:In one embodiment, the domain alignment module 600 includes:
特征对齐单元,用于通过内置有类间损失约束的检测模型,对所述原型表征信息和所述标准损伤标注信息进行特征分布对齐。The feature alignment unit is configured to perform feature distribution alignment on the prototype representation information and the standard damage label information through a built-in detection model with inter-class loss constraints.
在一个实施例中,所述图像获取模块200,还用于:In one embodiment, the image acquisition module 200 is also used for:
特征提取单元,用于基于Faster R-CNN目标检测框架,对所述目标图像的区域候选网络进行前景与背景特征的特征提取,生成区域候选框。The feature extraction unit is used to perform feature extraction of foreground and background features on the region candidate network of the target image based on the Faster R-CNN target detection framework to generate a region candidate frame.
参照图4,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于储存车辆损伤的检测方法等数据。该计算机设备的网络接口用于与外部的 终端通过网络连接通信。该计算机程序被处理器执行时以实现一种车辆损伤的检测方法。所述车辆损伤的检测方法,包括:获取标准数据集,其中,所述标准数据集包括若干个带有标准损伤标注信息的车辆数据;获取目标图像,对所述目标图像生成若干个区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆损伤图像;根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;分别对所述区域候选框进行聚合计算,得到所述区域候选框对应的聚合嵌入值和聚合置信度;根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的聚类的原型表征信息;通过检测模型,对所述原型表征信息和所述标准损伤标注信息进行域间对齐,输出所述原型表征信息对应的车辆损伤信息。Referring to FIG. 4 , an embodiment of the present application also provides a computer device, which may be a server, and its internal structure may be as shown in FIG. 4 . The computer device includes a processor, memory, network interface and database connected by a system bus. Among them, the processor designed by the computer is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs and databases. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store data such as detection methods of vehicle damage. The network interface of the computer device is used to communicate with the external terminal through the network connection. When the computer program is executed by the processor, a method for detecting vehicle damage is realized. The vehicle damage detection method includes: obtaining a standard data set, wherein the standard data set includes several vehicle data with standard damage label information; obtaining a target image, and generating several region candidate frames for the target image , wherein, the target image includes several vehicle damage images that have not been marked with damage; according to the positional relationship between the different candidate regions, identify the target corresponding to each candidate region frame in the target image Lesion site; performing aggregation calculations on the region candidate frames respectively to obtain the aggregation embedding value and the aggregation confidence degree corresponding to the region candidate frame; according to the aggregation embedding value and the aggregation confidence degree, for the same target damage The region candidate frames corresponding to the parts are merged to obtain the prototype representation information of the cluster corresponding to the target damage part; through the detection model, the prototype representation information and the standard damage label information are inter-domain aligned, and the output The vehicle damage information corresponding to the prototype characterization information.
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种车辆损伤的检测方法,包括步骤:获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, a vehicle damage detection method is implemented, including the steps of: acquiring a standard data set, wherein the The standard data set includes vehicle data of several different vehicle types with different standard damage labeling information; the target image is acquired, the target image is pre-recognized, and each part pre-recognized as a damaged area is marked with a region candidate frame, Wherein, the target image includes several vehicle images that have not been marked with damage; according to the positional relationship between the different candidate regions, identify the target damage part corresponding to each candidate region frame in the target image ; Carry out aggregation calculations on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target damage site; according to the aggregation embedding value and the aggregation confidence, for the same Merge each of the region candidate frames corresponding to a target damage part to obtain prototype representation information corresponding to the target damage part; through the detection model, respectively combine the prototype representation information with the standard damage of each vehicle type The annotation information is aligned between domains, and the standard damage annotation information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype representation information.
上述执行的车辆损伤的检测方法,本实施例通过获取未进行损伤标注的车辆损伤图像作为目标图像,对目标图像生成若干个区域候选框,从而实现了对车辆可能损伤区域的自动识别;通过对每一个区域候选框的位置关系进行识别,从而判定不同的区域候选框是否对应同一个损伤目标损伤部位,提高了目标损伤部位识别的完整性;通过对区域候选框进行聚合计算,并得到不同目标损伤部位分别对应的原型表征信息,从而增强了区域识别的鲁棒性,避免个别区域候选框标注误差导致损伤区域识别错误的问题;通过对原型表征信息和标准损伤标注信息进行域间对齐,输出原型表征信息对应的车辆损伤信息,从而提高了车辆损伤检测的精确度。In the vehicle damage detection method performed above, in this embodiment, a vehicle damage image without damage labeling is obtained as a target image, and several area candidate frames are generated for the target image, thereby realizing automatic identification of possible damage areas of the vehicle; The positional relationship of each region candidate frame is identified to determine whether different region candidate frames correspond to the same damaged target damage part, which improves the integrity of target damage part identification; through aggregation calculation of region candidate frames, different targets are obtained Prototype representation information corresponding to the damaged parts, thereby enhancing the robustness of region recognition and avoiding the problem of incorrect recognition of damaged regions caused by labeling errors in individual region candidate frames; through inter-domain alignment of prototype representation information and standard damage labeling information, the output The vehicle damage information corresponding to the prototype representation information improves the accuracy of vehicle damage detection.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media provided in the present application and used in the embodiments may include non-volatile and/or volatile memory. Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, apparatus, article or method comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional same elements in the process, apparatus, article or method comprising the element.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of the application, and are not intended to limit the patent scope of the application. Any equivalent structure or equivalent process conversion made by using the specification and drawings of the application, or directly or indirectly used in other related All technical fields are equally included in the patent protection scope of the present application.

Claims (22)

  1. 一种车辆损伤的检测方法,其中,所述方法包括:A method for detecting vehicle damage, wherein the method includes:
    获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;Obtaining a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information;
    获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;Acquiring a target image, pre-identifying the target image, and marking a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage;
    根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;Identifying a target lesion corresponding to each of the region candidate frames in the target image according to the positional relationship between the different region candidate frames;
    分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;Carrying out aggregation calculations on the region candidate frames respectively, to obtain an aggregation embedding value and an aggregation confidence when the region candidate frames are aggregated to the target lesion site;
    根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;According to the aggregated embedding value and the aggregated confidence, merge each of the region candidate frames corresponding to the same target lesion to obtain prototype representation information corresponding to the target lesion;
    通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。Through the detection model, the prototype characterization information is inter-domain aligned with the standard damage labeling information of each vehicle type, and the standard damage labeling information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype characterization information.
  2. 根据权利要求1所述的车辆损伤的检测方法,其中,所述根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位,包括:The vehicle damage detection method according to claim 1, wherein, according to the positional relationship between different said region candidate frames, identify the target damage part corresponding to each of said region candidate frames in said target image ,include:
    在同一个所述目标图像中,选取两个不同的所述区域候选框作为第一识别框和第二识别框;In the same target image, select two different candidate regions as the first recognition frame and the second recognition frame;
    根据所述第一识别框和所述第二识别框的位置关系,计算所述第一识别框和所述第二识别框之间的交并比;calculating an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
    若所述交并比大于预设的比例阈值,判定所述第一识别框和所述第二识别框对应的目标损伤部位相同;If the intersection-over-union ratio is greater than a preset ratio threshold, it is determined that the target lesion corresponding to the first identification frame and the second identification frame are the same;
    再次选取两个不同的所述区域候选框作为所述第一识别框和所述第二识别框,并进行所述交并比计算和所述比例阈值判定,直至所述目标图像中的每一个所述区域候选框均与其余所述区域候选框完成所述交并比计算和所述比例阈值判定。Selecting two different candidate frames of the region as the first recognition frame and the second recognition frame, and performing the calculation of the intersection ratio and the determination of the ratio threshold until each of the target images The region candidate frames and the other region candidate frames complete the calculation of the intersection ratio and the determination of the ratio threshold.
  3. 根据权利要求2所述的车辆损伤的检测方法,其中,所述聚合嵌入值的计算方法,包括:The detection method for vehicle damage according to claim 2, wherein the calculation method of the aggregated embedded value comprises:
    通过所述交并比构建所述区域候选框之间的邻接矩阵;Constructing an adjacency matrix between the region candidate frames through the intersection-over-union ratio;
    获取所述区域候选框的特征嵌入值,并通过下式计算所述特征嵌入值对应的所述聚合嵌入值:Obtain the feature embedding value of the region candidate frame, and calculate the aggregate embedding value corresponding to the feature embedding value by the following formula:
    Figure PCTCN2022072367-appb-100001
    Figure PCTCN2022072367-appb-100001
    式中,
    Figure PCTCN2022072367-appb-100002
    为所述聚合嵌入值,F为所述特征嵌入值,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
    In the formula,
    Figure PCTCN2022072367-appb-100002
    is the aggregation embedding value, F is the feature embedding value, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
  4. 根据权利要求3所述的车辆损伤的检测方法,其中,所述聚合置信度的计算方法,包括:The detection method of vehicle damage according to claim 3, wherein, the calculation method of the aggregation confidence includes:
    获取所述区域候选框的分类置信度,并通过下式计算所述分类置信度对应的所述聚合置信度:Obtain the classification confidence of the region candidate frame, and calculate the aggregation confidence corresponding to the classification confidence by the following formula:
    Figure PCTCN2022072367-appb-100003
    Figure PCTCN2022072367-appb-100003
    式中,
    Figure PCTCN2022072367-appb-100004
    为所述聚合置信度,P为所述分类置信度,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
    In the formula,
    Figure PCTCN2022072367-appb-100004
    is the aggregation confidence, P is the classification confidence, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
  5. 根据权利要求1所述的车辆损伤的检测方法,其中,所述根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息,包括:The vehicle damage detection method according to claim 1, wherein, according to the aggregated embedding value and the aggregated confidence, the region candidate frames corresponding to the same target damage site are combined to obtain The prototype representation information corresponding to the target damage site includes:
    将所述聚合置信度作为所述区域候选框的合并权重;Using the aggregation confidence as the merging weight of the region candidate frame;
    根据所述合并权重,对所述聚合嵌入值进行加权平均计算,得到所述原型表征信息。Perform weighted average calculation on the aggregated embedding value according to the combination weight to obtain the prototype representation information.
  6. 根据权利要求1所述的车辆损伤的检测方法,其中,所述通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,包括:The method for detecting vehicle damage according to claim 1, wherein, through the detection model, respectively performing inter-domain alignment of the prototype representation information and the standard damage labeling information of each of the vehicle types, comprising:
    通过内置有类间损失约束的检测模型,对所述原型表征信息和所述标准损伤标注信息进行特征分布对齐。Through the built-in detection model with inter-class loss constraints, the feature distribution alignment is performed on the prototype representation information and the standard damage label information.
  7. 根据权利要求1所述的车辆损伤的检测方法,其中,所述区域候选框的标记方法,包括:The detection method of vehicle damage according to claim 1, wherein the marking method of the region candidate frame comprises:
    基于Faster R-CNN目标检测框架,对所述目标图像的区域候选网络进行前景与背景特征的特征提取,生成所述区域候选框。Based on the Faster R-CNN target detection framework, the feature extraction of foreground and background features is performed on the region candidate network of the target image to generate the region candidate frame.
  8. 一种车辆损伤的检测装置,其中,包括:A vehicle damage detection device, including:
    数据集获取模块,用于获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;A data set acquisition module, configured to acquire a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage label information;
    图像获取模块,用于获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;An image acquisition module, configured to acquire a target image, perform pre-identification on the target image, and mark an area candidate frame for each part pre-identified as a damaged area, wherein the target image includes several vehicles that have not been marked with damage image;
    目标损伤部位识别模块,用于根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;A target lesion identification module, configured to identify the target lesion corresponding to each of the candidate area frames in the target image according to the positional relationship between the different candidate area frames;
    聚合计算模块,用于分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;An aggregation calculation module, configured to perform aggregation calculation on the region candidate frames respectively, to obtain the aggregation embedding value and the aggregation confidence when the region candidate frames are aggregated to the target lesion site;
    合并计算模块,用于根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;A merge calculation module, configured to merge each of the region candidate frames corresponding to the same target lesion according to the aggregate embedding value and the aggregate confidence, to obtain prototype representation information corresponding to the target lesion;
    域对齐模块,用于通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。A domain alignment module, configured to perform inter-domain alignment on the prototype representation information and the standard damage annotation information of each vehicle type through the detection model, and use the standard damage annotation information with the smallest alignment distance as the prototype representation information Corresponding vehicle damage information.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现一种车辆损伤的检测方法的步骤;A computer device, comprising a memory and a processor, the memory stores a computer program, wherein, when the processor executes the computer program, the steps of a method for detecting vehicle damage are realized;
    其中,所述车辆损伤的检测方法包括:Wherein, the detection method of described vehicle damage comprises:
    获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;Obtaining a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information;
    获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;Acquiring a target image, pre-identifying the target image, and marking a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage;
    根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;Identifying a target lesion corresponding to each of the region candidate frames in the target image according to the positional relationship between the different region candidate frames;
    分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;Carrying out aggregation calculations on the region candidate frames respectively, to obtain an aggregation embedding value and an aggregation confidence when the region candidate frames are aggregated to the target lesion site;
    根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;According to the aggregated embedding value and the aggregated confidence, merge each of the region candidate frames corresponding to the same target lesion to obtain prototype representation information corresponding to the target lesion;
    通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。Through the detection model, the prototype characterization information is inter-domain aligned with the standard damage labeling information of each vehicle type, and the standard damage labeling information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype characterization information.
  10. 根据权利要求9所述的计算机设备,其中,所述根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位,包括:The computer device according to claim 9, wherein the identifying the target lesion corresponding to each of the candidate region frames in the target image according to the positional relationship between the different candidate region frames includes:
    在同一个所述目标图像中,选取两个不同的所述区域候选框作为第一识别框和第二识别框;In the same target image, select two different candidate regions as the first recognition frame and the second recognition frame;
    根据所述第一识别框和所述第二识别框的位置关系,计算所述第一识别框和所述第二识别框之间的交并比;calculating an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
    若所述交并比大于预设的比例阈值,判定所述第一识别框和所述第二识别框对应的目标损伤部位相同;If the intersection-over-union ratio is greater than a preset ratio threshold, it is determined that the target lesion corresponding to the first identification frame and the second identification frame are the same;
    再次选取两个不同的所述区域候选框作为所述第一识别框和所述第二识别框,并进行所述交并比计算和所述比例阈值判定,直至所述目标图像中的每一个所述区域候选框均与其余所述区域候选框完成所述交并比计算和所述比例阈值判定。Selecting two different candidate frames of the region as the first recognition frame and the second recognition frame, and performing the calculation of the intersection ratio and the determination of the ratio threshold until each of the target images The region candidate frames and the other region candidate frames complete the calculation of the intersection ratio and the determination of the ratio threshold.
  11. 根据权利要求10所述的计算机设备,其中,所述聚合嵌入值的计算方法,包括:The computer device according to claim 10, wherein the calculation method of the aggregated embedded value comprises:
    通过所述交并比构建所述区域候选框之间的邻接矩阵;Constructing an adjacency matrix between the region candidate frames through the intersection-over-union ratio;
    获取所述区域候选框的特征嵌入值,并通过下式计算所述特征嵌入值对应的所述聚合嵌入值:Obtain the feature embedding value of the region candidate frame, and calculate the aggregate embedding value corresponding to the feature embedding value by the following formula:
    Figure PCTCN2022072367-appb-100005
    Figure PCTCN2022072367-appb-100005
    式中,
    Figure PCTCN2022072367-appb-100006
    为所述聚合嵌入值,F为所述特征嵌入值,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
    In the formula,
    Figure PCTCN2022072367-appb-100006
    is the aggregation embedding value, F is the feature embedding value, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
  12. 根据权利要求11所述的计算机设备,其中,所述聚合置信度的计算方法,包括:The computer device according to claim 11, wherein the calculation method of the aggregation confidence degree comprises:
    获取所述区域候选框的分类置信度,并通过下式计算所述分类置信度对应的所述聚合置信度:Obtain the classification confidence of the region candidate frame, and calculate the aggregation confidence corresponding to the classification confidence by the following formula:
    Figure PCTCN2022072367-appb-100007
    Figure PCTCN2022072367-appb-100007
    式中,
    Figure PCTCN2022072367-appb-100008
    为所述聚合置信度,P为所述分类置信度,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
    In the formula,
    Figure PCTCN2022072367-appb-100008
    is the aggregation confidence, P is the classification confidence, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
  13. 根据权利要求9所述的计算机设备,其中,所述根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息,包括:The computer device according to claim 9, wherein, according to the aggregated embedding value and the aggregated confidence, the region candidate frames corresponding to the same target lesion are combined to obtain the target Prototype representation information corresponding to the damage site, including:
    将所述聚合置信度作为所述区域候选框的合并权重;Using the aggregation confidence as the merging weight of the region candidate frame;
    根据所述合并权重,对所述聚合嵌入值进行加权平均计算,得到所述原型表征信息。Perform weighted average calculation on the aggregated embedding value according to the combination weight to obtain the prototype representation information.
  14. 根据权利要求9所述的计算机设备,其中,所述通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,包括:The computer device according to claim 9, wherein said passing through the detection model, respectively performing inter-domain alignment on said prototype representation information and standard damage labeling information of each said vehicle type, comprises:
    通过内置有类间损失约束的检测模型,对所述原型表征信息和所述标准损伤标注信息进行特征分布对齐。Through the built-in detection model with inter-class loss constraints, the feature distribution alignment is performed on the prototype representation information and the standard damage label information.
  15. 根据权利要求9所述的计算机设备,其中,所述区域候选框的标记方法,包括:The computer device according to claim 9, wherein the marking method of the region candidate frame comprises:
    基于Faster R-CNN目标检测框架,对所述目标图像的区域候选网络进行前景与背景特征的特征提取,生成所述区域候选框。Based on the Faster R-CNN target detection framework, the feature extraction of foreground and background features is performed on the region candidate network of the target image to generate the region candidate frame.
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现一种车辆损伤的检测方法的步骤;A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the steps of a method for detecting vehicle damage are realized;
    其中,所述车辆损伤的检测方法包括:Wherein, the detection method of described vehicle damage comprises:
    获取标准数据集,其中,所述标准数据集包括带有不同标准损伤标注信息的若干个不同车辆类型的车辆数据;Obtaining a standard data set, wherein the standard data set includes vehicle data of several different vehicle types with different standard damage labeling information;
    获取目标图像,对所述目标图像进行预识别,并对每一个预识别为损伤区域的部位标记区域候选框,其中,所述目标图像包括若干个未进行损伤标注的车辆图像;Acquiring a target image, pre-identifying the target image, and marking a region candidate frame for each part pre-recognized as a damaged region, wherein the target image includes several vehicle images that have not been marked with damage;
    根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位;Identifying a target lesion corresponding to each of the region candidate frames in the target image according to the positional relationship between the different region candidate frames;
    分别对所述区域候选框进行聚合计算,得到所述区域候选框聚合至所述目标损伤部位时的聚合嵌入值和聚合置信度;Carrying out aggregation calculations on the region candidate frames respectively, to obtain an aggregation embedding value and an aggregation confidence when the region candidate frames are aggregated to the target lesion site;
    根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息;According to the aggregated embedding value and the aggregated confidence, merge each of the region candidate frames corresponding to the same target lesion to obtain prototype representation information corresponding to the target lesion;
    通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,并将对齐距离最小的标准损伤标注信息作为所述原型表征信息对应的车辆损伤信息。Through the detection model, the prototype characterization information is inter-domain aligned with the standard damage labeling information of each vehicle type, and the standard damage labeling information with the smallest alignment distance is used as the vehicle damage information corresponding to the prototype characterization information.
  17. 根据权利要求16所述的车辆损伤的检测方法,其中,所述根据不同的所述区域候选框之间的位置关系,识别每一个所述区域候选框在所述目标图像中对应的目标损伤部位,包括:The vehicle damage detection method according to claim 16, wherein, according to the positional relationship between the different candidate region frames, the target damage part corresponding to each candidate region frame in the target image is identified ,include:
    在同一个所述目标图像中,选取两个不同的所述区域候选框作为第一识别框和第二识别框;In the same target image, select two different candidate regions as the first recognition frame and the second recognition frame;
    根据所述第一识别框和所述第二识别框的位置关系,计算所述第一识别框和所述第二识别框之间的交并比;calculating an intersection ratio between the first recognition frame and the second recognition frame according to the positional relationship between the first recognition frame and the second recognition frame;
    若所述交并比大于预设的比例阈值,判定所述第一识别框和所述第二识别框对应的目标损伤部位相同;If the intersection-over-union ratio is greater than a preset ratio threshold, it is determined that the target lesion corresponding to the first identification frame and the second identification frame are the same;
    再次选取两个不同的所述区域候选框作为所述第一识别框和所述第二识别框,并进行所述交并比计算和所述比例阈值判定,直至所述目标图像中的每一个所述区域候选框均与其余所述区域候选框完成所述交并比计算和所述比例阈值判定。Selecting two different candidate frames of the region as the first recognition frame and the second recognition frame, and performing the calculation of the intersection ratio and the determination of the ratio threshold until each of the target images The region candidate frames and the other region candidate frames complete the calculation of the intersection ratio and the determination of the ratio threshold.
  18. 根据权利要求17所述的车辆损伤的检测方法,其中,所述聚合嵌入值的计算方法,包括:The vehicle damage detection method according to claim 17, wherein the calculation method of the aggregated embedded value comprises:
    通过所述交并比构建所述区域候选框之间的邻接矩阵;Constructing an adjacency matrix between the region candidate frames through the intersection-over-union ratio;
    获取所述区域候选框的特征嵌入值,并通过下式计算所述特征嵌入值对应的所述聚合嵌入值:Obtain the feature embedding value of the region candidate frame, and calculate the aggregate embedding value corresponding to the feature embedding value by the following formula:
    Figure PCTCN2022072367-appb-100009
    Figure PCTCN2022072367-appb-100009
    式中,
    Figure PCTCN2022072367-appb-100010
    为所述聚合嵌入值,F为所述特征嵌入值,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
    In the formula,
    Figure PCTCN2022072367-appb-100010
    is the aggregation embedding value, F is the feature embedding value, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
  19. 根据权利要求18所述的车辆损伤的检测方法,其中,所述聚合置信度的计算方法,包括:The detection method for vehicle damage according to claim 18, wherein, the calculation method of the aggregation confidence includes:
    获取所述区域候选框的分类置信度,并通过下式计算所述分类置信度对应的所述聚合置信度:Obtain the classification confidence of the region candidate frame, and calculate the aggregation confidence corresponding to the classification confidence by the following formula:
    Figure PCTCN2022072367-appb-100011
    Figure PCTCN2022072367-appb-100011
    式中,
    Figure PCTCN2022072367-appb-100012
    为所述聚合置信度,P为所述分类置信度,A为所述邻接矩阵,D为所述邻接矩阵的对角矩阵。
    In the formula,
    Figure PCTCN2022072367-appb-100012
    is the aggregation confidence, P is the classification confidence, A is the adjacency matrix, and D is the diagonal matrix of the adjacency matrix.
  20. 根据权利要求16所述的车辆损伤的检测方法,其中,所述根据所述聚合嵌入值和所述聚合置信度,对同一个所述目标损伤部位对应的各个所述区域候选框进行合并,得到所述目标损伤部位对应的原型表征信息,包括:The vehicle damage detection method according to claim 16, wherein, according to the aggregated embedded value and the aggregated confidence, the region candidate frames corresponding to the same target damage site are combined to obtain The prototype representation information corresponding to the target damage site includes:
    将所述聚合置信度作为所述区域候选框的合并权重;Using the aggregation confidence as the merging weight of the region candidate frame;
    根据所述合并权重,对所述聚合嵌入值进行加权平均计算,得到所述原型表征信息。Perform weighted average calculation on the aggregated embedding value according to the combination weight to obtain the prototype representation information.
  21. 根据权利要求16所述的车辆损伤的检测方法,其中,所述通过检测模型,分别将所述原型表征信息与每一个所述车辆类型的标准损伤标注信息进行域间对齐,包括:The method for detecting vehicle damage according to claim 16, wherein, through the detection model, the inter-domain alignment of the prototype representation information and the standard damage labeling information of each of the vehicle types is performed, comprising:
    通过内置有类间损失约束的检测模型,对所述原型表征信息和所述标准损伤标注信息进行特征分布对齐。Through the built-in detection model with inter-class loss constraints, the feature distribution alignment is performed on the prototype representation information and the standard damage label information.
  22. 根据权利要求16所述的车辆损伤的检测方法,其中,所述区域候选框的标记方法,包括:The detection method of vehicle damage according to claim 16, wherein, the marking method of the region candidate frame comprises:
    基于Faster R-CNN目标检测框架,对所述目标图像的区域候选网络进行前景与背景特征的特征提取,生成所述区域候选框。Based on the Faster R-CNN target detection framework, the feature extraction of foreground and background features is performed on the region candidate network of the target image to generate the region candidate frame.
PCT/CN2022/072367 2021-09-08 2022-01-17 Vehicle damage detection method, device, apparatus and storage medium WO2023035538A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111058959.7A CN113743407B (en) 2021-09-08 2021-09-08 Method, device, equipment and storage medium for detecting vehicle damage
CN202111058959.7 2021-09-08

Publications (1)

Publication Number Publication Date
WO2023035538A1 true WO2023035538A1 (en) 2023-03-16

Family

ID=78737799

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/072367 WO2023035538A1 (en) 2021-09-08 2022-01-17 Vehicle damage detection method, device, apparatus and storage medium

Country Status (2)

Country Link
CN (1) CN113743407B (en)
WO (1) WO2023035538A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743407B (en) * 2021-09-08 2024-05-10 平安科技(深圳)有限公司 Method, device, equipment and storage medium for detecting vehicle damage
CN114898155B (en) * 2022-05-18 2024-05-28 平安科技(深圳)有限公司 Vehicle damage assessment method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569696A (en) * 2018-08-31 2019-12-13 阿里巴巴集团控股有限公司 Neural network system, method and apparatus for vehicle component identification
CN111967595A (en) * 2020-08-17 2020-11-20 成都数之联科技有限公司 Candidate frame marking method and system, model training method and target detection method
CN112966730A (en) * 2021-03-01 2021-06-15 创新奇智(上海)科技有限公司 Vehicle damage identification method, device, equipment and storage medium
CN113743407A (en) * 2021-09-08 2021-12-03 平安科技(深圳)有限公司 Vehicle damage detection method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712498A (en) * 2020-12-25 2021-04-27 北京百度网讯科技有限公司 Vehicle damage assessment method and device executed by mobile terminal, mobile terminal and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569696A (en) * 2018-08-31 2019-12-13 阿里巴巴集团控股有限公司 Neural network system, method and apparatus for vehicle component identification
CN111967595A (en) * 2020-08-17 2020-11-20 成都数之联科技有限公司 Candidate frame marking method and system, model training method and target detection method
CN112966730A (en) * 2021-03-01 2021-06-15 创新奇智(上海)科技有限公司 Vehicle damage identification method, device, equipment and storage medium
CN113743407A (en) * 2021-09-08 2021-12-03 平安科技(深圳)有限公司 Vehicle damage detection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113743407A (en) 2021-12-03
CN113743407B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
TWI742382B (en) Neural network system for vehicle parts recognition executed by computer, method for vehicle part recognition through neural network system, device and computing equipment for vehicle part recognition
CN111860670B (en) Domain adaptive model training method, image detection method, device, equipment and medium
CN109492643B (en) Certificate identification method and device based on OCR, computer equipment and storage medium
CN111723860B (en) Target detection method and device
TWI729405B (en) Method and device for optimizing damage detection results
CN108229509B (en) Method and device for identifying object class and electronic equipment
WO2019218410A1 (en) Image classification method, computer device, and storage medium
WO2023035538A1 (en) Vehicle damage detection method, device, apparatus and storage medium
CN111914642B (en) Pedestrian re-identification method, device, equipment and medium
CN111368766B (en) Deep learning-based cow face detection and recognition method
WO2020238256A1 (en) Weak segmentation-based damage detection method and device
CN111914634B (en) Automatic detection method and system for well lid class resisting complex scene interference
WO2021000832A1 (en) Face matching method and apparatus, computer device, and storage medium
WO2022121189A1 (en) Method and apparatus for measuring temperature, and computer device
WO2020038138A1 (en) Sample labeling method and device, and damage category identification method and device
CN112668462B (en) Vehicle damage detection model training, vehicle damage detection method, device, equipment and medium
Liu et al. Deep domain adaptation for pavement crack detection
CN116740758A (en) Bird image recognition method and system for preventing misjudgment
CN114549909A (en) Pseudo label remote sensing image scene classification method based on self-adaptive threshold
CN114494373A (en) High-precision rail alignment method and system based on target detection and image registration
CN111401286B (en) Pedestrian retrieval method based on component weight generation network
WO2020155484A1 (en) Character recognition method and device based on support vector machine, and computer device
Huang et al. Joint distribution adaptive-alignment for cross-domain segmentation of high-resolution remote sensing images
CN116188973B (en) Crack detection method based on cognitive generation mechanism
Ke Realization of Halcon Image Segmentation Algorithm in Machine Vision for Complex Scenarios

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE