Target attribute recognition method, device, computer equipment and storage medium

By integrating the nine-channel teacher network and the three-channel teacher network trained by distillation and optimizing the three-channel student network, the errors caused by background interference in human attribute recognition are solved, and high-precision recognition is achieved quickly and at low cost.

CN114529572BActive Publication Date: 2025-09-09SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111651423.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-09-09
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

Existing technologies for human attribute recognition often suffer from recognition errors due to background interference, and adding labeled samples or image preprocessing can be costly and time-consuming.

Method used

The nine-channel teacher network and the three-channel teacher network are used to perform integrated distillation training on the three-channel student network. By generating nine-channel images and soft labels, combining hard labels to generate the total loss results, the three-channel student network parameters are optimized until the training is completed.

Benefits of technology

Without increasing the number of labeled samples and image preprocessing, the accuracy of human attribute recognition is improved, the recognition speed is kept fast and the cost is low, and the difficulty of network model deployment is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529572B_ABST
    Figure CN114529572B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, computer device, and storage medium for target attribute recognition. The method may include: reading a first target original image, a first target nine-channel image, and a first label; processing the first target nine-channel image through a nine-channel teacher network to obtain a first prediction result; processing the first target original image through a three-channel teacher network to obtain a second prediction result; and processing the first target original image through a three-channel student network to obtain a third prediction result; generating a total loss result based on the prediction result and the first label; determining whether the three-channel student network has been trained; and iterating until training is complete if it has not; and processing the second target original image using the trained three-channel student network to obtain a recognition result. The present invention does not require additional training data, does not increase labeling costs, directly recognizes the target original image, and has a relatively fast recognition speed. Therefore, the present invention takes into account both the time and cost requirements of the target attribute recognition process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology. More specifically, the present invention can provide a target attribute recognition method, device, computer equipment and storage medium. Background Art

[0002] With the development of artificial intelligence, computer vision technology has experienced rapid growth, particularly in human attribute recognition. In practical applications, interference from the background of the human figure often leads to significant errors in human attribute recognition results. For example, if a tree with green leaves is behind a person in an image, conventional techniques, when identifying the color of clothing, will often be affected by the background and misidentify the clothing as green. To overcome this problem, some have proposed increasing the number of labeled samples to improve the recognition accuracy of human attribute recognition network models. However, the large number of labeled samples results in excessively high investment costs. Others have proposed adding more raw image preprocessing steps, which, while helpful in improving human attribute recognition results, can make the human attribute recognition process extremely time-consuming. Therefore, how to improve human attribute recognition without increasing the number of labeled samples or image preprocessing steps has become a pressing technical issue and a research focus for those skilled in the art. Summary of the Invention

[0003] In order to solve the problem that traditional human attribute recognition solutions are time-consuming or have too large a sample size, resulting in high costs, one or more embodiments of the present invention can provide a target attribute recognition method, apparatus, computer equipment and storage medium to take into account the time and cost requirements of the target attribute recognition solution.

[0004] To achieve the above technical objectives, the present invention provides a target attribute recognition method, which includes but is not limited to one or more of the following steps.

[0005] A first target original image, a first target nine-channel image, and a first label are read; wherein the first target nine-channel image is generated based on the first target original image.

[0006] The first target nine-channel image is processed by a nine-channel teacher network to obtain a first prediction result; the first target original image is processed by a three-channel teacher network to obtain a second prediction result; and the first target original image is processed by a three-channel student network to obtain a third prediction result; wherein the nine-channel teacher network and the three-channel teacher network are both trained networks, and the three-channel student network is a network to be trained.

[0007] A total loss result is generated based on the first prediction result, the second prediction result, the third prediction result, and the first label.

[0008] Determine whether the three-channel student network has been trained according to the total loss result. If the training is not completed, update the parameters of the three-channel student network and return to the image processing step for iterative training until the three-channel student network training is completed.

[0009] The trained three-channel student network is used to process the second target original image to obtain a target attribute recognition result of the second target original image.

[0010] To achieve the above technical objectives, the present invention can also provide a target attribute recognition device, which includes but is not limited to a target image reading module, a target image processing module, a network loss generation module, an iterative training judgment module and a target attribute recognition module.

[0011] The target image reading module is used to read the first target original image, the first target nine-channel image and the first label; wherein the first target nine-channel image is generated based on the first target original image.

