Vehicle indicator light recognition method, device, computer equipment and storage medium

Through the combination method of backbone network and feature pyramid, combined with pixel-by-pixel recognition technology, the problem of low vehicle indicator light recognition accuracy in the existing technology is solved, and higher recognition accuracy is achieved.

CN114170587BActive Publication Date: 2024-09-17SHENZHEN WEIBAO INFORMATION SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111519323.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-09-17
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In the existing technology, vehicle indicator light recognition methods based on OpenCV and SVM have low accuracy and cannot provide guidance to users quickly and conveniently.

Method used

The combination method of the backbone network, the first feature pyramid and the second feature pyramid is used to obtain the feature map of the semantic enhancement layer through down-sampling and up-sampling processing, and is combined with the positioning enhancement layer for pixel-by-pixel recognition to improve the recognition accuracy of the indicator light.

Benefits of technology

By extracting target feature maps carrying strong semantic features and positioning information, more accurate recognition of vehicle indicators is achieved and the recognition accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170587B
    Figure CN114170587B
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for identifying vehicle indicator lights. The method includes: obtaining an indicator light image of a vehicle to be identified; downsampling the indicator light image through a backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; upsampling the corresponding target data through a semantic reinforcement layer to obtain upsampled feature maps output by n semantic reinforcement layers, the target data at least includes input data, and a second feature pyramid has a positioning reinforcement layer that matches the n semantic reinforcement layers; through n positioning reinforcement layers, feature extraction is performed on the upsampled feature maps output by the corresponding semantic reinforcement layers to obtain target feature maps corresponding to the outputs of n positioning reinforcement layers; pixel-by-pixel identification is performed on the target feature maps corresponding to each positioning reinforcement layer to obtain the category of the indicator light in the indicator light image. The use of this method can improve the accuracy of indicator light recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision, and in particular to a method, device, computer equipment and storage medium for recognizing vehicle indicator lights. Background Art

[0002] With the development of machine vision technology, target detection technology has emerged. Target detection technology can be applied to all aspects of life, including the guidance of vehicle indicator lights. At present, there are nearly 200 types of fault indicator lights on vehicle dashboards on the market. Users cannot remember all kinds of indicator lights. When the indicator light appears, it often means that the vehicle has a fault. Therefore, when the vehicle indicator light appears, it is particularly important to provide users with guidance quickly and conveniently.

[0003] In traditional technology, the category of indicator lights is identified by a recognition method based on OpenCV and SVM. This recognition method uses traditional image algorithms and classification models, so the indicator light recognition accuracy is low. Summary of the invention

[0004] Based on this, it is necessary to provide a vehicle indicator light recognition method, device, computer equipment and storage medium that can improve the accuracy of indicator light recognition in response to the above technical problems.

[0005] A method for recognizing a vehicle indicator light, wherein the recognition model includes a backbone network, a first feature pyramid and a second feature pyramid, and the method includes:

[0006] Acquire the indicator light image of the vehicle to be identified;

[0007] The indicator light image is downsampled by the backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer, and the downsampled feature maps corresponding to each target backbone network layer serve as input data of the matching semantic reinforcement layer;

[0008] Performing upsampling processing on the corresponding target data through the semantic enhancement layer to obtain n upsampled feature maps output by the semantic enhancement layer, wherein the target data at least includes the input data, and the second feature pyramid has a positioning enhancement layer matching the n semantic enhancement layers;

[0009] Through the n positioning enhancement layers, feature extraction is performed on the upsampled feature maps output by the corresponding semantic enhancement layers, so as to obtain target feature maps corresponding to the outputs of the n positioning enhancement layers;

[0010] The target feature map corresponding to each positioning enhancement layer is respectively identified pixel by pixel to obtain the category of the indicator light in the indicator light image.

[0011] A vehicle indicator light recognition device, the device comprising:

[0012] An acquisition module, used to acquire an indicator light image of a vehicle to be identified;

[0013] A backbone network module, used to perform downsampling processing on the indicator light image through the backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer, and the downsampled feature map corresponding to each target backbone network layer is used as input data of the matching semantic reinforcement layer;

[0014] A semantic enhancement module, configured to perform upsampling processing on the corresponding target data through the semantic enhancement layer to obtain upsampled feature maps output by n semantic enhancement layers, wherein the target data at least includes the input data, and the second feature pyramid has a positioning enhancement layer matching the n semantic enhancement layers;

[0015] A positioning enhancement module, used to extract features from the upsampled feature maps output by the corresponding semantic enhancement layers through the n positioning enhancement layers, to obtain target feature maps corresponding to the outputs of the n positioning enhancement layers;

[0016] The recognition module is used to perform pixel-by-pixel recognition on the target feature map of each positioning enhancement layer to obtain the category of the indicator light in the indicator light image.

[0017] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned vehicle indicator light recognition method.

[0018] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above-mentioned vehicle indicator light recognition method.

[0019] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned vehicle indicator light recognition method are implemented.

[0020] The above-mentioned vehicle indicator light recognition method, device, computer equipment and storage medium obtain the indicator light image of the vehicle to be recognized; downsample the indicator light image through the backbone network of the recognition model to obtain the downsampled feature map corresponding to each target backbone network layer; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer in the backbone network, and the downsampled feature map corresponding to each target backbone network layer is used as the input data of the matching semantic reinforcement layer; upsample the corresponding target data through the semantic reinforcement layer to obtain the upsampled feature map output by n semantic reinforcement layers, and the target data at least includes input data, and the second feature pyramid has a positioning reinforcement layer matching the n semantic reinforcement layers; through the n positioning reinforcement layers, feature extraction is performed on the upsampled feature map output by the corresponding semantic reinforcement layer to obtain the target feature map corresponding to the output of the n positioning reinforcement layers; the target feature map of each positioning reinforcement layer is respectively pixel-by-pixel recognized to obtain the category of the indicator light in the indicator light image. By extracting image features through the first feature pyramid and the second feature pyramid, a target feature map with strong semantic features and positioning information can be obtained, and the indicator light can be better recognized. Multiple target feature maps of different scales can better perform pixel-by-pixel recognition, thereby improving the accuracy of indicator light recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A diagram of an application environment of a method for identifying a vehicle indicator light in an embodiment;

[0022] Figure 2 A schematic diagram of a flow chart of a method for identifying a vehicle indicator light in one embodiment;

[0023] Figure 3 A network diagram of a backbone network and a first feature pyramid in one embodiment;

[0024] Figure 4 A network diagram of a first feature pyramid and a second feature pyramid in one embodiment;

[0025] Figure 5 A network diagram of a recognition model of a vehicle indicator light in one embodiment;

[0026] Figure 6 A schematic diagram of a server returning information to a front end in one embodiment;

[0027] Figure 7 A schematic diagram of a process for training a recognition model in one embodiment;

[0028] Figure 8 is a structural block diagram of a vehicle indicator light recognition device in one embodiment;

[0029] Fig. 9is a structural block diagram of a device for identifying a vehicle indicator light in another embodiment;

[0030] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0032] The vehicle indicator light recognition method provided in this application can be applied to Figure 1 In the application environment shown in FIG.

