Artificial Intelligence-Based Vehicle Lamp Damage Detection Method and Related Equipment

By adopting an artificial intelligence-based method in vehicle lamp damage detection, the lamp components are used to segment the network and the damage detection network, and the characteristics of vehicle lamps are extracted and identified, the problem of low detection accuracy in the prior art is solved, and damage detection with higher accuracy is achieved.

CN115240147BActive Publication Date: 2025-05-27PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210901627.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2025-05-27
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

The prior art has low accuracy in vehicle lamp damage detection, especially the characteristics of different lamp components vary greatly, resulting in inaccurate detection results.

Method used

Using artificial intelligence-based vehicle lamp damage detection method, by storing a large number of vehicle images and label data, a lamp component segmentation network and damage detection network are built, and these networks are used to extract and identify the characteristics of lamp components, thereby real-time damage detection is achieved.

Benefits of technology

The accuracy of vehicle lamp damage detection is improved, and the damage parts and types of vehicle lamps can be more accurately identified and positioned.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115240147B_ABST
    Figure CN115240147B_ABST
Patent Text Reader

Abstract

The present application proposes an artificial intelligence-based vehicle lamp damage detection method, device, electronic device, and storage medium. The artificial intelligence-based vehicle lamp damage detection method includes: storing vehicle images and label data of the vehicle images as a first training set; training a lamp component segmentation network based on the first training set to update the parameters of the lamp segmentation network; inputting the real-time image of the target vehicle into the trained lamp component segmentation network to obtain lamp sub-images of various lamp component types; building a damage detection network, which includes a first encoder, a second decoder, and multiple detectors; training the damage detection network based on the lamp sub-images with label data to update the parameters of the second decoder and multiple detectors; and sequentially inputting all the lamp sub-images in the real-time image into the trained damage detection network to obtain the lamp damage detection result. The present application can improve the accuracy of vehicle lamp damage detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and particularly to a method, device, electronic device, and storage medium for detecting vehicle lamp damage based on artificial intelligence. Background Art

[0002] With the rapid growth of private cars, self-driving travel has become a common way of traveling. During vehicle driving, due to factors such as weather, road conditions, or driver skills, vehicle damage is inevitable. Detecting the damaged parts and the degree of damage of a damaged vehicle directly affects the determination of subsequent vehicle repair plans and the confirmation of the economic compensation amount for the relevant parties in subsequent accidents.

[0003] Currently, existing semantic segmentation networks or object segmentation networks are usually directly used to process images of damaged vehicles to achieve intelligent damage assessment. However, the feature differences of different lamp components in images are large, and this method cannot adapt to vehicle damage assessment of different lamp components. At the same time, vehicle lamps are further divided into multiple different categories, and there are subtle differences in the surface features of different vehicle lamp types, which will further lead to low accuracy in vehicle lamp damage detection. Summary of the Invention

[0004] In view of the above, it is necessary to propose a method for detecting vehicle lamp damage based on artificial intelligence and related devices to solve the technical problem of how to improve the accuracy of vehicle lamp damage detection. Among them, the related devices include a vehicle lamp damage detection device based on artificial intelligence, an electronic device, and a storage medium.

[0005] This application provides a method for detecting vehicle lamp damage based on artificial intelligence, and the method includes:

[0006] Storing a large number of vehicle images and label data of each vehicle image to obtain a first training set, where the label data of the vehicle image includes the lamp component types of each pixel point in the vehicle image;

[0007] Building a lamp component segmentation network, and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, where the lamp component segmentation network includes a first encoder and a first decoder;

[0008] Collecting real-time images of a target vehicle, and inputting the real-time images into the trained lamp component segmentation network to obtain lamp sub-images of each lamp component type in the real-time images;

[0009] Building a damage detection network based on the first encoder, where the damage detection network includes the first encoder, a second encoder, and multiple detectors;

[0010] Store a large number of sub - images of lamps and the label data of each sub - image of the lamp with different types of lamp components as the second training set, and train the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors. The label data of the sub - image of the lamp includes the position information and damage types of all damages in the sub - image of the lamp;

[0011] Input all the sub - images of the lamp in the real - time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle.

[0012] In some embodiments, storing a large number of vehicle images and the label data of each vehicle image to obtain the first training set. The label data of the vehicle image includes the types of lamp components of each pixel point in the vehicle image, including:

[0013] Collect a large number of vehicle images and obtain the label data of each vehicle image. The label data of the vehicle image is an image data of the same size as the vehicle image, and the pixel value of the pixel point in the image data is the preset value of the type of lamp component corresponding to the pixel point;

[0014] Store all vehicle images and the label data of all vehicle images as the first training set of the types of lamp components.

[0015] In some embodiments, building a lamp component segmentation network and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, including:

[0016] Build a lamp component segmentation network, which includes a first encoder and a first decoder;

[0017] Initialize the parameters in the lamp component segmentation network according to a preset initialization algorithm to obtain an initialized lamp component segmentation network;

[0018] Train the initialized lamp component segmentation network based on the first training set and the cross - entropy loss function to update the parameters of the lamp component segmentation network until the value of the cross - entropy loss function no longer changes, and then stop training to obtain a trained lamp component segmentation network. The input of the trained lamp component segmentation network is a vehicle image, and the output is the lamp component segmentation result of the vehicle image. The lamp component segmentation result includes the type of lamp component to which each pixel point in the vehicle image belongs.

[0019] In some embodiments, collecting a real - time image of a target vehicle and inputting the real - time image into the trained lamp component segmentation network to obtain sub - images of each type of lamp component in the real - time image, including:

[0020] Collect real-time images of the target vehicle, and input the real-time images into the trained lamp component segmentation network to obtain the lamp component segmentation result, where the lamp component segmentation result includes the lamp component types of each pixel point in the real-time image;

[0021] Mark the pixel points with the lamp component type of the target lamp component type in the lamp component segmentation result to obtain the marking map of the target lamp component type. The marking map includes marked pixel points and unmarked pixel points, and the target lamp component type is any one of all lamp types;

[0022] Based on the marking map of the target lamp component type, set the pixel values of the unmarked pixel points in the real-time image to 0, and keep the pixel values of the marked pixel points unchanged, to obtain the lamp sub-image of the target lamp component type in the real-time image;

[0023] Traverse all lamp types to obtain the lamp sub-images of each lamp component type in the real-time image.