[0012] A target image processing module is configured to process the first target nine-channel image through a nine-channel teacher network to obtain a first prediction result; to process the first target original image through a three-channel teacher network to obtain a second prediction result; and to process the first target original image through a three-channel student network to obtain a third prediction result; wherein the nine-channel teacher network and the three-channel teacher network are both trained networks, and the three-channel student network is a network to be trained.

[0013] A network loss generation module is used to generate a total loss result based on the first prediction result, the second prediction result, the third prediction result and the first label.

[0014] An iterative training judgment module is used to determine whether the three-channel student network has been trained according to the total loss result, and to update the parameters of the three-channel student network and return to the image processing step for iterative training if the training is not completed until the three-channel student network training is completed.

[0015] The target attribute recognition module is used to process the second target original image using the trained three-channel student network to obtain a target attribute recognition result of the second target original image.

[0016] In order to achieve the above-mentioned technical objectives, the present invention can also provide a computer device, which may include a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the target attribute identification method described in any embodiment of the present invention.

[0017] To achieve the above technical objectives, the present invention can also provide a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to execute the steps of the target attribute identification method in any embodiment of the present invention.

[0018] To achieve the above technical objectives, the present invention can also provide a computer program product. When the instructions in the computer program product are executed by a processor, the steps of the target attribute identification method described in any embodiment of the present invention are executed.

[0019] The beneficial effects of the present invention are as follows: the present invention trains a three-channel student network based on a nine-channel teacher network and a three-channel teacher network, and the training process does not require additional training data, and the labeling cost will not increase; the present invention utilizes the trained three-channel student network to directly recognize the original target image, and the recognition speed is very fast, so the present invention can effectively take into account the time and cost requirements of the target attribute recognition process. It can be seen that the present invention provides a target attribute recognition method based on integrated distillation, which not only reduces the impact of the background on target attribute recognition, and improves the target attribute recognition accuracy without increasing the labeled samples, but also does not increase the complexity of image preprocessing, so as to keep the difficulty of network model deployment unchanged and ensure rapid recognition of target attributes. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic flow chart of a target attribute recognition method in one or more embodiments of the present invention is shown.

[0021] Figure 2 A schematic diagram of a process for performing integrated distillation training on a three-channel student network using a trained nine-channel teacher network and a three-channel teacher network in one or more embodiments of the present invention is shown.

[0022] Figure 3 A schematic diagram of a nine-channel teacher network training process in one or more embodiments of the present invention is shown.

[0023] Figure 4 A schematic diagram of a process for forming a nine-channel image based on a three-channel image in one or more embodiments of the present invention is shown.

[0024] Figure 5 A schematic diagram of a three-channel teacher network training process in one or more embodiments of the present invention is shown.

[0025] Figure 6 A schematic diagram showing the structural composition of a target attribute recognition device in one or more embodiments of the present invention is shown.

[0026] Figure 7A schematic diagram of the internal structure of a computer device in one or more embodiments of the present invention is shown. DETAILED DESCRIPTION

[0027] The target attribute recognition method, device, computer equipment and storage medium provided by the present invention are explained and illustrated in detail below with reference to the drawings in the specification.

[0028] like Figure 1 shown, and can be combined Figure 2 One or more embodiments of the present invention can provide a method for identifying target attributes. The method may include but is not limited to at least one of the following steps, which are described in detail below.

[0029] Step 100 reads a first target original image, a first target nine-channel image, and a first label; wherein the first target nine-channel image is generated based on the first target original image. It should be understood that the first target of the present invention includes, but is not limited to, a human body, a vehicle, or an animal. The first target of the present invention can be a human body, and target attributes include, but are not limited to, clothing color, clothing type, whether a bag is carried, age, gender, and other human attributes.

[0030] like Figure 2 As shown, taking human attribute recognition as an example, the first target original image in the embodiment of the present invention can be a human original image (i.e., a human original image), the first target nine-channel image can be a human nine-channel image (i.e., a nine-channel image), and the first label can be, for example, a hard label in the field of machine learning.

[0031] In step 200, a first target nine-channel image is processed by a nine-channel teacher network to obtain a first prediction result; the first target original image is processed by a three-channel teacher network to obtain a second prediction result; and the first target original image is processed by a three-channel student network to obtain a third prediction result. The nine-channel teacher network and the three-channel teacher network are both trained networks, and the three-channel student network is a network to be trained. It is understood that the nine-channel teacher network, the three-channel teacher network, and the three-channel student network referred to in the present invention are all network models, such as but not limited to ResNet or MobileNet.