[0033] The server 104 obtains the indicator light image of the vehicle to be identified; downsamples the indicator light image through the backbone network to obtain the downsampled feature map corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer, and the downsampled feature map corresponding to each target backbone network layer is used as the input data of the matching semantic reinforcement layer; upsamples the corresponding target data through the semantic reinforcement layer to obtain the upsampled feature map output by n semantic reinforcement layers, the target data at least includes the input data, and the second feature pyramid has a positioning reinforcement layer matching the n semantic reinforcement layers; through the n positioning reinforcement layers, feature extraction is performed on the upsampled feature map output by the corresponding semantic reinforcement layer to obtain the target feature map corresponding to the output of the n positioning reinforcement layers; the target feature map corresponding to each positioning reinforcement layer is respectively identified pixel by pixel to obtain the category of the indicator light in the indicator light image. After obtaining the category of the indicator light in the indicator light image, the server 104 can output the category of the indicator light to the terminal 102 for display.

[0034] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto.

[0035] The server 104 may be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP).

[0036] In addition, server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0037] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.

[0038] In one embodiment, Figure 2 As shown, a method for identifying a vehicle indicator light is provided, which can be applied to Figure 1 The server or terminal in which the method is applied Figure 1 The server in is taken as an example to illustrate that the server deploys a recognition model to recognize the vehicle indicator light, and the recognition model includes a backbone network, a first feature pyramid and a second feature pyramid; the method includes the following steps:

[0039] S202: Acquire an indicator light image of a vehicle to be identified.

[0040] Among them, the indicator light image of the vehicle to be identified refers to the vehicle indicator light image that needs to be identified. For example, when the user is not clear about the specific meaning of the vehicle indicator light, it is necessary to identify the vehicle indicator light to obtain the specific meaning of the indicator light. The vehicle indicator light image refers to an image that includes the vehicle indicator light. The image may include one category of indicator lights or multiple categories of indicator lights. The vehicle indicator light may include a fault alarm light and a reminder indicator light. For example, the fault alarm light may include a temperature alarm light, a brake system warning light, a power steering system fault light, and a low oil level warning light; the reminder indicator light may include an engine fault light, a lighting fault light, a wiper fault light, and a frost indicator light.

[0041] Before obtaining the indicator light image of the vehicle to be identified, the user can provide the indicator light identification function through the APP or a third-party program independent of the application. The preset instructions guide the user to use the indicator light identification function to perform the identification operation. Of course, if confidential information is involved, authorization operation should also be provided.

[0042] S204, downsampling the indicator light image through the backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic enhancement layer that matches each target backbone network layer, and the downsampled feature map corresponding to each target backbone network layer is used as input data of the matching semantic enhancement layer.

[0043] The recognition model can be a network model obtained by improving and training the original recognition model, such as a network model improved on the basis of YOLOv5 (You Only Look Once version5). The overall network structure of YOLOv5 includes: a backbone network, an intermediate layer network and an output end network, and the intermediate network layer includes a first feature extraction network and a second feature extraction network. This solution improves the overall network structure of YOLOv5, including adding a semantic enhancement layer that matches the second backbone network layer to the first feature extraction network of the intermediate layer network for the purpose of strengthening semantic features, thereby obtaining an improved first feature pyramid; and, for the purpose of improving recognition accuracy, reducing one of the feature extraction layers of the second feature extraction network in the intermediate layer network, thereby obtaining an improved second feature pyramid.

[0044] Downsampling refers to the operation of reducing the size of an image. For an image with a resolution of M×N, the image is downsampled S times, and the resolution is For example, the resolution of the vehicle indicator light image to be identified in the backbone network of the input recognition model is 608×608. The server downsamples the indicator light image by 2 times through the first backbone network layer of the recognition model, and obtains a downsampled feature map with a resolution of 304×304.

[0045] Specifically, the recognition model is obtained by reconstructing and training the first feature pyramid and the second feature pyramid in the original recognition model; the second feature pyramid in the original recognition model includes m positioning reinforcement layers, where m is a positive integer greater than n. For the above reconstruction process, the specific steps are as follows: the server adds a semantic reinforcement layer that matches the first backbone network layer in the backbone network to the first feature pyramid in the original recognition model; and, among the m positioning reinforcement layers of the second feature pyramid in the original recognition model, the positioning reinforcement layers other than the n positioning reinforcement layers are deleted to obtain a reconstructed recognition model. In addition, the server can also perform model training on the reconstructed recognition model to obtain a recognition model after optimizing network parameters.

[0046] Among them, the number of semantic enhancement layers contained in the first feature pyramid of the reconstructed recognition model is greater than the number of semantic enhancement layers contained in the first feature pyramid of the original recognition model. By adding semantic enhancement layers to the first feature pyramid of the original recognition model, the upsampled feature map can be further upsampled to construct a feature map with higher resolution, thereby achieving the purpose of detecting small targets in a large feature map.

[0047] For example, the first feature pyramid can adopt a network with FPN (Feature Pyramid Networks) structure. The FPN structure is a top-down network structure composed of multiple semantic reinforcement layers. The improvement of the first feature pyramid is to add a semantic reinforcement layer on the basis of the first feature pyramid of the original recognition model. The first feature pyramid in the reconstructed recognition model includes two positioning reinforcement layers, namely P′2, P′3, P′4 and P′5. The positioning reinforcement layers corresponding to the P′4 and P′5 semantic reinforcement layers are deleted from the second feature pyramid of the original recognition model, that is, the P″4 and P″5 positioning reinforcement layers are deleted, and only the two positioning reinforcement layers, namely P″2 and P″3, are retained, thereby avoiding the situation of misdetection of large targets and further improving the model reasoning speed. Figure 3 As shown in the figure, the five network layers P1, P2, P3, P4 and P5 constitute the backbone network, and P′2, P′3, P′4 and P′5 are semantic enhancement layers that constitute the first feature pyramid. It should be pointed out that the P′5 semantic enhancement layer is a semantic enhancement layer added to the first feature pyramid of the original recognition model. Among them, the input image resolution size of the P′5 semantic enhancement layer is consistent with the resolution size of the downsampled feature map output by the P5 target backbone network layer, that is, the P5 target backbone network layer matches the P′5 semantic enhancement layer. Specifically, the input data of the P′5 semantic enhancement layer is the downsampled feature map output by the P5 target backbone network layer; the input image resolution size of the P′4 semantic enhancement layer is consistent with the resolution size of the downsampled feature map output by the P4 target backbone network layer, so the P4 target backbone network layer matches the P′4 semantic enhancement layer; the input image resolution size of the P′3 semantic enhancement layer is consistent with the resolution size of the downsampled feature map output by the P3 target backbone network layer, so the P3 target backbone network layer matches the P′3 semantic enhancement layer; the input image resolution size of the P′2 semantic enhancement layer is consistent with the resolution size of the downsampled feature map output by the P2 target backbone network layer, so the P2 target backbone network layer matches the P′2 semantic enhancement layer.

