Human body weight recognition method, human body weight recognition device, computer equipment and medium

Through the human weight recognition model trained based on human body training images collected by a single camera, the dependence problem of the human weight recognition model on data quality and quantity in the prior art is solved, which improves the accuracy of human body category recognition and reduces training costs.

CN114519863BActive Publication Date: 2025-04-25SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, human weight recognition models rely too much on data quality and quantity during training, resulting in high training cost and difficulty.

Method used

The human body weight recognition recognition model trained based on the human body training image collected by a single camera is extracted, and the first human body feature of the human body image to be detected is compared with multiple human body features in the preset database to determine the second human body feature with the highest similarity. When the similarity is greater than or equal to the specified threshold, it is matched to the human body category with the most similar human body image.

Benefits of technology

It improves the accuracy of human body category recognition, reduces the situation of misidentification, and reduces the difficulty and cost of training and labeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519863B_ABST
    Figure CN114519863B_ABST
Patent Text Reader

Abstract

The present invention provides a human body weight recognition method, a human body weight recognition device, a computer device and a medium. The human body weight recognition method comprises: obtaining a human body image to be detected. A first human body feature of the human body image is extracted through a pre-trained human body weight recognition model, and the human body weight recognition model is trained based on a human body training image collected by a single camera. The first human body feature is compared with a plurality of human body features in a preset database to determine a second human body feature with the highest similarity to the first human body feature. When the similarity is greater than or equal to a specified threshold, the human body category corresponding to the second human body feature is matched to the human body category most similar to the human body image. Through the present invention, human body weight recognition detection is performed based on a human body weight recognition model trained with a single camera, which helps to match the most similar human body category for the human body image to be detected among a plurality of human body features in a preset database, thereby reducing the occurrence of misidentification.
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, and in particular to a human body weight recognition method, a human body weight recognition device, a computer device and a medium. Background Art

[0002] Human body weight recognition technology is a technology that uses computer vision technology to perform non-overlapping camera retrieval on a given image to identify images belonging to the same human body. With the development and progress of artificial intelligence technology, human body weight recognition technology can track, match and identify the same human body across time and space. It has been widely used in all aspects of social life and has become one of the research hotspots in the field of computer vision in recent years.

[0003] In related technologies, when training a human weight recognition model based on a deep learning model, the deep learning model is used to learn the relationship between human bodies to extract features and search, and the model performance is heavily dependent on data quality and quantity. However, the training data used to train the human weight recognition model requires the cross-camera annotation of pedestrian relationships, which leads to high training costs and difficulties for the human weight recognition model. Summary of the invention