[0024] In some embodiments, the damage detection network is a target detection network, and building the damage detection network based on the first encoder includes:

[0025] Build a damage detection network, which includes the first encoder, the second encoder and multiple detectors;

[0026] The first encoder performs multiple convolution operations on the input lamp sub-image to obtain multiple first downsampled images with different sizes; the second encoder performs multiple convolution operations on the input lamp sub-image to obtain multiple second downsampled images with different sizes, and the number and sizes of the first downsampled images are the same as those of the second downsampled images;

[0027] Stack the first downsampled image and the second downsampled image with the same size together to obtain the fused downsampled image of each size;

[0028] Input all the fused downsampled images into the multiple detectors to obtain the sub-results of each fused downsampled image. The detectors correspond one-to-one with the fused downsampled images, and the sub-results of the fused downsampled images include the position information and damage types of all damages in the fused downsampled images; Figure 1 The sub-results of all the fused downsampled images are used as the damage detection results of the lamp sub-image, and the damage detection results include the position information and damage types of all damage areas in the lamp sub-image.

[0029] The sub-results of all the fused downsampled images are used as the damage detection results of the lamp sub-image, and the damage detection results include the position information and damage types of all damage areas in the lamp sub-image.

[0030] In some embodiments, training the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors includes:

[0031] Fixing the parameters of the first encoder in the damage detection network;

[0032] Initializing the parameters of the second encoder and the multiple detectors according to a preset initialization algorithm to obtain an initialized damage detection network;

[0033] Randomly selecting a lamp sub - graph from the second training set as a training image;

[0034] Sequentially inputting the training image into the initialized damage detection network to obtain a damage detection result, calculating the value of a preset loss function based on the damage detection result and the label data of the training image, and updating the parameters of the second encoder and the multiple detectors;

[0035] Until the value of the preset loss function no longer changes, stop training to obtain a trained damage detection network.

[0036] In some embodiments, sequentially inputting all lamp sub - graphs in the real - time image into the trained damage detection network to obtain the lamp damage detection result of the target vehicle includes:

[0037] Sequentially inputting all lamp sub - graphs in the real - time image into the trained damage detection network to obtain the damage detection result of each lamp sub - graph;

[0038] Counting the number of damaged areas in the damage detection result of each lamp sub - graph, and taking the lamp sub - graphs with the number of damaged areas greater than 0 as damaged sub - graphs;

[0039] Storing the damage recognition results of all damaged sub - graphs as the lamp damage detection result of the target vehicle, where the lamp damage detection result includes the position information and damage types of all damages on each type of lamp component of the target vehicle.

[0040] The embodiment of the present application further provides an artificial - intelligence - based vehicle lamp damage detection device, and the device includes:

[0041] A storage unit, configured to store a large number of vehicle images and the label data of each vehicle image to obtain a first training set, where the label data of the vehicle image includes the lamp component types of each pixel point in the vehicle image;

[0042] A first training unit, configured to build a lamp component segmentation network and train the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, where the lamp component segmentation network includes a first encoder and a first decoder;

[0043] A segmentation unit, configured to collect real-time images of a target vehicle, and input the real-time images into a trained lamp component segmentation network to obtain lamp sub-images of each type of lamp component in the real-time images;

[0044] A construction unit, configured to construct a damage detection network based on the first encoder, where the damage detection network includes the first encoder, a second encoder, and a plurality of detectors;

[0045] A second training unit, configured to store a large number of lamp sub-images of different types of lamp components and label data of each lamp sub-image as a second training set, and train the damage detection network based on the second training set to update parameters of the second encoder and the plurality of detectors, where the label data of the lamp sub-images includes position information and damage types of all damages in the lamp sub-images;

[0046] A damage detection unit, configured to sequentially input all the lamp sub-images in the real-time images into the trained damage detection network to obtain a lamp damage detection result of the target vehicle.

[0047] An embodiment of the present application further provides an electronic device, where the electronic device includes:

[0048] A memory, storing at least one instruction;

[0049] A processor, configured to execute the instruction stored in the memory to implement the artificial intelligence-based vehicle lamp damage detection method.

[0050] An embodiment of the present application further provides a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the artificial intelligence-based vehicle lamp damage detection method.

[0051] In summary, the present application uses a lamp component segmentation network to extract lamp sub-images of each type of lamp component from vehicle images, and further inputs the lamp sub-images of different types of lamp components into a trained damage detection network to obtain a lamp damage detection result. The damage detection network can use the lamp component features extracted by the lamp component segmentation network to assist in the damage detection task, improving the accuracy of vehicle lamp component damage detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a flowchart of a preferred embodiment of the artificial intelligence-based vehicle lamp damage detection method involved in the present application.

[0053] Figure 2It is a functional block diagram of a preferred embodiment of a vehicle lamp damage detection device based on artificial intelligence involved in this application.

[0054] Figure 3 It is a schematic structural diagram of an electronic device of a preferred embodiment of a vehicle lamp damage detection method based on artificial intelligence involved in this application. Detailed implementation manners

[0055] In order to be able to more clearly understand the purpose, features and advantages of this application, the following describes this application in detail with reference to the accompanying drawings and specific embodiments. It should be noted that, without conflict, the embodiments of this application and the features in the embodiments can be combined with each other. Many specific details are set forth in the following description in order to fully understand this application. The described embodiments are only a part of the embodiments of this application, rather than all of the embodiments.

[0056] In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of this application, "a plurality of" means two or more, unless otherwise specifically defined.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used in the description of this application in this specification are only for the purpose of describing specific embodiments, and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0058] The embodiments of this application provide a vehicle lamp damage detection method based on artificial intelligence, which can be applied to one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0059] An electronic device can be any kind of electronic product that can interact with customers in a human-machine manner. For example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.

[0060] The electronic device may further include a network device and / or a client device. Among them, the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.

[0061] The network where the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0062] As Figure 1 shown, it is a flowchart of a preferred embodiment of the vehicle lamp damage detection method based on artificial intelligence in this application. According to different requirements, the order of steps in this flowchart can be changed, and some steps can be omitted.

[0063] S10. Store a large number of vehicle images and the label data of each vehicle image to obtain a first training set. The label data of the vehicle image includes the type of lamp components of each pixel point in the vehicle image.

