Target attribute recognition method, computer device and storage medium
By using relevant information of the target object to determine the target scheduling in image processing technology, only the image and target object to be identified are identified, the problems of large resource consumption and low recognition efficiency in the prior art are solved, and more efficient and accurate attribute recognition is achieved.
Patent Information
- Application Number
- CN202411778006.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In the case where multiple attributes are needed, the prior art usually recognizes all attributes for all images, resulting in high resource consumption, low efficiency and low accuracy.
By acquiring the pending image and attribute recognition tasks, the target scheduling is determined using the relevant information of the target object, and only the images and target objects that need attribute recognition are identified to reduce unnecessary calculations.
It improves the efficiency and accuracy of target attribute recognition, reduces the identification and identification errors of dirty data, and reduces the computing power consumption.
Smart Images

Figure CN119251746B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a target attribute recognition method, a computer device and a storage medium. Background Art
[0002] With the development of image detection technology, image detection-based technology has been widely used in various fields. For example, image detection can be used to identify targets and identify target attributes.
[0003] In some application scenarios, when multiple attributes need to be identified, all attributes of all images are usually identified, which consumes a lot of resources and has the problem of low efficiency in attribute recognition, or may also have the problem of low accuracy in attribute recognition. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a method for identifying the attributes of a target, a computer device and a storage medium, which can improve the efficiency and accuracy of identifying the attributes of the target.
[0005] In a first aspect, the present application provides a method for identifying attributes of a target, the method comprising: obtaining a number of images to be processed, and obtaining attribute identification tasks corresponding to a number of attributes; determining a target scheduling for attribute identification using relevant information of target objects in the number of images to be processed; wherein the target scheduling comprises at least one of a target image and a recognition target, the target image being the image to be processed for attribute identification, and the recognition target being the target object for attribute identification in the image to be processed; executing the corresponding attribute identification task according to the target scheduling to obtain an attribute identification result.
[0006] A second aspect of the present application provides a computer device, which includes a memory and a processor coupled to each other, wherein program data is stored in the memory, and the processor is used to execute the program data to implement any step of the attribute identification method for the above-mentioned purpose.
[0007] A third aspect of the present application provides a computer-readable storage medium, which stores program data that can be executed by a processor, and the program data is used to implement any step of the attribute identification method for the above-mentioned purpose.
[0008] The above scheme obtains several images to be processed and several attribute recognition tasks corresponding to the attributes, and then uses the relevant information of the target objects in the several images to be processed to determine the target scheduling for attribute recognition, executes the corresponding attribute recognition tasks according to the target scheduling, and obtains the attribute recognition result. Since the target scheduling includes at least one of the target image and the recognition target, the target image is the image to be processed for attribute recognition, and the recognition target is the target object to be recognized in the image to be processed, the images to be processed / target objects to be recognized can be reduced, and only the images to be processed / target objects to be recognized need to be recognized, without the need to recognize all the target objects of all the images to be processed, thereby reducing computing power consumption and improving the efficiency of attribute recognition. In addition, according to the relevant information of the target object in the image to be processed, the target scheduling for attribute recognition is determined, which can reduce the attribute recognition of dirty data, reduce the situation of attribute recognition errors, and improve the accuracy of attribute recognition.
[0009] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in this application, the following briefly introduces the drawings required in the description of the embodiments. Obviously, the drawings described below are only some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0011] Figure 1 It is a flowchart of the first embodiment of the attribute identification method of the present application;
[0012] Figure 2 It is a schematic diagram of an embodiment of the field of view of the long focus channel and the short focus channel of the present application;
[0013] Figure 3 It is a flowchart of the second embodiment of the attribute identification method of the present application;
[0014] Figure 4 This application Figure 3 A schematic diagram of a flow chart of an embodiment of step S21;
[0015] Figure 5 It is a flowchart of the third embodiment of the attribute identification method of the present application;
[0016] Figure 6 It is a structural diagram of an embodiment of an attribute identification device targeted by the present application;
[0017] Figure 7It is a structural schematic diagram of an embodiment of a computer device of the present application;
[0018] Figure 8 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0019] 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. 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.
[0020] The terms "first" and "second" 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" and "second" 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.
[0021] 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.
[0022] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: 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 objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0023] The present application provides the following embodiments, and each embodiment is described in detail below.
[0024] It is understandable that the target attribute recognition method in the present application can be executed by a computer device, and the computer device can be any device with processing capabilities, such as a mobile device, a computer, a server, etc., and the present application does not limit this. In some possible implementations, the target attribute recognition method can be implemented by a processor calling program data stored in a memory.
[0025] See also Figure 1 , Figure 1 This is a flow chart of the first embodiment of the attribute identification method of the present application. The method may include the following steps:
[0026] S11: Obtain a number of images to be processed, and obtain attribute recognition tasks corresponding to a number of attributes.
[0027] Acquire several images to be processed. The several images to be processed may be several images or image sequences acquired by a camera device. For example, the images to be processed may be images acquired from a target area, images acquired from a target object, etc. The target object may include a living body, a movable object, etc., and the present application does not limit the images to be processed.
[0028] In some implementations, the plurality of images to be processed include a single-channel image to be processed. For example, the image to be processed may be acquired by using a single-purpose camera device.
[0029] In some embodiments, the plurality of images to be processed include images to be processed from at least two different channels, and the focal lengths corresponding to the different channels are different, that is, the fields of view corresponding to the different channels are different. In this way, the images to be processed can be acquired from multiple different channels.
[0030] In some embodiments, the plurality of images to be processed include images to be processed of a first channel and images to be processed of a second channel including different channels, wherein the focal length of the first channel is greater than the focal length of the second channel. For example, a binocular camera device may be used to acquire the images to be processed.
[0031] Exemplarily, a binocular camera is used to collect the image to be processed. Taking a binocular camera with long and short focus as an example, the first channel includes a long focus channel, and the second channel includes a short focus channel. The binocular camera with long and short focus is an integrated camera composed of a short focus lens (i.e., short focus channel) and a long focus lens (i.e., long focus channel). Compared with a monocular camera, a binocular camera has a long focus lens, which greatly improves the visual perception range and can better perform attribute recognition.
[0032] See also Figure 2, a long-focus image of the long-focus channel and a short-focus image of the short-focus channel can be acquired, and the long-focus image and / or the short-focus image can be used as the image to be processed. Among them, the focal length of the long-focus lens is greater than that of the short-focus lens, and the field of view of the long-focus lens and the short-focus lens are different. The field of view of the short-focus lens can cover the field of view of the long-focus lens. Compared with the short-focus image, the long-focus image can show the details of the distant scene more clearly.
[0033] Acquiring attribute recognition tasks corresponding to several attributes, that is, acquiring attributes that need to be recognized, each attribute may correspond to an attribute recognition task, wherein each attribute recognition task may be used to perform attribute recognition, for example, an attribute recognition model corresponding to the attribute may be used to implement the attribute recognition task. Attributes may be for target objects, and the attributes that need to be recognized may be determined based on the specific target object, and several attributes may include multiple attributes. For example, if the target object is a vehicle, its attributes may include license plate, vehicle model, vehicle color, type, etc. This application does not impose any restrictions on this.
[0034] In some embodiments, a to-be-processed image of the first channel (such as a telephoto image) and an to-be-processed image of the first channel (such as a short-focus image) after time synchronization may be obtained, and a long-focus and short-focus fusion target may be obtained through a preset fusion method, wherein the fusion target information includes a telephoto target corresponding to the telephoto channel and a short-focus target corresponding to the short-focus channel, and the fusion target is used as the target object.
[0035] In some embodiments, after the above step S11, a frame skipping attribute recognition method can be adopted to control whether the attribute is recognized in each image to be processed, instead of performing attribute recognition on all frames, all targets, and all attributes, thereby reducing the computing power resource consumption of attribute recognition.
[0036] After the above step S11, the following steps may be performed: according to a preset frame skipping interval, a plurality of attributes are allocated to a plurality of images to be processed, so as to obtain a target attribute corresponding to each image to be processed.
[0037] Optionally, the target attribute corresponding to the image to be processed includes at least one attribute among several attributes, and / or at least one attribute among the target attributes corresponding to adjacent images to be processed is different.
[0038] Optionally, the preset frame skipping interval may include a preset number of interval frames corresponding to the same attribute, and the preset number of interval frames may be determined according to a number of attributes and a number of images to be processed.
[0039] In some implementations, the attribute quantity of several attributes and the frame rates of several to-be-processed images may be obtained. Then, the preset frame skipping interval corresponding to each attribute may be determined according to the attribute quantity and the frame rate, that is, the preset interval frame number corresponding to each attribute may be obtained.
[0040] In some embodiments, attribute recognition may be performed only on the image to be processed that contains the target object. For example, it may be detected whether there is a target object in the image to be processed. If there is no target object, no attribute is assigned, and if there is a target object, the attribute is assigned. Alternatively, if there is a target object, for the image to be processed that contains the target object, several attributes are assigned to several images to be processed according to the preset frame skipping interval corresponding to each attribute, so as to obtain the target attribute corresponding to each image to be processed.
[0041] Exemplarily, for the method of frame skipping attribute recognition, for different attributes, the method of interleaving and fixing the frame skipping interval can be used to avoid the resource preemption problem caused by calling all attributes in the same frame. For example, in a number of images to be processed, the frame rate is 12 frames within 1 second. If the four attributes of license plate, vehicle model, vehicle color, and type need to be recognized, the recognition of the four attributes can be distributed to different frames within 12 frames. For example, each attribute is separated by 3 frames, and one attribute is recognized in each frame.
[0042] The frame skipping configuration of the target attribute corresponding to each image to be processed is as follows:
[0043] {[car model][car color][license plate][type][car model][car color][license plate][type][car model][car color][license plate][type]}.
[0044] The above method adopts the method of frame skipping attribute recognition. By adjusting the interval of each attribute call and the distribution of each attribute within the frame rate, it can reduce or avoid the resource preemption and operation waiting problems caused by the processor's computing power and the recognition of the attribute recognition model being accumulated on the same frame.
[0045] S12: Determine target scheduling for attribute recognition using relevant information of target objects in a number of images to be processed.
[0046] The target scheduling includes at least one of a target image and a recognition target. The target image is an image to be processed for attribute recognition, and the recognition target is a target object for attribute recognition in the image to be processed.
[0047] Obtain relevant information of target objects in a number of images to be processed, then use the relevant information of the target objects in the number of images to be processed to determine the images to be processed that need to be attribute recognized, and obtain the target image, that is, the image to be processed that needs to be attribute recognized. And / or, use the relevant information of the target object to determine the target object that needs to be attribute recognized, and obtain the recognized target.
[0048] The relevant information of the target object may include information that can be obtained by analyzing the target object. For example, the relevant information of the target object of the current frame may be obtained by analyzing the target object in the image to be processed of the current frame / the image to be processed of the associated frame, and the associated frames may be adjacent image frames or image frames with the same target object, or a preset number of frames, all frames, etc. The present application does not limit the method of obtaining the relevant information.
[0049] In some embodiments, the relevant information of the target object includes at least one of the following: motion information of the target object and quality information of the target object. The motion information of the target object may include at least one of the position information, motion trajectory, motion direction, or motion trend of the target object. The quality information of the target object may evaluate the quality condition of the target object in the image to be processed, the quality condition of the image to be processed, etc. For example, the quality information of the target object may include at least one of the pixel information, position information, and occlusion condition of the target object, etc. The present application does not limit the relevant information of the target object.
[0050] Optionally, the target image can be determined based on at least one of the motion information and quality information of the target object, and the identification target can be determined based on the quality information of the target object. The present application does not limit the method for determining the target scheduling.
[0051] In some embodiments, when a plurality of images to be processed are acquired by using a multi-purpose camera (such as a binocular camera), each image to be processed can be analyzed according to at least one of the motion information of the target object and the quality information of the target object to determine the image to be processed that needs to be attributed and obtain the target image. Alternatively, the quality information can be further used to determine the target object that needs to be attributed and obtain the identified target.
[0052] In some embodiments, when a plurality of images to be processed are acquired by using a single-purpose camera (such as a monocular camera), each image to be processed can be analyzed according to the quality information of the target object to determine the image to be processed that needs to be attributed and obtain the target image. Alternatively, the quality information can be further used to determine the target object that needs to be attributed and obtain the identified target.
[0053] Optionally, since the images to be processed come from multiple different channels, the images to be processed corresponding to the channels for which attribute recognition needs to be performed may be determined as target images according to motion information of target objects in the images to be processed.
[0054] Optionally, whether to perform attribute recognition on the image to be processed or the target object can be determined based on the quality information of the target object in the image to be processed, thereby obtaining a target image or identifying a target in response to performing attribute recognition on the image to be processed or the target object.
[0055] S13: Execute the corresponding attribute recognition task according to the target scheduling to obtain the attribute recognition result.
[0056] After selecting the target image, the corresponding attribute recognition task can be performed according to the target scheduling to obtain the attribute recognition result. Among them, since the target scheduling includes at least one of the target image and the recognition target, when only the target image is included, the corresponding attribute recognition task can be performed on the target image. For example, the target image can be processed using the attribute recognition model corresponding to the attribute recognition task, and the corresponding attribute recognition results can be obtained respectively. When only the recognition target is included, the corresponding attribute recognition task can be performed on the recognition target in each image to be processed, and the corresponding attribute recognition results can be obtained respectively. When the target image and the recognition target are included, the corresponding attribute recognition task can be performed on the recognition target in the target image, and the corresponding attribute recognition results can be obtained respectively.
[0057] In some implementations, for each target scheduling, such as a target image / recognition target, several attribute recognition tasks corresponding to the attributes are performed, so that several attributes of the target image / recognition target can be recognized and attribute recognition results corresponding to the several attributes can be obtained respectively.
[0058] In some embodiments, when a frame skipping attribute recognition method is adopted, attribute recognition can be performed on the target attributes set for each image to be processed according to the frame skipping attribute recognition method, that is, the corresponding target attributes of the target image / recognition target are respectively recognized, and attribute recognition results corresponding to the target attributes are respectively obtained.
[0059] Optionally, when the frame skipping attribute recognition method is adopted, an attribute recognition task corresponding to the target attribute may be performed on the recognition target in the target image to obtain an attribute recognition result of the recognition target for the target attribute.
[0060] Specifically, when adopting the frame skipping attribute recognition method, several attributes are assigned to several images to be processed, that is, each image to be processed is respectively assigned a target attribute, therefore, the selected target image is correspondingly assigned a target attribute to be identified, wherein the target attribute corresponding to the target image / image to be processed includes at least one attribute among several attributes. For example, it may include one attribute or multiple attributes among several attributes, etc., which is not limited in the present application. The attribute recognition task corresponding to the target attribute is performed on the target image, that is, for each target image, the attribute recognition task corresponding to the target attribute can be performed, thereby, the target attribute of the target image can be recognized, and the attribute recognition result corresponding to the target attribute can be obtained. Similarly, for the recognition target in the image to be processed or the target image, the target attribute is also recognized accordingly, and the attribute recognition result of the target attribute corresponding to the recognition target is obtained.
[0061] The above scheme obtains several images to be processed and several attribute recognition tasks corresponding to the attributes, and then uses the relevant information of the target objects in the several images to be processed to determine the target scheduling for attribute recognition, executes the corresponding attribute recognition tasks according to the target scheduling, and obtains the attribute recognition result. Since the target scheduling includes at least one of the target image and the recognition target, the target image is the image to be processed for attribute recognition, and the recognition target is the target object to be recognized in the image to be processed, the images to be processed / target objects to be recognized can be reduced, and only the images to be processed / target objects to be recognized need to be recognized, without the need to recognize all the target objects of all the images to be processed, thereby reducing computing power consumption and improving the efficiency of attribute recognition. In addition, according to the relevant information of the target object in the image to be processed, the target scheduling for attribute recognition is determined, which can reduce the attribute recognition of dirty data, reduce the situation of attribute recognition errors, and improve the accuracy of attribute recognition.
[0062] In some embodiments, step S12 of the above embodiment may be further expanded to determine target scheduling requiring attribute recognition by utilizing any one or a combination of the target object's motion information and the target object's quality information.
[0063] See also Figure 3 , Figure 3 1 is a flow chart of the second embodiment of the attribute identification method of the present application. The method may include the following steps:
[0064] S21: using the motion information of the target object in the plurality of images to be processed, determining the image to be processed for attribute recognition, and obtaining the target image.
[0065] Since the plurality of images to be processed include images to be processed of at least two different channels, for the images to be processed input in this step, the motion information of the target objects in the plurality of images to be processed can be used to determine the target channel that needs to be attribute identified, thereby using the image to be processed corresponding to the target channel as the target image.
[0066] In some embodiments, see Figure 4 , step S21 of the above embodiment can be further expanded. By using the motion information of the target object in the plurality of images to be processed, the image to be processed for attribute recognition is determined to obtain the target image. This embodiment may include the following steps:
[0067] S211: Obtaining the motion trend of target objects in a number of images to be processed.
[0068] The motion trend indicates the motion trend of the target object in the field of view corresponding to at least two different channels. The trajectory information of the target object (such as the fusion target) in the image to be processed can be analyzed to obtain the motion trend of the target object, and the motion trend can be the overall motion trend of all target objects in the image to be processed.
[0069] Optionally, the motion trend of the target object of each entire frame of the image to be processed is determined separately. For example, the motion trend of the target object in the current frame can be determined based on the position information of the same target object in the current frame and the historical frames, so that the target channel that needs attribute identification in at least two synchronized channels can be determined.
[0070] Optionally, the trajectory information of all target objects in all images of several images to be processed is analyzed to obtain the movement trend of the overall target object, so that the target channel that needs attribute recognition from at least two channels does not need to perform attribute recognition on the images to be processed in other channels.
[0071] Optionally, a plurality of images to be processed are divided into a plurality of groups according to a time sequence, and each group may contain a preset number of frames of images to be processed, wherein the preset number is an integer greater than 1. Thus, the motion trend of the target objects in each group may be obtained according to the trajectory information of the target objects in the preset number of frames of images to be processed in each group, so that the target channels requiring attribute recognition may be determined according to the motion trends of different groups.
[0072] By judging the trajectory trend of the fusion target, the current trajectory direction, that is, the motion trend, can be obtained, where the motion trend can be divided into a first type of motion direction and a second type of motion direction. The first type of motion direction can represent the motion direction for straight travel, for example, the direction of coming or going. The second type of motion direction can represent the direction of turning or lateral movement. Since the plurality of images to be processed include images to be processed of at least two different channels, the target channel for attribute recognition in the images to be processed of multiple channels can be determined by the motion trend.
[0073] S212: Determine a target channel for attribute recognition by using the motion trend, and use the image to be processed corresponding to the target channel as the target image.
[0074] For the motion trend, a target channel for attribute recognition is determined. According to different motion trends, a channel that adapts to the motion trend can be determined as the target channel, so that the image to be processed corresponding to the target channel is used as the target image.
[0075] The first case: if the motion trend is the first type of motion direction, in response to the motion trend being the first type of motion direction, the initial channel corresponding to the first type of motion direction is determined as the target channel.
[0076] Specifically, if the motion trend is the first type of motion direction, that is, the straight motion direction, the initial channel corresponding to the first type of motion direction is determined to be the target channel, and the image to be processed of the target channel can be used as the target image, where the initial channel corresponding to the first type of motion direction represents the channel corresponding to the field of view range where the motion trend of the target object initially appears in multiple channels.
[0077] In some embodiments, the at least two different channels include a first channel and a second channel of different channels, and the focal length of the first channel is greater than the focal length of the second channel.
[0078] The first type of movement direction includes: an incoming movement direction or an outgoing movement direction. The incoming movement direction indicates that the target object moves from the first channel to the second channel, and the target channel corresponding to the incoming movement direction may be the first channel. The outgoing movement direction indicates that the target object moves from the second channel to the first channel, and the target channel corresponding to the outgoing movement direction may be the second channel.
[0079] Therefore, when the movement trend is the incoming movement direction, the first channel is determined as the target channel. When the movement trend is the outgoing movement direction, the second channel is determined as the target channel.
[0080] The second situation: if the motion trend is the second type of motion direction, in response to the motion trend being the second type of motion direction, the position of the target object in the field of view of at least two different channels is used to determine the target channel for attribute recognition.
[0081] Specifically, if the movement trend is the second type of movement direction, that is, the turning or lateral movement direction, the position of the target object in the field of view of at least two different channels can be used to determine the target channel for attribute identification. Among them, if the target object is only located in the corresponding preset field of view of a single channel, this single channel can be determined as the target channel for attribute identification. If the target object is located in the corresponding preset transition range of multiple channels, multiple channels can be determined to be the target channels for attribute identification. If the target object is located in the corresponding preset common viewing range of multiple channels, the channel with the largest focal length among the multiple channels can be determined as the target channel for attribute identification.
[0082] In some embodiments, the at least two different channels include a first channel and a second channel of different channels, and the focal length of the first channel is greater than the focal length of the second channel.
[0083] Optionally, in response to the target object being located within a preset common viewing range corresponding to the first channel and the second channel, the first channel is determined to be the target channel. The preset common viewing range may represent a common viewing range of viewing ranges of different channels. Since the focal length of the first channel is greater than that of the second channel, the viewing range of the second channel may include the viewing range of the first channel. Therefore, the first channel is taken as the target channel.
[0084] Optionally, in response to the target object being located within a preset transition range corresponding to the first channel and the second channel, the corresponding first channel and the second channel are determined to be target channels, wherein the preset transition range represents a transition area in the field of view of different channels, that is, an area within a preset range from the field of view boundary of the two channels.
[0085] Optionally, in response to the target object being located only within a preset visual range corresponding to the second channel, the second channel is determined to be the target channel, wherein the preset visual range refers to the visual range corresponding to the channel, and different focal lengths may correspond to different preset visual ranges.
[0086] The following description is made by taking the first channel as a long focus and the second channel as a short focus as an example.
[0087] For the incoming motion direction, the target object moves from the long focus to the short focus, so only the corresponding target object on the long focus image may be identified in terms of attributes, and the corresponding target object on the short focus image may not be identified in terms of attributes.
[0088] For the outward movement direction, the target object moves from short focus to long focus, and only the corresponding target object on the short focus image is identified by attributes, while the corresponding target object on the long focus image is not identified by attributes.
[0089] For turning and lateral movement directions, the larger the corresponding pixel of the target object in the image, the more stable the effect of attribute recognition. For turning and lateral directions, the present application can determine the target channel that needs to be attribute recognized based on the position of the target object in the field of view of each channel.
[0090] If the target object is in the long- and short-focus common viewing area, for example, within the field of view of the long focus, the attribute recognition of the target object is performed only on the long focus image. If the target object is only within the field of view of the short focus, the attribute recognition is performed only on the short focus image. If the target object is in the long- and short-focus transition area, for example, when entering the long- and short-focus common viewing area from the short-focus visible area, the attribute recognition of the target object is performed on both the short focus and long focus images.
[0091] In the above method, by using the motion trend of the target object, the image to be processed corresponding to the appropriate channel is selected as the target image, which can reduce the images that need to be attribute recognized on the channel and reduce the amount of attribute recognition calculation.
[0092] After the above step S21, or the above step S12, the following steps may also be included:
[0093] S22: using the quality information of the target objects in the plurality of images to be processed, determining the target objects for attribute recognition, and obtaining the recognition targets.
[0094] Optionally, in this step, the several images to be processed may refer to several images to be processed corresponding to at least two different channels, or the several images to be processed may refer to images to be processed of a target channel, that is, target images, and this application does not impose any restrictions on this.
[0095] The quality information of each target object in the current image to be processed can be obtained, wherein the quality information may include pixel information, position information, occlusion status, etc. of the target object. Then, the quality information of the target objects in the images to be processed is used to determine the target objects that need to be attribute recognized in each image to be processed or the target image, and obtain the recognized target.
[0096] Specifically, it can be determined whether the quality information of the target object meets the preset quality condition. If the preset quality condition is met, in response to the quality information of the target object in the image to be processed meeting the preset quality condition, it is determined that the image to be processed or the target object needs to be attribute recognized, and the image to be processed is used as the target image or the target object is used as the recognition target. The following is an example of determining the recognition target for each target object. The method of determining the target image by quality information can refer to the specific embodiment of determining the recognition target, and this application does not elaborate on this.
[0097] In some embodiments, the preset quality condition includes at least one of the following: the pixel scale of the target object is greater than a preset pixel threshold, the position information of the target object does not meet the image boundary condition, and the occlusion condition of the target object meets the preset occlusion condition.
[0098] Among them, for the pixel scale of the target object greater than the preset pixel threshold, a fixed pixel threshold in the long and short focus can be set to limit the call of attribute recognition, and the pixel scale of the target object includes the scale of pixels occupied by the target object, and the scale can be expressed in the number or size of pixels. For example, the pixel scale of the target object includes the width, height or area of pixels occupied by the target object. This application does not impose any restrictions on this. For example, the accuracy of attribute recognition of target objects with a pixel size of more than 150*150 is higher, and the preset pixel threshold can be limited to 150 pixels. If the width or height of the target object in the image to be processed (such as short-focus and long-focus images) is greater than 150 pixels, it is determined that the preset quality conditions are met, and the attribute recognition of this target object can be performed. This method can reduce the problem of attribute recognition errors of the target object at a low pixel scale (such as less than 150 pixels).
[0099] If the position information of the target object does not meet the image boundary condition, it can be determined whether the position information of the target object meets the image boundary condition, that is, whether the target object is at the boundary position of the image. If the image boundary condition is not met, it is not at the image boundary. For example, when the target object is at the image boundary or the detection boundary, the target object is usually incomplete. At this time, by determining whether the position information of the target object is at the image boundary or the detection boundary, if it is at the image boundary, attribute recognition is not performed, which can reduce the recognition error problem caused by incompleteness.
[0100] The occlusion of the target object meets the preset occlusion condition, wherein the occlusion of the target object meets the preset occlusion condition including at least one of the following: the occlusion position of the target object does not belong to the preset position, and the occlusion ratio of the target object is less than the preset ratio. When there is mutual occlusion between the target objects, it can be determined whether to perform attribute recognition based on the occlusion ratio and occlusion position to improve the accuracy of attribute recognition.
[0101] The occlusion ratio of the current target object and other target objects can be obtained, it can be determined whether the current target object is occluded with other target objects, and the occlusion ratio can be obtained. For example, the intersection over union (IOU) between target objects whose coordinates intersect can be calculated based on the position information (such as coordinates or detection frames) of each target object to obtain the occlusion ratio. Alternatively, the union of the current target frame of the current target object and other target frames of other target objects is obtained, and the area ratio of the current target frame is used as the occlusion ratio. This application does not impose any restrictions on this. If the occlusion ratio of the target object is greater than or equal to the preset ratio, it is considered that the occlusion of the current target object is more serious, and attribute recognition is not performed on the current target object. Among them, the preset ratio can be set according to the specific application situation. For example, the preset ratio can be 0.4, 0.5, etc. This application does not impose any restrictions on the preset ratio.
[0102] The occluded position of the target object can be obtained. The preset position is related to the position corresponding to each attribute in the target object. When the occluded position of the target object does not belong to the preset position, the attribute recognition of the target object can be performed. If the occluded position of the target object belongs to the preset position, the attribute recognition of the target object will not be performed. For example, the occluded position can be divided into four categories: up, down, left, and right. For attributes with strong position information such as license plates, it is determined whether to perform the attribute based on the occluded position. For example, when the occluded part of the vehicle is at the bottom, it is considered that the occluded part may not be able to recognize the license plate, and the license plate attribute of the current target is not recognized.
[0103] The above method determines whether to perform attribute recognition by limiting the recognition pixel threshold, whether it is located at the boundary, occlusion status and other quality information of the target object. This can reduce the calculation of unreliable attribute recognition caused by the poor quality of the target object, avoid outputting unreliable attributes, and improve the accuracy of attribute recognition.
[0104] In some implementations, the step S21 of this embodiment may determine the input of the target image to be processed as the first input image to be processed, and the step S22 may determine the input of the recognition target to be processed as the second input image to be processed. The first input image to be processed includes the image to be processed or the second image; the second input image to be processed includes the image to be processed or the first image. At least one of the first input and the second input is the image to be processed.
[0105] Optionally, the first input image to be processed includes several images to be processed, and the second input image to be processed includes several images to be processed.
[0106] Optionally, the first input image to be processed includes several images to be processed, and the second input image to be processed includes the first image.
[0107] Optionally, the second input image to be processed includes several images to be processed, and the first input image to be processed includes the second image.
[0108] In some embodiments, when the relevant information of the target object includes a combination of the motion information of the target object and the quality information of the target object, the present application may first execute step S21 and then execute step S22. The present application uses this as an example for explanation. Alternatively, step S22 may be executed first and then step S21. In this way, the motion information and quality information of the target object may be used to comprehensively determine the target scheduling that requires attribute identification. The present application does not limit the execution order of this embodiment.
[0109] The above scheme can optimize the timing of attribute recognition and determine the target image / recognition target that needs to be recognized through the motion trend and quality information of the target object. It can reduce the mixing of contaminated data into the time series attribute results, reduce the impact of erroneous recognition results on subsequent attribute fusion, and make the attribute results more accurate.
[0110] In some embodiments, after the above step S13, a final attribute recognition result may be determined based on each attribute recognition result, and / or the execution of each attribute recognition task may be controlled.
[0111] See also Figure 5 , Figure 5 1 is a flow chart of the third embodiment of the attribute identification method of the present application. The method may include the following steps:
[0112] S31: Evaluate the attribute recognition results of each target object to obtain the evaluation status of each attribute with respect to the attribute recognition results.
[0113] For the attribute recognition results obtained in the above step S13, there may be inconsistent attributes in the attribute recognition results due to the trajectory movement of the target object, or the attribute recognition results of a small number of frames may be unreliable. Therefore, the present application can evaluate the attribute recognition results of each target object after identifying each attribute recognition result to obtain the evaluation status of each attribute for the attribute recognition result.
[0114] The evaluation of each attribute for the attribute identification result may include: the evaluation value of each attribute identification result, the evaluation attribute of each attribute for the attribute identification result, and other evaluation conditions, which are not limited in this application.
[0115] Specifically, the attribute voting feedback value of the attribute recognition result of each target object can be obtained. For example, for the same target object, for each attribute, the statistical value of the same attribute recognition result is identified to obtain the evaluation value of each attribute recognition result. Alternatively, the maximum statistical value is obtained. The maximum statistical value means that the attribute recognition result corresponding to the statistical value is recognized the most times. The attribute recognition result is used as the evaluation attribute of the attribute, that is, the attribute recognition result with the maximum statistical value can be used as the current attribute recognition result.
[0116] S32: Based on the evaluation of each attribute on the attribute recognition result, determine the final attribute recognition result of the attribute recognition task corresponding to each attribute, and / or determine the execution status of the attribute recognition task corresponding to each attribute.
[0117] Based on the attribute recognition results of the attributes of the target object, it can be determined whether the evaluation situation meets the attribute recognition requirements. If the evaluation situation meets the attribute recognition requirements, the execution status of the attribute recognition task corresponding to the attribute is determined to be completed, so that the attribute recognition task of this attribute is no longer performed on the target object in the subsequent image to be processed, and / or the final attribute recognition result of the attribute recognition task corresponding to the attribute is determined to be the attribute recognition result with the largest evaluation value, that is, the evaluation attribute. Otherwise, the execution status of the attribute recognition task corresponding to the attribute is determined to be incomplete, and the attribute recognition of the attribute needs to be continued, that is, the attribute recognition task corresponding to the attribute needs to be continued to obtain the final attribute recognition result.
[0118] Optionally, the execution status may be to perform the above-mentioned evaluation on each attribute of each target object. If the evaluation status of the attribute of the target object for the attribute recognition result meets the attribute recognition requirement, then the execution status of the attribute recognition task corresponding to the attribute of the target object is determined to be recognition completed, and there is no need to recognize this attribute of the target object in subsequent images to be processed. Alternatively, if the evaluation status of all attributes of the target object meets the attribute requirement, then the execution status of the attribute recognition task corresponding to each attribute of the target object is determined to be recognition completed, and there is no need to recognize the attribute of this target object in subsequent images to be processed. In some application scenarios, the situation where the execution status is recognition completed can be marked accordingly, for example, the attribute recognition task / target object corresponding to the attribute that has been recognized is marked.
[0119] Wherein, satisfying the attribute identification requirement includes: the evaluation value is greater than the preset value, the evaluation attribute meets the stability condition, etc. Wherein, the evaluation attribute meets the stability condition may indicate that the evaluation attributes of consecutive preset frames are the same evaluation attribute.
[0120] For example, the attribute recognition result with the largest evaluation value is continuously maintained in the preset frames. When the attribute voting feedback value of the attribute remains stable in the consecutive frames, it is determined that a reliable and stable attribute recognition result is recognized, and the stable attribute recognition result is determined as the final attribute recognition result. In addition, the execution status of the attribute recognition task corresponding to the attribute is determined to be recognition completed, and the attribute corresponding to the current target object is marked as no longer updated, and no attribute recognition is performed on the target objects in subsequent related images.
[0121] The above scheme evaluates the attribute recognition results of each target object to obtain the evaluation status of each attribute for the attribute recognition result, and determines the final attribute recognition result of the attribute recognition task corresponding to each attribute based on the evaluation status of each attribute of each target object, so that a more accurate attribute recognition result can be obtained. In addition, the execution status of the attribute recognition task corresponding to each attribute can be determined according to the evaluation status, so that the scheduling of the attribute recognition task can be managed, and the attribute recognition task that has been recognized can no longer be executed, thereby further reducing the power consumption and computational complexity of attribute recognition.
[0122] The above application can control the calling of attribute recognition tasks at the levels of time, channel and target object according to the frame skipping method, motion trend, quality information of target object and evaluation of voting feedback, so as to better call various attribute recognition tasks and improve the accuracy and efficiency of attribute recognition.
[0123] For long-focus and short-focus binocular cameras, the attribute recognition performance of the real-time output can be optimized, and the attributes of the long-focus and short-focus images can be fused and updated. There is no need to identify all attributes of all target objects in all long-focus and short-focus images, thereby improving the accuracy and efficiency of recognition.
[0124] It is understandable that in the above method of the specific implementation mode, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0125] This application only provides technology. The data required for specific applications shall be based on actual conditions. However, users are reminded that when actually using this technology, the collection and processing of data should comply with laws and regulations related to data and user information protection.
[0126] In some embodiments, the present application also provides a target attribute recognition device for implementing the target attribute recognition method of any of the above embodiments.
[0127] See also Figure 6 , Figure 6 4 is a schematic diagram of a structure of an embodiment of a device for identifying a target attribute of the present application. The device for identifying a target attribute 40 comprises an acquisition module 41, a scheduling module 42 and an identification module 43. The modules are interconnected.
[0128] The acquisition module 41 is used to acquire a number of images to be processed and to acquire attribute recognition tasks corresponding to a number of attributes.
[0129] The scheduling module 42 is used to determine the target scheduling for attribute recognition using the relevant information of the target objects in several images to be processed; wherein the target scheduling includes at least one of a target image and a recognition target, the target image is the image to be processed for attribute recognition, and the recognition target is the target object for attribute recognition in the image to be processed.
[0130] The identification module 43 is used to execute the corresponding attribute identification task according to the target scheduling to obtain the attribute identification result.
[0131] It should be noted that the target attribute identification device provided in the above embodiment and the target attribute identification method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In practical applications, the target attribute identification device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this application does not limit this.
[0132] For the above embodiment, the present application provides a computer device, see Figure 7 , Figure 71 is a schematic diagram of the structure of an embodiment of a computer device of the present application. The computer device 50 includes a memory 51 and a processor 52, wherein the memory 51 and the processor 52 are coupled to each other, the memory 51 stores program data, and the processor 52 is used to execute the program data to implement the steps of any embodiment of the attribute recognition method of the above-mentioned target.
[0133] In this embodiment, the processor 52 may also be referred to as a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip having the ability to process signals. The processor 52 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or the processor 52 may also be any conventional processor, etc.
[0134] The method of the above embodiment can be implemented in the form of a computer program, so the present application proposes a computer readable storage medium, see Figure 8 , Figure 8 The computer-readable storage medium 60 stores program data 61 that can be executed by a processor, and the program data 61 can be executed by the processor to implement the steps of any embodiment of the attribute identification method of the above-mentioned target.
[0135] The computer-readable storage medium 60 of this embodiment may be a medium that can store the program data 61, such as 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, or may be a server storing the program data 61. The server may send the stored program data 61 to other devices for execution, or may execute the stored program data 61 by itself.
[0136] In some embodiments, the functions or modules included in the device provided in the above embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, the present application will not go into details here.
[0137] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other. For the sake of brevity, this application will not go into details here.
[0138] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0139] 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 embodiment.
[0140] 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.
[0141] 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, which is 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, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of each implementation method of the present application.
[0142] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a computer-readable storage medium and executed by a computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.
[0143] The above descriptions are merely embodiments of the present application and are not intended to 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 method for identifying target attributes, characterized in that: include: Obtaining a number of images to be processed, and obtaining attribute recognition tasks corresponding to a number of attributes; Determine the target scheduling for attribute recognition by using the relevant information of the target objects in the plurality of images to be processed; wherein the target scheduling includes at least one of a target image and a recognition target, the target image is the image to be processed for attribute recognition, and the recognition target is the target object for attribute recognition in the image to be processed; Execute the corresponding attribute recognition task according to the target scheduling to obtain the attribute recognition result; The relevant information of the target object includes motion information of the target object, the plurality of images to be processed include images to be processed of at least two different channels, and the focal lengths corresponding to different channels are different; and determining the target scheduling for attribute recognition by using the relevant information of the target object in the plurality of images to be processed includes: Acquire a motion trend of a target object in the plurality of images to be processed; wherein the motion trend represents a motion trend of the target object in a field of view corresponding to the at least two different channels; The motion trend is used to determine a target channel for attribute recognition, and the image to be processed corresponding to the target channel is used as the target image.
2. The method according to claim 1, characterized in that The relevant information of the target object also includes quality information of the target object; and determining the target scheduling for attribute recognition by using the relevant information of the target objects in the plurality of images to be processed further includes: The target object for attribute recognition is determined by using the quality information of the target objects in the plurality of images to be processed, thereby obtaining a recognition target.
3. The method according to claim 1, characterized in that The step of utilizing the motion trend to determine a target channel for attribute recognition includes: In response to the movement trend being a first type of movement direction, determining an initial channel corresponding to the first type of movement direction as a target channel; or, In response to the movement trend being the second type of movement direction, a target channel for attribute recognition is determined using a position of the target object within the field of view of the at least two different channels.
4. The method according to claim 3, characterized in that The at least two different channels include a first channel and a second channel of different channels, wherein the focal length of the first channel is greater than the focal length of the second channel; The first type of movement direction includes: an incoming movement direction or an outgoing movement direction, the target channel corresponding to the incoming movement direction is a first channel, and the target channel corresponding to the outgoing movement direction is a second channel; And / or, determining the target channel for attribute recognition by using the position of the target object in the field of view of the at least two different channels comprises any of the following steps: In response to the target object being located within a preset common viewing range corresponding to the first channel and the second channel, determining the first channel as a target channel; In response to the target object being located within a preset transition range corresponding to the first channel and the second channel, determining the corresponding first channel and the second channel as target channels; In response to the target object being located only within a preset visual field corresponding to the second channel, the second channel is determined to be a target channel.
5. The method according to claim 2, characterized in that: The step of using the quality information of the target objects in the plurality of images to be processed to determine the target objects for attribute recognition and obtain the recognition targets includes: Using the quality information of the target object in the image to be processed, determining the target object whose quality information meets the preset quality condition, and obtaining the recognition target; The preset quality condition includes at least one of the following: the pixel scale of the target object is greater than a preset pixel threshold, the position information of the target object does not meet the image boundary condition, and the occlusion condition of the target object meets the preset occlusion condition.
6. The method according to claim 1, characterized in that Before executing the corresponding attribute recognition task according to the target scheduling and obtaining the attribute recognition result, the method includes: According to a preset frame skipping interval, the plurality of attributes are allocated to the plurality of images to be processed, so as to obtain a target attribute corresponding to each image to be processed.
7. The method according to claim 6, characterized in that Before allocating the plurality of attributes to the plurality of images to be processed according to the preset frame skipping interval to obtain the target attribute corresponding to each of the images to be processed, the method includes: Determining the number of attributes of the plurality of attributes and the frame rates of the plurality of images to be processed; A preset frame skipping interval corresponding to each attribute is determined according to the attribute quantity and the frame rate.
8. The method according to claim 1 or 6, characterized in that: The target attribute corresponding to the image to be processed includes at least one attribute among a plurality of attributes; The executing the corresponding attribute recognition task according to the target scheduling to obtain the attribute recognition result includes: For the recognition target in the target image, an attribute recognition task corresponding to the target attribute is performed to obtain an attribute recognition result of the recognition target for the target attribute.
9. The method according to claim 1, characterized in that: After executing the corresponding attribute recognition task according to the target scheduling and obtaining the attribute recognition result, the method includes: Evaluate the attribute recognition result of each target object to obtain the evaluation of each attribute on the attribute recognition result; Based on the evaluation of each attribute on the attribute recognition result, the final attribute recognition result of the attribute recognition task corresponding to each attribute is determined, and / or the execution status of the attribute recognition task corresponding to each attribute is determined.
10. A computer device, characterized in that: The invention comprises a memory and a processor coupled to each other, wherein the memory stores program data, and the processor is used to execute the program data to implement the steps of the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: Program data that can be executed by a processor are stored, and the program data is used to implement the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Image recognition method and device, computer equipment and storage medium
CN111178128A
Object identification method and device, server and medium
CN113518217A