[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defect of the prior art that the human weight recognition model is too dependent on data quality and quantity when performing human weight recognition, thereby providing a human weight recognition method, human weight recognition device, computer equipment and medium.

[0005] In a first aspect, the present invention provides a method for human body weight recognition, the method comprising: obtaining a human body image to be detected. Extracting a first human body feature of the human body image through a pre-trained human body weight recognition model, the human body weight recognition model being trained based on a human body training image acquired by a single camera. Comparing the first human body feature with a plurality of human body features in a preset database, and determining a second human body feature having the highest similarity to the first human body feature. When the similarity is greater than or equal to a specified threshold, matching the human body category corresponding to the second human body feature to the human body category most similar to the human body image.

[0006] In this method, when performing body weight recognition detection on a human body image to be detected, a human body weight recognition model trained based on a human body training image captured by a single camera can be used to match the most similar human body category for the human body image to be detected from multiple human body features in a preset database, thereby improving the accuracy of human body category recognition and reducing the occurrence of misidentification.

[0007] In a second aspect, the present invention also provides a human body weight recognition device, the device comprising: an acquisition unit, for acquiring a human body image to be detected. An extraction unit, for extracting a first human body feature of the human body image through a pre-trained human body weight recognition model, the human body weight recognition model being trained based on a human body training image acquired by a single camera. A comparison unit, for comparing the first human body feature with a plurality of human body features in a preset database, and determining a second human body feature having the highest similarity to the first human body feature. A determination unit, for matching the human body category corresponding to the second human body feature to the human body category most similar to the human body image when the similarity is greater than or equal to a specified threshold.

[0008] In combination with the second aspect, in a first embodiment of the second aspect, the human body weight recognition model is trained based on human body training images captured by a single camera using the following units: a first acquisition unit, used to acquire multiple groups of first human body training image sets, different groups of first human body training image sets are captured by different cameras, and different first human body training image sets include the same human body categories. A first training unit, used to input each of the first human body training image sets into a feature extraction network to be trained, train the feature extraction network to extract human body features corresponding to each of the human body categories, and obtain a first feature extraction model. A second acquisition unit, used to acquire a second human body training image set and a human body training feature set of the same human body category as the first human body training image set, wherein the multiple human body training features included in the human body training feature set are the total human body features of the first human body training images corresponding to each group of human body image sets. A second training unit, used to input the second human body training image set into the first feature extraction model, train the first feature extraction model according to the human body training feature set, and obtain the human body weight recognition model.

[0009] According to the third aspect, an embodiment of the present invention further provides a computer device, comprising a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the human weight recognition method of the first aspect and any one of its optional embodiments by executing the computer instructions.

[0010] According to a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the human weight recognition method of any one of the first aspect and its optional embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 The present invention is a flowchart of a method for identifying human body weight according to an exemplary embodiment.

[0013] Figure 2 It is a flowchart of a training method of a human body weight recognition model proposed according to an exemplary embodiment.

[0014] Figure 3 It is a flowchart of a training method of a first feature extraction model proposed according to an exemplary embodiment.

[0015] Figure 4 It is a flowchart of another training method of a first feature extraction model proposed according to an exemplary embodiment.

[0016] Figure 5 It is a flowchart of a method for acquiring a human body training feature set according to an exemplary embodiment.

[0017] Figure 6 It is a flowchart of another method for acquiring a human body training feature set proposed according to an exemplary embodiment.

[0018] Figure 7 It is a flowchart of another method for training a human body weight recognition model proposed according to an exemplary embodiment.

[0019] Figure 8 It is a flowchart of another method for acquiring a human body training feature set proposed according to an exemplary embodiment.

[0020] Fig. 9 The present invention is a flowchart of a method for acquiring a human body training image set according to an exemplary embodiment.

[0021] Fig.10 It is a structural block diagram of a human body weight recognition device proposed according to an exemplary embodiment.

[0022] Fig.11 It is a schematic diagram of the hardware structure of a computer device proposed according to an exemplary embodiment. DETAILED DESCRIPTION

[0023] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In the related art, when training a human body weight recognition model, a detection model is used to detect human body images from original images taken by multiple cameras and form a base library. Use an existing model to extract human body features from the base library images, and use a clustering method to classify the base library features. Manually check and screen each cluster in the clustering results. Calculate the similarity between clusters in the manual screening results, generate recommended combinations with similarities between clusters greater than the set threshold, and then manually check and merge to finally generate manual annotation results. Train a feature extraction network based on the manual annotation results, input pedestrian images into the feature extraction network to obtain high-dimensional vector feature representations, obtain loss values ​​based on the metric distance and cross entropy calculated by the features, select an optimizer to iteratively find the minimum value of the loss function, and continuously update the parameters of the network to achieve the effect of optimizing learning, and obtain the final human body weight recognition model.

[0025] Since the same human body may appear repeatedly between different cameras and there are many human bodies appearing in each camera, when this method is used to train a human weight recognition model, the same human body appearing in different cameras needs to be matched. The number of permutations and combinations is very large, which results in a lot of time cost for training.

[0026] In order to solve the above problems, a human body weight recognition method is provided in an embodiment of the present invention, which is used in a computer device. It should be noted that its execution subject can be a human body weight recognition device, which can be implemented as part or all of a storage device through software, hardware, or a combination of software and hardware. The computer device can be a terminal, a client, or a server. The server can be a single server or a server cluster composed of multiple servers. The terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer, a wearable device, and other intelligent hardware devices such as an intelligent robot. In the following method embodiments, the execution subject is taken as an example of a computer device for explanation.

[0027] The computer device in the embodiment of the present invention is applied to the use scenario of performing human weight recognition detection on human images of unknown human categories. Through the human weight recognition method provided by the present invention, when performing human weight recognition detection on human images to be detected, a human weight recognition model trained based on human training images collected by a single camera can be used to match the most similar human category for the human image to be detected from multiple human features in a preset database, thereby improving the accuracy of human category recognition and reducing the occurrence of misidentification.

[0028] Figure 1 FIG. 1 is a flow chart of a method for identifying human weight according to an exemplary embodiment. Figure 1 As shown, the distributed cluster expansion method includes the following steps S101 to S104.

[0029] In step S101, a human body image to be detected is obtained.

[0030] In an embodiment of the present invention, the human body image to be detected can be understood as an image in which it is not clear that the human body image specifically corresponds to a human body category. The human body category can be understood as a category used to distinguish different human bodies, and each independent individual corresponds to a human body category. For example: pedestrian A and pedestrian B are two different human body categories. In one example, for ease of recording, an identity document (ID) can be used to record and distinguish each human body category. For example: id1 corresponds to the first human body category, and id2 corresponds to the second human body category.

[0031] In step S102, a first human body feature of a human body image is extracted using a pre-trained human body weight recognition model.

[0032] In an embodiment of the present invention, a pre-trained human body weight recognition model is obtained by training based on a human body training image captured by a single camera. When this human body weight recognition model is used to extract the first human body feature of the human body image, the accuracy of human body feature extraction can be improved based on the shooting characteristics of the single camera, and then when the human body category corresponding to the human body image is subsequently matched, it helps to improve the matching accuracy.

[0033] In step S103, the first human body feature is compared with a plurality of human body features in a preset database to determine a second human body feature having the highest similarity to the first human body feature.

[0034] In an embodiment of the present invention, the human body categories corresponding to the multiple human body features in the preset database are known, and the human body features corresponding to each human body category can be clearly identified. The first human body feature is compared with the multiple human body features in the preset database to determine whether the multiple human body features of the known human body category include human body features similar to the first human body feature. Since the higher the similarity, the greater the possibility that the two belong to the same human body category, therefore, based on the comparison result, the second human body feature with the highest similarity to the first human body feature is determined among the multiple human body features, so as to determine the human body category corresponding to the first human body feature through the second human body feature. In one example, when determining the similarity between the first human body feature and each human body feature, it can be determined by cosine similarity, Euclidean distance or Minkowski distance.

[0035] In step S104, when the similarity is greater than or equal to a specified threshold, the human body category corresponding to the second human body feature is matched as the human body category that is most similar to the human body image.

[0036] In an embodiment of the present invention, when the same human body category is photographed in different scenes, the extracted human body features may be different. Therefore, the specified threshold value can be understood as a fault tolerance threshold value for determining whether the first human body feature and the second human body feature belong to the same human body category. When the similarity is greater than or equal to the specified threshold value, it indicates that the first human body feature and the second human body feature are too similar, and the first human body feature and the second human body feature may belong to the same human body category. When the similarity is less than the specified threshold value, it indicates that the similarity between the first human body feature and the second human body feature is low, and it can be determined that the first human body feature and the second human body feature do not belong to the same human body category. Therefore, when the similarity is greater than or equal to the specified threshold value, the human body category corresponding to the second human body feature can be matched to the human body category most similar to the human body image, so that the human body category to which the human body image finally corresponds can be clarified according to the matched human body category. In one example, if there are multiple second human body features whose similarity is greater than or equal to the specified threshold value, the human body category corresponding to the second human body feature with the largest similarity value is determined to be the human body category most similar to the human body image.

[0037] Through the above embodiments, when performing body weight recognition detection on a body image to be detected, a body weight recognition model trained based on a body training image captured by a single camera can be used to match the most similar body category for the body image to be detected from multiple body features in a preset database, thereby helping to improve the accuracy of body category recognition and reduce the occurrence of misidentification.

[0038] In one embodiment, if the similarity between the first human feature and the second human feature is less than a specified threshold, it can be determined that the human category corresponding to the human image is a newly appeared human category, and the first human feature of the human image and the corresponding human category can be stored in a preset database, so that the accuracy of recognition and tracking can be improved during subsequent human weight recognition and tracking.

[0039] The following example will illustrate the specific training process of the human body weight recognition model.

[0040] Figure 2 FIG. 1 is a flow chart of a method for training a human body weight recognition model according to an exemplary embodiment. Figure 2 As shown, the training method of the human body weight recognition model includes the following steps.

[0041] In step S201, a plurality of first human body training image sets are obtained.

[0042] In an embodiment of the present invention, different groups of first human body training image sets are collected by different cameras, and the human body categories included in different first human body training image sets are the same. That is, the human body categories included in different groups of first human body training image sets are the same, but the first human body training image sets of different groups are collected by different cameras. For example: the first human body training image set of group A is collected by camera A, and the first human body training image set of group B is collected by camera B. The human body categories included in the first human body training image set of group A are the same as the human body categories included in the first human body training image set of group B.

[0043] In step S202, each first human training image set is input into the feature extraction network to be trained respectively, and the feature extraction network is trained to extract human features corresponding to each human category to obtain a first feature extraction model.

[0044] In an embodiment of the present invention, when training a feature extraction network, each first human training image set is respectively input into the feature extraction network to be trained, and the feature extraction network extracts human features for each first human training image set collected by each camera, and then trains the feature extraction network based on the extracted human features to obtain a first feature extraction model. For example: the first human training image sets obtained are three groups A, B and C. When training a feature extraction network, A, B and C are respectively input into the feature extraction network for human feature extraction, and the feature extraction network extracts human features a of each human category included in A, extracts human features b of each human category included in B, and extracts human features c of each human category included in C, and then trains the feature extraction network based on a, b and c to extract human features corresponding to each human category, and obtains a first feature extraction model.

[0045] When training the first feature extraction model, the human body training images used are all images with labeled human body categories. When training the feature extraction model, since the first human body training image sets collected by each camera are separately input into the feature network model for training, when annotating the human body training images in advance, there is no need to annotate across cameras, and only the current camera needs to be annotated, thereby reducing the difficulty of annotation, saving annotation time, and helping to improve annotation efficiency.

[0046] In step S203, a second human body training image set and a human body training feature set including the same human body categories as those included in the first human body training image set are obtained.

[0047] In an embodiment of the present invention, the multiple human body training features included in the human body training feature set are the total human body features of the first human body training images corresponding to each group of human body image sets. In one example, the first human body training image sets are respectively subjected to human body feature extraction by the first feature extraction model to obtain human body feature sets corresponding to each first human body training image set, and each human body feature set is merged to obtain the human body training feature set.

[0048] The human categories included in the human training feature set are the same as the human categories included in the first human training image set, so that when the subsequent training of the first feature extraction model is capable of performing feature recognition across cameras, targeted training can be performed.

[0049] In one example, the second human body training image set may be a human body training image set obtained by merging groups of first human body training image sets.

[0050] In step S204, the second human body training image set is input into the first feature extraction model, and the first feature extraction model is trained according to the human body training feature set to obtain a human body weight recognition model.

[0051] In the embodiment of the present invention, since the first feature training model is trained for the first human training image set collected by a single camera, in actual applications, the human weight recognition model used for human weight recognition needs to recognize the human weight of the human body image to be detected from the human body images collected by multiple cameras. Therefore, in order to enable the first feature extraction model to realize cross-camera human weight recognition, the acquired second human training image set is input into the first feature extraction model, and according to the acquired human training feature set, the first feature extraction model is trained to learn the human body features of the same human body type in the human body images collected by different cameras, thereby obtaining the human weight recognition model used for human weight recognition.

[0052] Through the above embodiments, the process of training the human body weight recognition model is divided into two stages. When the first feature extraction model is trained based on the first human training image set captured by a single camera, it helps to enhance the robustness of the first feature extraction model in learning to extract human features corresponding to human images captured by a single camera. Subsequently, when the first feature extraction model is trained to learn human features in human images of the same human type captured by different cameras, it helps to enhance the robustness of extracting human features, thereby achieving greater accuracy when extracting human features in actual use.

[0053] The following embodiment will illustrate the specific training process of the first feature extraction model.

[0054] Figure 3 FIG. 1 is a flow chart of a training method for a first feature extraction model according to an exemplary embodiment. Figure 3 As shown, the training method of the first feature extraction model includes the following steps.

[0055] In step S301, the first human training image set of the current group is input into the feature extraction network to be trained to extract human features, and the feature extraction result is input into the preset first classification network to perform feature classification to obtain a first classification result.

[0056] In an embodiment of the present invention, the feature extraction network to be trained is a network model for feature extraction. If only the human body features output by the feature extraction network are used, it is impossible to determine whether the extracted human body features are accurate and whether the extracted human body features can reflect the differences between different human body categories. Therefore, when training the feature extraction network, the feature extraction results output by the feature extraction network for human body feature extraction of each first human body training image are classified in combination with the preset first classification network to obtain the first classification results corresponding to each human body feature, so as to adjust the parameters of the feature extraction network according to the first classification results corresponding to each first human body training image and the corresponding human body category, thereby obtaining the first feature extraction model. In one example, the feature extraction network can be a backbone feature extraction network (a neural network), and its network architecture includes a convolution layer and a pooling layer. Among them, the convolution layer is used to reduce the dimension and extract features of the input image, and the pooling layer is used to reduce the model size and enhance robustness. Since the structure of the backbone feature extraction network is relatively simple and the iteration speed is fast, it helps to improve the training efficiency during training, and thus helps to reduce the training cost.

[0057] In one example, the first classification network may be a fully connected classification layer connected to the output end of the feature extraction network, and is used to assist the feature extraction network in training human feature extraction.

[0058] In another example, the number of fully connected classification layers is the same as the number of groups of the first human training image set, and corresponds one-to-one to each group of the first human training image set, and the number of classifications calculated by the fully connected classification layer is also the same as the number of human categories included in the corresponding first human training image set. It can be understood that when training the feature extraction network, after the current first human training image set is input into the feature extraction network, the feature extraction result output by the feature extraction network is input into the fully connected classification layer corresponding to the current first human training image set for feature classification, and the first classification result of the current first human training image set is extracted.

[0059] In step S302, based on the first classification result and the human categories included in the first human training image set, a feature extraction network is trained to extract human features corresponding to each human category to obtain a first feature extraction model.

[0060] In an embodiment of the present invention, according to the first classification result and the human categories included in the first human training image set, the loss generated when the first classification network is classified is determined through a loss function, and then the parameters of the feature extraction network are adjusted accordingly, and the feature extraction network is trained according to the adjusted parameters to extract the human features corresponding to each human category, thereby obtaining a first feature extraction model. In one example, the loss function used may include Arcface loss, cross entropy loss function, or triple loss function.

[0061] Through the above embodiments, when training the feature extraction network, training based on the first classification network helps to improve the accuracy of the feature extraction network in learning to extract human body features, so that the human body features extracted by the first feature extraction model can better express the differences in human body categories, laying a good feature extraction foundation for the subsequent training of the human body weight recognition model, thereby enhancing the robustness of the human body weight recognition model.

[0062] In one implementation scenario, the training process of the first feature extraction model can be as follows: Figure 4 shown. Figure 4 1 is a flowchart of another training method of the first feature extraction model proposed according to an exemplary embodiment. The number of groups of the first human training image set used to train the backbone feature extraction network is n, corresponding to n cameras respectively, n>1, and n is an integer. For ease of description, the following will take the process of training the backbone feature extraction network with the first human training image set corresponding to camera 1 as an example for description.

[0063] The first human training image set corresponding to camera 1 is input into the backbone feature extraction network for human feature extraction, and the output feature extraction result is input into the fully connected classification layer 1 corresponding to camera 1 for feature classification to obtain the first classification result, and the classification loss is calculated, and then the parameters of the feature extraction network are adjusted accordingly, and the feature extraction network is trained according to the adjusted parameters to extract human features corresponding to each human category.

[0064] The process of training the backbone feature extraction network with the first human training image set corresponding to any one of cameras 2 to n is the same as the process of training the backbone feature extraction network with the first human training image set corresponding to camera 1, and will not be repeated here.

[0065] After the training of each group of first human body training image sets is completed, a first feature extraction model is obtained.

[0066] In another implementation scenario, if the number of human categories in the first human training image set is small, the cross entropy loss function can be used to calculate the loss. The calculation formula is as follows: Among them, loss n is the loss value corresponding to the nth camera, P is the predicted probability of the fully connected classification layer, i and m correspond to a human category and the total number of human categories of a single camera, respectively.

[0067] The following embodiments will illustrate the specific process of obtaining the human body training feature set.

[0068] Figure 5 FIG. 1 is a flow chart of a method for acquiring a human body training feature set according to an exemplary embodiment. Figure 5 As shown, the method for obtaining a human body training feature set includes the following steps.

[0069] In step S501, a first feature extraction model is used to extract human feature sets corresponding to each first human training image set.

[0070] In step S502, the first human feature in the current human feature set is matched with each second human feature in the next human feature set in sequence to determine the second human feature in the next human feature set that has the highest matching degree with the first human feature.

[0071] In the embodiment of the present invention, when performing matching and fusion, the first human feature in the current human feature set is matched with each second human feature in the next human feature set in sequence to determine the second human feature in the next human feature set with the highest similarity to the first human feature.

[0072] In step S503, each first human body feature is fused into the second human body feature with the highest corresponding matching degree to obtain a new second human body feature, and a pseudo label of a human body category corresponding to each new second human body feature is generated.

[0073] In the embodiment of the present invention, since the human categories included in each first human training image set are the same, the human category corresponding to the second human feature with the highest similarity to the first human feature can be determined to be the same human category as the human category corresponding to the first human feature, and then the first human feature and the second human feature with the highest similarity to the first human feature can be fused to obtain a new second human feature, and a pseudo label corresponding to the new second human feature is generated. The pseudo label can be understood as the human category corresponding to the new second human feature.

[0074] In step S504, each human feature set is cycled in turn until a new second human feature corresponding to each human category in each group of human feature sets and a corresponding pseudo label are obtained to obtain a human training feature set.

[0075] In an embodiment of the present invention, the second human features corresponding to each first human feature in the current human feature set in the next human feature set are determined in sequence, and each first human feature is fused into the corresponding second human feature to obtain a plurality of new second human features. When all the first human features in the current human feature set are fused, the current human feature set is canceled, and the next human feature set including a plurality of new second human features is used as the new current human feature set, and each new second human feature in the new current human feature set is used as the first human feature, and is compared with each second human feature in the next human feature set to determine the second human feature corresponding to each first human feature. By analogy, each first human feature is fused into the corresponding second human feature until a new second human feature corresponding to each human category in each group of human feature sets and a corresponding pseudo label are obtained to obtain a human training feature set. That is, any human training feature in the human training feature set includes the total human feature of the pseudo label corresponding to the human training feature in each human feature set, and the human training feature is the new second human feature finally generated.

[0076] Through the above embodiment, the human body features collected by each camera are integrated into the same human body training feature, which is helpful for the subsequent training of the first feature extraction model, so that the first feature extraction model can fully learn the human body features of each human category, and then the obtained human weight recognition model can reduce the differences in human feature detection caused by different cameras when performing feature extraction, thereby helping to improve the accuracy of the detection results.

[0077] In one implementation scenario, the process of acquiring the human body training feature set can be as follows: Figure 6shown. Figure 6 is a flowchart of another method for obtaining a human training feature set according to an exemplary embodiment. m Indicates the first human feature in the human feature set corresponding to camera n, id k Indicates the second human feature in the human feature set corresponding to camera p. m The first human feature corresponding to the camera p is compared with each second human feature in the human feature set corresponding to the camera p to determine the human feature set corresponding to the camera p that matches the id m The most similar id k , change id m and id k Merge and generate corresponding pseudo labels.

[0078] The following embodiment will illustrate the specific training process of training the human weight recognition model through the first feature extraction model.

[0079] Figure 7 FIG. 1 is a flow chart of another method for training a human body weight recognition model according to an exemplary embodiment. Figure 7 As shown, the training method of the human body weight recognition model includes the following steps.

[0080] In step S701, the second human training image set is input into the first feature extraction model to extract human features, and the feature extraction result is input into a preset second classification network to perform feature classification to obtain a second classification result.

[0081] In an embodiment of the present invention, the second classification network may be a fully connected classification layer connected to the output end of the first feature extraction model, and the output result of the first feature extraction model is classified, and the first feature extraction model is assisted in training human feature extraction according to the obtained second classification result. In one example, the second classification network model and the first classification network model may be the same classification network model. In another example, the second classification network model and the first classification network model may be two different classification network models, which are used in different training stages. The training stage includes: a training stage of obtaining the first feature extraction model by training the feature extraction network, and a training stage of obtaining the human weight recognition model by training the first feature extraction model.

[0082] In step S702, based on the second classification result and the human body training feature set, the first feature extraction model is trained to extract the features of each human body in the second human body training image set to obtain a human body weight recognition model.

[0083] In an embodiment of the present invention, according to the second classification result and the pseudo-label corresponding to each human training feature, the loss generated when the second classification network is classified is determined through a loss function, and then the parameters of the first feature extraction model are adjusted accordingly, and the first feature extraction model is trained according to the adjusted parameters to extract the human features corresponding to each human category, thereby obtaining a human weight recognition model. In one example, the loss function used may include Arcface loss, cross entropy loss function, or triple loss function.

[0084] In one example, when adjusting the parameters of the first feature extraction model, the parameters can be adjusted by continuously iteratively updating the network parameters through gradient back propagation.

[0085] Through the above embodiments, the first feature extraction model is trained based on the human body training features extracted by each of the multiple cameras, which helps the first feature extraction model to fully learn the human body features corresponding to the same human body category in different shooting scenes, so that the human body weight recognition model can fully express the human body features corresponding to different human body types when extracting human body features, thereby improving the accuracy of human body weight recognition detection.

[0086] In one embodiment, before inputting the second human body training image set into the first feature extraction model, each second human body training image in the second human body training image set can be scaled to the same specified size, which helps to save computing costs when subsequently extracting human body features.

[0087] In one implementation scenario, the training process of the human weight recognition model can be as follows: Figure 8 shown. Figure 8 It is a flowchart of another method for training a human body weight recognition model proposed according to an exemplary embodiment.

[0088] In step S801 , a second human training image in a second human training image set is scaled to a specified size.

[0089] In step S802, the second human body training image scaled to a specified size is input into a first feature extraction model for feature extraction to obtain a feature extraction result.

[0090] In step S803, the feature extraction result is input into the fully connected classification layer for classification to determine the pseudo label corresponding to the second human body training image.

[0091] In step S804, the classification loss of the pseudo label corresponding to the second human training image is determined by the fully connected classification layer.

[0092] In another implementation scenario, if the output classification loss does not meet the training requirements, the parameters of the first feature extraction model are adjusted, and training is continued according to the adjusted parameters.

[0093] In one embodiment, each first human training image in the first human training image set is annotated with the human category that appears for the first time in the video shot by the current camera. Through the target tracking algorithm, multiple first human training images corresponding to each human category in the video are extracted to obtain the first human training image set, so that when annotating the first human training images, there is no need to pay attention to the same human body that appears between cameras, which helps to reduce the difficulty of annotation. In addition, multiple annotators can also annotate multiple videos at the same time, which helps to improve the annotation efficiency.

[0094] In one example, the target tracking algorithm may include a tracking by detection algorithm (Tracking By Detection, TBD) or a SORT algorithm (an online real-time multi-target tracking algorithm), which is not limited in the present invention.

[0095] In one implementation scenario, the process of obtaining the first human training image set can be as follows: Fig. 9 shown. Fig. 9 The present invention is a flowchart of a method for acquiring a human body training image set according to an exemplary embodiment.

[0096] In step S901, the video captured by the current camera is obtained.

[0097] In step S902, it is determined whether the current human body category appears in the video for the first time.

[0098] In step S903, if the current human category appears in the video for the first time, the first human training image in which the current human category appears in the first frame is annotated and extracted.

[0099] In step S904, the first human body training image of the current human body category in other frame images is extracted through target tracking to obtain a first human body training image set.

[0100] Based on the same inventive concept, the present invention also provides a human body weight recognition device.

[0101] Fig.10 FIG. 1 is a structural block diagram of a human body weight recognition device according to an exemplary embodiment. Fig.10 As shown, the human body weight recognition device includes an acquisition unit 1001 , an extraction unit 1002 , a comparison unit 1003 and a determination unit 1004 .

[0102] An acquisition unit 1001 is used to acquire a human body image to be detected;

[0103] An extraction unit 1002 is used to extract a first human feature of a human image by using a pre-trained human weight recognition model, where the human weight recognition model is trained based on a human training image captured by a single camera;

[0104] A comparison unit 1003 is used to compare the first human body feature with a plurality of human body features in a preset database to determine a second human body feature having the highest similarity to the first human body feature;

[0105] The determination unit 1004 is configured to match the human body category corresponding to the second human body feature to the human body category most similar to the human body image when the similarity is greater than or equal to a specified threshold.

[0106] In one embodiment, a human body weight recognition model is trained based on human body training images captured by a single camera using the following units: a first acquisition unit, used to acquire multiple groups of first human body training image sets, where different groups of first human body training image sets are captured by different cameras, and the human body categories included in different first human body training image sets are the same. A first training unit, used to input each first human body training image set into a feature extraction network to be trained, and train the feature extraction network to extract human body features corresponding to each human body category to obtain a first feature extraction model. A second acquisition unit, used to acquire a second human body training image set and a human body training feature set of the same human body category as the first human body training image set, and the multiple human body training features included in the human body training feature set are the total human body features corresponding to the first human body training images of each group of human body image sets. A second training unit, used to input the second human body training image set into the first feature extraction model, and train the first feature extraction model according to the human body training feature set to obtain a human body weight recognition model.

[0107] In another embodiment, the first training unit includes: a first extraction unit, which is used to input the current group of first human training image sets into the feature extraction network to be trained to extract human features, and input the feature extraction results into a preset first classification network to classify features to obtain a first classification result. A first training subunit, which is used to train the feature extraction network to extract human features corresponding to each human category based on the first classification result and the human categories included in the first human training image set, to obtain a first feature extraction model.

[0108] In another embodiment, the second acquisition unit includes: a second extraction unit, used to extract the human feature sets corresponding to each first human training image set respectively through the first feature extraction model. A first matching unit, used to match the first human features in the current human feature set with each second human feature in the next human feature set in turn, and determine the second human feature in the next human feature set with the highest matching degree with the first human feature. A fusion unit, used to fuse each first human feature into the second human feature with the highest corresponding matching degree to obtain a new second human feature, and generate a pseudo-label of a human category corresponding to each new second human feature. A second acquisition sub-unit, used to cycle through each human feature set in turn until a new second human feature corresponding to each human category in each group of human feature sets and the corresponding pseudo-label are obtained to obtain a human training feature set.

[0109] In another embodiment, the second training unit includes: a third extraction unit, which is used to input the second human body training image set into the first feature extraction model to extract human body features, and input the feature extraction result into a preset second classification network to perform feature classification to obtain a second classification result. A second training subunit is used to train the first feature extraction model to extract each human body feature in the second human body training image set based on the second classification result and the human body training feature set to obtain a human body weight recognition model.

[0110] In another embodiment, the second acquisition unit includes: a determination unit, configured to determine and mark the human category that appears for the first time based on the video captured by the current camera. A first image extraction unit, configured to extract a plurality of first human training images corresponding to each of the human categories in the video through a target tracking algorithm, and obtain a first human training image set corresponding to the current camera.

[0111] In yet another embodiment, the second acquisition unit includes: a merging unit, configured to merge the first human body training image sets to obtain a second human body training image set.

[0112] The specific limitations and beneficial effects of the above-mentioned human body weight recognition device can be found in the above-mentioned limitations on the human body weight recognition method, which will not be repeated here. The above-mentioned modules can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0113] Fig.11 FIG. 1 is a schematic diagram of a hardware structure of a computer device according to an exemplary embodiment. Fig.11As shown, the device includes one or more processors 1110 and a memory 1120, and the memory 1120 includes a persistent memory, a volatile memory, and a hard disk. Fig.11 A processor 1110 is taken as an example. The device may further include: an input device 1130 and an output device 1140.