[0032] In an embodiment of the present invention, the accuracy of the first prediction result obtained by processing the nine-channel image of the first target through the nine-channel teacher network is higher than the second prediction result obtained by processing the original image of the first target through the three-channel teacher network. On this basis, the present invention realizes the effective improvement of the prediction performance of the three-channel student network by utilizing the nine-channel teacher network. Moreover, experiments have shown that the combination of the nine-channel teacher network and the three-channel teacher network makes the prediction results more accurate. The combination of the nine-channel teacher network and the three-channel teacher network improves the performance by about 2% compared with the nine-channel teacher network, so that the trained three-channel student network has higher target attribute recognition accuracy, thereby better distinguishing the difference between the target attributes and the background, such as distinguishing the color attributes of human clothes from the background color.

[0033] like Figure 3 As shown, for the scenario of human attribute recognition, the entire process of training the nine-channel teacher network (model) of the present invention may include but is not limited to the following steps.

[0034] First, the original human body image (human body original image) is segmented to obtain a human body mask image. This embodiment can select a segmentation model that can achieve the function of human body image segmentation, so as to achieve the purpose of human body part segmentation. The input of the segmentation model is the original human body image. Figure 3 Channel RGB image, which can be recorded as image ori The output after human body segmentation is a human body mask. In the human body mask, the background area can be represented by pure black (RGB values ​​are 255, 255, 255 respectively), and different parts of the human body can be represented by different colors, which can be recorded as image mask .

[0035] Secondly, a human body segmentation map is formed by using the human body mask map and the human body original image, and the human body original image, human body mask map and human body segmentation map are spliced ​​in the channel direction to obtain a human body nine-channel image. ori and human body mask image mask After element-by-element multiplication, we get the human body segmentation image seg ; The pixel value of the human body area in the human body segmentation map is equal to the pixel value of the original human body image, and the pixel value of the background area is 0. The specific calculation method is as follows.

[0036] image seg =image ori *sign(image mask )

[0037] Among them, * represents element-by-element multiplication, and the sign() function means that if the color at that position is pure black, the value of each channel at that position is set to (0,0,0), and if the color at that position is not pure black, it is set to (1,1,1).

[0038] For example, if the color at position [16,64] in the image is green and the RGB value is (0,255,0), then sign(image mask [16,64]) is equal to (1,1,1).

[0039] like Figure 4 As shown, the original human image, the human mask image, and the human segmentation image are all three-channel images. After splicing them in the channel direction, a nine-channel human image (nine-channel human image) is generated. It can be understood that the nine-channel human image of this embodiment not only maintains the attributes of clothing, but also maintains attributes such as age, gender, and handbag. The effect of the nine-channel human image is better than that of the six-channel human image (for example, original image + segmentation image or original image + mask image), especially in terms of attributes such as clothing.

[0040] Finally, the network model to be trained is trained using the nine-channel human body images and human body attribute labels to obtain a nine-channel teacher network. The nine-channel human body images and human body attribute labels are input into the network for training. The training process can be without a soft attention mechanism, or it can be with a soft attention mechanism, that is, the training process for obtaining the nine-channel teacher network can be combined with a soft attention mechanism. Among them, the network model to be trained in the present invention can be, for example, ResNet or MobileNet, of course, but is not limited thereto. The specific training strategy can be selected as needed, and the present invention will not be repeated here.

[0041] like Figure 5 As shown, for the scenario of human attribute recognition, the entire process of training the three-channel teacher network (model) of the present invention may include but is not limited to the following steps: inputting the original human image to the network model to be trained and obtaining the prediction result; calculating the loss based on the prediction result and the attribute label, and ending the training when the loss is less than or equal to the set threshold or the number of iterations reaches the set number, or updating the network parameters when the loss is greater than the set threshold and the number of iterations is less than the set number, and iterative training until the three-channel teacher network training is completed. Among them, the network model to be trained may include but is not limited to ResNet or MobileNet, and the loss function used to calculate the loss may be a cross-entropy loss function, of course, but is not limited to this.

[0042] Step 300: Generate a total loss result based on the first prediction result, the second prediction result, the third prediction result, and the first label.

