A target attribute recognition method, device and storage medium

By segmenting the target and fusing the associated probability information of the image to be recognized, the main target probability characteristics are obtained, and the problems of low target attribute recognition efficiency and unstable results in complex scenarios are solved, achieving a more efficient and stable recognition effect.

CN119313993BActive Publication Date: 2025-04-25ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411867460.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-25
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In complex scenarios, the target attribute recognition efficiency is not high and the recognition results are unstable.

Method used

By segmenting the target image to be recognized, the target segmentation result is obtained, and the correlation probability information is obtained based on the key position of the target, the two are fused to obtain the main target probability characteristics, and then the target attribute recognition is carried out.

Benefits of technology

It improves the recognition efficiency and stability of target attribute recognition, reduces the impact of non-main targets, makes the recognition results more stable, and adapts to complex and changeable application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313993B_ABST
    Figure CN119313993B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for target attribute recognition, the method comprising: performing target segmentation on an image to be recognized to obtain a target segmentation result; and, based on the key position of the target in the image to be recognized, obtaining association probability information, wherein the association probability information includes a first probability that different pixels in the image to be recognized belong to the target corresponding to the key position; fusing the target segmentation result and the association probability information to obtain a main target probability feature, wherein the main target probability feature includes a second probability that different pixels in the image to be recognized belong to a main target among the at least one target; based on the main target probability feature, performing target attribute recognition on the image to be recognized to obtain an attribute recognition result of the main target. In the above manner, the present application can improve the accuracy and stability of target attribute 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 technology, and in particular to a target attribute recognition method, device and storage medium. Background Art

[0002] With the development of big data and artificial intelligence technology, target attribute recognition technology plays an important role in the fields of intelligent transportation. At present, deep learning, especially convolutional neural networks, has been widely used in target attribute recognition tasks, which can automatically extract image features and significantly improve recognition accuracy.

[0003] However, when performing target attribute recognition in some complex scenarios, there are still problems such as low recognition efficiency and unstable recognition results. Summary of the invention

[0004] In order to solve the above technical problems, the technical solution adopted in this application is: to provide a target attribute recognition method, device and storage medium, so as to at least solve the problem of low target recognition efficiency and unstable recognition results in the process of target attribute recognition in the related technology.

[0005] According to an embodiment of the present invention, a method for identifying target attributes is provided, comprising:

[0006] Performing target segmentation on the image to be identified to obtain a target segmentation result, wherein the image to be identified includes at least one target; and

[0007] Based on the key position of the target in the image to be identified, obtaining association probability information, wherein the association probability information includes a first probability that different pixels in the image to be identified belong to the target corresponding to the key position;

[0008] Fusion of the target segmentation result and the association probability information to obtain a main target probability feature, wherein the main target probability feature includes a second probability that different pixels in the image to be identified belong to the main target in the at least one target;

[0009] Based on the main target probability feature, target attribute recognition is performed on the image to be recognized to obtain an attribute recognition result of the main target.

[0010] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the target attribute recognition method in the above technical solution.

[0011] In order to solve the above technical problems, a technical solution adopted in the present application is: providing a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the target attribute recognition method in the above technical solution.

[0012] Through the above scheme, the beneficial effect of the present application is: the target attribute recognition method provided by the present application obtains the main target probability feature by fusing the target segmentation result obtained by performing target segmentation on the image to be recognized and the associated probability information obtained based on the key position of the target, and then performs target attribute recognition on the image to be recognized in combination with the main target probability feature, thereby obtaining the attribute recognition result of the main target; in this way, the present application can reduce the influence of non-main targets in the image by identifying the main target in the image to be recognized, so that the attribute recognition focuses on the main target, and the output attribute recognition result is more stable, thereby improving the recognition efficiency and stability of target attribute recognition, and can adapt to complex and changeable application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0014] Figure 1 It is a flowchart of an embodiment of a target attribute identification method provided by the present application;

[0015] Figure 2 is a flowchart of another embodiment of the target attribute identification method provided by the present application;

[0016] Figure 3 It is a flowchart of a specific embodiment of the target attribute identification method provided by the present application;

[0017] Figure 4 is a schematic diagram of a target detection result provided by the present application;