[0114] The processor 1110, the memory 1120, the input device 1130 and the output device 1140 may be connected via a bus or other means. Fig.11 The example of connecting through bus is taken in the following.

[0115] The processor 1110 may be a central processing unit (CPU). The processor 1110 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips. A general-purpose processor may be a microprocessor or the processor may be any conventional processor.

[0116] The memory 1120 is a non-transient computer-readable storage medium, including a persistent memory, a volatile memory, and a hard disk, and can be used to store non-transient software programs, non-transient computer executable programs, and modules, such as program instructions / modules corresponding to the business management method in the embodiment of the present application. The processor 1110 executes various functional applications and data processing of the server by running the non-transient software programs, instructions, and modules stored in the memory 1120, that is, implementing any of the above-mentioned human body weight recognition methods.

[0117] The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data required for use, etc. In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 1120 may optionally include a memory remotely arranged relative to the processor 1110, and these remote memories may be connected to the data processing device 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.

[0118] The input device 1130 can receive input digital or character information and generate key signal input related to user settings and function control. The output device 1140 can include display devices such as a display screen.

[0119] One or more modules are stored in the memory 1120, and when executed by one or more processors 1110, the execution is as follows: Figure 1-9 The method shown.

[0120] The above-mentioned product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to Figure 1-9 Related description of the illustrated embodiment.