[0048] In addition, the improvement of the second feature pyramid is to delete at least two positioning enhancement layers based on the second feature pyramid of the original recognition model, such as Figure 4As shown, the second feature pyramid in the reconstructed recognition model includes two positioning enhancement layers, P″2 and P″3, which is the result of deleting the positioning enhancement layers corresponding to the semantic enhancement layers P′4 and P′5 in the second feature pyramid of the original recognition model, that is, deleting the positioning enhancement layers P″4 and P″5 and retaining only the two positioning enhancement layers P″2 and P″3, thereby avoiding the misdetection of large targets and further improving the model reasoning speed. Among them, the input image resolution size of the P″2 positioning enhancement layer is consistent with the resolution size of the upsampled feature map output by the P′2 semantic enhancement layer, that is, the P′2 semantic enhancement layer matches the P″2 positioning enhancement layer. Specifically, the data input to the P″2 positioning enhancement layer is the upsampled feature map output by the P′2 semantic enhancement layer; the data input to the P″3 positioning enhancement layer includes the features output by the P″2 positioning enhancement layer (that is, the first target feature map) and the upsampled feature map output by the P′3 semantic enhancement layer. Since the input image resolution size of the P″3 positioning enhancement layer is consistent with the resolution size of the upsampled feature map output by the P′3 semantic enhancement layer, the P″3 positioning enhancement layer matches the P′3 semantic enhancement layer.

[0049] In one embodiment, the backbone network includes, in addition to at least two target backbone network layers, other backbone network layers (hereinafter referred to as the first backbone network layer), and the first backbone network layer is the first layer of the backbone network; the server downsamples the indicator light image through the first backbone network layer in the backbone network to obtain an initial feature map; the server downsamples the initial feature map in turn through at least two target backbone network layers in the backbone network, and the input features of the second target backbone network layer are the output features after the downsampling of the first target backbone network layer, so as to obtain the downsampled feature maps corresponding to the at least two target backbone network layers respectively.

[0050] Among them, the backbone network includes a first backbone network layer and at least two target backbone network layers. The at least two target backbone network layers include a first target backbone network layer and a second target backbone network layer. The output data of the first backbone network layer is used as the input data of the first target backbone network layer, and the output data of the first target backbone network layer is used as the input data of the second target backbone network layer. Starting from the first backbone network layer, the depth of downsampling processing performed by each subsequent target backbone network layer is deepened in multiples. For example, the depth of downsampling processing performed by the P2 network layer is twice the depth of processing performed by the P1 network layer, and the depth of downsampling processing performed by the P3 network layer is twice the depth of processing performed by the P2 network layer, and so on.

[0051] For example, Figure 3As shown in the figure, the five network layers P1, P2, P3, P4 and P5 constitute the backbone network. The P1 network layer is the first backbone network layer, which outputs the initial feature map; the four network layers P2, P3, P4 and P5 are the target backbone network layers, which extract features from their respective input data and output downsampled feature maps corresponding to each target backbone network layer.

[0052] Specifically, when the downsampling of each backbone network layer is 2 times, the resolution of the vehicle indicator light image to be identified is 608 × 608. The server downsamples the vehicle indicator light to be identified through the P1 network layer to obtain an initial feature map with a resolution of 304 × 304. Afterwards, the initial feature map is used as the input of the P2 target backbone network layer, and the server downsamples the initial feature map through the P2 target backbone network layer to obtain a second downsampled feature map with a resolution of 152×152; the second downsampled feature map is used as the input of the P3 target backbone network layer, and the server downsamples the second downsampled feature map through the P3 target backbone network layer to obtain a third downsampled feature map with a resolution of 76×76; the third downsampled feature map is used as the input of the P4 target backbone network layer, and the server downsamples the third downsampled feature map through the P4 target backbone network layer to obtain a fourth downsampled feature map with a resolution of 38×38; the fourth downsampled feature map is used as the input of the P5 target backbone network layer, and the server downsamples the fourth downsampled feature map through the P5 target backbone network layer to obtain a fifth downsampled feature map with a resolution of 19×19. It can be understood that the depth corresponding to the downsampled feature map output by each target backbone network in the backbone network gradually deepens, and for feature maps with deeper depth, the more complex the feature extraction is.

[0053] S206, upsampling the corresponding target data through the semantic enhancement layer to obtain the upsampled feature map output by the n semantic enhancement layers, the target data at least includes the input data, and the second feature pyramid has a positioning enhancement layer that matches the n semantic enhancement layers.

[0054] If the semantic enhancement layer is the first layer of the first feature pyramid, the target data includes the downsampled feature map output by the target backbone network layer matching the semantic enhancement layer. If the semantic enhancement layer is a non-first layer of the first feature pyramid, the target data includes the downsampled feature map output by the target backbone network layer matching the semantic enhancement layer and the features output by the previous semantic enhancement layer.

[0055] In one embodiment, S206 may specifically include: the current semantic enhancement layer is the first-layer semantic enhancement layer, and the server uses the input data corresponding to the current semantic enhancement layer as the target data; the current semantic enhancement layer is a non-first-layer semantic enhancement layer, and the input data corresponding to the current semantic enhancement layer and the input data corresponding to the previous layer of the current semantic enhancement layer are upsampled and the output features are fused as the target data; the corresponding target data is upsampled through the current semantic enhancement layer to obtain the upsampled feature maps output by n non-first-layer semantic enhancement layers.

[0056] The input data corresponding to the current semantic enhancement layer may refer to: a downsampled feature map obtained by the target backbone network layer matching the current semantic enhancement layer; for example, Figure 3 As shown in , if the current semantic reinforcement layer is the P′5 semantic reinforcement layer, the corresponding input data of the P′5 semantic reinforcement layer is the downsampled feature map of the P5 network layer (i.e., the last target backbone network layer). The input data corresponding to the previous level of the current semantic reinforcement layer may refer to: the downsampled feature map obtained by the target backbone network layer that matches the previous level of the semantic reinforcement layer of the current semantic reinforcement layer; for example, Figure 3 As shown, if the current semantic enhancement layer is the P′4 semantic enhancement layer, the corresponding input data of the P′4 semantic enhancement layer is the downsampled feature map of the P4 network layer (that is, the last target backbone network layer).

[0057] For example, if the current semantic reinforcement layer is the first semantic reinforcement layer, the server inputs the corresponding input data of the current semantic reinforcement layer (i.e., the corresponding downsampled feature map) as the target data into the current semantic reinforcement layer, extracts features from the input target data through the current semantic reinforcement layer, and outputs the corresponding features. If the current semantic reinforcement layer is not the first semantic reinforcement layer, and the current semantic reinforcement layer is the second layer, the features output by the first semantic reinforcement layer are fused with the downsampled feature map of the target backbone network layer corresponding to the second semantic reinforcement layer as the target data, and the current semantic reinforcement layer is used to extract features from the target data, and so on, to obtain the upsampled feature maps output by the last two semantic reinforcement layers; the second feature pyramid in the recognition model has a positioning reinforcement layer that matches the last two semantic reinforcement layers.

[0058] Among them, feature fusion refers to the fusion of features of different scales and the integration of feature map information. Feature fusion can be achieved by feature splicing and feature addition. The feature splicing method is to merge the number of channels, and the number of channels of the output result is increased; the feature addition method is to add two feature maps, and the amount of information describing the image features is increased.