[0064] In an optional embodiment, the types of lamp components include left rear inner tail lamp, left rear outer tail lamp, left rear outer tail lamp assembly, right rear inner tail lamp, right rear outer tail lamp, right rear outer tail lamp assembly, left front head lamp, right front head lamp, left front fog lamp, right front fog lamp, left rear fog lamp, and right rear fog lamp.

[0065] In an optional embodiment, the storing a large number of vehicle images and the label data of each vehicle image to obtain a first training set, where the label data of the vehicle image includes the type of lamp components of each pixel point in the vehicle image, includes:

[0066] Collect a large number of vehicle images and obtain the label data of each vehicle image. The label data of the vehicle image is an image data of the same size as the vehicle image, and the pixel value of the pixel point in the image data is a preset value of the type of lamp component corresponding to the pixel point;

[0067] Store all vehicle images and the label data of all vehicle images as the first training set of the type of lamp components.

[0068] In this optional embodiment, the preset value of the types of the lamp components is integer data from 0 to N, where 0 represents the background class outside all types of lamp components, and N represents the number of types of all lamp components. The preset tags correspond to the types of the lamp components one by one.

[0069] In this way, a large number of vehicle images with tagged data are collected to obtain a first training set of the types of lamp components, providing a data basis for the training of the lamp component segmentation network.

[0070] S11. Build a lamp component segmentation network, and train the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network. The lamp component segmentation network includes a first encoder and a first decoder.

[0071] In an optional embodiment, the building of the lamp component segmentation network and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network includes:

[0072] Build a lamp component segmentation network, which includes a first encoder and a first decoder;

[0073] Initialize the parameters in the lamp component segmentation network according to a preset initialization algorithm to obtain an initialized lamp component segmentation network;

[0074] Train the initialized lamp component segmentation network based on the first training set and a cross-entropy loss function to update the parameters of the lamp component segmentation network until the value of the cross-entropy loss function no longer changes, and then stop training to obtain a trained lamp component segmentation network. The input of the trained lamp component segmentation network is a vehicle image, and the output is the lamp component segmentation result of the vehicle image. The lamp component segmentation result includes the type of lamp component to which each pixel point in the vehicle image belongs.

[0075] Among them, the preset initialization algorithm is Kaiming initialization, and the parameters in the lamp component segmentation network include all trainable parameters in the first encoder and the first decoder.

[0076] In this alternative embodiment, the input of the lamp component segmentation network is a vehicle image, and the expected output is the lamp component segmentation result of the vehicle image. The lamp component segmentation result includes the types of lamp components to which each pixel in the vehicle image belongs, and the types of components include multiple lamp types. The lamp component segmentation network is formed by connecting a first encoder and a first decoder in series. The first encoder includes multiple convolutional layers, and the multiple convolutional layers perform multiple convolutional operations on the input vehicle image to output multiple downsampled maps of different sizes. The number and size of the downsampled maps are determined by the structure of the first encoder, and the downsampled maps contain the distinguishing features of different lamp components in the vehicle image. Further, the first decoder includes multiple transposed convolutional layers, and the multiple transposed convolutional layers perform multiple transposed convolutional operations on all the downsampled maps to obtain a lamp component segmentation result that is the same size as the vehicle image. Among them, the first encoder and the first decoder can adopt any one of the existing semantic segmentation network structures such as Deeplab V3+, UNet, FCN, etc., and this application does not make any restrictions.

[0077] In this alternative embodiment, first, the parameters of the lamp component segmentation network are initialized using Kaiming initialization to obtain an initialized lamp component segmentation network. Further, a vehicle image is randomly selected from the first training set and input into the initialized lamp component segmentation network to obtain a lamp component segmentation result, and the value of the cross-entropy loss function is calculated based on the lamp component segmentation result and the label data of the vehicle image. After obtaining the value of the cross-entropy loss function, the parameters of the lamp component segmentation network are updated according to the gradient descent method. The vehicle images are continuously selected from the first training set to update the parameters of the lamp component segmentation network until the value of the cross-entropy loss function no longer changes, and then the training is stopped to obtain a trained lamp component segmentation network.

[0078] In this way, inputting the vehicle image into the lamp component segmentation network can obtain an accurate lamp component segmentation result, realizing precise pixel-level classification in the vehicle image.

[0079] S12. Collect the real-time image of the target vehicle, and input the real-time image into the trained lamp component segmentation network to obtain a lamp sub-image of each type of lamp component in the real-time image.

[0080] In an alternative embodiment, the step of collecting the real-time image of the target vehicle, inputting the real-time image into the trained lamp component segmentation network, and obtaining a lamp sub-image of each type of lamp component in the real-time image includes:

[0081] Collect real-time images of the target vehicle, and input the real-time images into the trained lamp component segmentation network to obtain the lamp component segmentation result, where the lamp component segmentation result includes the lamp component types of each pixel point in the real-time image;

[0082] Mark the pixel points with the lamp component type of the target lamp component type in the lamp component segmentation result to obtain the marking map of the target lamp component type. The marking map includes marked pixel points and unmarked pixel points, and the target lamp component type is any one of all lamp types;

[0083] Based on the marking map of the target lamp component type, set the pixel values of the unmarked pixel points in the real-time image to 0, and keep the pixel values of the marked pixel points unchanged, to obtain the lamp sub-image of the target lamp component type in the real-time image;

[0084] Traverse all lamp types to obtain the lamp sub-images of each lamp component type in the real-time image.

[0085] In this optional embodiment, marking the pixel points can fill a preset character at the pixel points, and the preset character can be a number or a letter, which is not limited in this application.

[0086] In this way, by means of the lamp component segmentation network, the lamp sub-images of each lamp component type in the real-time image of the target vehicle are obtained, providing a data basis for subsequent damage detection of different lamp types.

[0087] S13. Build a damage detection network based on the first encoder. The damage detection network includes the first encoder, the second encoder, and multiple detectors.

[0088] In an optional embodiment, the damage detection network is a target detection network. Building the damage detection network based on the first encoder includes:

[0089] Build a damage detection network, which includes the first encoder, the second encoder, and multiple detectors;

[0090] The first encoder performs multiple convolution operations on the input lamp sub-image to obtain multiple first downsampled images with different sizes; the second encoder performs multiple convolution operations on the input lamp sub-image to obtain multiple second downsampled images with different sizes. The number and size of the first downsampled images are the same as those of the second downsampled images;

[0091] Stack the first downsampled image and the second downsampled image with the same size together to obtain a fused downsampled image of each size;

