Human body target detection method and device, computer equipment and storage medium
By using the backbone network to extract features in the human target detection model and combining it with the parameter correlation of the branch network, the problem of being unable to simultaneously output multi-target and multi-attribute detection results in the existing technology is solved, and the calculation amount of multi-task detection is reduced and detected. Improved efficiency.
Patent Information
- Application Number
- CN202411073397.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing human target detection methods based on deep learning cannot output multi-target and multi-attribute detection results at the same time, resulting in a large amount of calculation for multi-task detection and the lack of effective solutions.
Features are extracted from the input image through the backbone network in the target detection model, and these features are input to the branch network. The parameters of the branch network are associated with the detection results to achieve the detection of multiple attribute information of each human target. Using encoding The decoder-decoder architecture and the method of freezing the parameters of the backbone network to train branch networks reduce the amount of calculation.
It realizes the simultaneous output of detection results of multiple targets and attributes, significantly reduces the calculation amount of the model, and improves detection efficiency and accuracy.
Smart Images

Figure CN118587746A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, apparatus, computer equipment and storage medium for detecting human targets. Background Art
[0002] Human target detection is one of the effective ways to understand human targets in images. It is used to locate the area where the human body is located and divide it into multiple semantic areas. However, most of the current human target detection methods based on deep learning cannot output multi-target and multi-attribute detection results at the same time, resulting in a large amount of computation for multi-task detection.
[0003] There is no effective solution to the problem that related technologies cannot simultaneously output detection results of multiple targets and multiple attributes, resulting in a large amount of computation for multi-task detection. Summary of the invention
[0004] In this embodiment, a human target detection method, apparatus, computer device and storage medium are provided to solve the problem in the related art that the detection results of multiple targets and multiple attributes cannot be output simultaneously, resulting in a large amount of calculation for multi-task detection.
[0005] In a first aspect, a method for detecting a human target is provided in this embodiment, and the method includes: Extracting features of the input image through a backbone network in the target detection model to obtain common features of the input image; The common features of the input image are input into the branch network in the target detection model to obtain detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target.
[0006] In some of the embodiments, feature extraction is performed on the input image through the backbone network in the target detection model to obtain the common features of the input image, including: Acquire processing information corresponding to the input image; the processing information is used to indicate a plurality of attribute information to be detected corresponding to each of the human targets in the input image; The input image and the processed information are input into a backbone network in a target detection model to obtain common features of the input image.
[0007] In some of the embodiments, before extracting features from the input image through the backbone network in the target detection model to obtain the common features of the input image, the method further includes: Acquire a first sample image with labeled data and a second sample image without labeling; the number of the first sample images is less than the number of the second sample images; Training a backbone network in the target detection model using the second sample image, and freezing parameters of the trained backbone network; Based on the first sample image and the trunk network with frozen parameters, the branch network in the object detection model is trained.
[0008] In some embodiments, the attribute information includes annotated attributes and / or extended attributes of the human target; wherein the annotated attributes are human attributes annotated in sample images used for training the model, and the extended attributes are human attributes not annotated in sample images used for training the model.
[0009] In some embodiments, the method further comprises: In the case that the branch network includes a plurality of sub-branch networks, each of the sub-branch networks is used to detect different attribute information.
[0010] In some embodiments, the method further comprises: In the case where the branch network includes multiple sub-branch networks, the sub-branch networks are trained based on the loss function corresponding to each of the sub-branch networks.
[0011] In some of the embodiments, the target detection model adopts an encoder-decoder architecture; wherein the backbone network includes an encoder unit and the branch network includes a decoder unit.
[0012] In a second aspect, a human target detection device is provided in this embodiment, the device comprising: an extraction module and a detection module; The extraction module is used to extract features from the input image through the backbone network in the target detection model to obtain the common features of the input image; The detection module is used to input the common features of the input image into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each of the human targets.
[0013] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the human target detection method described in the first aspect when executing the computer program.
[0014] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the human target detection method of the first aspect described above is implemented.
[0015] Compared with the related art, the human target detection method, apparatus, computer equipment and storage medium provided in this embodiment perform feature extraction on the input image through the backbone network in the target detection model to obtain the common features of the input image; the common features of the input image are input into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target, which solves the problem that the detection results of multiple targets and multiple attributes cannot be output simultaneously, resulting in a large amount of computation for multi-task detection, and realizes the simultaneous output of the detection results of multiple targets and multiple attributes, significantly reducing the amount of model computation.
[0016] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a hardware structure block diagram of a terminal device of a human target detection method provided by an embodiment of the present application; Figure 2 is a flow chart of a human target detection method provided by an embodiment of the present application; Figure 3 is a flow chart of a human target detection method provided by an embodiment of the present application; Figure 4 is a schematic diagram of the structure of multiple sub-branch networks provided in an embodiment of the present application; Figure 5 is a flow chart of a human target detection method provided by a preferred embodiment of the present application; Figure 6 It is a structural block diagram of a human target detection device provided in one embodiment of the present application.
[0018] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, extraction module; 20, detection module. DETAILED DESCRIPTION
[0019] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0020] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0021] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the human target detection method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the human target detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0024] In this embodiment, a method for detecting a human target is provided. Figure 2 is a flow chart of the human target detection method of this embodiment, such as Figure 2 As shown, the process includes the following steps: Step S210, extracting features of the input image through the backbone network in the target detection model to obtain common features of the input image; Step S220, input the common features of the input image into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target.
[0025] Specifically, the target detection model includes a backbone network and a branch network, the backbone network is used to extract image features, and the branch network is responsible for the detection task of human targets. During the training process of the target detection model, a large number of unlabeled second sample images are collected, and some of the second sample images are required to contain multiple human targets. The backbone network in the target detection model is trained through the second sample images, and the parameters of the trained backbone network are frozen, that is, the parameters of the backbone network are not updated during the back propagation of the training branch network. Afterwards, a small number of first sample images are collected for annotation processing, and the annotation content includes human target frame annotation, human key point annotation, human segmentation annotation, human posture annotation, human part annotation, and human orientation annotation. The branch network in the target detection model is trained through the first sampling image with labeled data. The training process of the branch network does not update the parameters of the backbone network, but only updates the parameters of the branch network.
[0026] Furthermore, the input image actually collected is input into the target detection model, and the input image contains multiple human targets, for example, an image containing multiple pedestrians collected by a security surveillance camera. The input image is feature extracted through the backbone network in the target detection model to obtain the common features of the input image, which include but are not limited to the color features, texture features, shape features and spatial relationship features of the image, and the common features of the input image are input into the branch network in the target detection model for processing to obtain the detection results corresponding to each human target in the input image.
[0027] Among them, the parameters of the branch network are associated with the detection results, that is, according to the requirements of human target detection, the parameters of the branch network are set accordingly, so that the branch network can process the common features of the input image accordingly to obtain the required detection results. For example, when the requirements of human target detection are to obtain human posture and human orientation, the parameters of the branch network are set based on the human posture detection task and the human orientation detection task, so that the human posture detection result and the human orientation detection result can be output by the processing of the branch network. The detection result includes multiple attribute information of each human target in the input image, and the attribute information includes but is not limited to the human target frame, human key points, human segmentation results, human posture, human part information and human orientation. This embodiment does not limit the category of human detection tasks.
[0028] It should be noted that in order to output corresponding human attributes according to actual application requirements, during the training stage of the target detection model, the target detection model can be trained in combination with sample images and corresponding processing information. The processing information is used to indicate multiple attribute information to be detected corresponding to each human target in the input image. For example, the detection results output by the specified model are the human segmentation results, human posture information and human orientation information of each human target. In actual applications, the input image and the current processing information input can be processed by the trained target detection model to obtain the detection results specified by the current processing information, thereby achieving accurate human target detection. At the same time, it avoids outputting unnecessary human attribute information, reduces the computational complexity of the model, and improves the model processing efficiency.
[0029] Compared with the prior art, the present application extracts features from the input image through the backbone network in the target detection model to obtain the common features of the input image; the common features of the input image are input into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target. Based on this, the common features of the input image are extracted through the backbone network in the target detection model, and the multiple attribute information of each human target in the output image is detected using the branch network in the target detection model, which solves the problem that the detection results of multiple targets and multiple attributes cannot be output simultaneously, resulting in a large amount of calculation for multi-task detection, and realizes the simultaneous output of the detection results of multiple targets and multiple attributes, significantly reducing the amount of model calculation.
[0030] In some embodiments, step S210 of extracting features from the input image through the backbone network in the target detection model to obtain common features of the input image includes the following steps: Step S211, obtaining processing information corresponding to the input image; the processing information is used to indicate a plurality of attribute information to be detected corresponding to each human target in the input image; Step S212, input the input image and the processed information into the backbone network in the target detection model to obtain the common features of the input image.
[0031] Specifically, user-defined processing information is obtained according to actual application requirements, and the processing information is used to indicate multiple attribute information to be detected corresponding to each human target in the input image. For example, the processing information specifies that the detection results output by the model are human segmentation results, human posture information, and human orientation information for each human target.
[0032] Furthermore, if Figure 3As shown, the input image and the current processing information are input into the backbone network in the target detection model, and according to the model output specified by the current processing information, the input image is feature extracted through the backbone network to obtain the common features of the input image.
[0033] It should be noted that the common features of the input image include but are not limited to the color features, texture features, shape features and spatial relationship features of the image. Among them, the shape features of the input image include edge detection results and contour descriptions, and the spatial relationship features include the adjacency relationship between different areas in the image.
[0034] Through this embodiment, processing information corresponding to the input image is obtained to indicate multiple attribute information to be detected corresponding to each human target in the input image, and the input image and the processing information are input into the backbone network in the target detection model to obtain the common features of the input image, so that on the basis of outputting multi-target and multi-attribute detection results, accurate output of human target detection results can be achieved, and unnecessary output of human attribute information can be avoided, so as to reduce the computational complexity of the model and improve the model processing efficiency.
[0035] In some of the embodiments, before extracting features from the input image through the backbone network in the target detection model to obtain the common features of the input image, the following steps are also included: Step S201, obtaining first sample images with labeled data and second sample images without labeling; the number of first sample images is less than the number of second sample images; Step S202, training the backbone network in the target detection model using the second sample image, and freezing the parameters of the trained backbone network; Step S203: training the branch network in the target detection model based on the first sample image and the trunk network with frozen parameters.
[0036] Specifically, a large number of unlabeled second sample images are collected. The image collection requirement is that some of the second sample images contain multiple human targets, and the preferred resolution of the sample images is 360P~8K. The backbone network in the target detection model is trained through the collected second sample images. The loss functions used for model training include mean absolute error (MAE), mean square error (MSE) and root mean square error (RMSE), among which the preferred loss function is mean absolute error. The parameters of the trained backbone network are frozen, that is, the parameters of the backbone network are not updated during the back propagation of the training branch network.
[0037] Afterwards, under the premise that the number of first sample images is less than the number of second sample images, a small number of first sample images are collected for annotation processing, and the annotation content of the first sample images includes human target frame annotation, human key point annotation, human segmentation annotation, human posture annotation, human part annotation and human orientation annotation, etc. The branch network in the target detection model is trained through the first sampling image with annotation data. The training process of the branch network does not update the parameters of the trunk network, but only updates the parameters of the branch network, thereby completing the training of the target detection model. Among them, human postures include upright, sitting on the ground, sitting on a chair, squatting, etc., human parts include the head, face, hands and feet, etc., and the annotation of the human orientation angle can be in units of preset angle values, such as 10° as the basic unit of human orientation annotation.
[0038] It should be noted that if it is desired to use processing information to specify the attribute categories contained in the model detection results, during the model training stage, the target detection model is trained in combination with the above-mentioned sample images and the corresponding processing information, so that the model can output multiple human attributes required for practical applications, thereby improving the model processing efficiency.
[0039] Through this embodiment, a first sample image with labeled data and a second sample image without labeling are obtained, and the number of the first sample images is less than the number of the second sample images. The backbone network in the target detection model is trained through the second sample image, and the parameters of the trained backbone network are frozen. Based on the first sample image and the backbone network with frozen parameters, the branch network in the target detection model is trained, so that a small amount of labeled data is used to implement model training and reduce the labor cost of image labeling. In addition, the parameters of the backbone network after training are frozen, and the branch network training only updates the parameters of the branch network, so as to facilitate the subsequent expansion of multiple tasks related to human body detection and achieve rapid convergence of the model.
[0040] In some of the embodiments, the attribute information includes annotated attributes and / or extended attributes of the human target; wherein the annotated attributes are the human attributes annotated in the sample images used to train the model, and the extended attributes are the human attributes not annotated in the sample images used to train the model.
[0041] Specifically, the attribute information corresponding to each human target includes the annotated attributes and / or extended attributes of the human target. The annotated attributes are the human attributes annotated in the sample images used to train the model. For example, in the training stage of the target detection model, the annotation content of the first sample image used to train the branch network includes human target frame annotation, human key point annotation, human segmentation annotation, human posture annotation, human part annotation and human orientation annotation. The annotated attributes include human target frame, human key point, human segmentation result, human posture, human part information and human orientation.
[0042] The extended attributes are the human attributes that are not labeled in the sample images used to train the model. For example, when the annotation content of the first sample image includes human target frame annotation, human key point annotation, human segmentation annotation, human posture annotation, human part annotation and human orientation annotation, the human facial expression, human hand posture and other human attributes that are not labeled in the first sample image are all extended attributes.
[0043] It should be noted that the object detection model trained based on sample images containing annotated attributes has the ability to output extended attributes of the human body. In addition, after the object detection model is trained, if it is necessary to expand multiple tasks related to the human body, a small number of sample images can be collected to annotate the extended attributes, freeze the parameters of the backbone network, and fine-tune the branch network in the model based on the sample images annotated with extended attributes.
[0044] Through this embodiment, the target detection model can output the annotated attributes and / or extended attributes of the human target in the image, thereby conveniently implementing the expansion of the human detection task and improving the detection performance of the model. In some embodiments, the human target detection method further includes the following steps: In the case where a branch network includes a plurality of sub-branch networks, each sub-branch network is used to detect different attribute information.
[0045] Specifically, the branch network can be responsible for multiple human body detection tasks at the same time, or the branch network can be composed of multiple sub-branch networks, each of which is responsible for different human body detection tasks. In the case where the branch network includes multiple sub-branch networks, each sub-branch network is built after the main network, and a corresponding human body detection task is assigned to each sub-branch network. For example, Figure 4 As shown, each sub-branch network is used for human target frame detection, human key point detection, human segmentation, human posture detection, human part detection and human orientation detection.
[0046] It should be noted that if the branch network includes multiple sub-branch networks, each sub-branch network is trained using sample images labeled with human attributes during the branch network training process. In addition, when it is necessary to expand multiple tasks related to human detection, you can choose to add corresponding sub-branch networks to perform the expanded detection tasks.
[0047] Through this embodiment, when a branch network includes multiple sub-branch networks, each sub-branch network is set to detect different attribute information, so that on the basis of extracting common features through the backbone network, more fine-grained feature extraction and learning can be achieved, while facilitating the subsequent expansion of multiple tasks related to human body detection.
[0048] In some embodiments, the human target detection method further includes the following steps: In the case where the branch network includes multiple sub-branch networks, the sub-branch networks are trained based on the loss function corresponding to each sub-branch network.
[0049] Specifically, if the branch network includes multiple sub-branch networks, during the branch network training process, sample images labeled with human attributes are used to train the sub-branch networks responsible for corresponding detection tasks respectively.
[0050] For example, Figure 4 As shown in Figure 1, each sub-branch network is built after the main network. Each sub-branch network is used for human target frame detection, human key point detection, human segmentation, human posture detection, human part detection and human orientation detection. The loss function of the model is l loss as follows: Among them, l det is the human target frame positioning loss function; l pose is the loss function for human posture detection; l mask is the human body segmentation loss function; l iou is the loss function for human body part detection; l ori is the loss function for human orientation detection; l oks Loss function for human key point detection.
[0051] Through this embodiment, when a branch network includes multiple sub-branch networks, the sub-branch networks are trained based on the loss function corresponding to each sub-branch network, which facilitates the subsequent expansion of multiple tasks related to human body detection.
[0052] In some of the embodiments, the target detection model adopts an encoder-decoder architecture; wherein the backbone network includes an encoder unit and the branch network includes a decoder unit.
[0053] Specifically, in the target detection model, first build a backbone network containing encoder units, for example, the backbone network adopts a combination of Visual Transformer and Transformer encoder structures, and then build a branch network containing decoder units after the backbone network, for example, the branch network adopts a Transformer decoder structure. Among them, if the branch network is responsible for multiple human detection tasks at the same time, the branch network uses a common Transformer decoder; if the branch network includes multiple sub-branch networks, each sub-branch network uses a Transformer decoder. Based on this, when it is necessary to expand multiple tasks related to human detection, fine-tune the common branch network, or add a corresponding Transformer decoder to the branch network to achieve the expansion of the detection task.
[0054] It should be noted that the target detection model in this embodiment uses a self-attention mechanism to encode and learn the input sequence, so as to capture the dependencies between different positions in the sequence, achieve context awareness, and facilitate multi-task learning of human target detection.
[0055] Through this embodiment, an encoder-decoder architecture is adopted as the target detection model, which significantly improves the generalization performance of the model, and uses the encoder to extract rich contextual information to facilitate multi-task learning of human target detection. At the same time, the model is guaranteed to be flexible and scalable, thereby improving the accuracy and efficiency of human target detection.
[0056] The present embodiment is described and illustrated below through preferred embodiments.
[0057] Figure 5 is a flow chart of the human target detection method of the preferred embodiment, such as Figure 5 As shown, the human target detection method includes the following steps: Step S510, obtaining first sample images with labeled data and second sample images without labeling; the number of first sample images is less than the number of second sample images; Step S520, training the backbone network in the target detection model using the second sample image, and freezing the parameters of the trained backbone network; Step S530, training the branch network in the object detection model based on the first sample image and the trunk network with frozen parameters; Step S540, obtaining processing information corresponding to the input image; wherein the processing information is used to indicate a plurality of attribute information to be detected corresponding to each human target in the input image, and the attribute information includes the annotated attributes and / or extended attributes of the human target; Step S550, inputting the input image and the processed information into the backbone network in the target detection model to obtain the common features of the input image; Step S560, input the common features of the input image into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target.
[0058] Through this embodiment, a first sample image with labeled data and a second sample image that is not labeled are obtained, wherein the number of the first sample images is less than the number of the second sample images, the backbone network in the target detection model is trained through the second sample images, and the parameters of the trained backbone network are frozen, and the branch network in the target detection model is trained based on the first sample images and the backbone network with frozen parameters, so that the model training is realized with a small amount of labeled data, the labor cost of image annotation is reduced, and the rapid convergence of the model is achieved.
[0059] Furthermore, processing information corresponding to the input image is obtained, and the processing information is used to indicate multiple attribute information to be detected corresponding to each human target in the input image, and the attribute information includes the annotated attributes and / or extended attributes of the human target. The input image and the processing information are input into the backbone network in the target detection model to obtain the common features of the input image, and the common features of the input image are input into the branch network in the target detection model to obtain multiple attribute information corresponding to each human target in the input image, which solves the problem that the detection results of multiple targets and multiple attributes cannot be output simultaneously, resulting in a large amount of calculation for multi-task detection, and realizes the simultaneous output of the detection results of multiple targets and multiple attributes, significantly reducing the amount of model calculation.
[0060] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0061] In this embodiment, a human target detection device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit" and the like used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0062] Figure 6 is a structural block diagram of the human target detection device of this embodiment, such as Figure 6As shown, the device comprises: an extraction module 10 and a detection module 20; An extraction module 10 is used to extract features from an input image through a backbone network in a target detection model to obtain common features of the input image; The detection module 20 is used to input the common features of the input image into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target.
[0063] Through the device provided in this embodiment, the input image is feature extracted through the backbone network in the target detection model to obtain the common features of the input image; the common features of the input image are input into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target, thereby solving the problem that the detection results of multiple targets and multiple attributes cannot be output simultaneously, resulting in a large amount of computation for multi-task detection, and realizing the simultaneous output of the detection results of multiple targets and multiple attributes, significantly reducing the amount of model computation.
[0064] In some of the embodiments, the extraction module 10 is also used to obtain processing information corresponding to the input image; the processing information is used to indicate multiple attribute information to be detected corresponding to each human target in the input image; the input image and the processing information are input into the backbone network in the target detection model to obtain the general features of the input image.
[0065] In some of these embodiments, Figure 6 On the basis of, the device also includes a training module, which is used to obtain a first sample image with labeled data and a second sample image that is not labeled; the number of the first sample images is less than the number of the second sample images; the backbone network in the target detection model is trained through the second sample images, and the parameters of the trained backbone network are frozen; based on the first sample images and the backbone network with frozen parameters, the branch network in the target detection model is trained.
[0066] In some of the embodiments, the training module is further used to train the sub-branch network based on the loss function corresponding to each sub-branch network when the branch network includes multiple sub-branch networks.
[0067] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0068] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0069] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0070] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, extract features from the input image through the backbone network in the target detection model to obtain the common features of the input image; S2, inputting the common features of the input image into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target.
[0071] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0072] In addition, in combination with the human target detection method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the human target detection method. The storage medium stores a computer program; when the computer program is executed by a processor, any human target detection method in the above embodiments is implemented.
[0073] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0074] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0075] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0076] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A human target detection method, characterized in that: The method comprises: Extracting features of the input image through a backbone network in the target detection model to obtain common features of the input image; The common features of the input image are input into the branch network in the target detection model to obtain detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each human target.
2. The human target detection method according to claim 1, characterized in that: The input image is subjected to feature extraction through the backbone network in the target detection model to obtain the common features of the input image, including: Acquire processing information corresponding to the input image; the processing information is used to indicate a plurality of attribute information to be detected corresponding to each of the human targets in the input image; The input image and the processed information are input into a backbone network in a target detection model to obtain common features of the input image.
3. The human target detection method according to claim 1, characterized in that: Before extracting features from the input image through the backbone network in the target detection model to obtain the common features of the input image, the method further includes: Acquire a first sample image with labeled data and a second sample image without labeling; the number of the first sample images is less than the number of the second sample images; Training a backbone network in the target detection model using the second sample image, and freezing parameters of the trained backbone network; Based on the first sample image and the trunk network with frozen parameters, the branch network in the object detection model is trained.
4. The human target detection method according to claim 1, characterized in that: The attribute information includes the annotated attributes and / or extended attributes of the human target; wherein the annotated attributes are the human attributes annotated in the sample images used for training the model, and the extended attributes are the human attributes not annotated in the sample images used for training the model.
5. The human target detection method according to claim 1, characterized in that: The method further comprises: In the case that the branch network includes a plurality of sub-branch networks, each of the sub-branch networks is used to detect different attribute information.
6. The human target detection method according to claim 5, characterized in that: The method further comprises: In the case where the branch network includes multiple sub-branch networks, the sub-branch networks are trained based on the loss function corresponding to each of the sub-branch networks.
7. The human target detection method according to any one of claims 1 to 6, characterized in that: The target detection model adopts an encoder-decoder architecture; wherein the backbone network includes an encoder unit and the branch network includes a decoder unit.
8. A human target detection device, characterized in that: The device comprises: an extraction module and a detection module; The extraction module is used to extract features from the input image through the backbone network in the target detection model to obtain the common features of the input image; The detection module is used to input the common features of the input image into the branch network in the target detection model to obtain the detection results corresponding to each human target in the input image; wherein the parameters of the branch network are associated with the detection results, and the detection results include multiple attribute information of each of the human targets.
9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the human target detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the human target detection method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image detection method, device and equipment and storage medium
CN111640103A
Biological body detection method, device and equipment
CN117095205A
Training method of image processing model, image processing method, equipment and medium
CN117391176A
Object attribute detection method and device, neural network training method and device, and regional detection method and device
WO2018121690A1
Cited By
Object attribute identification method and device, medium and electronic equipment
CN118762335A
Object attribute recognition method, device, medium and electronic device
CN118762335B