[0059] In one embodiment, the server performs feature splicing on the result of feature extraction of the corresponding input data through the current semantic enhancement layer and the input data of the next semantic enhancement layer, and outputs a fused feature map, which is the target data of the next semantic enhancement layer. The number of channels of the fused feature map is the sum of the number of channels of the corresponding input data of the current semantic enhancement layer and the number of channels of the input data of the next semantic enhancement layer. For example, when the number of channels of the corresponding input data through the current semantic enhancement layer is 768, and the number of channels of the input data of the next semantic enhancement layer is also 768, the number of channels of the output fused feature map is 1536.

[0060] Specifically, Figure 3 As shown, the input data of the P′5 semantic reinforcement layer includes the output data of the P5 target backbone network layer in the backbone network. After the output data of the P5 target backbone network layer passes through the P′5 semantic reinforcement layer, the output data of the P′5 semantic reinforcement layer is fused with the downsampled feature map output by the P4 target backbone network layer; the P′4 semantic reinforcement layer extracts features from the fused target data, and then fuses the output data of the P′4 semantic reinforcement layer with the downsampled feature map output by the P3 target backbone network layer; the P′3 semantic reinforcement layer extracts features from the fused target data to obtain a second upsampled feature map, and fuses the second upsampled feature map with the downsampled feature map output by the P2 target backbone network layer; the P′2 semantic reinforcement layer extracts features from the fused target data to obtain a first upsampled feature map.

[0061] In one embodiment, the server performs upsampling processing on the input data through the positioning enhancement layer of the second feature pyramid, wherein the upsampling processing may refer to enlarging the image, and commonly used upsampling methods include bilinear interpolation and transposed convolution. The bilinear interpolation method, also known as the bilinear interpolation method, is used to interpolate a bivariate function (such as x and y), and performs linear interpolation in the x and y directions respectively. The formula for linear interpolation is as follows:

[0062]

[0063]

[0064]

[0065] Among them, f function is an unknown function, f(x, y) is the interpolation result of point P in the input image, P = (x, y), and the known function f is in Q 11 =(x 1 ,y 1 ), Q 12 =(x 1 ,y2 ), Q 21 =(x 2 ,y 1 ) and Q 22 =(x 2 ,y 2 )The values ​​of the four points.

[0066] In one embodiment, the second feature pyramid in the recognition model may be a PAN (Path Aggregation Network) structure, which is a bottom-up multi-layer network structure. For example, when the second feature pyramid has 2 layers, Figure 4 As shown, the two positioning enhancement layers P″2 and P″3 constitute the second feature pyramid.

[0067] S208, performing feature extraction on the upsampled feature maps output by the corresponding semantic enhancement layers through n positioning enhancement layers, and obtaining target feature maps corresponding to the outputs of the n positioning enhancement layers.

[0068] In one embodiment, the target feature map includes a first target feature map and a second target feature map; the n semantic enhancement layers include a first semantic enhancement layer and a second semantic enhancement layer; the positioning enhancement layer includes a first positioning enhancement layer and a second positioning enhancement layer; the server extracts features from the upsampled feature map output by the first semantic enhancement layer through the first positioning enhancement layer to obtain a first target feature map; performs feature fusion on the first target feature map and the upsampled feature map output by the second semantic enhancement layer to obtain a fused feature; performs feature extraction on the fused feature through the second positioning enhancement layer to obtain a second target feature map.

[0069] For example, when the first feature pyramid has 4 semantic enhancement layers and the second feature pyramid has 2 positioning enhancement layers, Figure 5 As shown, the first semantic reinforcement layer can refer to the P′2 semantic reinforcement layer; the second semantic reinforcement layer can refer to the P′3 semantic reinforcement layer; the first positioning reinforcement layer can refer to the P″2 positioning reinforcement layer; the second positioning reinforcement layer can refer to the P″3 positioning reinforcement layer, the P″2 positioning reinforcement layer takes the upsampled feature map output by the P′2 semantic reinforcement layer as input data, the P″2 positioning reinforcement layer performs feature extraction on the input data to obtain a first target feature map; the first target feature map is feature fused with the upsampled feature map output by the P′3 semantic reinforcement layer to obtain a fused feature; after the fused feature is input into the P″3 positioning reinforcement layer, the P″3 positioning reinforcement layer performs feature extraction on the input fused feature to obtain a second target feature map.

[0070] S210, performing pixel-by-pixel recognition on the target feature map of each positioning enhancement layer to obtain the category of the indicator light in the indicator light image.

[0071] In one of the embodiments, the server matches each pixel with each anchor frame in the target feature map of each positioning enhancement layer, and outputs a feature vector corresponding to each anchor frame based on the matching result; based on the category information carried by the feature vector, the category of the indicator light in the indicator light image is determined.

[0072] Among them, the anchor frame refers to multiple bounding boxes of different sizes and aspect ratios centered on the pixel point. Whether the indicator light is recognized depends on whether the indicator light in the indicator light image can be matched by the anchor frame. Based on these bounding boxes, it can be determined whether the indicator light is within the bounding box and the category of the indicator light in the bounding box. Pixel-by-pixel recognition means that each pixel point in the target feature map is used as the center point of each anchor frame. According to the pixel value in the anchor frame, the feature vector corresponding to the anchor frame is calculated, and the feature vector includes the indicator light category information.

[0073] In one embodiment, the server optimizes the size of the anchor frame through the k-means clustering algorithm so that the anchor frame is more consistent with the aspect ratio of the indicator light. The k-means clustering algorithm is to find a partitioning scheme of k subsets (i.e., k groups) through iteration so that the loss function corresponding to the clustering result is minimized. When multiple sample anchor frames are divided into K subsets, the center point corresponding to each subset is given.

[0074] Specifically, the server obtains the anchor frame annotation file corresponding to the recognition model; calculates the area of ​​each sample anchor frame based on the anchor frame annotation file; divides each sample anchor frame into multiple subsets based on the area of ​​each sample anchor frame, and calculates the average size of the sample anchor frame in each subset; performs k-means clustering on the sample anchor frames in the corresponding subset according to the average size to obtain the center point of each subset; calculates the distance between each sample anchor frame and the center point in each subset; adjusts the size of the sample anchor frame in the corresponding subset based on the distance to obtain the anchor frame.

[0075] The format of the anchor box annotation file is (c, x, y, w, h), including the target category c, the center position coordinates (x, y) of the annotation box, and the width and height (w, h). Before optimizing the sample anchor box, the width and height can be normalized, and the optimization is performed based on the normalized anchor box annotation file, where the result of the normalization is w*=w / W, h*=h / H, where W and H are the width and height of the indicator light image, respectively. The distance between each sample anchor box and the center point in the subset is calculated by the loss function, which can be defined as the sum of squared errors of each sample from the center point of the group to which it belongs:

[0076]

[0077] Among them, x i represents the i-th sample anchor box, c i is x i The subset to which it belongs, Represents c i The center point of the group, M is the total number of samples.