[0092] Input all the fused downsampled images into the multiple detectors to obtain the sub-results of each fused downsampled image. The detectors correspond one-to-one with the fused downsampled Figure 1 images. The sub-results of the fused downsampled images include the location information and damage types of all damages in the fused downsampled images;

[0093] Take the sub-results of all the fused downsampled images as the damage detection results of the lamp sub-graph. The damage detection results include the location information and damage types of all damaged areas in the lamp sub-graph.

[0094] Among them, the damage types include minor scratches, severe scratches, minor cracks, severe cracks, missing, internal damage and internal water ingress.

[0095] In this optional embodiment, fused downsampled images of different sizes can simultaneously extract damage features of different sizes and features of lamp component types in the lamp sub-graph. The number and size of the first downsampled image and the second downsampled image are respectively determined by the structures of the first encoder and the second encoder. The location information of the damage is the center point coordinates and width and height dimensions of the rectangular frame containing the damage.

[0096] In this optional embodiment, the first encoder in the trained lamp component segmentation network can learn the discriminative features of different lamp component types. Therefore, the first downsampled image contains the feature information of different lamp component types in the lamp image, which can assist the lamp damage detection task, thereby improving the accuracy of lamp damage detection.

[0097] It should be noted that the second encoder and the detector can adopt any one of the existing object detection network structures such as RetinaNet, RefineDet, CenterNet, etc. This application does not make any restrictions, and only needs to satisfy that the number and size of the first downsampled image output by the second encoder and the second downsampled image output by the second encoder are the same.

[0098] In this way, the construction of the damage detection network is completed. The damage detection network utilizes the output results of the first encoder of the trained lamp component segmentation network to assist the lamp damage detection task, thereby improving the accuracy of lamp damage detection.

[0099] S14. Store a large number of lamp sub-graphs of different lamp component types and the label data of each lamp sub-graph as the second training set, and train the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors. The label data of the lamp sub-graph includes the location information and damage types of all damages in the lamp sub-graph.

[0100] In an optional embodiment, after building the damage detection network, in order to ensure that the damage detection network obtains accurate damage detection results, it is necessary to train the damage detection network to constrain the damage detection network to learn the discriminative features of different damage types in different lamp component types. The process of training the damage detection network is the process of updating the parameters of the second encoder and the multiple detectors in the damage detection network.

[0101] In an optional embodiment, first, a large number of lamp subgraphs of different lamp component types are collected, and the label data of each lamp subgraph is obtained. Among them, the lamp subgraphs of different lamp component types can be obtained by means of the lamp component segmentation network, and the label data of the lamp subgraphs can be obtained by manual annotation. The label data of the lamp subgraphs includes the position information and damage types of all damages in the lamp subgraph, and the position information of the damage is the center point coordinates and width and height dimensions of the rectangular frame containing the damage area.

[0102] It should be noted that in order to ensure that the damage detection network can detect all damages on each lamp component type, the second training set should include lamp subgraphs of all lamp component types, and the number of lamp subgraphs of different lamp component types should be kept consistent. At the same time, all damage types are included in all lamp subgraphs of each lamp component type.

[0103] In an optional embodiment, training the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors includes:

[0104] Fix the parameters of the first encoder in the damage detection network;

[0105] Initialize the parameters of the second encoder and the multiple detectors according to a preset initialization algorithm to obtain an initialized damage detection network;

[0106] Randomly select a lamp subgraph from the second training set as a training image;

[0107] Input the training image into the initialized damage detection network in sequence to obtain a damage detection result, calculate the value of a preset loss function based on the damage detection result and the label data of the training image, and update the parameters of the second encoder and the multiple detectors;

[0108] Until the value of the preset loss function no longer changes, stop training to obtain a trained damage detection network.

[0109] Among them, the preset initialization algorithm is the Kaiming initialization algorithm; the preset loss function is related to the network structures of the second encoder and the detector in the damage detection network. Exemplarily, if the network structures of the second encoder and the multiple detectors adopt the structure of RefineDet, the preset loss function is the loss function of RefineDet.

[0110] It should be noted that during the training process of the damage detection network, only the parameters in the second encoder and all detectors are updated, and the parameters of the first encoder remain unchanged.

[0111] In this way, with the help of the second training set, the training of the damage detection network is completed. The trained damage detection network can learn the discriminative features of different damage types in different lamp component types and obtain accurate damage detection results.

[0112] S15, input all the lamp sub-images in the real-time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle.

[0113] In an alternative embodiment, the step of inputting all the lamp sub-images in the real-time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle includes:

[0114] Input all the lamp sub-images in the real-time image into the trained damage detection network in sequence to obtain the damage detection result of each lamp sub-image;

[0115] Count the number of damaged areas in the damage detection result of each lamp sub-image, and regard the lamp sub-image with the number of damaged areas greater than 0 as a damaged sub-image;

[0116] Store the damage recognition results of all damaged sub-images as the lamp damage detection result of the target vehicle. The lamp damage detection result includes the position information and damage types of all damages on each lamp component type of the target vehicle.

[0117] In this way, with the help of the trained damage detection network, the damage detection result of each lamp component type in the target vehicle is obtained, improving the accuracy of lamp damage detection.

[0118] It can be seen from the above technical solutions that this application uses a lamp component segmentation network to extract lamp sub-images of each lamp component type from a vehicle image, and further inputs the lamp sub-images of different lamp component types into a trained damage detection network to obtain a lamp damage detection result. The damage detection network can utilize the lamp component features extracted by the lamp component segmentation network to assist the damage detection task, improving the accuracy of vehicle lamp component damage detection.

[0119] Please refer toFigure 2 , Figure 2 is a functional block diagram of a preferred embodiment of the vehicle lamp damage detection device based on artificial intelligence in the present application. The vehicle lamp damage detection device 11 based on artificial intelligence includes a storage unit 110, a first training unit 111, a segmentation unit 112, a construction unit 113, a second training unit 114, and a damage detection unit 115. The module / unit referred to in the present application means a series of computer-readable instruction segments that can be executed by a processor 13 and can complete fixed functions, and are stored in a memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0120] In an alternative embodiment, the storage unit 110 is used to store a large number of vehicle images and label data of each vehicle image to obtain a first training set, and the label data of the vehicle image includes the type of lamp component of each pixel point in the vehicle image.