[0121] The embodiment of the present invention also provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the authentication method in any of the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0122] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A method for identifying human body weight, characterized in that: The method comprises: Acquire a human body image to be detected; The first human feature of the human image is extracted by a pre-trained human weight recognition model, and the human weight recognition model is trained based on human training images collected by a single camera, including: extracting human feature sets corresponding to each first human training image set respectively by a first feature extraction model; matching the first human feature in the current human feature set with each second human feature in the next human feature set in turn, and determining the second human feature in the next human feature set with the highest matching degree with the first human feature; fusing each of the first human features into the second human feature with the highest matching degree to obtain a new second human feature, and generating a pseudo label of a human category corresponding to each of the new second human features; and looping through each of the human feature sets in turn until a new second human feature corresponding to each human category in each group of human feature sets and a corresponding pseudo label are obtained to obtain a human training feature set; Comparing the first human feature with a plurality of human features in a preset database to determine a second human feature having the highest similarity to the first human feature; When the similarity is greater than or equal to a specified threshold, the human category corresponding to the second human feature is matched to the human category that is most similar to the human image.

2. The method according to claim 1, characterized in that The human weight recognition model is trained based on human training images collected by a single camera, including: Acquire multiple groups of first human body training image sets, where different groups of first human body training image sets are collected by different cameras, and different first human body training image sets include the same human body categories; Inputting each of the first human body training image sets into a feature extraction network to be trained, respectively, training the feature extraction network to extract human body features corresponding to each of the human body categories, and obtaining a first feature extraction model; Acquire a second human body training image set and a human body training feature set of the same human body category as the first human body training image set, wherein the plurality of human body training features included in the human body training feature set are total human body features corresponding to the first human body training image in each group of human body image sets; The second human body training image set is input into the first feature extraction model, and the first feature extraction model is trained according to the human body training feature set to obtain the human body weight recognition model.