[0018] Figure 5 is a schematic diagram of a neural network structure provided by the present application;

[0019] Figure 6 It is a structural schematic diagram of a vehicle attribute recognition model provided by this application;

[0020] Figure 7 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;

[0021] Figure 8It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0022] The present application is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0023] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] It should be noted that the terms "first", "second", etc. in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", etc. can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0025] See also Figure 1 , Figure 1 is a flow chart of an embodiment of the target attribute identification method provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment includes:

[0026] S110: Perform target segmentation on the image to be recognized to obtain a target segmentation result.

[0027] The image to be identified is input into a pre-trained target segmentation model, and the target segmentation operation is performed to obtain the target segmentation result. In this process, each image to be identified includes at least one target, and accordingly, after the target segmentation, the segmentation result of at least one target is obtained.

[0028] In one embodiment, the target segmentation result includes target segmentation features corresponding to each target, and the value of each feature element in these target segmentation features is used to characterize whether each pixel in the image to be identified belongs to the corresponding target. Exemplarily, the image to be identified is segmented to obtain a target segmentation result, which is recorded as F; wherein the pixel value corresponding to a target in the image to be identified is the first value, and the remaining pixel values ​​of other targets or backgrounds except the target are the second value; if there are n targets (n≥2) in the image to be identified, and the target segmentation results corresponding to n targets are obtained, then the feature dimension of the target segmentation result F of the image to be identified can be expressed as n*h*w, wherein h and w are the height and width of the target segmentation result feature map, respectively. Through the above distribution representation of feature values, each target in the image can be accurately identified and distinguished, providing a basis for subsequent attribute recognition and analysis.

[0029] In one embodiment, target segmentation is performed on the image to be identified to obtain a target segmentation result. Prior to this, the number of targets in the image to be identified may be obtained first. Based on the target number result, it is selected whether to perform a target segmentation process on the image to be identified or to directly perform an attribute recognition process. The specific selection method can be referred to step S201 below and will not be repeated here.

[0030] S120: Obtaining association probability information based on key positions of the target in the image to be identified.

[0031] Before obtaining the association probability information based on the key position of the target in the image to be identified, the key position of the target in the image to be identified is identified and detected so as to obtain the corresponding association probability information based on the key position of the target. Among them, the key position is a preset position point in the preset component of the target, the preset component is a part of the target object with a specific function or feature, and the preset position point refers to a specific position defined in the preset component, which can usually be selected according to the geometric features or functional features of the target. Exemplarily, if the target is a vehicle, the preset component can be a license plate, a wheel, a window or a headlight, etc.; assuming that the preset component is a wheel, the preset position point can be set to the center point of the wheel or the edge point of the tire; assuming that the preset component is a license plate, the preset position point can be the center point of the license plate. By identifying these preset components and their preset position points, it is helpful for the system to locate the target more accurately, and calculate the association probability information based on the acquired key positions, thereby achieving more efficient target recognition and analysis.

[0032] In one embodiment, a detection model is used to perform component detection on an image to be identified to obtain position information of a preset component in the image to be identified; based on the position information of the preset component, a key position is determined. Exemplarily, a pre-trained detection model such as a convolutional neural network is used to analyze the image to be identified to identify and locate the preset component in the image to determine the key position; preferably, based on the existing YOLOv5 framework, a target preset component detection branch is added to detect the key position of the target in the image to be identified.

[0033] Based on the key position of the target in the image to be identified detected as above, the association probability information is obtained. In one embodiment, the association probability information includes the first probability that different pixels in the image to be identified belong to the target corresponding to the key position. In one example, the first probability between each pixel in the image to be identified and the key position can be calculated through the mathematical model of the Gaussian kernel to obtain the association probability information. In this model, the first probability is negatively correlated with the distance between the pixel and the key position, that is, the closer the pixel is to the key position, the higher its first probability value is, indicating that the pixel is more likely to belong to the target corresponding to the key position; on the contrary, the farther the distance is, the lower the first probability value is, indicating that the pixel is less likely to belong to the target.