[0121] In an alternative embodiment, the types of lamp components include left rear inner tail lamp, left rear outer tail lamp, left rear outer tail lamp assembly, right rear inner tail lamp, right rear outer tail lamp, right rear outer tail lamp assembly, left front head lamp, right front head lamp, left front fog lamp, right front fog lamp, left rear fog lamp, and right rear fog lamp.

[0122] In an alternative embodiment, storing a large number of vehicle images and label data of each vehicle image to obtain a first training set, and the label data of the vehicle image includes the type of lamp component of each pixel point in the vehicle image, includes:

[0123] Collect a large number of vehicle images and obtain label data of each vehicle image. The label data of the vehicle image is an image data of the same size as the vehicle image, and the pixel value of the pixel point in the image data is a preset value of the type of lamp component corresponding to the pixel point;

[0124] Store all vehicle images and label data of all vehicle images as a first training set of the type of lamp component.

[0125] In this alternative embodiment, the preset value of the type of lamp component is an integer data from 0 to N, where 0 represents the background class outside all types of lamp components, and N represents the number of types of all lamp components, and the preset label corresponds to each lamp component one by one.

[0126] In an alternative embodiment, the first training unit 111 is used to construct a lamp component segmentation network and train the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network. The lamp component segmentation network includes a first encoder and a first decoder.

[0127] In an optional embodiment, building the lamp component segmentation network and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network includes:

[0128] Building the lamp component segmentation network, where the lamp component segmentation network includes a first encoder and a first decoder;

[0129] Initializing the parameters in the lamp component segmentation network according to a preset initialization algorithm to obtain an initialized lamp component segmentation network;

[0130] Training the initialized lamp component segmentation network based on the first training set and the cross-entropy loss function to update the parameters of the lamp component segmentation network, and stopping the training until the value of the cross-entropy loss function no longer changes, obtaining a trained lamp component segmentation network. The input of the trained lamp component segmentation network is a vehicle image, and the output is the lamp component segmentation result of the vehicle image. The lamp component segmentation result includes the lamp component types to which each pixel point in the vehicle image belongs.

[0131] Among them, the preset initialization algorithm is Kaiming initialization, and the parameters in the lamp component segmentation network include all trainable parameters in the first encoder and the first decoder.

[0132] In this optional embodiment, the input of the lamp component segmentation network is a vehicle image, and the expected output is the lamp component segmentation result of the vehicle image. The lamp component segmentation result includes the lamp component types to which each pixel point in the vehicle image belongs, and the component types include multiple lamp types. The lamp component segmentation network is composed of a first encoder and a first decoder connected in series. The first encoder includes multiple convolutional layers, and the multiple convolutional layers perform multiple convolutional operations on the input vehicle image to output multiple downsampled maps of different sizes. The number and size of the downsampled maps are determined by the structure of the first encoder, and the downsampled maps contain the discriminative features of different lamp components in the vehicle image. Further, the first decoder includes multiple deconvolutional layers, and the multiple deconvolutional layers perform multiple deconvolutional operations on all the downsampled maps to obtain a lamp component segmentation result with the same size as the vehicle image. Among them, the first encoder and the first decoder can adopt any one of the existing semantic segmentation network structures such as Deeplab V3+, UNet, and FCN, and this application does not make any restrictions.

[0133] In this optional embodiment, first, the parameters of the lamp component segmentation network are initialized using kaiming initialization to obtain an initialized lamp component segmentation network; further, a vehicle image is randomly selected from the first training set and input into the initialized lamp component segmentation network to obtain a lamp component segmentation result, and the value of the cross-entropy loss function is calculated based on the lamp component segmentation result and the label data of the vehicle image. After obtaining the value of the cross-entropy loss function, the parameters of the lamp component segmentation network are updated according to the gradient descent method; vehicle images are continuously selected from the first training set to update the parameters of the lamp component segmentation network until the value of the cross-entropy loss function no longer changes, at which point the training stops, and a trained lamp component segmentation network is obtained.

[0134] In an optional embodiment, the segmentation unit 112 is configured to collect a real-time image of a target vehicle and input the real-time image into the trained lamp component segmentation network to obtain a lamp sub-image of each lamp component type in the real-time image.

[0135] In an optional embodiment, collecting a real-time image of a target vehicle and inputting the real-time image into the trained lamp component segmentation network to obtain a lamp sub-image of each lamp component type in the real-time image includes:

[0136] Collect a real-time image of a target vehicle, input the real-time image into the trained lamp component segmentation network to obtain a lamp component segmentation result, where the lamp component segmentation result includes the lamp component type of each pixel point in the real-time image;

[0137] Mark the pixel points in the lamp component segmentation result whose lamp component type is the target lamp component type to obtain a marking map of the target lamp component type, where the marking map includes marked pixel points and unmarked pixel points, and the target lamp component type is any one of all lamp types;

[0138] Based on the marking map of the target lamp component type, set the pixel values of the unmarked pixel points in the real-time image to 0, and keep the pixel values of the marked pixel points unchanged, to obtain a lamp sub-image of the target lamp component type in the real-time image;

[0139] Traverse all lamp types to obtain a lamp sub-image of each lamp component type in the real-time image.

[0140] In this optional embodiment, marking a pixel point may fill a preset character at the pixel point, and the preset character may be a number or a letter, which is not limited in this application.

[0141] In an alternative embodiment, the construction unit 113 is configured to construct a damage detection network based on the first encoder, and the damage detection network includes the first encoder, a second encoder, and a plurality of detectors.

[0142] In an alternative embodiment, the damage detection network is an object detection network, and constructing the damage detection network based on the first encoder includes:

[0143] Constructing a damage detection network, the damage detection network including the first encoder, a second encoder, and a plurality of detectors;

[0144] The first encoder performs multiple convolution operations on the input sub-graph of the lamp to obtain a plurality of first downsampled graphs with different sizes; the second encoder performs multiple convolution operations on the input sub-graph of the lamp to obtain a plurality of second downsampled graphs with different sizes, and the number and sizes of the first downsampled graphs are the same as those of the second downsampled graphs;

[0145] Stacking the first downsampled graphs and the second downsampled graphs with the same size together to obtain a fused downsampled graph of each size;

[0146] Inputting all the fused downsampled graphs into the plurality of detectors to obtain sub-results of each fused downsampled graph, where the detectors are in one-to-one correspondence with the fused downsampled graphs, and the sub-results of the fused downsampled graphs include the position information and damage types of all damages in the fused downsampled graphs; Figure 1 Taking the sub-results of all the fused downsampled graphs as the damage detection results of the sub-graph of the lamp, and the damage detection results include the position information and damage types of all damaged areas in the sub-graph of the lamp.