[0043] In an embodiment of the present invention, generating a total loss result based on the first prediction result, the second prediction result, the third prediction result, and the first label may include: generating a second label using the first prediction result and the second prediction result, and generating a total loss result based on the second label, the first label, and the third prediction result. The second label can be understood as a soft label in the field of machine learning.

[0044] Specifically, in this embodiment, generating a second label from the first prediction result and the second prediction result may include: performing mean processing on the first prediction result and the second prediction result, and using the mean processing result as the second label. The mean processing may be an arithmetic mean processing or a weighted mean processing, and the present invention selects the method based on the specific situation. Taking the arithmetic mean processing as an example, if the first prediction result is <0.1, 0.1, 0.8> and the second prediction result is <0.1, 0.2, 0.7>, the mean processing result is <0.1, 0.15, 0.75>, and the second label is <0.1, 0.15, 0.75>.

[0045] One or more embodiments of the present invention generate a total loss result based on the second label, the first label, and the third prediction result, including: generating a first loss result based on the third prediction result and the first label, generating a second loss result based on the third prediction result and the second label, and obtaining a total loss result using the first loss result and the second loss result. Taking human attribute recognition as an example, this embodiment inputs the third prediction result and the first label into the first preset loss function to obtain the first loss result; similarly, this embodiment inputs the third loss result and the second label into the second preset loss function to obtain the second loss result. The first loss result of the embodiment of the present invention can be understood as the hard label loss in the field of machine learning, and the second loss result can be understood as the soft label loss in the field of machine learning. The loss function used to calculate the loss in the embodiment of the present invention can specifically be a cross-entropy loss function, but is of course not limited to this.

[0046] Optionally, embodiments of the present invention may utilize the first loss result and the second loss result to obtain a total loss result, including: summing the first loss result and the second loss result, and using the summed result as the total loss result. That is, the present invention sums the hard label loss and the soft label loss to obtain a total loss result. The total loss result in the present invention can be used to update the parameters of the three-channel student network and to determine whether the parameters of the three-channel student network have been trained.

[0047] Step 400, determines whether the three-channel student network has been trained based on the total loss result. If the training is not completed, the parameters of the three-channel student network are updated and the image processing step is returned to perform iterative training until the training of the three-channel student network is completed. It should be clarified again that the three-channel teacher network and the nine-channel teacher network involved in the embodiment of the present invention are networks that have been trained in advance and remain unchanged during the training process of the three-channel student network. If the training is not completed, the embodiment of the present invention needs to update the parameters of the three-channel student network, and the parameters may include but are not limited to weight parameters. Specifically, this embodiment can update the parameters of the three-channel student network based on the current total loss result, so that the next total loss result obtained based on the three-channel student network after the parameter update is smaller.

[0048] The present invention objectively and accurately measures the performance of the three-channel student network through the total loss result and updates the parameters in the three-channel student network, so as to gradually optimize and improve the target attribute recognition ability of the three-channel student network until the performance of the three-channel student network approaches the integrated performance of the nine-channel teacher model and the three-channel teacher model. It can be seen that the present invention can obtain a three-channel student network with extremely high target attribute recognition performance, so as to achieve accurate recognition of target attributes, especially accurate recognition of human body attributes.

[0049] like Figure 2 As shown, the present invention adopts an integrated distillation training method to train a three-channel student network through distillation of the existing nine-channel teacher network and the three-channel teacher network. The embodiment of the present invention determines whether the three-channel student network has been trained based on the total loss result, including: if the total loss result is less than the set threshold, it means that the performance of the three-channel student network has met the requirements, and then it is determined that the three-channel student network has been trained; if the total loss result is greater than or equal to the set threshold, it means that the performance of the three-channel student network has not met the requirements, and then it is determined that the three-channel student network has not been trained. It should be understood that the set threshold in this embodiment can be set according to actual conditions, and the present invention is not limited to this.

[0050] Optionally, the target attribute recognition method provided by the present invention can further include: obtaining the number of iterative training times; if the number of iterative training times reaches a set number, even if the total loss result is still greater than or equal to a set threshold, then determining that the three-channel student network has been trained; if the number of iterative training times does not reach the set number and the total loss result is greater than or equal to the set threshold, then determining that the three-channel student network has not been trained. It should be understood that the set number of times in the embodiment of the present invention can be set according to actual conditions, and the present invention is not limited to this.