[0078] In one embodiment, the feature vector also carries the confidence of the anchor frame; the server selects the anchor frame corresponding to the maximum confidence in each anchor frame as the target anchor frame; based on the category information carried by the feature vector, determining the category of the indicator light in the indicator light image includes: reading the category information from the feature vector corresponding to the target anchor frame; determining the category of the indicator light in the indicator light image according to the category information.

[0079] The feature vector corresponding to the anchor frame includes: the width of the anchor frame, the height of the anchor frame, the coordinates of the center of the anchor frame in the image, the confidence, and the probability values ​​of each category. The confidence is a value between the interval [0,1], which consists of two parts. The first part is the probability of whether there is an indicator light in the current anchor frame, and the second part is the IoU (Intersection over Union) value between the anchor frame and the real image area of ​​the indicator light when the current anchor frame has an object. The IoU value is used to measure the correlation between the real image area of ​​the indicator light and the anchor frame. The higher the correlation, the higher the IoU value. This value is the result of dividing the overlapping part of the two areas by the collective part of the two areas. For example, when the real image area of ​​the indicator light and the anchor frame completely overlap, the IoU value is 1.

[0080] In addition, the probability value of each category in the feature vector is a value between [0,1]. The higher the category probability value, the greater the probability that the indicator light belongs to this category. The number of indicator light categories is consistent with the number of probability values ​​of each category in the feature vector. For example, when the number of indicator light categories is 200, there are 200 values ​​representing the probability of each category in the feature vector of each anchor frame.

[0081] In one embodiment, the server uses the non-maximum suppression (NMS) method to select the anchor box corresponding to the maximum confidence from each anchor box as the target anchor box, and can also adjust the target anchor box to output the final anchor box with the highest matching degree. Among them, there can be multiple anchor boxes for one recognition target, and the non-maximum suppression method can suppress elements that are not the maximum confidence value to obtain the result with the highest confidence in the region.

[0082] In one embodiment, after the category of the indicator light is identified, the server searches the indicator light knowledge base according to the category to obtain indicator light description information matching the category; and returns the indicator light description information to the terminal for display.

[0083] In one embodiment, the server returns an image with the area where the indicator light is located and the indicator light information, including the indicator light diagram, the indicator light name, the indicator light location, the indicator light shape, the meaning of the indicator light, and precautions when the indicator light appears. Figure 6 As shown, when the frost indicator light appears, the server will return the schematic diagram, name and description of the frost indicator light to the front end. The description includes the location of the frost indicator light, the shape of the frost indicator light, the meaning of the frost indicator light and the precautions when the frost indicator light appears. The location of the frost indicator light is located in the lower right corner of the tachometer; the shape of the frost indicator light is composed of road surface and snowflakes; the meaning of the frost indicator light includes that when the frost indicator light is yellow, it means that the road surface temperature is lower than 4℃, and when the frost indicator light is red, it means that the road surface temperature is lower than 0℃; the precautions for the frost indicator light are that the road surface is icy, drive carefully, and beware of slipping.

[0084] In the above-mentioned vehicle indicator light recognition method, the indicator light image of the vehicle to be recognized is obtained; the indicator light image is downsampled through the backbone network of the recognition model to obtain the downsampled feature map corresponding to each target backbone network layer; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer in the backbone network, and the downsampled feature map corresponding to each target backbone network layer is used as the input data of the matching semantic reinforcement layer; the corresponding target data is upsampled through the semantic reinforcement layer to obtain the upsampled feature map output by n semantic reinforcement layers, and the target data at least includes the input data, and the second feature pyramid has a positioning reinforcement layer matching the n semantic reinforcement layers; through the n positioning reinforcement layers, the upsampled feature map output by the corresponding semantic reinforcement layer is respectively extracted to obtain the target feature map corresponding to the output of the n positioning reinforcement layers; the target feature map of each positioning reinforcement layer is respectively pixel-by-pixel identified to obtain the category of the indicator light in the indicator light image. By extracting image features through the first feature pyramid and the second feature pyramid, a target feature map carrying strong semantic features and positioning information can be obtained, and the indicator light can be better recognized. Multiple target feature maps of different scales can better perform pixel-by-pixel recognition, thereby improving the accuracy of indicator light recognition.

[0085] In one embodiment, Figure 7 As shown, before step S202, the following steps are also included:

[0086] S702, obtaining an indicator light image sample of the target vehicle.

[0087] The indicator light image samples of the target vehicle are dashboard images taken by the owner in actual scenes. The dashboard images include indicator lights. A dashboard image can have one indicator light or multiple indicator lights. In addition, the indicator light image samples have labels corresponding to the real information of the image. The label content includes: the real category of the indicator light and the real area of ​​the indicator light.

[0088] In one embodiment, the server divides the multiple indicator light image samples into three data sets, namely, a training data set, a verification data set, and a test data set. The training data set is used to train the model; the verification data set is used to adjust the model parameters of the learned model, such as adjusting the anchor frame; and the test data set is used to test the resolution ability of the trained model. Specifically, the server constructs the training data set, the verification data set, and the test data set from the indicator light image samples in a ratio of 7:2:1.

[0089] In one embodiment, each indicator light image sample includes an indicator light of a corresponding category; each indicator light image sample is grouped according to the category of the indicator light to obtain at least two indicator light image sample groups; the at least two indicator light image sample groups include a first sample group and a second sample group; if the number of indicator lights in the first sample group is less than a preset number, the first sample group is oversampled to obtain an oversampled sample group. Through the backbone network of the recognition model, the indicator light image samples in the oversampled sample group are sequentially downsampled, and the second sample group is downsampled.

[0090] Among them, oversampling refers to repeating sample data of some categories, thereby increasing the proportion of the sample category and obtaining sample data of uniform quantity in each category. Oversampling can use methods such as direct copying and copy enhancement. The copy enhancement method is to increase the number of the category by copying, and then process the copied samples. The processing methods for the samples include color transformation, space transformation and noise transformation. Specifically, when the preset number is 10 and the number of frost indicator lights is less than 10, the server groups the image samples of each indicator light, and then oversamples the frost indicator light image in the first sample group, thereby increasing the proportion of the frost indicator light in all sample categories.

[0091] In one embodiment, a region segmentation is performed in an indicator light image sample including a target indicator light to obtain a target region including the target indicator light; the target region is copied multiple times to obtain multiple target regions; each target region is pasted into an indicator light image sample not including the target indicator light; and each indicator light image sample including the target indicator light is downsampled through the backbone network of the recognition model. In the pasting process, the pasting position of the target indicator light should not overlap with the indicator light in the indicator light image sample. For example, if indicator light t is copied at position a of image 1 and is pasted into image 2, if there is an indicator light at position a of image 2, indicator light t needs to be pasted to other positions of image 2 to avoid blocking the original indicator light in image 2. The target region including the indicator light can be obtained based on the label information corresponding to the indicator light image sample. By copying and repeating the target region in the image, the proportion of the target indicator light in the image can be increased.