[0147] Among them, the damage types include minor abrasions, severe abrasions, minor cracks, severe cracks, missing parts, internal damages, and internal water ingress.

[0148] In this alternative embodiment, the fused downsampled graphs of different sizes can simultaneously extract damage features of different sizes and features of lamp component types in the sub-graph of the lamp. The number and sizes of the first downsampled graphs and the second downsampled graphs are respectively determined by the structures of the first encoder and the second encoder. The position information of the damage is the center point coordinates and width and height dimensions of the rectangular frame containing the damage.

[0149] In this alternative embodiment, the first encoder in the trained lamp component segmentation network can learn the discriminative features of different lamp component types. Therefore, the first downsampled graphs contain the feature information of different lamp component types in the lamp image, which can assist the lamp damage detection task, thereby improving the accuracy of lamp damage detection.

[0150] In this alternative embodiment, the first encoder in the trained lamp component segmentation network can learn the discriminative features of different lamp component types. Therefore, the first downsampled graphs contain the feature information of different lamp component types in the lamp image, which can assist the lamp damage detection task, thereby improving the accuracy of lamp damage detection.

[0151] It should be noted that the second encoder and the detector can adopt any structure of existing object detection networks such as RetinaNet, RefineDet, CenterNet, etc. This application does not limit them, and only requires that the number and size of the first downsampled image output by the second encoder and the second downsampled image output by the second encoder be the same.

[0152] In an optional embodiment, the second training unit 114 is used to store a large number of lamp sub-images of different lamp component types and the label data of each lamp sub-image as the second training set, and train the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors. The label data of the lamp sub-image includes the position information and damage types of all damages in the lamp sub-image.

[0153] In an optional embodiment, after building the damage detection network, in order to ensure that the damage detection network obtains accurate damage detection results, it is necessary to train the damage detection network to constrain the damage detection network to learn the discriminative features of different damage types in different lamp component types. The process of training the damage detection network is the process of updating the parameters of the second encoding and the multiple detectors in the damage detection network.

[0154] In an optional embodiment, first, a large number of lamp sub-images of different lamp component types are collected, and the label data of each lamp sub-image is obtained. Among them, the lamp sub-images of different lamp component types can be obtained by means of the lamp component segmentation network, and the label data of the lamp sub-image can be obtained by manual annotation. The label data of the lamp sub-image includes the position information and damage types of all damages in the lamp sub-image. The position information of the damage is the center point coordinates and width and height dimensions of the rectangular frame containing the damage area.

[0155] It should be noted that in order to ensure that the damage detection network can detect all damages on each lamp component type, the second training set should include lamp sub-images of all lamp component types, and the number of lamp sub-images of different lamp component types should be kept consistent. At the same time, all damage types are included in all lamp sub-images of each lamp component type.

[0156] In an optional embodiment, training the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors includes:

[0157] Fix the parameters of the first encoder in the damage detection network;

[0158] Initialize the parameters of the second encoder and the multiple detectors according to a preset initialization algorithm to obtain an initialized damage detection network;

[0159] Randomly select a lamp sub - graph from the second training set as a training image;

[0160] Input the training image into the initialized damage detection network in sequence to obtain a damage detection result, calculate the value of a preset loss function based on the damage detection result and the label data of the training image, and update the parameters of the second encoder and the multiple detectors;

[0161] Until the value of the preset loss function no longer changes, stop training to obtain a trained damage detection network.

[0162] Among them, the preset initialization algorithm is the Kaiming initialization algorithm; the preset loss function is related to the network structures of the second encoder and the detectors in the damage detection network. Exemplarily, if the network structures of the second encoder and the multiple detectors adopt the structure of RefineDet, then the preset loss function is the loss function of RefineDet.

[0163] It should be noted that during the training process of the damage detection network, only the parameters of the second encoder and all detectors are updated, and the parameters of the first encoder remain unchanged.

[0164] In an alternative embodiment, the damage detection unit 115 is used to input all the lamp sub - graphs in the real - time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle.

[0165] In an alternative embodiment, the step of inputting all the lamp sub - graphs in the real - time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle includes:

[0166] Input all the lamp sub - graphs in the real - time image into the trained damage detection network in sequence to obtain the damage detection result of each lamp sub - graph;

[0167] Count the number of damaged areas in the damage detection result of each lamp sub - graph, and regard the lamp sub - graphs with the number of damaged areas greater than 0 as damaged sub - graphs;

[0168] Store the damage recognition results of all damaged sub - graphs as the lamp damage detection result of the target vehicle. The lamp damage detection result includes the position information and damage types of all damages on each type of lamp component of the target vehicle.

[0169] As can be seen from the above technical solutions, the present application uses a lamp component segmentation network to extract lamp sub-images of each lamp component type from vehicle images, and further inputs the lamp sub-images of different lamp component types into a trained damage detection network to obtain lamp damage detection results. The damage detection network can utilize the lamp component features extracted by the lamp component segmentation network to assist in the damage detection task, improving the accuracy of vehicle lamp component damage detection.

[0170] Please refer to Figure 3 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 1 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is configured to execute the computer-readable instructions stored in the memory to implement the artificial intelligence-based vehicle lamp damage detection method described in any of the above embodiments.

[0171] In an optional embodiment, the electronic device 1 further includes a bus and a computer program stored in the memory 12 and executable on the processor 13, such as an artificial intelligence-based vehicle lamp damage detection program.

[0172] Figure 3 Only the electronic device 1 having the memory 12 and the processor 13 is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0173] In combination with Figure 1 , the memory 12 in the electronic device 1 stores multiple computer-readable instructions to implement an artificial intelligence-based vehicle lamp damage detection method, and the processor 13 can execute the multiple instructions to implement:

[0174] Storing a large number of vehicle images and label data of each vehicle image to obtain a first training set, where the label data of the vehicle image includes the lamp component type of each pixel point in the vehicle image;

[0175] Building a lamp component segmentation network and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, where the lamp component segmentation network includes a first encoder and a first decoder;

[0176] Collecting real-time images of a target vehicle and inputting the real-time images into the trained lamp component segmentation network to obtain lamp sub-images of each lamp component type in the real-time images;