[0051] Step 500: Process the second target original image using the trained three-channel student network to obtain a target attribute recognition result for the second target original image. In this embodiment, the second target original image is the image to be recognized, and a second target exists in the second target original image. The present invention then uses the trained three-channel student network to recognize the attributes of the second target. In this embodiment of the present invention, the second target can be a human body, and the present invention can provide a human attribute recognition method based on integrated distillation.

[0052] Based on the technical solution provided by the present invention, the present invention obtains a three-channel student network for target original image recognition based on a nine-channel teacher network and a three-channel teacher network, which improves the target attribute recognition accuracy without increasing the number of labeled samples, and does not require additional image preprocessing processes. The difficulty of network model deployment remains unchanged, and the rapid recognition of target attributes is guaranteed. The present invention has the outstanding advantages of fast target image recognition speed, low investment cost, and improving the model accuracy based on existing data as much as possible.

[0053] like Figure 6 As shown, based on the same inventive technical concept as the target attribute recognition method, one or more embodiments of the present invention can also provide a target attribute recognition device. The target attribute recognition device of the present invention may include but is not limited to a target image reading module 601, a target image processing module 602, a network loss generation module 603, an iterative training judgment module 604, and a target attribute recognition module 605, as described below.

[0054] The target image reading module 601 is configured to read a first target original image, a first target nine-channel image, and a first label; wherein the first target nine-channel image is generated based on the first target original image.

[0055] The target image processing module 602 is used to process the first target nine-channel image through the nine-channel teacher network to obtain a first prediction result; to process the first target original image through the three-channel teacher network to obtain a second prediction result; and to process the first target original image through the three-channel student network to obtain a third prediction result; wherein the nine-channel teacher network and the three-channel teacher network are both trained networks, and the three-channel student network is a network to be trained.

[0056] The network loss generation module 603 is used to generate a total loss result based on the first prediction result, the second prediction result, the third prediction result and the first label.

[0057] Specifically, the network loss generating module 603 is configured to generate a second label using the first prediction result and the second prediction result, and is further configured to generate a total loss result based on the second label, the first label, and the third prediction result.

[0058] Optionally, the network loss generating module 603 can be used to perform mean processing on the first prediction result and the second prediction result, and use the mean processing result as the second label.

[0059] More specifically, the network loss generation module 603 of the present invention is used to generate a first loss result based on the third prediction result and the first label, and to generate a second loss result based on the third prediction result and the second label, and to obtain a total loss result using the first loss result and the second loss result.

[0060] Optionally, the network loss generating module 603 is configured to sum the first loss result and the second loss result, and use the summed result as the total loss result.

[0061] The iterative training judgment module 604 is used to determine whether the three-channel student network has been trained based on the total loss result. If the training is not completed, it is used to update the parameters of the three-channel student network and return to the image processing step for iterative training until the training of the three-channel student network is completed.

[0062] Optionally, the iterative training judgment module 604 is used to determine that the three-channel student network has been trained based on the total loss result being less than a set threshold; or the iterative training judgment module 604 is used to determine that the three-channel student network has not been trained based on the total loss result being greater than or equal to a set threshold.

[0063] Optionally, the iterative training determination module 604 is configured to obtain the number of iterative training times. The iterative training determination module 604 is configured to determine that the three-channel student network has been trained when the number of iterative training times reaches a set number.

[0064] The target attribute recognition module 605 is used to process the second target original image using the trained three-channel student network to obtain a target attribute recognition result of the second target original image.

[0065] like Figure 7 As shown, based on the same inventive technical concept as the target attribute identification method, one or more embodiments of the present invention can also provide a computer device. The computer device includes, but is not limited to, a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the target attribute identification method in any embodiment of the present invention. The specific implementation process of the target attribute identification method has been described in detail in this specification and will not be repeated here.

[0066] like Figure 7As shown, based on the same inventive technical concept as the target attribute identification method, one or more embodiments of the present invention can also provide a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the target attribute identification method in any embodiment of the present invention. The specific implementation process of the target attribute identification method of the present invention has been described in detail in this specification and will not be repeated here.

[0067] Based on the same technical concept as the target attribute identification method, one or more embodiments of the present invention may also provide a computer program product. When the instructions in the computer program product are executed by a processor, the steps of the target attribute identification method described in any embodiment of the present invention are performed. The specific implementation process of the target attribute identification method has been described in detail in this specification and will not be repeated here.