[0034] In one embodiment, the key probability information can be represented by a heat map feature, which displays the feature map inside the model in a visual manner, and the peak point of each heat map corresponds to the center of an object. Exemplarily, the image to be identified contains at least one key position, and the key probability information includes the heat map feature corresponding to each key position, and the value of each feature element in the heat map feature respectively represents the first probability between each pixel point in the image to be identified and the corresponding key position.

[0035] S130: Fusing the target segmentation result and the associated probability information to obtain the main target probability feature.

[0036] Obtain the target segmentation features corresponding to each target in the image to be identified output in the above step S110, wherein the value of each feature element in each target segmentation feature represents whether each pixel in the image belongs to the corresponding target; and the heat map features corresponding to each key position output in step S120, wherein the value of each feature element of each heat map feature represents the first probability between each pixel in the image to be identified and the corresponding key position.

[0037] To further obtain the main target probability feature, the target segmentation feature corresponding to each target and the heat map feature corresponding to each key position are fused, for example, by multiplying or adding the corresponding element values ​​of these two features, and the fused feature will contain both the target segmentation information and the probability information of the key position. In one example, the target segmentation feature corresponding to each target and the heat map feature corresponding to each key position are respectively combined into several groups of feature pairs; the main target probability feature is obtained by using the dot product results of each group of feature pairs, wherein the value of each feature element in the main target probability feature is equal to the sum of the values ​​of the corresponding feature elements in each dot product result.

[0038] In one embodiment, the main target probability feature includes a second probability that different pixels in the image to be identified belong to the main target in at least one target, that is, the second probability reflects the possibility that each pixel is part of the main target. In addition, the value of each feature element in the fused main target probability feature is positively correlated with the value of the corresponding feature element in the target segmentation feature and the heat map feature. Exemplarily, if a pixel is determined to belong to the target in the target segmentation feature, and the probability of association with the key position in the heat map feature is high, then in the main target probability feature, the second probability that the pixel belongs to the target will also be correspondingly high.

[0039] S140: Based on the main target probability feature, target attribute recognition is performed on the image to be recognized to obtain the attribute recognition result of the main target.

[0040] The main target probability features obtained by combining the target segmentation results and the associated probability information are used to perform target attribute recognition on the image to be identified, and the attribute recognition result of the main target in the image to be identified is obtained.

[0041] To further improve the accuracy and efficiency of target detection and better adapt to complex and changing scenarios. The present application can also obtain target segmentation results and associated probability information output at different feature levels respectively, and obtain the main target probability features at different feature levels by fusing the target segmentation results and associated probability information at different feature levels. In this way, the present application can simultaneously utilize the high resolution of shallow features and the rich semantic information of deep features to perform multi-scale fusion of target segmentation results and associated probability information, thereby performing target attribute recognition on the image to be identified based on the main target probability features corresponding to each feature level, and obtaining more accurate attribute recognition results of the main target.

[0042] In one embodiment, both the target segmentation results and the associated probability information correspond to multiple feature levels. For each feature level, the target segmentation results and the associated probability information corresponding to the feature level are fused to obtain the main target probability features corresponding to each feature level. Based on the main target probability features corresponding to each feature level, target attribute recognition is performed on the image to be recognized to obtain the attribute recognition result of the main target.

[0043] Among them, target attribute recognition of the image to be recognized can be achieved by an attribute recognition model, which includes a plurality of feature extraction modules connected in sequence, each of which is responsible for extracting feature information at different levels to achieve in-depth recognition of the target attributes.

[0044] In one embodiment, the feature extraction modules corresponding to each feature level of the attribute recognition model are used to extract features from the input data to obtain the target image features. Among them, the feature extraction modules corresponding to each feature level are connected in sequence, and the input data of the first feature extraction module can be the image to be recognized, or the fusion result of the image to be recognized and the main target probability feature of a feature level, so as to enhance the model's recognition ability of the target. In addition to the first feature extraction module, the input data of the subsequent non-first feature extraction modules are the output data of the previous feature extraction module, so that the attribute recognition model gradually extracts and processes feature information in depth. The output data of the last feature extraction module is used as the target image feature, which integrates all relevant information from the shallow layer to the deep layer, and provides rich input for attribute recognition. It should be noted that among all the feature extraction modules of the attribute recognition model, at least one feature extraction module is used to extract features from the input data based on the main target probability feature of the corresponding feature level, so that the attribute recognition model pays more attention to the main target area in the image to be recognized, and reduces the influence of the non-main target area on the main target attribute recognition.