[0092] In one embodiment, noise is added to each indicator light image sample to obtain an indicator light image sample including noise; the indicator light image sample including noise is downsampled through the backbone network of the recognition model. For example, Gaussian noise can be added to each indicator light image sample. Gaussian noise refers to a type of noise whose probability density function obeys Gaussian distribution (i.e., normal distribution). By adding noise to each indicator light image sample, different types of application scenarios can be fitted to obtain indicator light image samples for different application scenarios, thereby enriching the types of indicator light image samples. This is beneficial for the recognition model to learn to recognize indicator light image samples for different application scenarios during the model training process, thereby improving the recognition ability and generalization ability of the recognition model. The probability density function of the Gaussian noise can be expressed as:

[0093]

[0094] Among them, z represents the grayscale value of the image pixel, μ represents the expected grayscale value, and σ represents the standard deviation of the grayscale value.

[0095] S704, down-sampling the indicator light image samples through the backbone network of the reconstructed recognition model to obtain the down-sampled training feature maps corresponding to each target backbone network layer; the down-sampled training feature maps are used as training input data for the corresponding semantic enhancement layer.

[0096] S706, upsampling the corresponding target training data through the semantic enhancement layer to obtain upsampled training feature maps output by n semantic enhancement layers, where the target data at least includes the training input data.

[0097] S708, performing feature extraction on the upsampled training feature maps output by the corresponding semantic enhancement layers through n positioning enhancement layers to obtain corresponding target training feature maps.

[0098] S710, performing pixel-by-pixel recognition on the target training feature map of each positioning enhancement layer to obtain the category of the indicator light in the indicator light image sample.

[0099] The specific steps of S704 to S710 can be referred to Figure 2 S204~S210 in the embodiment.

[0100] S712, calculating the loss value between the category of the indicator light in the indicator light image sample and the indicator light label, and optimizing the network parameters in the backbone network, the first feature pyramid and the second feature pyramid based on the loss value.

[0101] Among them, the loss value refers to the result of the loss function. The smaller the loss value, the better the robustness of the model. The loss function is used to measure the degree of inconsistency between the model's predicted value and the true value. After the training data is sent to the recognition model, the predicted value is output through forward propagation, and then the loss function calculates the difference between the predicted value and the true value, which is the loss value. After obtaining the loss value, the model updates each parameter through back propagation to reduce the loss value between the true value and the predicted value, so that the predicted value generated by the model is closer to the true value, thereby achieving the purpose of learning.

[0102] In one embodiment, the server uses a loss function to calculate the loss value between the category of the indicator light in the indicator light image sample and the indicator light label, and obtains the real image area and real category of the indicator light in the indicator light image sample according to the label corresponding to the indicator light image sample. The loss function may include the following three parts: the first part is the difference value between the real image area of ​​the indicator light in the indicator light image sample and the predicted coordinates of the anchor frame; the second part is the difference value between the real confidence of the indicator light in the indicator light image sample and the predicted confidence of the anchor frame; the third part is the difference value between the real category of the indicator light in the indicator light image sample and the predicted category of the anchor frame; the three difference values ​​are added together to obtain the final loss value.

[0103] In this embodiment, by constructing indicator light image sample data and training the parameters of the recognition model, the category of the vehicle indicator light can be quickly and accurately identified in the vehicle instrument image.

[0104] It should be understood that although Figure 2 , 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , 7At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0105] In one embodiment, Figure 8 As shown, a vehicle indicator light recognition device is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: an acquisition module 802, a backbone network module 804, a semantic enhancement module 806, a positioning enhancement module 808 and a recognition module 810, wherein:

[0106] An acquisition module 802 is used to acquire an indicator light image of a vehicle to be identified;

[0107] The backbone network module 804 is used to perform downsampling processing on the indicator light image through the backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic enhancement layer matching each target backbone network layer, and the downsampled feature map corresponding to each target backbone network layer is used as input data of the matching semantic enhancement layer;

[0108] The semantic enhancement module 806 is used to perform upsampling processing on the corresponding target data through the semantic enhancement layer to obtain the upsampled feature graphs output by the n semantic enhancement layers, where the target data at least includes the input data, and the second feature pyramid has a positioning enhancement layer matching the n semantic enhancement layers;

[0109] The positioning enhancement module 808 is used to extract features from the upsampled feature maps output by the corresponding semantic enhancement layers through n positioning enhancement layers, and obtain target feature maps corresponding to the outputs of the n positioning enhancement layers;

[0110] The identification module 810 is used to perform pixel-by-pixel identification on the target feature map of each positioning enhancement layer to obtain the category of the indicator light in the indicator light image.

[0111] In one embodiment, the backbone network module 804 is also used to downsample the indicator light image through the first backbone network layer in the backbone network to obtain an initial feature map; the initial feature map is downsampled in turn through at least two target backbone network layers in the backbone network, and the input features of the second target backbone network layer are the output features after the downsampling of the first target backbone network layer, so as to obtain the downsampled feature maps corresponding to the at least two target backbone network layers respectively; wherein the depth of the downsampling processing of each target backbone network layer after the first backbone network layer is deepened in turn by multiples.

[0112] In one of the embodiments, the semantic enhancement module 806 is also used for when the current semantic enhancement layer is the first semantic enhancement layer, and the input data corresponding to the current semantic enhancement layer is used as the target data; when the current semantic enhancement layer is a non-first semantic enhancement layer, the input data corresponding to the current semantic enhancement layer and the input data corresponding to the previous level of the current semantic enhancement layer are upsampled and the output features are fused as the target data; the corresponding target data is upsampled through the current semantic enhancement layer to obtain the upsampled feature maps output by n non-first semantic enhancement layers.

[0113] In one of the embodiments, the recognition module 810 is also used to match the pixel set of the target feature map of each positioning enhancement layer with the pixel set in each anchor frame, and output the feature vector corresponding to each anchor frame according to the matching result; based on the category information carried by the feature vector, determine the category of the indicator light in the indicator light image.

[0114] In one embodiment, if Fig. 9 As shown, the feature vector also carries the confidence of the anchor frame; the device also includes: a selection module 812, which is used to select the anchor frame corresponding to the maximum confidence in each anchor frame as the target anchor frame; the recognition module is also used to read the category information from the feature vector corresponding to the target anchor frame; determine the category of the indicator light in the indicator light image according to the category information.

[0115] In one embodiment, the device further comprises:

[0116] The anchor frame optimization module is used to obtain the anchor frame annotation file corresponding to the recognition model; calculate the area of ​​each sample anchor frame based on the anchor frame annotation file; divide each sample anchor frame into multiple subsets based on the area of ​​each sample anchor frame, and calculate the average size of the sample anchor frame in each subset; perform k-means clustering on the sample anchor frames in the corresponding subset according to the average size to obtain the center point of each subset; calculate the distance between each sample anchor frame and the center point in each subset respectively; adjust the size of the sample anchor frame in the corresponding subset based on the distance to obtain the anchor frame.

[0117] In one embodiment, the recognition model is obtained by reconstructing and training the first feature pyramid and the second feature pyramid in the original recognition model; the second feature pyramid in the original recognition model includes m positioning enhancement layers, where m is a positive integer greater than n; and the device further includes:

[0118] A reconstruction module is used to add a semantic reinforcement layer that matches the first backbone network layer in the backbone network to the first feature pyramid in the original recognition model; and to delete the positioning reinforcement layers other than the n positioning reinforcement layers among the m positioning reinforcement layers of the second feature pyramid in the original recognition model to obtain a reconstructed recognition model;

[0119] The training module is used to perform model training on the reconstructed recognition model to obtain the recognition model after optimizing the network parameters.

[0120] In one embodiment, the target feature map includes a first target feature map and a second target feature map; the n semantic enhancement layers include a first semantic enhancement layer and a second semantic enhancement layer; the positioning enhancement layer includes a first positioning enhancement layer and a second positioning enhancement layer;

[0121] The positioning enhancement layer module 808 is also used to perform feature extraction on the upsampled feature map output by the first semantic enhancement layer through the first positioning enhancement layer to obtain a first target feature map; perform feature fusion on the first target feature map and the upsampled feature map output by the second semantic enhancement layer to obtain a fused feature; perform feature extraction on the fused feature through the second positioning enhancement layer to obtain a second target feature map.

[0122] In one embodiment, the device further includes: a retrieval module 814, which is used to search the indicator light knowledge base according to the category after identifying the category of the indicator light, and obtain the indicator light description information matching the category; and return the indicator light description information to the terminal for display.

[0123] In the above embodiment, by obtaining the indicator light image of the vehicle to be identified; downsampling the indicator light image through the backbone network of the recognition model to obtain the downsampling feature map corresponding to each target backbone network layer; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer in the backbone network, and the downsampling feature map corresponding to each target backbone network layer is used as the input data of the matching semantic reinforcement layer; upsampling the corresponding target data through the semantic reinforcement layer to obtain the upsampling feature map output by n semantic reinforcement layers, the target data at least includes the input data, and the second feature pyramid has a positioning reinforcement layer matching the n semantic reinforcement layers; through the n positioning reinforcement layers, feature extraction is performed on the upsampling feature map output by the corresponding semantic reinforcement layer, and the target feature map corresponding to the output of the n positioning reinforcement layers is obtained; the target feature map of each positioning reinforcement layer is respectively pixel-by-pixel identified to obtain the category of the indicator light in the indicator light image. By extracting image features through the first feature pyramid and the second feature pyramid, a target feature map carrying strong semantic features and positioning information can be obtained, and the indicator light can be better identified. Multiple target feature maps of different scales can better perform pixel-by-pixel recognition, thereby improving the accuracy of indicator light recognition.

[0124] In one embodiment, the device also includes: a training module 816, which is also used to obtain indicator light image samples of the target vehicle; down-sampling the indicator light image samples through the backbone network of the reconstructed recognition model to obtain down-sampled training feature maps corresponding to each target backbone network layer; the down-sampled training feature maps are used as training input data for the corresponding semantic reinforcement layer; up-sampling the corresponding target training data through the semantic reinforcement layer to obtain up-sampled training feature maps output by n semantic reinforcement layers, and the target data at least includes the training input data; feature extraction is performed on the up-sampled training feature maps output by the corresponding semantic reinforcement layers through n positioning reinforcement layers to obtain corresponding target training feature maps; pixel-by-pixel identification is performed on the target training feature maps of each positioning reinforcement layer to obtain the category of the indicator light in the indicator light image sample; the loss value between the category of the indicator light in the indicator light image sample and the indicator light label is calculated, and the network parameters in the backbone network, the first feature pyramid and the second feature pyramid are optimized based on the loss value.

[0125] In one embodiment, each indicator light image sample includes an indicator light of a corresponding category; the device further includes: an oversampling module 818, configured to group each indicator light image sample according to the category of the indicator light to obtain at least two indicator light image sample groups; the at least two indicator light image sample groups include a first sample group and a second sample group; if the number of indicator lights in the first sample group is less than a preset number, oversampling the first sample group to obtain an oversampled sample group;

[0126] The training module 816 is further used to sequentially downsample the indicator light image samples in the oversampled sample group and downsample the second sample group through the backbone network of the reconstructed recognition model.

[0127] In one embodiment, the device further includes: a copy and paste module 820, configured to perform region segmentation in the indicator light image sample including the target indicator light to obtain a target region including the target indicator light; copy the target region multiple times to obtain multiple target regions; and paste each target region into the indicator light image sample not including the target indicator light;

[0128] The training module 816 is further used to perform down-sampling processing on each indicator light image sample including the target indicator light through the backbone network of the reconstructed recognition model.

[0129] In one of the embodiments, the apparatus further includes: a noise adding module 822, configured to add noise to each indicator light image sample to obtain an indicator light image sample including noise;

[0130] The training module 816 is also used to downsample the indicator light image samples including noise through the backbone network of the reconstructed recognition model.

[0131] In the above embodiment, by constructing indicator light image sample data and training the parameters of the recognition model, the category of the vehicle indicator light can be quickly and accurately identified in the vehicle instrument image.

[0132] The specific definition of the vehicle indicator light recognition device can be found in the definition of the vehicle indicator light recognition method mentioned above, which will not be repeated here. Each module in the above-mentioned vehicle indicator light recognition device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0133] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store indicator light image sample data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying a vehicle indicator light is implemented.

[0134] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0135] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0136] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0137] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0138] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0139] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0140] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for identifying a vehicle indicator light, characterized in that: The recognition model includes a backbone network, a first feature pyramid and a second feature pyramid, and the method includes: Acquire the indicator light image of the vehicle to be identified; The indicator light image is downsampled by the backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer, and the downsampled feature maps corresponding to each target backbone network layer serve as input data of the matching semantic reinforcement layer; Performing upsampling processing on the corresponding target data through the semantic enhancement layer to obtain n upsampled feature maps output by the semantic enhancement layer, wherein the target data at least includes the input data, and the second feature pyramid has a positioning enhancement layer matching the n semantic enhancement layers; Through the n positioning enhancement layers, feature extraction is performed on the upsampled feature maps output by the corresponding semantic enhancement layers, so as to obtain target feature maps corresponding to the outputs of the n positioning enhancement layers; The target feature map corresponding to each positioning enhancement layer is respectively identified pixel by pixel to obtain the category of the indicator light in the indicator light image.

2. The method according to claim 1, characterized in that The downsampling process of the indicator light image by the backbone network to obtain the downsampling feature graph corresponding to each target backbone network layer in the backbone network includes: Downsampling the indicator light image through the first backbone network layer in the backbone network to obtain an initial feature map; The initial feature map is sequentially downsampled by at least two target backbone network layers in the backbone network, and the input feature of the second target backbone network layer is the output feature after the downsampling process of the first target backbone network layer, so as to obtain downsampled feature maps corresponding to the at least two target backbone network layers respectively; The depth of downsampling processing performed on each target backbone network layer after the first backbone network layer is deepened by multiples.

3. The method according to claim 1, characterized in that The upsampling process is performed on the corresponding target data through the semantic enhancement layer to obtain n upsampling feature maps output by the semantic enhancement layer, wherein the target data at least includes the input data, including: The current semantic enhancement layer is the first semantic enhancement layer, and the input data corresponding to the current semantic enhancement layer is used as the target data; The current semantic enhancement layer is a non-first semantic enhancement layer, and features of the input data corresponding to the current semantic enhancement layer and the input data corresponding to the previous level of the current semantic enhancement layer are upsampled and outputted as target data by feature fusion; The corresponding target data is upsampled through the current semantic enhancement layer to obtain upsampled feature maps output by n non-first semantic enhancement layers.