[0177] Build a damage detection network based on the first encoder. The damage detection network includes the first encoder, a second encoder, and multiple detectors;

[0178] Store a large number of sub - images of lamps of different lamp component types and the label data of each sub - image of the lamp as the second training set, and train the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors. The label data of the sub - image of the lamp includes the position information and damage types of all damages in the sub - image of the lamp;

[0179] Input all the sub - images of the lamps in the real - time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle.

[0180] Specifically, for the specific implementation method of the above instructions by the processor 13, reference can be made to Figure 1 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.

[0181] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1, and does not constitute a limitation on the electronic device 1. The electronic device 1 can be of a bus - type structure or a star - type structure. The electronic device 1 can also include more or fewer other hardware or software than shown in the figure, or different component arrangements. For example, the electronic device 1 can also include input - output devices, network access devices, etc.

[0182] It should be noted that the electronic device 1 is only an example. Other existing or future - emerging electronic products that can be adapted to this application should also be included within the protection scope of this application and are hereby incorporated by reference.

[0183] Among them, the memory 12 includes at least one type of readable storage medium. The readable storage medium can be non - volatile or volatile. The readable storage medium includes flash memory, mobile hard disks, multimedia cards, card - type memories (such as SD or DX memories, etc.), magnetic memories, magnetic disks, optical disks, etc. The memory 12 can be an internal storage unit of the electronic device 1 in some embodiments, such as the mobile hard disk of the electronic device 1. The memory 12 can also be an external storage device of the electronic device 1 in other embodiments, such as a plug - in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. The memory 12 can be used not only to store application software installed on the electronic device 1 and various types of data, such as the code of the vehicle lamp damage detection program based on artificial intelligence, but also to temporarily store data that has been output or will be output.

[0184] In some embodiments, the processor 13 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including the combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 13 is the control core of the electronic device 1. It uses various interfaces and circuits to connect all components of the entire electronic device 1. By running or executing programs or modules stored in the memory 12 (such as executing an artificial intelligence-based vehicle lamp damage detection program, etc.), and by calling the data stored in the memory 12, it performs various functions of the electronic device 1 and processes data.

[0185] The processor 13 executes the operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application programs to implement the steps in the above-mentioned embodiments of various artificial intelligence-based vehicle lamp damage detection methods, such as Figure 1 the steps shown.

[0186] Exemplarily, the computer program may be divided into one or more modules / units. The one or more modules / units are stored in the memory 12 and executed by the processor 13 to complete this application. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into a storage unit 110, a first training unit 111, a segmentation unit 112, a construction unit 113, a second training unit 114, and a damage detection unit 115.

[0187] The above-mentioned integrated units implemented in the form of software function modules may be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium and include several instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the artificial intelligence-based vehicle lamp damage detection methods described in the various embodiments of this application.

[0188] If the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned embodiment methods of this application, it can also be completed by a computer program instructing relevant hardware devices. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented.

[0189] Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory and other memories, etc.

[0190] Furthermore, the computer-readable storage medium mainly includes a storage program area and a storage data area. Among them, the storage program area can store an operating system, application programs required for at least one function, etc.; the storage data area can store data created according to the use of the blockchain node, etc.

[0191] The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.

[0192] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, in Figure 3 it is only represented by one arrow, but it does not mean that there is only one bus or one type of bus. The bus is set to realize the connection and communication between the memory 12 and at least one processor 13, etc.

[0193] An embodiment of this application also provides a computer-readable storage medium (not shown in the figure). Computer-readable instructions are stored in the computer-readable storage medium and are executed by a processor in an electronic device to implement the method for detecting vehicle lamp damage based on artificial intelligence described in any of the above embodiments.

[0194] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0195] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0196] In addition, in each embodiment of this application, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a hardware plus software functional module.

[0197] Furthermore, obviously, the term "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices described in the specification can also be implemented by one unit or device through software or hardware. Terms such as first and second are used to represent names and do not represent any specific order.

[0198] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and not to limit them. Although this application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of this application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of this application.

Claims

1. An artificial intelligence-based method for detecting damage to vehicle lamps, characterized in that, the method includes: Storing a large number of vehicle images and label data of each vehicle image to obtain a first training set, where the label data of the vehicle image includes the lamp component types of each pixel point in the vehicle image; Building a lamp component segmentation network, and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, where the lamp component segmentation network includes a first encoder and a first decoder; Collecting real-time images of the target vehicle, and inputting the real-time images into the trained lamp component segmentation network to obtain lamp sub-images of each lamp component type in the real-time images; Building a damage detection network based on the first encoder, where the damage detection network includes the first encoder, a second encoder, and multiple detectors, and the damage detection network is an object detection network. Building the damage detection network based on the first encoder includes: building the damage detection network; the first encoder performing multiple convolution operations on the input lamp sub-images to obtain multiple first downsampled images of different sizes; the second encoder performing multiple convolution operations on the input lamp sub-images to obtain multiple second downsampled images of different sizes, and the number and size of the first downsampled images are the same as those of the second downsampled images; stacking the first downsampled images and the second downsampled images of the same size together to obtain fused downsampled images of each size; inputting all the fused downsampled images into the multiple detectors to obtain sub-results of each fused downsampled image, where the detectors correspond to the fused downsampled images one by one, and the sub-results of the fused downsampled images include the position information and damage types of all damages in the fused downsampled images; taking the sub-results of all the fused downsampled images as the damage detection results of the lamp sub-images, and the damage detection results include the position information and damage types of all damage areas in the lamp sub-images; Storing a large number of lamp sub-images of different lamp component types and label data of each lamp sub-image as a second training set, and training the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors, including: fixing the parameters of the first encoder in the damage detection network; initializing the parameters of the second encoder and the multiple detectors according to a preset initialization algorithm to obtain an initialized damage detection network; randomly selecting lamp sub-images from the second training set as training images; sequentially inputting the training images into the initialized damage detection network to obtain damage detection results, calculating the value of a preset loss function based on the damage detection results and the label data of the training images, and updating the parameters of the second encoder and the multiple detectors; until the value of the preset loss function no longer changes, stopping the training to obtain a trained damage detection network, where the label data of the lamp sub-images includes the position information and damage types of all damages in the lamp sub-images; Input all the lamp sub - graphs in the real - time image into the trained damage detection network in sequence to obtain the lamp damage detection result of the target vehicle.