[0045] The attribute recognition model includes at least one recognition module, such as a target attribute recognition head, which uses the recognition module of the attribute recognition model to perform attribute recognition based on the target image features to obtain the attribute recognition result of the main target. The attribute recognition result includes attribute information such as color, shape, size, brand, etc. of the target.

[0046] Through the technical solution of the present application, the target features of the main target in the image to be identified can be effectively extracted when performing target attribute recognition, effectively solving problems such as multiple targets in one image and mutual occlusion between targets, thereby improving the accuracy and stability of target attribute recognition.

[0047] See also Figure 2 , Figure 2 is a flow chart of another embodiment of the target attribute identification method provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 2 The process sequence shown is limited. Figure 2 As shown, this embodiment includes:

[0048] S201: Obtain the number of targets in the image to be identified.

[0049] Perform target segmentation on the image to be identified to obtain the target segmentation result. Before that, the number of targets in the image to be identified can be obtained first. In response to the number of targets being single, directly perform attribute recognition on the image to be identified to obtain the attribute recognition result; in response to the number of targets being multiple, perform target segmentation on the image to be identified to obtain the target segmentation result, perform target attribute recognition on the image to be identified based on the probability characteristics of the main target, and obtain the attribute recognition result of the main target.

[0050] Specifically, if there is only one target in the image to be identified and there is no interference from other targets on attribute recognition, the attribute recognition can be directly performed on the image to be identified to obtain the attribute recognition result; if the image to be identified includes at least two or more targets, in order to reduce the impact of non-main targets on the recognition results during attribute recognition, the image to be identified needs to be optimized.

[0051] In one embodiment, the method for obtaining the number of targets in the image to be identified may be: using the detection model to perform target center point detection on the image to be identified, obtaining target center point information in the image to be identified, and determining the number of target center points in the image to be identified based on the target center point information as the number of targets. Preferably, based on the existing YOLOv5 framework, a target center point regression detection branch is added to detect the center point of the target in the image to be identified.

[0052] During the detection process, one target center point corresponds to one target. If only one target center point is detected, it means that there is only one target in the image to be identified. In this case, jump to step S205 and directly perform attribute recognition on the image to be identified to obtain an attribute recognition result.

[0053] If multiple target center points are detected, it means that there are multiple targets in the image to be identified. In this case, steps S202-S205 are executed in sequence to further analyze and process the image to be identified to obtain a more accurate attribute recognition result.

[0054] S202: Performing target segmentation on the image to be recognized to obtain segmentation results of multiple targets.

[0055] The image to be identified is input into a pre-trained target segmentation model, and the target segmentation operation is performed to obtain multiple segmentation results corresponding to multiple targets.

[0056] S203: Obtaining association probability information based on the key position of the target in the image to be identified.

[0057] Detect the key positions of the target in the image to be identified, where the number of key positions of the target is not necessarily equal to the number of detected targets, and may be 0, 1, or more. Based on the key positions of the target in the image to be identified, obtain the heat map features corresponding to the key positions, and then obtain the association probability information in the image to be identified. The specific acquisition method can refer to the aforementioned step S120, which will not be repeated here.

[0058] S204: Fusing the target segmentation results and associated probability information of multiple feature levels to obtain the main target probability feature.

[0059] The target segmentation results and associated probability information both correspond to multiple feature levels, and the multiple target segmentation results and associated probability information output by the multiple feature levels are fused to obtain the main target probability features corresponding to each feature level. Based on the main target probability features corresponding to each feature level, target attribute recognition is performed on the image to be recognized to obtain the attribute recognition result of the main target. The specific method for obtaining the main target probability features can refer to the aforementioned step S130, which will not be repeated here.

[0060] S205: Perform target attribute recognition on the image to be recognized to obtain the attribute recognition result of the main target.