[0068] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable storage medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0069] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0070] In the description of this specification, the description with reference to the terms "this embodiment", "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0071] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements and simple improvements made to the essential contents of the present invention should be included in the scope of protection of the present invention.

Claims

1. A target attribute recognition method, characterized in that: include: Reading a first target original image, a first target nine-channel image, and a first label; wherein the first target nine-channel image is generated based on the first target original image; Processing the first target nine-channel image through a nine-channel teacher network to obtain a first prediction result; processing the first target original image through a three-channel teacher network to obtain a second prediction result; processing the first target original image through a three-channel student network to obtain a third prediction result; wherein the nine-channel teacher network and the three-channel teacher network are both trained networks, the three-channel student network is a network to be trained, and the accuracy of the first prediction result is higher than that of the second prediction result; Generate a total loss result based on the first prediction result, the second prediction result, the third prediction result, and the first label; Determining whether the three-channel student network has been trained according to the total loss result, and if the training has not been completed, updating the parameters of the three-channel student network and returning to the image processing step to perform iterative training until the three-channel student network is trained, so that the performance of the three-channel student network approaches the integrated performance of the nine-channel teacher model and the three-channel teacher model; The trained three-channel student network is used to process the second target original image to obtain the target attribute recognition result of the second target original image, so as to distinguish the difference between the target attribute and the background.

2. The target attribute recognition method according to claim 1, characterized in that: Generating a total loss result based on the first prediction result, the second prediction result, the third prediction result, and the first label includes: Generate a second label based on the first prediction result and the second prediction result; A total loss result is generated based on the second label, the first label, and the third prediction result.

3. The target attribute recognition method according to claim 2, characterized in that: Generating a second label by using the first prediction result and the second prediction result includes: Perform mean processing on the first prediction result and the second prediction result, and use the mean processing result as the second label.

4. The target attribute recognition method according to claim 2 or 3, characterized in that: Generating a total loss result based on the second label, the first label, and the third prediction result includes: Generate a first loss result based on the third prediction result and the first label; Generate a second loss result based on the third prediction result and the second label; The total loss result is obtained by using the first loss result and the second loss result.

5. The target attribute recognition method according to claim 4, characterized in that: Obtaining the total loss result by using the first loss result and the second loss result includes: The first loss result and the second loss result are summed up, and the summed up result is used as the total loss result.

6. The target attribute recognition method according to claim 1, characterized in that: Determining whether the three-channel student network has been trained according to the total loss result includes: If the total loss result is less than a set threshold, it is determined that the three-channel student network has been trained; If the total loss result is greater than or equal to the set threshold, it is determined that the three-channel student network is not trained.

7. The target attribute recognition method according to claim 1, characterized in that: Also includes: Get the number of iterative training; If the number of iterative training reaches the set number, it is determined that the three-channel student network has been trained.

8. A target attribute recognition device, characterized in that: include: A target image reading module, configured to read a first target original image, a first target nine-channel image, and a first label; wherein the first target nine-channel image is generated based on the first target original image; a target image processing module, configured to process the first target nine-channel image through a nine-channel teacher network to obtain a first prediction result; to process the first target original image through a three-channel teacher network to obtain a second prediction result; and to process the first target original image through a three-channel student network to obtain a third prediction result; wherein the nine-channel teacher network and the three-channel teacher network are both trained networks, the three-channel student network is a network to be trained, and the accuracy of the first prediction result is higher than that of the second prediction result; a network loss generating module, configured to generate a total loss result based on the first prediction result, the second prediction result, the third prediction result, and the first label; an iterative training judgment module, configured to determine whether the three-channel student network has been trained according to the total loss result, and to update the parameters of the three-channel student network and return to the image processing step for iterative training if the training is not completed, until the training of the three-channel student network is completed, so that the performance of the three-channel student network approaches the integrated performance of the nine-channel teacher model and the three-channel teacher model; The target attribute recognition module is used to process the second target original image using the trained three-channel student network to obtain the target attribute recognition result of the second target original image to distinguish the difference between the target attribute and the background.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the target attribute recognition method according to any one of claims 1 to 7.

10. A storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the target attribute recognition method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Target detection method and target detection terminal based on knowledge distillation

    CN113743514A