2. The method for detecting vehicle lamp damage based on artificial intelligence according to claim 1, wherein, storing a large number of vehicle images and the label data of each vehicle image to obtain a first training set, and the label data of the vehicle image includes the lamp component types of each pixel point in the vehicle image, including: Collecting a large number of vehicle images and obtaining the label data of each vehicle image. The label data of the vehicle image is an image data of the same size as the vehicle image, and the pixel value of the pixel point in the image data is the preset value of the lamp component type corresponding to the pixel point; Storing all vehicle images and the label data of all vehicle images as the first training set of lamp component types.

3. The method for detecting vehicle lamp damage based on artificial intelligence according to claim 1, wherein, building a lamp component segmentation network and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, including: Building a lamp component segmentation network, which includes a first encoder and a first decoder; Initializing the parameters in the lamp component segmentation network according to a preset initialization algorithm to obtain an initialized lamp component segmentation network; Training the initialized lamp component segmentation network based on the first training set and the cross - entropy loss function to update the parameters of the lamp component segmentation network until the value of the cross - entropy loss function no longer changes, and stopping the training to obtain a trained lamp component segmentation network. The input of the trained lamp component segmentation network is a vehicle image, and the output is the lamp component segmentation result of the vehicle image. The lamp component segmentation result includes the lamp component types to which each pixel point in the vehicle image belongs.

4. The method for detecting vehicle lamp damage based on artificial intelligence according to claim 1, wherein, collecting the real - time image of the target vehicle and inputting the real - time image into the trained lamp component segmentation network to obtain the lamp sub - graphs of each lamp component type in the real - time image, including: Collecting the real - time image of the target vehicle and inputting the real - time image into the trained lamp component segmentation network to obtain the lamp component segmentation result, and the lamp component segmentation result includes the lamp component types of each pixel point in the real - time image; Marking the pixel points with the lamp component type of the target lamp component type in the lamp component segmentation result to obtain the marking graph of the target lamp component type. The marking graph includes marked pixel points and unmarked pixel points, and the target lamp component type is any one of all lamp types; Based on the marking graph of the target lamp component type, setting the pixel values of the unmarked pixel points in the real - time image to 0 and keeping the pixel values of the marked pixel points unchanged to obtain the lamp sub - graph of the target lamp component type in the real - time image; Traversing all lamp types to obtain the lamp sub - graphs of each lamp component type in the real - time image.

5. The method for detecting damage of vehicle lamps based on artificial intelligence according to claim 1, characterized in that, the step of inputting all the lamp sub - images in the real - time image into the trained damage detection network in sequence to obtain the damage detection result of the lamps of the target vehicle includes: Inputting all the lamp sub - images in the real - time image into the trained damage detection network in sequence to obtain the damage detection result of each lamp sub - image; Counting the number of damaged areas in the damage detection results of each lamp sub - image, and taking the lamp sub - images with the number of damaged areas greater than 0 as damaged sub - images; Storing the damage recognition results of all damaged sub - images as the damage detection result of the lamps of the target vehicle, and the damage detection result of the lamps includes the position information and damage types of all damages on each type of lamp component of the target vehicle.

6. An apparatus for detecting damage of vehicle lamps based on artificial intelligence, characterized in that, the apparatus includes: A storage unit for storing a large number of vehicle images and the label data of each vehicle image to obtain a first training set, and the label data of the vehicle image includes the lamp component types of each pixel point in the vehicle image; A first training unit for building a lamp component segmentation network and training the lamp component segmentation network based on the first training set to update the parameters of the lamp component segmentation network, and the lamp component segmentation network includes a first encoder and a first decoder; A segmentation unit for collecting the real - time image of the target vehicle and inputting the real - time image into the trained lamp component segmentation network to obtain the lamp sub - images of each type of lamp component in the real - time image; A building unit for building a damage detection network based on the first encoder, the damage detection network includes the first encoder, a second encoder and a plurality of detectors, the damage detection network is a target detection network, and building the damage detection network based on the first encoder includes: building the damage detection network; the first encoder performing multiple convolution operations on the input lamp sub - image to obtain a plurality of first down - sampled images with different sizes; the second encoder performing multiple convolution operations on the input lamp sub - image to obtain a plurality of second down - sampled images with different sizes, the number and size of the first down - sampled images being the same as those of the second down - sampled images; stacking the first down - sampled images and the second down - sampled images with the same size together to obtain a fused down - sampled image of each size; inputting all the fused down - sampled images into the plurality of detectors to obtain the sub - results of each fused down - sampled image, the detectors corresponding to the fused down - sampled images one by one, and the sub - results of the fused down - sampled image including the position information and damage types of all damages in the fused down - sampled image; taking the sub - results of all the fused down - sampled images as the damage detection result of the lamp sub - image, and the damage detection result including the position information and damage types of all damaged areas in the lamp sub - image; A second training unit, configured to store a large number of lamp sub - images of different lamp component types and label data of each lamp sub - image as a second training set, and train the damage detection network based on the second training set to update the parameters of the second encoder and the multiple detectors, including: fixing the parameters of the first encoder in the damage detection network; initializing the parameters of the second encoder and the multiple detectors according to a preset initialization algorithm to obtain an initialized damage detection network; randomly selecting a lamp sub - image from the second training set as a training image; sequentially inputting the training image into the initialized damage detection network to obtain a damage detection result, calculating the value of a preset loss function based on the damage detection result and the label data of the training image, and updating the parameters of the second encoder and the multiple detectors; until the value of the preset loss function no longer changes, stopping the training to obtain a trained damage detection network, wherein the label data of the lamp sub - image includes the position information and damage types of all damages in the lamp sub - image; A damage detection unit, configured to sequentially input all lamp sub - images in the real - time image into the trained damage detection network to obtain a lamp damage detection result of the target vehicle.

7. An electronic device, characterized in that, the electronic device includes: a memory storing computer - readable instructions; and a processor that executes the computer - readable instructions stored in the memory to implement the artificial - intelligence - based vehicle lamp damage detection method according to any one of claims 1 to 5.

8. A computer - readable storage medium, characterized in that, the computer - readable storage medium stores computer - readable instructions, and when the computer - readable instructions are executed by a processor, the artificial - intelligence - based vehicle lamp damage detection method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Fast vehicle detection using augmented dataset based on RetinaNet

    AU2019101133A4

  • Lightweight SAR image ship detection method

    CN111967292A