4. The method according to claim 1, characterized in that: The target feature map of each positioning enhancement layer is identified pixel by pixel to obtain the category of the indicator light in the indicator light image, including: Matching a pixel set of the target feature map of each positioning enhancement layer with a pixel set in each anchor frame, and outputting a feature vector corresponding to each anchor frame according to the matching result; Based on the category information carried by the feature vector, the category of the indicator light in the indicator light image is determined.

5. The method according to claim 4, characterized in that The feature vector also carries the confidence of the anchor box; the method further includes: Selecting the anchor frame corresponding to the maximum confidence level from among the anchor frames as the target anchor frame; The determining the category of the indicator light in the indicator light image based on the category information carried by the feature vector includes: Reading category information from the feature vector corresponding to the target anchor frame; The category of the indicator light in the indicator light image is determined according to the category information.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining an anchor box annotation file corresponding to the recognition model; Calculating the area of ​​each sample anchor box based on the anchor box annotation file; Dividing each of the sample anchor boxes into a plurality of subsets based on the area of ​​each of the sample anchor boxes, and calculating an average size of the sample anchor boxes in each of the subsets; Performing k-means clustering on the sample anchor frames in the corresponding subsets according to the average size to obtain the center point of each subset; Calculate the distance between each sample anchor box in each subset and the center point respectively; The anchor frame of the samples in the corresponding subset is resized based on the distance to obtain the anchor frame.

7. The method according to claim 1, characterized in that The recognition model is obtained by reconstructing and training the first feature pyramid and the second feature pyramid in the original recognition model; the second feature pyramid in the original recognition model includes m positioning enhancement layers, where m is a positive integer greater than n; The reconstructing and training the first feature pyramid and the second feature pyramid in the original recognition model includes: In the first feature pyramid in the original recognition model, a semantic enhancement layer matching the first backbone network layer in the backbone network is added; and, Among the m positioning enhancement layers of the second feature pyramid in the original recognition model, the positioning enhancement layers other than the n positioning enhancement layers are deleted to obtain the reconstructed recognition model; The reconstructed recognition model is trained to obtain a recognition model with optimized network parameters.

8. The method according to claim 7, characterized in that The target feature map includes a first target feature map and a second target feature map; the n semantic enhancement layers include a first semantic enhancement layer and a second semantic enhancement layer; the positioning enhancement layer includes a first positioning enhancement layer and a second positioning enhancement layer; The extracting features of the upsampled feature maps output by the corresponding semantic enhancement layers through the n positioning enhancement layers includes: Performing feature extraction on the upsampled feature map output by the first semantic enhancement layer through the first positioning enhancement layer to obtain the first target feature map; Performing feature fusion on the first target feature map and the upsampled feature map output by the second semantic enhancement layer to obtain a fused feature; The second positioning enhancement layer is used to extract the fused features to obtain the second target feature map.

9. The method according to claim 1, characterized in that: Also includes: After the category of the indicator light is identified, searching the indicator light knowledge base according to the category to obtain indicator light description information matching the category; The indicator light description information is returned to the terminal for display.

10. The method according to claim 7, characterized in that The performing model training on the reconstructed recognition model to obtain the recognition model after optimizing the network parameters comprises: Obtain an indicator light image sample of the target vehicle; The indicator light image samples are downsampled by the backbone network of the reconstructed recognition model to obtain downsampled training feature maps corresponding to each target backbone network layer; the downsampled training feature maps are used as training input data for the corresponding semantic enhancement layer; Performing upsampling processing on the corresponding target training data through the semantic enhancement layer to obtain n upsampled training feature maps output by the semantic enhancement layer, wherein the target data at least includes the training input data; Through the n positioning enhancement layers, feature extraction is performed on the upsampled training feature maps output by the corresponding semantic enhancement layers to obtain corresponding target training feature maps; Recognize the target training feature map of each positioning enhancement layer pixel by pixel to obtain the category of the indicator light in the indicator light image sample; The loss value between the category of the indicator light in the indicator light image sample and the indicator light label is calculated, and the network parameters in the backbone network, the first feature pyramid and the second feature pyramid are optimized based on the loss value.

11. The method according to claim 10, characterized in that Each indicator light image sample includes an indicator light of a corresponding category; and further includes: According to the category of the indicator light, each of the indicator light image samples is grouped to obtain at least two indicator light image sample groups; the at least two indicator light image sample groups include a first sample group and a second sample group; If the number of indicator lights in the first sample group is less than a preset number, oversampling the first sample group to obtain an oversampled sample group; The down-sampling process of the indicator light image sample by reconstructing the backbone network of the recognition model includes: The indicator light image samples in the oversampled sample group are downsampled sequentially through the reconstructed backbone network of the recognition model, and the second sample group is downsampled.

12. The method according to claim 10, characterized in that Also includes: Performing region segmentation in the indicator light image sample including the target indicator light to obtain a target region including the target indicator light; Copying the target area multiple times to obtain multiple target areas; Pasting each of the target areas respectively into the indicator light image sample that does not include the target indicator light, to obtain the indicator light image sample that includes the target indicator light; The down-sampling process of the indicator light image sample by reconstructing the backbone network of the recognition model includes: Through the reconstructed backbone network of the recognition model, down-sampling processing is performed on each indicator light image sample including the target indicator light.

13. The method according to claim 10, characterized in that Also includes: adding noise to each of the indicator light image samples to obtain an indicator light image sample including noise; The down-sampling process of the indicator light image sample by reconstructing the backbone network of the recognition model includes: The indicator light image samples including noise are down-sampled by using the reconstructed backbone network of the recognition model.

14. A vehicle indicator light recognition device, characterized in that: The recognition model includes a backbone network, a first feature pyramid and a second feature pyramid, and the device includes: An acquisition module, used to acquire an indicator light image of a vehicle to be identified; A backbone network module, used to perform downsampling processing on the indicator light image through the backbone network to obtain downsampled feature maps corresponding to each target backbone network layer in the backbone network; the first feature pyramid in the recognition model has a semantic reinforcement layer matching each target backbone network layer, and the downsampled feature map corresponding to each target backbone network layer is used as input data of the matching semantic reinforcement layer; A semantic enhancement module, configured to perform upsampling processing on the corresponding target data through the semantic enhancement layer to obtain upsampled feature maps output by n semantic enhancement layers, wherein the target data at least includes the input data, and the second feature pyramid has a positioning enhancement layer matching the n semantic enhancement layers; A positioning enhancement module, used to extract features from the upsampled feature maps output by the corresponding semantic enhancement layers through the n positioning enhancement layers, to obtain target feature maps corresponding to the outputs of the n positioning enhancement layers; The recognition module is used to perform pixel-by-pixel recognition on the target feature map of each positioning enhancement layer to obtain the category of the indicator light in the indicator light image.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.