[0061] If it is detected in step S201 that there is one target center point in the image to be identified, target attribute recognition is directly performed on the image to be identified to obtain an attribute recognition result of the main target.

[0062] If at least two target center points are detected in the image to be identified in step S201, the target attribute recognition is performed on the image to be identified by combining the target segmentation result and the main target probability feature obtained by fusing the associated probability information, and the attribute recognition result of the main target in the image to be identified is obtained. The specific method of target attribute recognition can refer to the above step S140, which will not be repeated here.

[0063] To better illustrate the target attribute recognition method of this application, the following takes a vehicle as the target and an application scenario of attribute recognition of the vehicle as an example. Figure 3 , Figure 3 This is a flowchart of a specific embodiment of the target attribute recognition method provided by the present application. The following specific embodiments of the target attribute recognition method are provided for exemplary explanation:

[0064] In complex scenes, there are many problems with the vehicle target frame obtained by vehicle target detection based on video images, such as vehicle target occlusion, multiple targets in one frame, etc. Figure 4 As shown, Figure 4 is a schematic diagram of a target detection result provided by this application. There are multiple vehicle targets in the vehicle target frame obtained through target detection. Figure 4The vehicle target frame shown is sent to the vehicle attribute recognition model for attribute recognition. At this time, it is difficult for the model to distinguish which vehicle should be used as the main target in the vehicle target frame for attribute recognition, so that the final vehicle attribute recognition result is very unstable.

[0065] In this embodiment, target detection is performed on the video image to obtain multiple vehicle target frame images. Before vehicle attribute recognition, license plate detection and target center point regression are performed to detect the license plate position in the current vehicle target frame image and determine the existence of the target vehicle.

[0066] For example, see Figure 5 , Figure 5 This is a schematic diagram of a neural network structure provided by this application. A license plate detection and target center point regression module based on a vehicle target frame is provided. This module is based on the existing YOLOv5 framework and adds a license plate detection branch and a target center point regression branch to detect the license plate position and the existing vehicle target center point in the vehicle target frame image. Figure 4 For example, the left image can detect two license plate positions and two vehicle target center points, and the right image can detect one license plate position and two vehicle target center points.

[0067] Determine whether there are multiple target center points in the current vehicle target frame image: If the license plate detection and target center point regression module only detects one vehicle target center point, it means that there is only one target vehicle in the current vehicle target frame image. In the current case, the vehicle target frame image can be directly sent to the vehicle attribute recognition module for attribute recognition; if the license plate detection and target center point regression module detects multiple vehicle target center points, it means that there are multiple target vehicles in the current vehicle target frame image, and subsequent analysis is required to determine the main target in the vehicle target frame image.

[0068] When the license plate detection and target center point regression module detects multiple vehicle target center points, the current vehicle target frame image is sent to the pre-trained vehicle target segmentation module to obtain the result of vehicle target instance segmentation, which is recorded as F. Among them, the pixel value of the corresponding pixel point of the vehicle target is 1, and the remaining pixel values ​​(other vehicles and background except the current vehicle target) are all 0. If there are n vehicles (n≥2) in the current vehicle target frame image, the feature dimension of F is n*224*224.

[0069] The vehicle target segmentation result is sent to the license plate position and vehicle segmentation combination module to obtain the license plate position coordinates detected by the license plate detection and target center point regression module in the current vehicle target frame image, and the license plate position center point (x1, y1) is calculated. The probability of each point in the vehicle target frame image belonging to the vehicle target corresponding to the license plate is obtained through the following Gaussian kernel formula (1).

[0070] (1)

[0071] Among them, (x, y) is the coordinate position of each pixel in the vehicle target frame image, and σ is a free parameter, which is the width parameter of the function and affects the size and distribution of each point in the generated Gaussian heat map. When the coordinate position and the center point of the license plate position are close to coincide, the Gaussian kernel output value is close to 1; when the coordinate position and the center point of the license plate position are very different, the Gaussian kernel output value is close to 0.

[0072] The license plate Gaussian heat map feature obtained above is denoted as P. If there are m license plates in the vehicle target frame image, the feature dimension of P is m*224*224.

