Target attribute recognition method, electronic device and computer-readable storage medium
By acquiring and analyzing the scheduling interval status, motion information status and quality information status in the video frame, determining the recognition priority of the target and performing attribute recognition, the problem of difficulty in realizing the full range of target attribute recognition in the prior art is solved, and the accuracy and comprehensiveness of the recognition are improved.
Patent Information
- Application Number
- CN202411867719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The prior art is difficult to achieve the identification of the attributes of the targets within the entire range while ensuring the recognition accuracy, especially in scenarios where there are many targets.
By obtaining the scheduling interval status, motion information status and quality information status in the current frame, the target identification priority is determined, and the target to be identified is selected according to the priority, the identified attributes of the current frame and the historical frame are fused to obtain the target's attribute identification results.
It improves the accuracy and comprehensiveness of target attribute recognition, ensures that the attribute recognition effect of high-priority targets under limited processing resources, and achieves real-time and high-precision attribute recognition results.
Smart Images

Figure CN119313994B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a target attribute recognition method, an electronic device, and a computer-readable storage medium. Background Art
[0002] As the demand for image recognition continues to increase, for video frames collected in scenes with many targets, in addition to identifying the attributes of some targets of interest in the video frames, it is also required to obtain as many attributes as possible for the targets in the entire range. However, the performance of the front-end equipment for collecting video frames is limited, and it is difficult to achieve attribute recognition of targets in the entire range while ensuring recognition accuracy. In view of this, how to improve the accuracy and comprehensiveness of target attribute recognition has become an urgent problem to be solved. Summary of the invention
[0003] The main technical problem solved by the present application is to provide a target attribute recognition method, an electronic device and a computer-readable storage medium, which can improve the accuracy and comprehensiveness of target attribute recognition.
[0004] To solve the above technical problems, the first aspect of the present application provides a target attribute recognition method, including: obtaining a current frame, determining a scheduling interval state matched by the current frame and a motion information state and a quality information state matched by the target in the current frame; wherein the scheduling interval state includes attributes that are preferentially recognized in the current frame, and the dependency conditions of some attributes among a plurality of attributes to be recognized are targets moving in the video frame, and the dependency conditions of some attributes are the image quality of the target in the video frame; based on the scheduling interval state, the motion information state and the quality information state, determining the recognition priority corresponding to the target in the current frame, and selecting at least some targets in the current frame as targets to be recognized according to the recognition priority; obtaining the attributes of the target to be recognized, and obtaining attribute recognition results of at least some targets in the current frame based on the attributes recognized in the current frame and the attributes recognized in at least some historical frames before the current frame.
[0005] To solve the above technical problems, the second aspect of the present application provides an electronic device, which includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method described in the first aspect.
[0006] In order to solve the above technical problem, the third aspect of the present application provides a computer-readable storage medium on which program data is stored. When the program data is executed by a processor, the method described in the first aspect is implemented.
[0007] The above scheme obtains the current frame, determines the scheduling interval state matched by the current frame, and determines the motion information state and quality information state matched by the target in the current frame, wherein the target corresponds to multiple attributes to be identified, the scheduling interval state includes the attributes to be identified first in the current frame, the dependency conditions of some attributes among the multiple attributes to be identified are the target moving in the video frame, and the dependency conditions of some attributes are the image quality of the target in the video frame, that is, some attributes are more sensitive to motion information, and some attributes are more sensitive to quality information. Based on the dependency conditions corresponding to the attributes to be identified first indicated by the scheduling interval state, and the motion information state and quality information state corresponding to the target in the video frame, the targets in the video frame are prioritized, and the recognition priority corresponding to the target in the current frame is determined, so that for attributes with different dependency conditions, a more reasonable recognition priority can be adaptively configured, and at least some targets in the current frame are selected as targets to be identified according to the recognition priority, so that limited processing resources can give priority to the identification of high-priority targets, thereby improving the accuracy of the corresponding attributes when being identified. The attributes of the target to be identified in the current frame are obtained, and the attributes that have been identified in the current frame are merged with the attributes that have been identified in at least part of the historical frames before the current frame to obtain the attribute recognition results of at least part of the target in the current frame, so that the attribute recognition results corresponding to as many targets as possible can be obtained in the current frame, ensuring the comprehensiveness of the targets that can obtain the attribute recognition results in real time, and the attributes in the attribute recognition results have high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] 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:
[0009] Figure 1 It is a flowchart of an implementation method of the target attribute identification method of the present application;
[0010] Figure 2 It is a flowchart of another implementation method of the target attribute identification method of the present application;
[0011] Figure 3 This is a schematic diagram of an application scenario of an implementation method of scheduling interval state 1 of the present application;
[0012] Figure 4 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0013] Figure 5 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different implementation methods can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0015] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0016] The target attribute recognition method provided in this application is used to obtain the attributes corresponding to the targets in the full range of the image / video frame, and the corresponding execution subject is a processing unit capable of image processing. Among them, the targets can correspond to multiple types in different scenarios. For example, in a road scenario, the targets can include at least non-motor vehicles and motor vehicles. This application does not make specific restrictions on this. For the sake of convenience, this application takes a motor vehicle with richer attributes as an example to specifically explain the scheme of this application.
[0017] See also Figure 1 , Figure 1 : is a flow chart of an implementation method of a target attribute recognition method of the present application, the method comprising:
[0018] S101: Acquire the current frame, determine the scheduling interval state of the current frame match and the motion information state and quality information state of the target match in the current frame; wherein the scheduling interval state includes the attributes that are preferentially identified in the current frame, and the dependency conditions of some attributes among the multiple attributes to be identified are the moving targets in the video frame, and the dependency conditions of some attributes are the image quality of the target in the video frame.
[0019] Specifically, the current frame is obtained, the scheduling interval state of the current frame matching is determined, and the motion information state and quality information state of the target matching in the current frame are determined, wherein the target corresponds to multiple attributes to be identified, and the scheduling interval state includes the attributes that are preferentially identified in the current frame.
[0020] It should be noted that among the multiple attributes to be identified, the dependent conditions of some attributes are the moving targets in the video frame, and the dependent conditions of some attributes are the image quality of the targets in the video frame. That is to say, some attributes are more sensitive to motion information, and some attributes are more sensitive to quality information.
[0021] In some implementation scenarios, the current frame is obtained, and the scheduling interval status of the current frame matching is determined, wherein the scheduling interval status is set based on a preset periodic cycle, each video frame corresponds to a priority identification attribute, all targets in the current frame are obtained, and the motion information status of the target matching is determined based on the position change of each target in the current frame compared to the historical frame, and the quality information status of the target matching is determined based on the image area corresponding to each target in the current frame.
[0022] In some implementation scenarios, the current frame is obtained, and a scheduling interval state of the current frame matching is determined, wherein the scheduling interval state is set based on a Group of Picture (GOP) loop, and each video frame corresponds to a priority identification attribute, and the moving target and the static target in the current frame are obtained, and matching motion information states are set for the moving target and the static target, and target frames corresponding to the moving target and the static target are extracted, and based on the position and occlusion rate of the target frame, the quality information state of the target matching is determined.
[0023] S102: Determine the recognition priority corresponding to the target in the current frame based on the scheduling interval state, the motion information state and the quality information state, and select at least part of the targets in the current frame as targets to be recognized according to the recognition priority.
[0024] Specifically, based on the dependency conditions corresponding to the priority identification attributes indicated by the scheduling interval status, and the motion information status and quality information status corresponding to the targets in the video frames, the targets in the video frames are prioritized to determine the identification priority corresponding to the targets in the current frame.
[0025] It can be understood that for attributes with different dependent conditions, a more reasonable recognition priority can be adaptively configured, and at least part of the targets in the current frame can be selected as targets to be identified according to the recognition priority, so that limited processing resources can give priority to high-priority targets for attribute identification, thereby improving the accuracy of identifying the corresponding attributes.
[0026] In some implementation scenarios, the dependency condition corresponding to the attribute for priority recognition indicated in response to the scheduling interval status indication is the target in motion in the video frame, and the targets in the current frame are traversed in the order of motion information state and quality information state, and the corresponding recognition priority is set for the target based on the motion information state and quality information state of each target; the dependency condition corresponding to the attribute for priority recognition indicated in response to the scheduling interval status indication is the image quality of the target in the video frame, and the targets in the current frame are traversed in the order of quality information state and motion information state, and the corresponding recognition priority is set for the target based on the quality information state and motion information state of each target. According to the order of recognition priority, at least part of the targets are extracted from the current frame as the targets to be recognized, wherein, due to the difference in resource consumption between recognizing the attributes sensitive to motion information and recognizing the attributes sensitive to quality information, the number of targets to be recognized is adapted to the dependency condition.
[0027] In some implementation scenarios, based on the scheduling interval state, the motion information state, and the quality information state, the targets in the current frame are divided into a high-priority target set and a low-priority target set, wherein the recognition priority of the targets in the high-priority target set is higher than the recognition priority of the targets in the low-priority target set. It is determined whether the number of targets in the high-priority target set reaches a preset number. If so, a preset number of targets are obtained from the high-priority target set as targets to be recognized. If not, all targets in the high-priority target set are used as targets to be recognized, and at least some of the targets in the low-priority target set are used to supplement the total number of targets to be recognized to the preset number, or all targets in the low-priority target set are used as targets to be recognized, and the number of targets to be recognized does not reach the preset number.
[0028] Optionally, the target in the current frame is configured with an event frame state based on whether a preset event type is triggered, wherein the event frame state has a higher priority than the motion information state and the quality information state.
[0029] For ease of explanation, taking the event type of prohibiting trucks from passing as an example, if the targets in the current frame include trucks, the event frame status that matches the truck target is yes, and the event frame status that matches other non-truck targets is no, so that the attributes of the targets that trigger the event type are identified with a higher priority, and the attribute identification results of the targets are obtained as soon as possible.
[0030] S103: Acquire attributes of the target to be identified, and obtain attribute recognition results of at least part of the target in the current frame based on the attributes identified in the current frame and the attributes identified in at least part of the historical frames before the current frame.
[0031] Specifically, the attributes of the target to be identified in the current frame are obtained, and the identified attributes in the current frame are merged with the identified attributes in at least some historical frames before the current frame to obtain the attribute recognition results of at least some targets in the current frame, so that the attribute recognition results corresponding to as many targets as possible can be obtained in the current frame, ensuring the comprehensiveness of the targets for which the attribute recognition results can be obtained in real time, and the attributes in the attribute recognition results have high accuracy.
[0032] In some implementation scenarios, the target to be identified has a corresponding attribute recognition task, the attribute recognition task indicates that there are attributes that need to be recognized for the target to be identified in the current frame, the attribute recognition task is executed to obtain the attributes of the target to be identified, other attributes of the target to be identified that are not recognized in the current frame are determined, other attributes of the target to be identified that are not obtained in the current frame are obtained from historical frames before the current frame, and recognized attributes of other targets other than the target to be identified are obtained from historical frames, and based on the acquired attributes, the attribute recognition results of at least some targets in the current frame are determined.
[0033] In some implementation scenarios, the attributes of the target to be identified that need to be identified first in the current frame are obtained, the target identifier of the target to be identified is determined, and based on the target identifier, a set of identified attributes of the target that matches the identifier is indexed from the identified attributes corresponding to the cached historical frames. The attribute set is updated using the attributes of the target to be identified that need to be identified first in the current frame to obtain attribute identification results for at least part of the target in the current frame.
[0034] It should be noted that the scheduling interval state is set according to the video frame cycle within a preset period, wherein each video frame corresponds to a priority identification attribute, and among multiple video frames arranged continuously within the preset period, any video frame has a frame number interval compared to the nearest video frame with different dependency conditions, and the frame number interval is less than the frame number threshold.
[0035] Optionally, the number of cached historical frames is consistent with the number of video frames within a preset period of the scheduling interval state, or the number of cached historical frames is positively correlated with the average number of targets in the video frames within the preset period, thereby increasing the probability of being able to obtain attribute recognition results of all targets in the entire range of the video frames from the historical frames. The above scheme obtains the current frame, determines the scheduling interval state that matches the current frame, and determines the motion information state and quality information state that matches the target in the current frame, wherein the target corresponds to a plurality of attributes to be identified, the scheduling interval state includes the attributes that are preferentially identified in the current frame, and the dependency conditions of some of the multiple attributes to be identified are the moving targets in the video frame, and the dependency conditions of some of the attributes are the image quality of the target in the video frame, that is, some attributes are more sensitive to motion information, and some attributes are more sensitive to quality information. Based on the dependency conditions corresponding to the attributes to be recognized with priority indicated by the scheduling interval status, and the motion information status and quality information status corresponding to the targets in the video frame, the targets in the video frame are prioritized, and the recognition priority corresponding to the targets in the current frame is determined, so that for the attributes with different dependency conditions, a more reasonable recognition priority can be adaptively configured, and at least part of the targets in the current frame are selected as the targets to be recognized according to the recognition priority, so that limited processing resources can give priority to the recognition of the attributes of high-priority targets, and improve the accuracy of the corresponding attributes when being recognized. The attributes of the targets to be recognized in the current frame are obtained, and the attributes recognized in the current frame are merged with the attributes recognized in at least part of the historical frames before the current frame to obtain the attribute recognition results of at least part of the targets in the current frame, so that the attribute recognition results corresponding to as many targets as possible can be obtained in the current frame, and the comprehensiveness of the targets that can obtain the attribute recognition results in real time is guaranteed, and the attributes in the attribute recognition results have high accuracy.
[0036] See also Figure 2 , Figure 2 : is a flow chart of another embodiment of the target attribute identification method of the present application, the method comprising:
[0037] S201: Acquire the current frame, determine the scheduling interval state of the current frame match and the motion information state and quality information state of the target match in the current frame; wherein the scheduling interval state includes the attributes that are preferentially identified in the current frame, and the dependency conditions of some attributes among the multiple attributes to be identified are the moving targets in the video frame, and the dependency conditions of some attributes are the image quality of the target in the video frame.
[0038] Specifically, the current frame is obtained, the scheduling interval state of the current frame matching is determined, and the motion information state and quality information state of the target matching in the current frame are determined, wherein the target corresponds to multiple attributes to be identified, and the scheduling interval state includes the attributes that are preferentially identified in the current frame. Among the multiple attributes to be identified, the dependency conditions of some attributes are the moving targets in the video frame, and the dependency conditions of some attributes are the image quality of the target in the video frame.
[0039] It should be noted that the scheduling interval state is set according to the video frame cycle within a preset period, wherein each video frame corresponds to a priority identification attribute, and among multiple video frames arranged continuously within the preset period, any video frame has a frame number interval compared to the nearest video frame with different dependency conditions, and the frame number interval is less than the frame number threshold.
[0040] Specifically, the scheduling interval state sets the attributes for priority recognition in the video frame according to a preset period, thereby realizing the repetition of the scheduling interval state, wherein, for a plurality of video frames arranged continuously within the preset period, the corresponding frame number interval between any two closest video frames with different dependency conditions is less than the frame number threshold, so that when the attributes for priority recognition are determined according to the scheduling interval state and attribute recognition is performed, the time and resource consumption of attribute recognition can be more balanced, thereby improving the recognition efficiency.
[0041] For illustration purposes, see Figure 3 , Figure 3 This is a schematic diagram of the application scenario of the scheduling interval state of the present application. Taking the preset period of the scheduling interval state and the frame rate matching as an example, assuming that 12 video frames are transmitted per second, and the target to be identified in the video frame is a motor vehicle, wherein the dependent condition is that the attributes of the moving target in the video frame correspond to the key points, and the dependent condition is that the attributes of the image quality of the target in the video frame correspond to the license plate, car color and car logo. Figure 3 As shown, license plates are prioritized for identification on the 1st, 3rd, 5th, 8th, and 10th frames, key points are prioritized for identification on the 2nd, 4th, 7th, 9th, and 11th frames, vehicle color is prioritized for identification on the 6th frame, and vehicle logo and model are prioritized for identification on the 12th frame. The corresponding frame number interval between any two closest video frames with different dependency conditions is less than 2. In other specific implementation scenarios, the attributes in the scheduling interval state and the frame number threshold can be set to match the specific scenario, and this application does not impose specific restrictions on this.
[0042] S202: Determine the recognition priority corresponding to the target in the current frame based on the event frame status, scheduling interval status, motion information status and quality information status; wherein the reference order of the motion information status and the quality information status when determining the recognition priority is adapted to the dependency conditions corresponding to the attributes to be recognized preferentially in the current frame.
[0043] Specifically, the target in the current frame is configured with an event frame status based on whether a preset event type is triggered. Based on the event frame status, the dependency conditions corresponding to the priority identification attributes indicated by the scheduling interval status, and the motion information status and quality information status corresponding to the target in the video frame, the targets in the video frame are prioritized to determine the identification priority corresponding to the target in the current frame.
[0044] It can be understood that in the process of determining the recognition priority, the event frame status, scheduling interval status, motion information status and quality information status have corresponding reference orders, among which the event frame status has the highest order, so as to identify the attributes of the target that triggers the event type as quickly as possible.
[0045] Furthermore, the reference order of the motion information state and the quality information state when determining the recognition priority is adapted to the dependency condition corresponding to the attribute that is preferentially recognized in the current frame. That is, if the dependency condition corresponding to the attribute that is preferentially recognized in the current frame is a moving target in the video frame, the motion information state is sorted before the quality status information; if the dependency condition corresponding to the attribute that is preferentially recognized in the current frame is the image quality of the target in the video frame, the quality information state is sorted before the motion information state. This allows a more accurate recognition priority to be set for the target when it is necessary to identify attributes of different dependency conditions corresponding to the target.
[0046] In some implementation scenarios, the motion information state includes a heading angle change state, a deformation state and a motion state; wherein the heading angle change state is related to the amplitude of the heading angle change of the target, the deformation state is related to the change in the aspect ratio of the target, and the motion state is related to the position change of the target in adjacent video frames; the quality information state includes an occlusion state, an area relationship state, a coordinate change state and a boundary state; the occlusion state is related to the overlap rate between the target frame and other target frames, the area relationship state is related to whether the target is in a specified area, the coordinate change state is related to the amplitude of the change of the target in the direction of a preset coordinate axis, and the boundary state is related to whether the target frame of the target appears completely in the video frame for the first time, and the distance between the target frame and the boundary of the video frame.
[0047] Specifically, the motion information state includes the heading angle change state, the deformation state and the motion state, that is, the motion information state includes a variety of specific states related to the motion information of the target, and the quality information state includes the occlusion state, the area relationship state, the coordinate change state and the boundary state, that is, the quality information state includes a variety of specific states related to the image quality of the target, thereby providing a more refined sorting basis for the target recognition priority sorting and improving the accuracy of the recognition priority.
[0048] Optionally, the heading angle of the target includes multiple preset directions, for example: up, upper right, right, lower right, down, lower left, left, and upper left, a total of 8 directions. If the heading angle changes more than two adjacent states, the target heading angle change state is output as "yes", otherwise it is "no".
[0049] Optionally, the aspect ratio of the first appearance of the cache target is cached, and the difference between the target aspect ratio and the cache in subsequent video frames is calculated. If it is greater than a threshold, the deformation state is "yes" and the current aspect ratio is updated to the cache, otherwise it is "no".
[0050] Optionally, the intersection-and-union ratio between the target frame in the current frame of the target and the target frame of the target in the previous frame is obtained. If it is greater than a threshold, the motion state of the target is "yes", otherwise it is "no".
[0051] Optionally, the ratio of the area of the target frame blocked by the target in the current frame to the entire target frame is obtained. If it is greater than a threshold, the blocking state of the target is "yes", otherwise it is "no".
[0052] Optionally, it is determined whether the target is in a specified area in the target frame of the current frame. If so, the area relationship state of the target is "yes", otherwise it is "no".
[0053] Optionally, the target frame of the cached target when it first appears has a preset coordinate value of the coordinate axis in the image coordinate system, wherein the image coordinate system usually takes the upper left corner as the origin, the horizontal direction as the horizontal axis, the vertical direction as the vertical axis, and the preset coordinate axis as the vertical axis. Then, as time goes by, if the vertical axis coordinate value of the target frame increases by more than a preset proportion of the image height, the coordinate change state of the target is output as "yes", until the target is attributed, then the current cached target frame vertical axis coordinate value is updated to the current target frame vertical axis coordinate value, and the coordinate change state of the target is output as "no". Among them, when the acquisition device is fixed in position, the increase in the vertical axis coordinate value corresponds to the target moving in a direction close to the acquisition device, so that a higher quality image area of the target can be obtained.
[0054] Optionally, the boundary state may specifically correspond to a first boundary state and a boundary feedback state. When the target appears completely at a boundary of the image for the first time, the first boundary state is set to "yes" until the target is attribute-recognized, and the first boundary state is set to "no". When the upper, lower, left or right boundary of the target box is lower than the ratio threshold of the image height than the upper, lower, left or right boundary of the image, the boundary feedback state of the target is output as "yes", otherwise it is "no".
[0055] It should be noted that how to set each specific state can be based on the specific scenario and can be set using other feasible solutions according to the setting basis given in this application. This application only provides reference examples.
[0056] In a specific implementation scenario, when the dependency condition corresponding to the attribute to be identified is a moving target in a video frame, the recognition priority corresponding to the target in the current frame is determined based on the event frame status, scheduling interval status, motion information status, and quality information status, including: determining the recognition priority corresponding to the target in the current frame based on the order of the event frame status, scheduling interval status, heading angle change status, deformation status, motion status, occlusion status, regional relationship status, and boundary status.
[0057] Specifically, for attributes that are more sensitive to motion information, the targets in the current frame are traversed according to the order of event frame status, scheduling interval status, heading angle change status, deformation status, motion status, occlusion status, regional relationship status and boundary status as a reference order, and the recognition priority corresponding to the targets in the current frame is determined and sorted, so as to obtain the recognition priority corresponding to the targets in a more detailed manner.
[0058] Optionally, for attributes that are more sensitive to motion information, the reference order for determining recognition priority is: event frame status "Yes" > scheduling interval status "Yes" > heading angle change status "Yes" > deformation status "Yes" > motion status "Yes" > occlusion status "No" > region relationship status "Yes" > first boundary status "Yes", thereby dividing the priority of the target layer by layer according to a variety of specific statuses to obtain accurate recognition priority.
[0059] In a specific implementation scenario, when the dependent condition corresponding to the attribute to be identified is the image quality of the target in the video frame, the identification priority corresponding to the target in the current frame is determined based on the event frame status, scheduling interval status, motion information status and quality information status, including: determining the identification priority corresponding to the target in the current frame based on the order of the event frame status, scheduling interval status, occlusion status, area relationship status, coordinate change status, boundary status, deformation status and motion status.
[0060] Specifically, for attributes that are more sensitive to quality information, the targets in the current frame are traversed according to the order of event frame status, scheduling interval status, occlusion status, regional relationship status, coordinate change status, boundary status, deformation status and motion status as a reference order, and the recognition priority corresponding to the targets in the current frame is determined and sorted, so as to obtain the recognition priority corresponding to the targets in a more detailed manner.
[0061] Optionally, for attributes that are more sensitive to quality information, the reference order for determining recognition priority is: event frame status "Yes" > scheduling interval status "Yes" > occlusion status "No" > region relationship status "Yes" > coordinate change status "Yes" > first boundary status "Yes" and boundary feedback status "No" > deformation status "Yes" > motion status "Yes", thereby dividing the priority of the target layer by layer according to a variety of specific states to obtain accurate recognition priority.
[0062] S203: selecting at least part of the targets in the current frame as targets to be identified according to the identification priority, and generating attribute identification tasks corresponding to the targets to be identified.
[0063] Specifically, at least some of the targets are selected from all the targets in the current frame as targets to be identified according to their identification priorities, and corresponding attribute identification tasks are generated for the targets to be identified, thereby accurately indicating the attributes that need to be identified for the targets to be identified.
[0064] In some implementation scenarios, all targets in the current frame are divided into a high-priority target set and a low-priority target set according to recognition priority; at least one target is obtained from the high-priority target set as a target to be recognized, and a preset number of attribute recognition tasks are generated based on the target to be recognized; wherein the preset number is adapted to the dependency conditions corresponding to the attributes to be recognized preferentially in the current frame.
[0065] Specifically, all targets in the current frame are classified into two categories according to the recognition priority, and all targets in the current frame are divided into a high-priority target set and a low-priority target set, thereby completing a preliminary screening of all targets in the current frame.
[0066] Furthermore, at least one target is obtained from a high-priority target set as a target to be identified, and a preset number of attribute recognition tasks are generated based on the target to be identified. Since there is a difference in resource consumption between identifying attributes that are sensitive to motion information and identifying attributes that are sensitive to quality information, the preset number is adapted to the dependency conditions corresponding to the attributes that are prioritized for identification in the current frame, so that the resource consumption when performing attribute recognition in each video frame is more balanced, thereby improving the accuracy of attribute recognition in each video frame.
[0067] It can be understood that when the number of targets in the high-priority target set reaches a preset number, a preset number of targets ranked at the top are selected from the high-priority target set as targets to be identified, attribute recognition tasks are generated for the preset number of targets to be identified, and the attribute recognition tasks indicate the identification of the attributes that are preferentially identified in the current frame. When the number of targets in the high-priority target set does not reach the preset number, and the total number of targets in the current frame reaches the preset number, all targets in the high-priority target set and at least part of the targets ranked at the top in the low-priority target set are extracted to obtain a total of a preset number of targets as targets to be identified, and attribute recognition tasks are generated for the preset number of targets to be identified, and the attribute recognition tasks indicate the identification of the attributes that are preferentially identified in the current frame.
[0068] It should be noted that when the total number of targets in the current frame does not reach the preset number, all targets in the current frame are regarded as targets to be identified, and at least one attribute recognition task is configured for each target to be identified, wherein the attribute recognition task corresponding to each target to be identified includes identifying the attributes that are preferentially recognized in the current frame, and at least some of the targets to be identified correspond to multiple attribute recognition tasks, which are used to indicate the recognition of other attributes except the attributes that are preferentially recognized in the current frame, thereby improving the efficiency of attribute recognition.
[0069] S204: Acquire attributes of the target to be identified, and obtain attribute recognition results of at least part of the target in the current frame based on the attributes identified in the current frame and the attributes identified in at least part of the historical frames before the current frame.
[0070] Specifically, the attributes of the target to be identified in the current frame are obtained, and the identified attributes in the current frame are merged with the identified attributes in at least part of the historical frames before the current frame to obtain the attribute recognition result of at least part of the target in the current frame.
[0071] In some implementation scenarios, the target is matched with a target identifier, and the target identifier corresponding to the target in the current frame corresponds to the identifier to be matched; the attributes of the target to be identified are obtained, and based on the attributes identified in the current frame and the attributes identified in at least part of the historical frames before the current frame, the attribute recognition results of at least part of the target in the current frame are obtained, including: obtaining the attributes of the target to be identified in the current frame, and obtaining the identified attributes of the target corresponding to the identifier to be matched from at least part of the cached historical frames; based on all the acquired identified attributes, the attribute recognition results of at least part of the target in the current frame are obtained.
[0072] Specifically, the target in the video frame is matched with a target identifier during identification, and the target identifier corresponding to the target in the current frame is the identifier to be matched. The attributes that can be identified by the attribute recognition task matching the target to be identified in the current frame are obtained, and the identified attributes of the target corresponding to the identifier to be matched are obtained from the cached historical frames, so as to ensure the accuracy of attribute retrieval through identifier matching, and then improve other attributes of the target to be identified, and at the same time improve the attributes corresponding to the target that has not been identified in the current frame.
[0073] Furthermore, all the acquired identified attributes are integrated to generate attribute recognition results for at least part of the targets in the current frame. The number of targets with identified attributes in the current frame and the cached historical frames is the number of targets for which attribute recognition results can be obtained, and finally attribute recognition results corresponding to as many targets as possible in the entire range of the current frame are obtained.
[0074] Optionally, the number of cached historical frames is the same as the number of video frames within a preset period of the scheduling interval state, or the number of cached historical frames is greater than the number of video frames within the preset period of the scheduling interval state.
[0075] In this embodiment, the target in the current frame is configured with an event frame state based on whether a preset event type is triggered. Based on the event frame state, the dependency conditions corresponding to the priority attributes indicated by the scheduling interval state, and the motion information state and quality information state corresponding to the target in the video frame, the targets in the video frame are prioritized, the recognition priority corresponding to the target in the current frame is determined, at least some targets are selected from all targets in the current frame as targets to be recognized according to the recognition priority of the targets, and corresponding attribute recognition tasks are generated for the targets to be recognized, thereby accurately indicating the attributes that need to be recognized for the targets to be recognized, and the resource consumption when performing attribute recognition in each video frame is relatively balanced, thereby improving the accuracy of attribute recognition in each video frame. The attributes of the target to be recognized in the current frame are obtained, and the attributes that have been recognized in the current frame are merged with the attributes that have been recognized in at least some historical frames before the current frame, and finally the attribute recognition results corresponding to as many targets as possible in the full range of the current frame are obtained.
[0076] See also Figure 4 , Figure 4 It is a structural diagram of an embodiment of an electronic device of the present application, wherein the electronic device 40 includes a memory 401 and a processor 402 coupled to each other, wherein the memory 401 stores program data (not shown), and the processor 402 calls the program data to implement the method in any of the above embodiments. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0077] See also Figure 5 , Figure 5It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 50 stores program data 500. When the program data 500 is executed by a processor, the method in any of the above embodiments is implemented. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0078] It should be noted that the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0081] The above description is only an implementation method of the present application, and does not limit the protection 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 used in other related technical fields, are also included in the protection scope of the present application.
Claims
1. A target attribute recognition method, characterized in that: The method comprises: Acquire a current frame, determine a scheduling interval state matched by the current frame and a motion information state and a quality information state matched by a target in the current frame; wherein the scheduling interval state includes attributes that are preferentially identified in the current frame, a dependency condition of some attributes among a plurality of attributes to be identified is a target moving in a video frame, a dependency condition of some attributes is an image quality of the target in a video frame, the motion information state is determined based on a position change of the target in the current frame compared to a historical frame, and the quality information state is determined based on an image area corresponding to the target in the current frame; Determine, based on the scheduling interval state, the motion information state, and the quality information state, a recognition priority corresponding to the target in the current frame, and select at least part of the targets in the current frame as targets to be recognized according to the recognition priority; wherein a reference order of the motion information state and the quality information state when determining the recognition priority is adapted to a dependency condition corresponding to an attribute to be recognized preferentially in the current frame; The attributes of the target to be identified are obtained, and based on the attributes identified in the current frame and the attributes identified in at least part of the historical frames before the current frame, attribute identification results of at least part of the target in the current frame are obtained.
2. The target attribute recognition method according to claim 1, characterized in that: The target in the current frame is configured with an event frame state based on whether a preset event type is triggered; The determining, based on the scheduling interval state, the motion information state, and the quality information state, the recognition priority corresponding to the target in the current frame, and selecting at least part of the targets in the current frame as targets to be recognized according to the recognition priority, includes: Determining a recognition priority corresponding to a target in the current frame based on the event frame state, the scheduling interval state, the motion information state, and the quality information state; At least part of the targets in the current frame are selected as targets to be identified according to the identification priority, and attribute identification tasks corresponding to the targets to be identified are generated.
3. The target attribute recognition method according to claim 2, characterized in that: The motion information state includes a heading angle change state, a deformation state and a motion state; wherein the heading angle change state is related to the heading angle change amplitude of the target, the deformation state is related to the aspect ratio change of the target, and the motion state is related to the position change of the target in adjacent video frames; The quality information status includes an occlusion status, a region relationship status, a coordinate change status and a boundary status; the occlusion status is related to the overlap rate between the target frame and other target frames, the region relationship status is related to whether the target is in a specified area, the coordinate change status is related to the change amplitude of the target in the direction of a preset coordinate axis, and the boundary status is related to whether the target frame appears completely in the video frame for the first time, and the distance between the target frame and the boundary of the video frame.
4. The target attribute recognition method according to claim 3, characterized in that: When the dependent condition corresponding to the attribute to be identified is a moving target in a video frame, determining the identification priority corresponding to the target in the current frame based on the event frame state, the scheduling interval state, the motion information state, and the quality information state includes: Based on the order of the event frame state, the scheduling interval state, the heading angle change state, the deformation state, the motion state, the occlusion state, the area relationship state and the boundary state, the recognition priority corresponding to the target in the current frame is determined.
5. The target attribute recognition method according to claim 3, characterized in that: When the dependent condition corresponding to the attribute to be identified is the image quality of the target in the video frame, determining the identification priority corresponding to the target in the current frame based on the event frame state, the scheduling interval state, the motion information state, and the quality information state includes: Based on the order of the event frame state, the scheduling interval state, the occlusion state, the area relationship state, the coordinate change state, the boundary state, the deformation state and the motion state, the recognition priority corresponding to the target in the current frame is determined.
6. The target attribute recognition method according to claim 2, characterized in that: The step of selecting at least part of the targets in the current frame as targets to be identified according to the identification priority, and generating attribute identification tasks corresponding to the targets to be identified, comprises: Dividing all the targets in the current frame into a high-priority target set and a low-priority target set according to the recognition priority; At least one target is obtained from the high-priority target set as the target to be identified, and a preset number of attribute recognition tasks are generated based on the target to be identified; wherein the preset number is adapted to the dependency conditions corresponding to the attributes that are preferentially identified in the current frame.
7. The target attribute recognition method according to claim 1, characterized in that: The target is matched with a target identifier, and the target identifier corresponding to the target in the current frame corresponds to the identifier to be matched; The acquiring of the attributes of the target to be identified, based on the attributes identified in the current frame and the attributes identified in at least part of the historical frames before the current frame, obtains the attribute identification result of at least part of the target in the current frame, including: Acquire the attributes of the target to be identified in the current frame, and acquire the identified attributes of the target corresponding to the identifier to be matched from at least part of the cached historical frames; Based on all the acquired identified attributes, an attribute recognition result of at least part of the target in the current frame is obtained.
8. The target attribute recognition method according to any one of claims 1 to 7, characterized in that: The scheduling interval state is set according to the video frame cycle within a preset period, wherein each video frame corresponds to a priority identification attribute, and among the multiple video frames arranged continuously within the preset period, any video frame has a frame number interval compared to the nearest video frame with different dependency conditions, and the frame number interval is less than the frame number threshold.
9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Prioritizing objects for object recognition
CN111033515A
Allocation method of computing power resources, computer equipment and storage medium
CN116229241A