3. The method according to claim 2, characterized in that The step of inputting each of the first human body training image sets into a feature extraction network to be trained, training the feature extraction network to extract human body features corresponding to each of the human body categories, and obtaining a first feature extraction model comprises: Inputting the first human body training image set of the current group into the feature extraction network to be trained to extract human body features, and inputting the feature extraction result into the preset first classification network to perform feature classification, so as to obtain a first classification result; Based on the first classification result and the human categories included in the first human training image set, the feature extraction network is trained to extract human features corresponding to each of the human categories to obtain a first feature extraction model.

4. The method according to claim 3, characterized in that The step of inputting the second human body training image set into the first feature extraction model, training the first feature extraction model according to the human body training feature set, and obtaining the human body weight recognition model comprises: Inputting the second human body training image set into the first feature extraction model to extract human body features, and inputting the feature extraction result into a preset second classification network to perform feature classification, thereby obtaining a second classification result; Based on the second classification result and the human body training feature set, the first feature extraction model is trained to extract each human body feature in the second human body training image set to obtain the human body weight recognition model.

5. The method according to any one of claims 2 to 4, characterized in that: The step of obtaining a plurality of first sets of human body training images comprises: According to the video captured by the current camera, determine and mark the human category that appears for the first time; Through the target tracking algorithm, a plurality of first human body training images corresponding to each of the human body categories in the video are extracted to obtain a first human body training image set corresponding to the current camera.