[0073] Based on the following formula (2), the vehicle target segmentation feature F and the license plate Gaussian heat map feature P are fused to obtain the vehicle main target probability feature: Q 1. It can be seen that when there is a license plate on a vehicle and the larger the proportion of vehicles, the greater the probability that the vehicle area is the main target.

[0074] (2)

[0075] Furthermore, based on the vehicle target segmentation features F and the license plate Gaussian heat map features P obtained at different feature levels, the corresponding vehicle main target probability features at different feature levels are obtained, which are recorded as For example, based on the vehicle target segmentation features F and the license plate Gaussian heat map features P obtained at least five feature levels, the vehicle main target probability features outputted at at least five feature levels are obtained. Q 0- Q 4.

[0076] The main target probability features of vehicles at different feature levels are fed into the vehicle attribute recognition model. The main target probabilities of vehicles and vehicle features at different levels are combined to capture multi-scale information from shallow to deep layers, optimize the final extracted vehicle attribute features, and thus improve the accuracy of vehicle attribute recognition.

[0077] For example, see Figure 6 , Figure 6 This is a schematic diagram of the structure of a vehicle attribute recognition model provided by this application. The input data of the first feature extraction module is the vehicle main target probability feature Q 0 and the fusion result of the vehicle target frame image or the vehicle target frame image. The input data of the subsequent feature extraction module of the attribute recognition model can be the output data of the previous stage (Stage) and the main target probability feature of the corresponding feature level. Q 0- Q4, where the corresponding feature level can be understood as the input vehicle target frame image and the main target probability feature map have the same resolution. The last stage is Figure 6 The output data of Stage 5 in the process is the vehicle target frame image features, and the vehicle attribute recognition head is used to further extract and recognize the specific attributes of the vehicle, such as the color, type, and brand of the vehicle.

[0078] In this embodiment, a vehicle attribute recognition method in complex scenes is proposed, including a license plate detection and target center point regression module, a vehicle main target probability feature extraction module and a vehicle attribute recognition module. Through the processing of the above modules, the features of the main target vehicle in the vehicle target frame image can be effectively extracted, and the vehicle attribute recognition result can be improved, thereby effectively solving the problems of multiple vehicles in one frame and mutual occlusion of targets in complex scenes, and improving the accuracy and stability of vehicle attribute recognition.

[0079] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of an electronic device provided in the present application. The electronic device 60 includes a memory 61 and a processor 62 connected to each other. The memory 61 is used to store a computer program. When the computer program is executed by the processor 62, it is used to implement the target attribute recognition method in the above embodiment.

[0080] The above-mentioned method is an embodiment, which can exist in the form of a computer program. Therefore, the present application proposes a computer-readable storage medium. Figure 8 , Figure 8 It is a schematic diagram of the structure of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 80 is used to store a computer program 81, which can be executed to implement the target attribute recognition method in the above embodiment.

[0081] The computer-readable storage medium 80 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which may store program codes.

[0082] The above description is only an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A target attribute recognition method, characterized in that: The method comprises: Performing target segmentation on the image to be identified to obtain a target segmentation result, wherein the image to be identified includes at least one target; and Based on the key position of the target in the image to be identified, association probability information is obtained, wherein the association probability information includes a first probability that different pixel points in the image to be identified belong to the target corresponding to the key position, wherein the key position of the target is a preset position point in a preset component of the target, the preset component is a part of the target with a specific function or feature, the preset position point refers to a specific position defined in the preset component, and the specific position is selected according to the geometric features or functions of the target; Fusion of the target segmentation result and the association probability information to obtain a main target probability feature, wherein the main target probability feature includes a second probability that different pixels in the image to be identified belong to the main target in the at least one target; Based on the main target probability feature, target attribute recognition is performed on the image to be recognized to obtain an attribute recognition result of the main target.

2. The method according to claim 1, characterized in that The obtaining of association probability information based on the key position of the target in the image to be identified includes: The first probability between each pixel point in the image to be identified and the key position is calculated through a mathematical model of a Gaussian kernel to obtain the association probability information, wherein the first probability is negatively correlated with the distance between the pixel point and the key position.