6. The method according to claim 5, characterized in that The step of acquiring a second human body training image set having the same human body category as that included in the first human body training image set comprises: The first human body training image sets are merged to obtain a second human body training image set.

7. A human body weight recognition device, characterized in that: The device comprises: An acquisition unit, used for acquiring a human body image to be detected; An extraction unit is used to extract the first human feature of the human image through a pre-trained human weight recognition model, wherein the human weight recognition model is trained based on human training images collected by a single camera, including: extracting human feature sets corresponding to each first human training image set respectively through a first feature extraction model; matching the first human feature in the current human feature set with each second human feature in the next human feature set in turn, and determining the second human feature in the next human feature set with the highest matching degree with the first human feature; fusing each of the first human features into the second human feature with the highest matching degree to obtain a new second human feature, and generating a pseudo label of a human category corresponding to each of the new second human features; and looping through each of the human feature sets in turn until a new second human feature corresponding to each human category in each group of human feature sets and a corresponding pseudo label are obtained to obtain a human training feature set; A comparing unit, configured to compare the first human feature with a plurality of human features in a preset database, and determine a second human feature having the highest similarity to the first human feature; A determination unit is configured to match the human category corresponding to the second human feature to the human category most similar to the human image when the similarity is greater than or equal to a specified threshold.

8. A computer device, characterized in that: The invention comprises a memory and a processor, wherein the memory and the processor are connected to each other for communication, the memory stores computer instructions, and the processor executes the human body weight recognition method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the human body weight recognition method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Vehicle weight identification method, device and system

    CN109145777A

  • Face recognition method, neural network training method, neural network training device and electronic equipment

    CN109886222A