3. The method according to claim 1, characterized in that The target segmentation result includes target segmentation features corresponding to each target, and the value of each feature element in the target segmentation feature is used to represent whether each pixel in the image to be identified belongs to the corresponding target; the image to be identified contains at least one key position, and the association probability information includes heat map features corresponding to each key position, and the value of each feature element in the heat map feature represents the first probability between each pixel in the image to be identified and the corresponding key position; The fusing of the target segmentation result and the associated probability information to obtain the main target probability feature includes: The target segmentation features corresponding to each of the targets and the heat map features corresponding to each of the key positions are fused to obtain the main target probability feature; wherein the value of each feature element in the main target probability feature is positively correlated with the value of the corresponding feature element in the target segmentation feature and the heat map feature.

4. The method according to claim 3, characterized in that The fusion of the target segmentation features corresponding to each of the targets and the heat map features corresponding to each of the key positions to obtain the main target probability features includes: The target segmentation features corresponding to each of the targets and the heat map features corresponding to each of the key positions are respectively combined into a plurality of feature pairs; The main target probability feature is obtained by using the dot product results of each group of the feature pairs, wherein the value of each feature element in the main target probability feature is equal to the sum of the values ​​of the corresponding feature elements in each of the dot product results.

5. The method according to claim 1, characterized in that The target segmentation result and the association probability information both correspond to multiple feature levels; The fusing of the target segmentation result and the associated probability information to obtain the main target probability feature includes: For each of the feature levels, the target segmentation result and the associated probability information corresponding to the feature level are integrated to obtain the main target probability feature corresponding to the feature level; The step of performing target attribute recognition on the image to be recognized based on the main target probability feature to obtain the attribute recognition result of the main target includes: Based on the main target probability features corresponding to each of the feature levels, target attribute recognition is performed on the image to be recognized to obtain an attribute recognition result of the main target.

6. The method according to claim 5, characterized in that The target attribute recognition of the image to be recognized is realized by an attribute recognition model, and the attribute recognition model includes a plurality of feature extraction modules connected in sequence; The target attribute recognition is performed on the image to be recognized based on the main target probability features corresponding to each of the feature levels to obtain the attribute recognition result of the main target, including: The feature extraction modules corresponding to each feature level of the attribute recognition model are used to extract features from the input data to obtain target image features; wherein the feature extraction modules corresponding to each feature level are connected in sequence, the input data of the first feature extraction module is the image to be identified, or the fusion result of the image to be identified and the main target probability feature of one feature level, the input data of the feature extraction module other than the first one is the output data of the previous feature extraction module, and the output data of the last feature extraction module is used as the target image feature, and at least one feature extraction module is used to extract features from the input data based on the main target probability feature of the corresponding feature level; The recognition module of the attribute recognition model is used to perform attribute recognition based on the target image features to obtain an attribute recognition result of the main target.

7. The method according to claim 1, characterized in that The key position is a preset position point in a preset component of the target; Before obtaining the association probability information based on the key position of the target in the image to be identified, the method includes: Performing component detection on the image to be identified by using a detection model to obtain position information of the preset component in the image to be identified; The key position is determined based on the position information of the preset component.

8. The method according to claim 1, characterized in that Before performing target segmentation on the image to be identified and obtaining the target segmentation result, the method further includes: Obtaining the number of targets in the image to be identified; In response to the number of the target being a single object, directly performing attribute recognition on the image to be recognized to obtain the attribute recognition result; In response to the number of targets being multiple, the step of performing target segmentation on the image to be identified to obtain the target segmentation result and performing target attribute recognition on the image to be identified based on the main target probability feature to obtain the attribute recognition result of the main target is performed.

9. The method according to claim 8, characterized in that The obtaining the number of targets in the image to be identified includes: Using the detection model to perform target center point detection on the image to be identified, to obtain target center point information in the image to be identified; Based on the target center point information, the number of target center points in the image to be identified is determined as the number of targets.

10. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the processor is coupled to the memory, and the processor is configured to execute one or more steps of the target attribute recognition method according to any one of claims 1 to 9 based on instructions stored in the memory.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the target attribute recognition method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • MSER license plate positioning method and system based on visual saliency detection

    CN111027544A

  • Image processing method and device, electronic equipment and storage medium

    CN114549281A