Model construction method and apparatus, object recognition method and apparatus, device, medium, and product
By using the feature extraction network in the trained limb recognition model to extract hand and palm features and build a target recognition model, the problem of low hand frame recognition accuracy and high training complexity is solved, and efficient and accurate hand recognition is achieved.
Patent Information
- Application Number
- PCT/CN2024/081599
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-14
- Filing Date
- 2024-03-14
- Publication Date
- 2024-09-19
AI Technical Summary
In the existing technology, hand frame recognition model training requires a large amount of data, resulting in low recognition accuracy and high training complexity, making it difficult to accurately identify hand frames in images.
The limb feature extraction network in the trained limb recognition model is used, and the features of the hand and palm are extracted by adding a regression network to build a target recognition model, which reduces training data requirements and improves recognition accuracy.
It improves the construction efficiency and accuracy of the hand recognition model, reduces the training complexity, and can achieve high-precision target recognition with a small number of labeled samples.
Smart Images

Figure CN2024081599_19092024_PF_FP_ABST
Abstract
Description
Model construction, object recognition methods, devices, equipment, media and products
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims priority to an application filed in China with application number 202310267677.0, filed on March 14, 2023, entitled “Model construction, object recognition methods, devices, equipment, media and products”. The disclosure of the application is incorporated herein as a whole. Technical Field
[0003] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to a model construction, object recognition method, device, equipment, medium and product. Background Art
[0004] Image-based gesture recognition refers to identifying hand movements made by people in an image. This allows for gesture control and improves interaction efficiency. Currently, hand gesture recognition requires first identifying the hand region in the image, also known as the hand frame, then extracting the partial image corresponding to the hand frame, and then identifying the gesture from this partial image.
[0005] The current method for identifying hand frames in images mainly uses a large number of training images, including images and labels of hand frames in images, to train the image recognition network model.
[0006] Summary of the Invention
[0007] In a first aspect, an embodiment of the present disclosure provides a model building method, comprising:
[0008] Acquire a limb recognition model, wherein the limb recognition model includes a limb feature extraction network with known parameters, and the limb recognition model is used to recognize limbs;
[0009] Inputting the training image into the limb feature extraction network to obtain image limb features;
[0010] Based on the limb features of the image, determining an object recognition result of the training image through an object recognition network, and updating the object recognition network based on the object recognition result, wherein the object recognized by the object recognition network is a local part of the limb;
[0011] Based on the limb feature extraction network and the updated object recognition network, a target recognition model is constructed, and the target recognition model is used to perform recognition of local parts of the limb in the target image.
[0012] In a second aspect, an embodiment of the present disclosure provides an object recognition method, including:
[0013] In response to an image recognition request, receiving an image to be recognized;
[0014] Obtaining a trained target recognition model, wherein the target recognition model includes a limb feature extraction network with known parameters and a trained object recognition network; the object recognized by the object recognition network is a local part of the limb;
[0015] Extracting limb features of the image to be identified based on the limb feature extraction network with known parameters;
[0016] Based on the object recognition network obtained by training, the object recognition result corresponding to the image limb feature of the image to be recognized is determined, and the target recognition model is obtained by adopting the model construction method described in the first aspect.
[0017] In a third aspect, an embodiment of the present disclosure provides a model building device, comprising:
[0018] A first acquisition unit is configured to acquire a limb recognition model, wherein the limb recognition model includes a limb feature extraction network with known parameters, and the limb recognition model is configured to recognize a limb;
[0019] A feature extraction unit, configured to input a training image into the limb feature extraction network to obtain image limb features;
[0020] A model training unit is configured to determine an object recognition result of a training image based on the limb features in the image through an object recognition network, and to update the object recognition network based on the object recognition result, wherein the object recognized by the object recognition network is a local part of the limb;
[0021] The model construction unit is used to construct a target recognition model based on the limb feature extraction network and the updated object recognition network, and the target recognition model is used to perform recognition of local parts of the limb in the target image.
[0022] In a fourth aspect, an embodiment of the present disclosure provides an object recognition device, including:
[0023] An image receiving unit, configured to receive an image to be recognized in response to an image recognition request;
[0024] A second acquisition unit is used to acquire a trained target recognition model, wherein the target recognition model includes a limb feature extraction network with known parameters and an updated object recognition network;
[0025] A feature extraction unit, configured to extract limb features of the image to be identified based on the limb feature extraction network with known parameters;
[0026] The object recognition unit is used to determine the object recognition result corresponding to the image limb feature of the image to be recognized based on the object recognition network obtained by training, and the target recognition model is obtained by adopting the model construction method described in the first aspect.
[0027] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0028] The memory stores computer-executable instructions;
[0029] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the model building method described in the first aspect and various possible designs of the first aspect or the object recognition method described in the second aspect and various possible designs of the second aspect.
[0030] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the model building method described in the first aspect and various possible designs of the first aspect or the object recognition method described in the second aspect and various possible designs of the second aspect are implemented.
[0031] In the seventh aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the model building method described in the first aspect and various possible designs of the first aspect or the object recognition method described in the second aspect and various possible designs of the second aspect.
[0032] In an eighth aspect, according to one or more embodiments of the present disclosure, a computer program is provided, comprising: instructions, which, when executed by a processor, cause the processor to execute the model building method or object recognition method according to the aforementioned embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] FIG1 is a diagram of an application network architecture of an object recognition method provided by an embodiment of the present disclosure;
[0035] FIG2 is a flowchart of some embodiments of a model building method provided by an embodiment of the present disclosure;
[0036] FIG3 is a flowchart of some further embodiments of a model building method provided by an embodiment of the present disclosure;
[0037] FIG4 is an example diagram of a target recognition model provided by an embodiment of the present disclosure;
[0038] FIG5 is a flowchart of some embodiments of an object recognition method provided by an embodiment of the present disclosure;
[0039] FIG6 is a schematic structural diagram of an image processing device provided by an embodiment of the present disclosure;
[0040] FIG7 is a schematic structural diagram of an object recognition device provided by an embodiment of the present disclosure;
[0041] FIG8 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0043] The technical solution disclosed herein can be applied to recognition scenarios for key image parts such as hand frames and palms. By adopting a trained limb recognition model, the limb feature extraction network in the limb recognition model is incorporated into the training process of the recognition network for objects such as hand frames and palms. By reusing the limb feature extraction network and updating the object recognition network, the target recognition model can be constructed, thereby improving the efficiency of constructing the recognition model.
[0044] Hand recognition is a key branch of artificial intelligence, applicable across a wide range of fields, including home appliances, transportation, finance, and entertainment. To achieve accurate hand recognition results, a typical process involves first identifying a hand frame, extracting a partial image of the hand frame, and then identifying the hand gesture within the partial image. This process demonstrates that the accuracy of hand frame recognition plays a crucial role in determining hand recognition accuracy. Currently, hand frame recognition models are typically acquired through machine learning models, neural networks, and other techniques. These models are typically trained using images and training data corresponding to the hand frame annotations within the images. This training process requires a large amount of training data, and even models trained with this large amount of training data often exhibit limited accuracy, resulting in low hand recognition accuracy.
[0045] Currently, the hand frame recognition network training process requires a large amount of training data to complete the network training. When the label data is limited, inaccurate hand frame recognition often occurs.
[0046] Therefore, how to accurately identify the hand frame in the image is a technical problem that needs to be solved urgently.
[0047] To address the aforementioned technical issues, the disclosed technical solution takes into account that hands are essentially partial features of the human body, and currently, limb recognition models also require training. Therefore, based on the trained limb recognition model, a feature extraction network within the limb recognition model can be employed. After the feature extraction network extracts features from the image, a regression network for the hand, palm, and other parts is added to extract local limb features. This allows the feature extraction network within the limb recognition model to extract limb features, and the limb features learned by the limb recognition model to be applied to the learning process of the object recognition network for local limb features. This improves the accuracy of extracting local limb features while reducing the complexity of object recognition model training.
[0048] In embodiments of the present disclosure, a limb recognition model can be obtained. The limb recognition model can include a limb feature extraction network with known parameters. Furthermore, the limb recognition model can also include a limb recognition network with known parameters. The limb recognition network can perform overall limb recognition using features extracted by the limb feature extraction network. The limb recognition model can be a trained model, and the feature extraction network can be reused based on the limb recognition model. By inputting a training image into the limb feature extraction network, image limb features can be obtained. These image limb features can be used for object recognition in an object recognition network. The object recognition network can then be updated using the object recognition results, allowing the limb feature extraction network to be reused. The objects recognized by the object recognition network can be representations of local limb parts in the image to be recognized, such as a hand frame or palm representing a hand. By fixing the limb feature extraction network, the limb feature extraction network can be used to directly extract corresponding features. The extracted limb features can then be directly used to train the object recognition network, significantly reducing the difficulty of constructing the target recognition model. Simultaneously, the target recognition model can be constructed using the limb feature extraction network and the updated object recognition network. This target recognition model can more accurately extract local limb parts, resulting in a fast and accurate target recognition model. This technical solution can achieve the effect of improving training efficiency and effectively improving training accuracy.
[0049] The following will describe in detail the technical solutions of the present disclosure and how they solve the above-mentioned technical problems using specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following embodiments of the present disclosure are described in detail with reference to the accompanying drawings.
[0050] Figure 1 is a diagram of an application network architecture according to the object recognition method disclosed herein. The application network architecture according to an embodiment of the present disclosure may include an electronic device and a client connected to the electronic device via a local area network (LAN) or a wide area network (WAN). The electronic device may be a personal computer, a standard server, a supercomputer, a cloud server, or other server type. The present disclosure does not impose any specific restrictions on the specific type of the electronic device. The client may be, for example, a mobile phone, a tablet computer, a personal computer, a smart home appliance, a wearable device, or other terminal device. The present disclosure does not impose any specific restrictions on the specific type of the client. As shown in Figure 1 , taking the electronic device as a cloud server 1 and the first client 2 as a mobile phone 21 or a tablet computer 22 as an example, the cloud server 1 may train an object recognition model based on the technical solution disclosed herein. Any first client 2 may request the cloud server 1 to obtain a trained object recognition model. For example, the client may send a recognition request to the cloud server to obtain the trained object recognition model. Of course, in actual applications, the cloud server may also directly receive the image to be recognized and identify the target object among the objects to be recognized based on the object recognition method disclosed herein.
[0051] When cloud server 1 employs the technical solution of the present disclosure to construct a target recognition model, limb feature extraction network 11 and limb recognition network 12 in the limb recognition model can be fixed. An object recognition network 13 is added after limb feature extraction network 11. Object recognition network 13 can be, for example, one or more of a hand frame recognition network and a palm recognition network. During the training of object recognition network 13, limb feature extraction network 11 and limb recognition network 12 are fixed. That is, limb feature extraction network 11 and limb recognition network 12 do not participate in training, and only object recognition network 13 needs to be trained.
[0052] Refer to FIG2 , which is a flowchart of some embodiments of a model building method provided by an embodiment of the present disclosure. The model building method may include the following steps 201 to 204 .
[0053] In step 201 , a limb recognition model is obtained. The limb recognition model includes a limb feature extraction network with known parameters. The limb recognition network is used to recognize limbs.
[0054] In some embodiments, a limb recognition model can be used to identify limbs in an image. The limb in the image can specifically refer to the entire limb, including the entire limb area and / or limb key points. The entire limb area can be a rectangular frame that encompasses the entire human body, and the limb key points can include the location points or coordinate points corresponding to various local parts of the limb. Local parts of the limb can include: hands, feet, upper and lower limbs, head, and other local parts of the limb.
[0055] The limb recognition model can be pre-trained. It includes a limb feature extraction network with known parameters and a limb recognition network with known parameters. The limb feature extraction network can be used to extract limb features from the input image. The limb recognition network can perform regression calculations on the limb features to obtain corresponding body bounding boxes or limb key points. The specific information obtained by the limb recognition network can be customized based on task requirements.
[0056] In some embodiments, the limb recognition model can be obtained by building a network structure of the convolutional neural network, recurrent neural network, etc. This embodiment does not impose too many restrictions on the specific algorithm used in the limb recognition network.
[0057] In step 202, the training image is input into a limb feature extraction network to obtain image limb features.
[0058] The limb feature extraction network in step 202 is a trained limb feature extraction network.
[0059] The training images may include two-dimensional training images and / or three-dimensional training images. The limb feature extraction network may be directly used to extract limb features from the training images. The image limb features may be overall features of the limb in the training images.
[0060] In step 203, based on the image limb features, the object recognition result of the training image is determined through the object recognition network, and the object recognition network is updated based on the object recognition result. The object recognized by the object recognition network is a local part of the limb.
[0061] In some embodiments, the object recognition network can identify a localized limb part based on the input limb features in the image to obtain an object recognition result. The object recognition result is the recognition result of a localized limb part in the training image. The localized limb part may include, for example, the hand, the hand center, the eye, and / or the eye center. The specific types of localized limb parts are not particularly limited in this embodiment.
[0062] Based on the object recognition result, updating the object recognition network can determine a recognition error based on the object recognition result, judge whether the object recognition network meets the convergence condition according to the recognition error, and in response to judging that the object recognition meets the convergence condition, determine that the current object recognition network is the updated object recognition network; in response to judging that the object recognition does not meet the convergence condition, update the object recognition network based on the recognition error, and return to step 203 to continue execution.
[0063] In step 204, a target recognition model is constructed based on the limb feature extraction network and the updated object recognition network. The target recognition model is used to recognize local parts of the limbs in the target image.
[0064] In some embodiments, the target recognition model may include a limb feature extraction network and an updated object recognition network. The limb feature extraction network and the updated object recognition network may be used to perform recognition of local parts of a limb, such as the recognition of a hand or the center point of a hand.
[0065] In some embodiments, the application steps of the target recognition model may include: extracting features of the input image through a limb feature extraction network, inputting the features output by the limb feature extraction network into the updated object recognition network, identifying local parts of the limb through the object recognition network, and realizing the comprehensive application of the limb feature extraction network and the object recognition network.
[0066] In some embodiments, the target recognition model may also include: adding a feature enhancement network between the limb feature extraction network and the object recognition network, enhancing the output features of the limb feature extraction network through the feature enhancement network, and inputting the enhanced features into the object recognition network to identify local parts of the limb.
[0067] In the disclosed embodiments, a limb recognition model can be obtained. The limb recognition model can include a limb feature extraction network with known parameters. Furthermore, the limb recognition model can also include a limb recognition network with known parameters. The limb recognition network can perform overall limb recognition using features extracted by the limb feature extraction network. The limb recognition model can be a trained model, and the feature extraction network can be reused on top of the limb recognition model. By inputting a training image into the limb feature extraction network, image limb features can be obtained. These image limb features can be used for object recognition in the object recognition network. The object recognition network can then be updated using the object recognition results, allowing the limb feature extraction network to be reused. The objects recognized by the object recognition network can be representations of local limb parts in the image to be recognized, such as a hand frame or palm representing a hand. By fixing the limb feature extraction network, the limb feature extraction network can be used to directly extract corresponding features. The extracted limb features can then be directly used to train the object recognition network, significantly reducing the difficulty of constructing the target recognition model. Simultaneously, the target recognition model can be constructed using the limb feature extraction network and the updated object recognition network. This target recognition model can more accurately extract local limb parts, resulting in a fast and accurate target recognition model. This technical solution can achieve the effect of improving training efficiency and effectively improving training accuracy.
[0068] In addition, since the parameters of the limb feature extraction network in the target recognition model are known, no additional feature network training is required. Based on the limb feature extraction network, the object recognition network can be trained separately, which reduces the complexity of the network that needs to be trained. Therefore, for relatively simple network training, a small number of training images with local limb labels can be used. Through the model construction method disclosed in the present invention, high-precision training of the object recognition network can be completed through a small number of labeled samples, that is, training images. On the basis of accurately training the object recognition network, a target recognition model with high recognition accuracy of local parts of the limbs is obtained, thereby achieving a higher model training effect at a lower labeling cost.
[0069] As shown in Figure 3, it is a flowchart of some other embodiments of a model building method provided by the embodiments of the present disclosure. The difference from the aforementioned embodiments is that based on the image limb features, the object recognition results of the training image are determined through the object recognition network, which may include steps 301 to 302.
[0070] In step 301, candidate parameters are determined for the object recognition network; the candidate parameters are parameter values of each network function in the object recognition network.
[0071] In some embodiments, the candidate parameters may be parameter values of each network function in the object recognition network. The object recognition network may include multiple network functions, such as activation functions and excitation functions. In some embodiments, each network function has a corresponding weight and an offset. The network function can generally be expressed as: y = ω * f (x) + b, where f (x) is the network function, ω is the weight of the network function, and b is the offset or bias of the network function. The candidate parameters may include the values of the weights and the values of the offsets.
[0072] Candidate parameters can be obtained through parameter initialization. Parameter initialization can, for example, randomly determine parameter values corresponding to each network function, or obtain historical parameters as candidate parameters. During a training round, the candidate parameters of the object recognition network can remain unchanged. At the end of a training round, the candidate parameters of the object recognition network can be updated to iteratively train the network.
[0073] In step 302, based on the object recognition network corresponding to the candidate parameters, an object recognition result corresponding to the image limb feature is determined.
[0074] The limb feature extraction network can be used as an encoder in the object recognition model. It accurately extracts limb features from images. During the object recognition model construction process, the limb feature extraction network is known and can be used to extract limb features from training images. Limb features can be vectors or matrices representing the characteristics of limbs in training images.
[0075] Step 302 may specifically include inputting the image limb features into an object recognition network corresponding to the candidate parameters to obtain an object recognition result. Furthermore, the image limb features may be enhanced and then inputted into the object recognition network corresponding to the candidate parameters to obtain an object recognition result. Alternatively, the image limb features may be processed in other ways before being inputted into the object recognition network corresponding to the candidate parameters.
[0076] The difference from the above embodiment is that the object recognition network is updated based on the object recognition result in step 203, and steps 303 to 305 may also be included.
[0077] In step 303, based on the object recognition result, it is determined whether the object recognition network meets the convergence condition. In response to the determination that the object recognition network meets the convergence condition, step 304 is executed. In response to the determination that the object recognition network does not meet the convergence condition, step 305 is executed.
[0078] In step 304, the candidate parameters are determined to be target parameters, and the object recognition network corresponding to the target parameters is determined to be the updated object recognition network.
[0079] In step 305, the candidate parameters are updated and the process returns to step 302 to continue.
[0080] Training images can be associated with recognition result labels, which can be annotations of local limbs in the image. For example, if the object recognition network identifies a hand as a local part, the recognition result label can be the annotation of the real-world rectangular box containing the hand, referred to as the hand frame label. If the object recognition network identifies a palm as a local part, the recognition result label can be the annotation of the real-world coordinate points corresponding to the palm.
[0081] Determining whether the object recognition network meets the convergence condition based on the object recognition result may include: determining a recognition error through the object recognition result and the recognition result label corresponding to the training image, judging whether the object recognition network meets the convergence condition based on the recognition error, determining that the current object recognition network is an updated object recognition network in response to judging that the object recognition network meets the convergence condition based on the recognition error, and updating the object recognition network based on the recognition error in response to judging that the object recognition network does not meet the convergence condition based on the recognition error.
[0082] The object recognition network can perform feature regression and classification on the limb features in the image to obtain the corresponding object recognition results. The object recognition results can include a rectangular box corresponding to the area or the location of the object. The specific type of object recognition result can be determined based on the object characteristics of the object being recognized. For example, the object recognition result can be a hand box.
[0083] The object recognition result can be used to calculate the loss of the object recognition network to obtain a recognition error. Determining whether the object recognition network meets the convergence condition based on the recognition error can include: determining whether the recognition error is less than a loss threshold; determining that the recognition error meets the convergence condition in response to determining that the recognition error is less than the loss threshold; and determining that the recognition error does not meet the convergence condition in response to determining that the recognition error is greater than or equal to the loss threshold.
[0084] In some embodiments, updating the candidate parameters may include: updating the candidate parameters based on a gradient descent algorithm and a recognition error to obtain updated candidate parameters.
[0085] In this embodiment, when training the object recognition network, the limb feature extraction network can be used to extract the image limb features of the training image, and the object recognition network corresponding to the candidate parameters can be used to perform local limb recognition on the image limb features to obtain object recognition results. The object recognition results are used to detect the convergence conditions of the object recognition network. The convergence conditions can be used to evaluate the effectiveness of the current candidate parameters of the object recognition network, so that the object recognition network can be applied to the limb feature extraction network during the training process, reducing the complexity of the network that needs to be trained and improving the training efficiency of the object recognition network. In addition, the convergence conditions can be used to determine whether the object recognition network has terminated training, accurately monitor the training process of the object recognition network, and improve the training accuracy of the object recognition network.
[0086] In some embodiments, the difference from the above embodiments is that the object recognition network includes a hand frame recognition network; determining the object recognition result of the training image based on the image limb features through the object recognition network may include:
[0087] Based on the hand frame recognition network corresponding to the hand frame parameters, a hand frame recognition result corresponding to the image limb features is determined, and the hand frame parameters are candidate parameters of the hand frame recognition network.
[0088] Update the object recognition network based on the object recognition results, including:
[0089] According to the hand frame recognition results, determine whether the object recognition network meets the convergence conditions;
[0090] In response to determining that the object recognition network meets the convergence condition according to the hand frame recognition result, determining that the hand frame parameter corresponds to the hand frame recognition network as the object recognition network that has completed the update;
[0091] In response to determining that the object recognition network does not meet the convergence condition according to the hand frame recognition result, the hand frame parameters are updated, the hand frame recognition network corresponding to the hand frame parameters is returned, and the hand frame recognition result corresponding to the image limb feature is determined to continue execution.
[0092] In some embodiments, determining a hand frame recognition result corresponding to an image limb feature based on a hand frame recognition network corresponding to hand frame parameters, where the hand frame parameters are candidate parameters of the hand frame recognition network, may include inputting the image limb feature into the hand frame recognition network corresponding to the hand frame parameters to obtain a hand frame recognition result. The image limb feature may also be enhanced and the enhanced image limb feature inputted into the hand frame recognition network corresponding to the hand frame parameters to obtain a hand frame recognition result.
[0093] In some embodiments, a hand frame recognition network can be used to recognize a hand frame in an image limb feature. The hand frame recognition result can include a rectangular frame corresponding to the hand area in the image, which can be called a hand frame.
[0094] In some embodiments, in addition to the hand frame recognition network, the object recognition network may also include recognition networks for other human body parts, such as a palm recognition network, a face recognition network, etc., which may be specifically determined according to the recognition purpose or recognition requirements of the recognition network.
[0095] In this embodiment, based on the limb features of the image, hand frame recognition can be performed based on the hand frame recognition network corresponding to the hand frame parameters to obtain a hand frame recognition result. The hand frame recognition result can be used to determine whether the object recognition network meets the convergence condition. If the object recognition network does not meet the convergence condition, the hand frame parameters can be updated, thereby achieving an update of the object recognition network. If the object recognition network meets the convergence condition, the hand frame recognition network corresponding to the hand frame parameters can be determined as the updated object recognition network. The hand frame recognition result can be used to determine whether the hand frame recognition network corresponding to the hand frame parameters meets the convergence condition. If the hand frame recognition network does not meet the convergence condition, parameter updates can be performed. This allows iterative updates of the hand frame recognition network to obtain an accurate hand frame recognition network.
[0096] In some embodiments, the object recognition network may further include: a palm recognition network and a hand frame recognition network.
[0097] Based on the image limb features, the object recognition network is used to determine the object recognition results of the training image, including:
[0098] Determine the hand frame recognition result corresponding to the image limb features based on the hand frame recognition network corresponding to the hand frame parameters, where the hand frame parameters are candidate parameters of the hand frame recognition network;
[0099] Based on the palm recognition network corresponding to the palm parameters, the palm recognition result corresponding to the image limb features is determined, and the palm parameters are candidate parameters of the palm recognition network.
[0100] Update the object recognition network based on the object recognition results, including:
[0101] Based on the hand frame recognition results and the palm recognition results, determine whether the object recognition network meets the convergence conditions;
[0102] In response to determining that the object recognition network meets the convergence condition according to the hand frame recognition result and the hand palm recognition result, determining that the hand frame recognition network corresponding to the hand frame parameters and the hand palm recognition network corresponding to the hand palm parameters are the updated object recognition networks;
[0103] In response to determining that the object recognition network does not meet the convergence condition based on the hand frame recognition result and the hand palm recognition result, the hand frame parameters and the hand palm parameters are updated, the hand frame recognition network corresponding to the hand frame parameters is returned, and the hand frame recognition result corresponding to the image limb feature is determined to continue execution.
[0104] In some embodiments, the object recognition results may include hand frame recognition results and hand palm recognition results. The hand palm recognition network can be used to identify the center point of a human hand. The hand palm recognition results may include hand palm position coordinates, which may refer to the coordinates of the hand palm in the training image or the image to be recognized.
[0105] For ease of understanding, FIG4 is an example diagram of an object recognition model provided in this embodiment. Referring to FIG4 , the object recognition model may include a limb feature extraction network 401. The input of limb feature extraction network 401 may be an image, and its output may be connected to a hand frame recognition network 402, a palm recognition network 403, and a limb recognition network 404. The features extracted by limb feature extraction network 401 may be input to hand frame recognition network 402, palm recognition network 403, and limb recognition network 404, respectively, to obtain a hand frame recognition result output by hand frame recognition network 402, a palm recognition result output by palm recognition network 403, and a limb recognition result output by limb recognition network 404. The limb recognition result may include, for example, limb key points or limb regions.
[0106] In this embodiment, in addition to the hand frame recognition network, the object recognition network may also include a palm recognition network. This configuration further enables effective utilization of limb features in images. Furthermore, by adding a palm recognition network to the hand frame recognition network, two key hand recognition objects—the hand frame and the palm point—can be trained together. This allows the training processes of the hand frame and palm recognition networks to influence each other, improving their recognition accuracy.
[0107] In some embodiments, judging whether the object recognition network meets the convergence condition based on the hand frame recognition result and the hand palm recognition result includes:
[0108] Calculate the first loss value based on the hand frame recognition result and the hand frame label of the training image;
[0109] Calculate the second loss value based on the palm recognition result and the palm label of the training image;
[0110] Perform a weighted sum of the first loss value and the second loss value to obtain the target loss value;
[0111] In response to determining that the target loss value satisfies the loss threshold, determining that the object recognition network satisfies a convergence condition;
[0112] In response to determining that the target loss value does not satisfy the loss threshold, it is determined that the object recognition network does not satisfy a convergence condition.
[0113] In some embodiments, the first loss value can be obtained by calculating the difference between the hand frame recognition result and the hand frame label. For example, the first loss value can be obtained by calculating the distance between the hand frame recognition result and the hand frame label.
[0114] In some embodiments, the second loss value can be obtained by calculating the difference between the palm recognition result and the palm label. For example, the second loss value can be obtained by calculating the distance between the palm recognition result and the palm label.
[0115] The target loss value can be calculated by weighting the first loss value and the second loss value. A first weight for the hand frame recognition network and a second weight for the hand palm recognition network can be determined. A first value is obtained by multiplying the first weight by the first loss value, and a second value is obtained by multiplying the second weight by the second loss value. The target loss value is then calculated by summing the first and second values.
[0116] In some embodiments, the first weight and the second weight may be preset constants. In other embodiments, to improve model building accuracy, the first weight and the second weight may be used as training parameters to participate in the training of the hand frame recognition network and the hand palm recognition network, and the weight values obtained in the last iteration are the training results of the first weight and the second weight.
[0117] In some embodiments, the target loss value meeting the loss threshold may mean that the target loss value is less than or equal to the loss threshold. The target loss value not meeting the loss threshold may mean that the target loss value is greater than the loss threshold.
[0118] In this embodiment, the training effects of the hand-frame recognition network and the hand-palm recognition network can be evaluated separately by calculating the first loss value of the hand-frame recognition network and the second loss value of the palm recognition network. Furthermore, the final target loss value is calculated by taking a weighted sum of the first and second loss values, thereby combining the two loss values for a comprehensive loss calculation. This allows the hand-frame recognition network and the palm recognition network to jointly determine convergence conditions, allowing them to be trained simultaneously. Furthermore, the palm recognition network and the hand-frame recognition network interact with each other, improving network recognition accuracy.
[0119] In some embodiments, based on any of the above embodiments, the step of determining the recognition result label corresponding to the training image in the object recognition network includes:
[0120] Determine the limb keypoint labels when training the limb recognition model on the training images;
[0121] Based on the limb key point labels, the recognition result labels corresponding to the training images in the object recognition network are generated.
[0122] In some embodiments, the recognition result label can be determined based on the object being recognized by the object recognition network. For example, if the object being recognized by the object recognition network is a palm, the recognition result label can be a palm label. If the object being recognized by the object recognition network is a hand frame, the recognition result label can be a hand frame label.
[0123] In some embodiments, a palm label of a training image in an object recognition network may be generated based on the limb key point labels. A hand frame label of a training image in an object recognition network may be generated based on the limb key point labels.
[0124] In the disclosed embodiment, limb key point labels are obtained when training a limb recognition model using existing training images, and recognition result labels corresponding to the training images in the object recognition network are generated based on the limb key point labels. For example, based on the positional constraint relationship between the limb key points and the recognition object, the existing limb key point labels can be used through interpolation, fitting, etc. to realize the labeling of recognition result labels corresponding to local parts of the limbs. In particular, when the number of recognition result labels corresponding to the recognition object is limited, the labeling efficiency can be improved and the number of labels can be enriched by reusing the limb key point labels.
[0125] In some embodiments, after performing weighted summation on the first loss value and the second loss value to obtain the target loss value, the method further includes:
[0126] According to the target loss value, update the hand frame parameters and hand center parameters.
[0127] In some embodiments, a target loss value can be used in conjunction with a gradient descent algorithm to update the hand frame parameters and the hand center parameters. Of course, other parameter update algorithms, such as stochastic gradient descent, can also be used. This embodiment does not impose any restrictions on the specific algorithm used for parameter update.
[0128] In this embodiment, the palm parameters and hand frame parameters are updated using the target loss value of this iteration, so that the losses generated in each iteration can be involved in the parameter update process of the hand frame recognition network and the palm parameters, thereby obtaining more accurate palm parameters and hand frame parameters.
[0129] In some embodiments, calculating a first loss value based on the hand frame recognition result and the hand frame label of the training image includes:
[0130] Using the regression loss function, calculate the first loss value corresponding to the hand frame recognition result and the hand frame label of the training image;
[0131] Based on the palm recognition results and the palm labels of the training images, the second loss value is calculated, including:
[0132] The mean square error loss function is used to calculate the second loss value corresponding to the palm recognition result and the palm annotation of the training image.
[0133] The regression loss function can include any one of the loss functions such as the mean absolute error (also known as the L1 loss function), the mean square error loss function (also known as the L2 loss function), and the smoothed mean absolute error (Huber smoothed L1 loss function). In this embodiment, there are no excessive restrictions on the function type used for the regression loss function.
[0134] The mean squared error (MSE) loss function, also known as the L2 loss function, calculates the error by calculating the sum of the squares of the differences between the predicted and target values. For detailed calculations of regression and mean squared error loss functions, please refer to the relevant literature and will not be elaborated on here.
[0135] In this embodiment, the first loss value can be calculated using the regression loss function, and the second loss value can be calculated using the mean square error function. By calculating the errors of different networks through different loss functions, targeted loss calculations can be achieved for different networks, making the selected loss function more suitable for the corresponding recognition network and improving the accuracy of loss calculation.
[0136] In some embodiments, based on any of the above embodiments, the hand frame recognition network may include a global average pooling layer and a fully connected layer. The hand center recognition network may be constructed based on a heat map algorithm.
[0137] The global average pooling layer can be constructed using the global average pooling algorithm. The global average pooling algorithm calculates the average of the raw data input for each channel, obtaining the corresponding mean for each channel and using the mean for each channel as the input for the fully connected layer. The global average pooling algorithm can reduce the complexity of the data structure of each channel and improve the network calculation speed.
[0138] The fully connected layer, constructed using a fully connected (FC) algorithm, can be used to classify hand frames. This allows for fast and accurate hand frame classification. The heatmap algorithm can be used to identify the palm center of the input feature. When implemented, this algorithm can identify the corresponding object.
[0139] In order to obtain an accurate limb recognition model, in this solution, the limb recognition model can be trained. The training steps of the limb recognition model may include:
[0140] Based on the two-dimensional limb annotation data, a limb recognition model is trained;
[0141] Alternatively, a limb recognition model is trained based on the two-dimensional limb annotation data and the three-dimensional limb annotation data.
[0142] The two-dimensional limb annotation data may include training images and two-dimensional annotation data of the training images.
[0143] The 3D limb annotation data may include training images and 3D annotation data of the training images.
[0144] Two-dimensional annotation data can refer to data represented in two dimensions, such as two-dimensional coordinate points or two-dimensional rectangular boxes. Three-dimensional annotation data can refer to data that includes depth data of an image in addition to two-dimensional data, such as depth data added to two-dimensional coordinate points or depth data added to a two-dimensional rectangular box.
[0145] The limb recognition model can identify limbs in images and obtain limb recognition results. The limbs involved in this case include, but are not limited to, key points and regions of the limbs. Of course, in practical applications, limbs other than human bodies can also include cartoon characters, animals, and other subjects to be identified.
[0146] In this embodiment, the limb recognition model can be trained using two-dimensional limb annotation data, or it can be trained using both two-dimensional and three-dimensional limb annotation data. By training the limb recognition model using two-dimensional limb annotation data, or using two-dimensional combined with three-dimensional limb annotation data, the limb recognition model can accurately identify limbs in images, improving the training efficiency and accuracy of the limb recognition model.
[0147] In order to achieve a complete limb recognition process. In some embodiments, the limb recognition model further includes: a limb recognition network with known parameters;
[0148] Based on the limb feature extraction network and the updated object recognition network, a target recognition model is constructed, including:
[0149] Based on the limb feature extraction network, the limb recognition network and the updated object recognition network, a target recognition model is determined, and the target recognition model is used to perform recognition of limbs and local parts of limbs in the target image.
[0150] During the construction of the target recognition model, the parameters of the limb feature extraction network and the limb recognition network in the target recognition model remain unchanged, and the parameters of the limb feature extraction network and the limb recognition network are not iteratively updated, while the parameters of the object recognition network are continuously iteratively updated during training until the convergence conditions are met.
[0151] In this embodiment, obtaining a limb recognition model can obtain a limb feature extraction network and a limb recognition network. When constructing a target recognition model, the limb recognition network can be used as a recognition branch of the target recognition model. An object recognition network is added to the limb recognition network. By adding recognition network branches to the same limb feature extraction network, multi-task recognition can be achieved, and multiple tasks can share the limb feature extraction network (backbone). There is no need to train feature extraction networks separately for the recognition of limbs and local parts of limbs, which can reduce the complexity and time consumption of model training and improve the efficiency and accuracy of model acquisition.
[0152] As shown in FIG5 , it is a flowchart of some embodiments of an object recognition method provided by the embodiments of the present disclosure. The object recognition method may include the following steps 501 to 504 .
[0153] In step 501 , in response to an image recognition request, an image to be recognized is received.
[0154] In step 502, a trained target recognition model is obtained, where the target recognition model includes a limb feature extraction network with known parameters and a trained object recognition network.
[0155] In step 503, based on a limb feature extraction network with known parameters, image limb features of the image to be recognized are extracted.
[0156] In step 504, based on the trained object recognition network, an object recognition result corresponding to the image limb feature of the image to be recognized is determined, and the target recognition model is obtained by using the model construction method of any of the above embodiments.
[0157] The object recognition results include recognition results of limbs and limb parts.
[0158] In some embodiments, the object recognition network may include a palm recognition network and / or a hand frame recognition network. Object recognition results corresponding to limb features of the image to be recognized may include palm recognition results obtained by the palm recognition network identifying the limb features of the image to be recognized, such as palm point coordinates, and / or hand frame recognition results obtained by the hand frame recognition network identifying the limb features of the image to be recognized, such as a hand frame.
[0159] In some embodiments, the object recognition network may further include a limb recognition network. The object recognition result corresponding to the limb features of the image to be recognized may further include a limb recognition result obtained by the limb recognition network recognizing the limb features of the image to be recognized, such as a rectangular box corresponding to a limb key point or limb area.
[0160] In this embodiment, an image to be recognized can be received in response to an image recognition request. By acquiring a trained target recognition model, a limb feature extraction network within the target recognition model can be used to extract limb features of the image to be recognized. Through the object recognition network, an object recognition result corresponding to the limb features of the image to be recognized can be obtained, thereby achieving accurate recognition of limb objects.
[0161] As shown in Figure 6, it is a structural schematic diagram of some embodiments of a model building device provided in an embodiment of the present disclosure. The model building device 600 may include a first acquisition unit 601, a feature extraction unit 602, a model training unit 603 and a model building unit 604.
[0162] The first acquisition unit 601 is used to acquire a limb recognition model. The limb recognition model includes a limb feature extraction network with known parameters. The limb recognition model is used to recognize limbs.
[0163] The feature extraction unit 602 is used to input the training image into the limb feature extraction network to obtain the image limb features.
[0164] The model training unit 603 is used to determine the object recognition result of the training image based on the image limb features through the object recognition network, and update the object recognition network based on the object recognition result. The object recognized by the object recognition network is a local part of the limb.
[0165] The model building unit 604 is used to build a target recognition model based on the limb feature extraction network and the updated object recognition network. The target recognition model is used to perform recognition of local parts of the limbs in the target image.
[0166] In some embodiments, the model training unit may include:
[0167] A first determination module is used to determine candidate parameters for the object recognition network, where the candidate parameters are parameter values of each network function in the object recognition network;
[0168] A first recognition module is configured to determine an object recognition result corresponding to an image limb feature based on an object recognition network corresponding to the candidate parameters;
[0169] A first processing module is configured to, in response to determining that the object recognition network meets a convergence condition based on the object recognition result, determine the candidate parameters as target parameters, and determine that the object recognition network corresponding to the target parameters is the updated object recognition network;
[0170] The second processing module is used to update the candidate parameters in response to determining that the object recognition network does not meet the convergence condition based on the object recognition result, return to the object recognition network corresponding to the candidate parameters, and determine the object recognition result corresponding to the image limb feature to continue execution.
[0171] In some embodiments, the object recognition network includes a hand frame recognition network; the model training unit may further include:
[0172] A second determination module is configured to determine a hand frame recognition result corresponding to an image limb feature based on a hand frame recognition network corresponding to hand frame parameters, where the hand frame parameters are candidate parameters of the hand frame recognition network;
[0173] The first judgment module is configured to judge whether the object recognition network meets the convergence condition based on the hand frame recognition result; in response to judging that the object recognition network meets the convergence condition based on the hand frame recognition result, determine that the hand frame recognition network corresponding to the hand frame parameters is the object recognition network that has completed the update; in response to judging that the object recognition network does not meet the convergence condition based on the hand frame recognition result, update the hand frame parameters, return to the hand frame recognition network corresponding to the hand frame parameters, and determine the hand frame recognition result corresponding to the image limb feature to continue execution.
[0174] In some embodiments, the object recognition network includes: a palm recognition network and a hand frame recognition network. The model training unit may also include:
[0175] a third determination module, configured to determine a hand frame recognition result corresponding to an image limb feature based on a hand frame recognition network corresponding to hand frame parameters, where the hand frame parameters are candidate parameters of the hand frame recognition network;
[0176] A fourth determination module is configured to determine a palm recognition result corresponding to an image limb feature based on a palm recognition network corresponding to palm parameters, where the palm parameters are candidate parameters of the palm recognition network;
[0177] The second judgment module is configured to judge whether the object recognition network meets the convergence condition based on the hand frame recognition results and the palm recognition results; in response to judging that the object recognition network meets the convergence condition based on the hand frame recognition results and the palm recognition results, determine that the hand frame recognition network corresponding to the hand frame parameters and the palm recognition network corresponding to the palm parameters are the updated object recognition networks; in response to judging that the object recognition network does not meet the convergence condition based on the hand frame recognition results and the palm recognition results, update the hand frame parameters and the palm parameters, return to the hand frame recognition network corresponding to the hand frame parameters, and determine the hand frame recognition result corresponding to the image limb feature to continue execution.
[0178] In some embodiments, the second determination module includes:
[0179] A first calculation submodule, configured to calculate a first loss value based on the hand frame recognition result and the hand frame label of the training image;
[0180] A second calculation submodule, configured to calculate a second loss value based on the palm recognition result and the palm label of the training image;
[0181] A target calculation submodule is used to perform a weighted summation of the first loss value and the second loss value to obtain a target loss value;
[0182] a first judgment submodule, configured to determine that the object recognition network satisfies a convergence condition in response to determining that the target loss value satisfies a loss threshold;
[0183] The second judgment submodule is configured to determine that the object recognition network does not meet the convergence condition in response to determining that the target loss value does not meet the loss threshold.
[0184] In some embodiments, the second determination module further includes:
[0185] The label determination unit is used to determine the labels of limb key points when training a limb recognition model using training images.
[0186] The label generation unit is used to generate the recognition result label corresponding to the training image in the object recognition network based on the limb key point label.
[0187] In some embodiments, the second determination module further includes:
[0188] The first training unit is used to train a limb recognition model based on two-dimensional limb annotation data;
[0189] Alternatively, the second training unit is used to train and obtain a limb recognition model based on the two-dimensional limb annotation data and the three-dimensional limb annotation data.
[0190] In some embodiments, the limb recognition model further includes: a limb recognition network with known parameters;
[0191] Model building unit, specifically used for:
[0192] An object recognition model is constructed based on the limb feature extraction network, the limb recognition network and the object recognition network to be trained.
[0193] In some embodiments, the model building unit may be specifically configured to:
[0194] Based on the limb feature extraction network, the limb recognition network and the updated object recognition network, a target recognition model is determined, and the target recognition model is used to perform recognition of limbs and local parts of limbs in the target image.
[0195] As shown in FIG7 , it is a schematic structural diagram of some embodiments of an object recognition device provided by an embodiment of the present disclosure. The object recognition device 700 may include an image receiving unit 701 , a second acquisition unit 702 , a feature extraction unit 703 and an object recognition unit 704 .
[0196] The image receiving unit 701 is configured to receive an image to be recognized in response to an image recognition request.
[0197] The second acquisition unit 702 is used to acquire the trained target recognition model, where the target recognition model includes a limb feature extraction network with known parameters and an updated object recognition network.
[0198] The feature extraction unit 703 is used to extract the image limb features of the image to be recognized based on a limb feature extraction network with known parameters.
[0199] The object recognition unit 704 is used to determine the object recognition result corresponding to the image limb feature of the image to be recognized based on the object recognition network obtained through training. The target recognition model is obtained by using the model construction method provided by any of the above embodiments.
[0200] The object recognition device provided in this embodiment can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0201] In order to implement the above embodiment, the embodiment of the present disclosure further provides an electronic device.
[0202] Referring to FIG8 , a schematic diagram of the structure of an electronic device 800 suitable for implementing an embodiment of the present disclosure is shown. The electronic device 800 may be a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG8 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.
[0203] As shown in Figure 8, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0204] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although FIG8 shows an electronic device 800 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0205] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0206] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0207] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0208] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0209] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0210] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0211] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0212] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0213] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0214] The embodiments of the present disclosure provide a model construction, object recognition method, apparatus, device, medium and product to overcome the current problems of difficulty in hand frame training and low recognition accuracy.
[0215] In a first aspect, according to one or more embodiments of the present disclosure, a model building method is provided, comprising:
[0216] Obtaining a limb recognition model, the limb recognition model including a limb feature extraction network with known parameters, and the limb recognition model is used to recognize limbs;
[0217] Input the training image into the limb feature extraction network to obtain the image limb features;
[0218] Based on the image limb features, the object recognition results of the training image are determined by the object recognition network, and the object recognition network is updated based on the object recognition results, where the object recognized by the object recognition network is a local part of the limb;
[0219] Based on the limb feature extraction network and the updated object recognition network, a target recognition model is constructed, and the target recognition model is used to perform recognition of local parts of the limbs in the target image.
[0220] According to one or more embodiments of the present disclosure, determining an object recognition result of a training image based on image limb features through an object recognition network includes:
[0221] Determining candidate parameters for the object recognition network, where the candidate parameters are parameter values of each network function in the object recognition network;
[0222] Determine an object recognition result corresponding to the limb feature of the image based on an object recognition network corresponding to the candidate parameters;
[0223] Update the object recognition network based on the object recognition results, including:
[0224] In response to determining that the object recognition network meets the convergence condition according to the object recognition result, determining the candidate parameters as the target parameters, and determining the object recognition network corresponding to the target parameters as the updated object recognition network;
[0225] In response to determining that the object recognition network does not meet the convergence condition based on the object recognition result, the candidate parameters are updated, and the object recognition network corresponding to the candidate parameters is returned to determine the object recognition result corresponding to the image limb feature to continue execution.
[0226] According to one or more embodiments of the present disclosure, the object recognition network includes a hand frame recognition network;
[0227] Based on the image limb features, the object recognition network is used to determine the object recognition results of the training image, including:
[0228] Determine the hand frame recognition result corresponding to the image limb features based on the hand frame recognition network corresponding to the hand frame parameters, where the hand frame parameters are candidate parameters of the hand frame recognition network;
[0229] Update the object recognition network based on the object recognition results, including:
[0230] According to the hand frame recognition results, determine whether the object recognition network meets the convergence conditions;
[0231] In response to determining, based on the hand frame recognition result, that the object recognition network meets the convergence condition, determining that the hand frame parameters correspond to the hand frame recognition network as the object recognition network that has completed the update;
[0232] In response to determining, based on the hand frame recognition result, that the object recognition network does not meet the convergence condition, the hand frame parameters are updated, the hand frame recognition network corresponding to the hand frame parameters is returned, and the hand frame recognition result corresponding to the image limb feature is determined to continue execution.
[0233] According to one or more embodiments of the present disclosure, the object recognition network includes: a palm recognition network and a hand frame recognition network;
[0234] Based on the image limb features, the object recognition network is used to determine the object recognition results of the training image, including:
[0235] Determine the hand frame recognition result corresponding to the image limb features based on the hand frame recognition network corresponding to the hand frame parameters, where the hand frame parameters are candidate parameters of the hand frame recognition network;
[0236] Based on the palm recognition network corresponding to the palm parameters, determine the palm recognition result corresponding to the image limb features, and the palm parameters are candidate parameters of the palm recognition network;
[0237] Update the object recognition network based on the object recognition results, including:
[0238] Based on the hand frame recognition results and the palm recognition results, determine whether the object recognition network meets the convergence conditions;
[0239] In response to determining that the object recognition network meets the convergence condition based on the hand frame recognition result and the hand palm recognition result, the hand frame recognition network corresponding to the hand frame parameters and the hand palm recognition network corresponding to the hand palm parameters are the updated object recognition networks;
[0240] In response to determining, based on the hand frame recognition results and the hand palm recognition results, that the object recognition network does not meet the convergence condition, the hand frame parameters and the hand palm parameters are updated, the hand frame recognition network corresponding to the hand frame parameters is returned, and the hand frame recognition result corresponding to the image limb feature is determined to continue execution.
[0241] According to one or more embodiments of the present disclosure, judging whether the object recognition network meets the convergence condition based on the hand frame recognition result and the hand palm recognition result includes:
[0242] Calculate the first loss value based on the hand frame recognition result and the hand frame label of the training image;
[0243] Calculate the second loss value based on the palm recognition result and the palm label of the training image;
[0244] Perform a weighted sum of the first loss value and the second loss value to obtain the target loss value;
[0245] In response to determining that the target loss value satisfies the loss threshold, determining that the object recognition network satisfies a convergence condition;
[0246] In response to determining that the target loss value does not satisfy the loss threshold, it is determined that the object recognition network does not satisfy a convergence condition.
[0247] According to one or more embodiments of the present disclosure, the step of determining the recognition result label corresponding to the training image in the object recognition network includes:
[0248] Determine the limb keypoint labels when training the limb recognition model on the training images;
[0249] Based on the limb key point labels, the recognition result labels corresponding to the training images in the object recognition network are generated.
[0250] According to one or more embodiments of the present disclosure, the training step of the limb recognition model includes:
[0251] Based on the two-dimensional limb annotation data, a limb recognition model is trained;
[0252] Alternatively, a limb recognition model is trained based on the two-dimensional limb annotation data and the three-dimensional limb annotation data.
[0253] According to one or more embodiments of the present disclosure, the limb recognition model further includes: a limb recognition network with known parameters;
[0254] Based on the limb feature extraction network and the updated object recognition network, a target recognition model is constructed, including:
[0255] Based on the limb feature extraction network, the limb recognition network and the updated object recognition network, a target recognition model is determined, and the target recognition model is used to perform recognition of limbs and local parts of limbs in the target image.
[0256] In a second aspect, according to one or more embodiments of the present disclosure, a method for object recognition is provided, including:
[0257] In response to an image recognition request, receiving an image to be recognized;
[0258] Obtaining a trained target recognition model, the target recognition model includes a limb feature extraction network with known parameters and a trained object recognition network; the object recognized by the object recognition network is a local part of the limb;
[0259] Based on a limb feature extraction network with known parameters, the limb features of the image to be identified are extracted;
[0260] Based on the object recognition network obtained through training, the object recognition result corresponding to the image limb feature of the image to be recognized is determined, and the target recognition model is obtained by using the model construction method provided by any of the above embodiments.
[0261] In a third aspect, according to one or more embodiments of the present disclosure, a model building device is provided, comprising:
[0262] A first acquisition unit is used to acquire a limb recognition model, the limb recognition model includes a limb feature extraction network with known parameters, and the limb recognition model is used to recognize limbs;
[0263] A feature extraction unit is used to input the training image into the limb feature extraction network to obtain the image limb features;
[0264] A model training unit is used to determine an object recognition result of the training image through an object recognition network based on the image limb features, and to update the object recognition network based on the object recognition result, wherein the object recognized by the object recognition network is a local part of the limb;
[0265] The model building unit is used to build a target recognition model based on the limb feature extraction network and the updated object recognition network. The target recognition model is used to perform recognition of local parts of the limbs in the target image.
[0266] In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided an object recognition device, comprising:
[0267] An image receiving unit, configured to receive an image to be recognized in response to an image recognition request;
[0268] A second acquisition unit is used to acquire a trained target recognition model, where the target recognition model includes a limb feature extraction network with known parameters and an updated object recognition network;
[0269] A feature extraction unit is used to extract limb features of an image to be identified based on a limb feature extraction network with known parameters;
[0270] The object recognition unit is used to determine the object recognition result corresponding to the image limb feature of the image to be recognized based on the object recognition network obtained through training. The target recognition model is obtained by using the model construction method provided by any of the above embodiments.
[0271] In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0272] Memory stores computer-executable instructions;
[0273] At least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the model building method or object recognition method provided by the aforementioned embodiments.
[0274] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the model building method or object recognition method provided in the aforementioned embodiments is implemented.
[0275] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the model building method or object recognition method provided in the aforementioned embodiments.
[0276] In a sixth aspect, according to one or more embodiments of the present disclosure, a computer program is provided, comprising: instructions, which, when executed by a processor, cause the processor to execute the model building method or object recognition method according to the aforementioned embodiments.
[0277] The technical solution provided by this embodiment can obtain a limb recognition model. The parameters of the limb feature extraction network in the limb recognition model are known and can be directly used to extract limb features from training images. The object recognition network can perform object recognition on the limb features in the image, obtaining object recognition results for the training images. This object recognition result can be used to update the object recognition network, which can be used to identify local limb parts. By directly using the limb feature extraction network to extract the corresponding features, there is no need to train the feature extraction network, greatly reducing the difficulty of model construction. Furthermore, the limb features learned by the limb feature extraction network can be used to train the object recognition network, allowing the object recognition network to learn limb features and perform object recognition. The objects recognized by the object recognition network can be local limb parts. By reusing the limb feature extraction parameters in the limb recognition model, the object recognition results can be used to update the object recognition network, reducing the number of networks to be updated, thereby achieving rapid and accurate training of the object recognition network. This technical solution can achieve the effect of both improving training efficiency and effectively enhancing training accuracy.
[0278] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present disclosure.
[0279] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0280] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A model building method, comprising: Acquire a limb recognition model, wherein the limb recognition model includes a limb feature extraction network with known parameters, and the limb recognition model is used to recognize limbs; Inputting the training image into the limb feature extraction network to obtain image limb features; Based on the image limb features, determining the object recognition result of the training image through an object recognition network, and updating the object recognition network based on the object recognition result, wherein the object recognized by the object recognition network is a local part of the limb; Based on the limb feature extraction network and the updated object recognition network, a target recognition model is constructed, and the target recognition model is used to perform recognition of local parts of the limbs in the target image.
2. The model building method according to claim 1, wherein: The determining the object recognition result of the training image based on the image limb feature through an object recognition network includes: Determining candidate parameters for the object recognition network, wherein the candidate parameters are parameter values of each network function in the object recognition network; Determine, based on the object recognition network corresponding to the candidate parameters, an object recognition result corresponding to the image limb feature; The updating of the object recognition network based on the object recognition result comprises: In response to determining that the object recognition network meets a convergence condition according to the object recognition result, determining that the candidate parameter is a target parameter, and determining that the object recognition network corresponding to the target parameter is the updated object recognition network; In response to determining that the object recognition network does not meet the convergence condition according to the object recognition result, the candidate parameters are updated, and the process returns to the object recognition result of the training image based on the image limb feature and determined through the object recognition network to continue execution.
3. The model building method according to claim 1, wherein: The object recognition network includes a hand frame recognition network; The determining the object recognition result of the training image based on the image limb feature through the object recognition network includes: Determining a hand frame recognition result corresponding to the image limb feature based on the hand frame recognition network corresponding to the hand frame parameters, wherein the hand frame parameters are candidate parameters of the hand frame recognition network; The updating of the object recognition network based on the object recognition result comprises: According to the hand frame recognition result, judging whether the object recognition network meets the convergence condition; In response to judging that the object recognition network satisfies the convergence condition according to the hand frame recognition result, determining that the hand frame recognition network corresponding to the hand frame parameter is the updated object recognition network; In response to determining, based on the hand frame recognition result, that the object recognition network does not meet the convergence condition, the hand frame parameters are updated, the hand frame recognition network corresponding to the hand frame parameters is returned, and the hand frame recognition result corresponding to the image limb feature is determined to continue execution.
4. The model building method according to claim 1, wherein: The object recognition network includes: a palm recognition network and a hand frame recognition network; The determining the object recognition result of the training image based on the image limb feature through the object recognition network includes: Determining a hand frame recognition result corresponding to the image limb feature based on the hand frame recognition network corresponding to the hand frame parameters, wherein the hand frame parameters are candidate parameters of the hand frame recognition network; Determining a palm recognition result corresponding to the image limb feature based on the palm recognition network corresponding to the palm parameter, wherein the palm parameter is a candidate parameter of the palm recognition network; The updating of the object recognition network based on the object recognition result comprises: According to the hand frame recognition result and the palm recognition result, determining whether the object recognition network meets a convergence condition; In response to judging that the object recognition network satisfies the convergence condition according to the hand frame recognition result and the hand palm recognition result, determining that the hand frame recognition network corresponding to the hand frame parameters and the hand palm recognition network corresponding to the hand palm parameters are the updated object recognition networks; In response to determining, based on the hand frame recognition result and the palm recognition result, that the object recognition network does not meet the convergence condition, the hand frame parameters and the palm parameters are updated, the hand frame recognition network corresponding to the hand frame parameters is returned, and the hand frame recognition result corresponding to the image limb feature is determined to continue execution.
5. The model building method according to claim 4, wherein: The determining, according to the hand frame recognition result and the palm recognition result, whether the object recognition network satisfies a convergence condition includes: Calculating a first loss value according to the hand frame recognition result and the hand frame label of the training image; Calculating a second loss value according to the palm recognition result and the palm label of the training image; Performing a weighted summation of the first loss value and the second loss value to obtain a target loss value; In response to determining that the target loss value satisfies a loss threshold, determining that the object recognition network satisfies a convergence condition; In response to determining that the target loss value does not satisfy the loss threshold, it is determined that the object recognition network does not satisfy a convergence condition.
6. The model building method according to any one of claims 1 to 5, further comprising: Determining a recognition result label corresponding to the training image in the object recognition network includes: Determine the limb key point labels when training the limb recognition model with the training image; According to the limb key point labels, a recognition result label corresponding to the training image in the object recognition network is generated.
7. The model building method according to any one of claims 1 to 5, wherein: Acquiring the limb recognition model includes training to obtain the limb recognition model, including: Based on the two-dimensional limb annotation data, training to obtain the limb recognition model; Alternatively, the limb recognition model is obtained by training based on the two-dimensional limb annotation data and the three-dimensional limb annotation data.
8. The model building method according to any one of claims 1 to 7, wherein: The limb recognition model also includes: a limb recognition network with known parameters; The target recognition model is constructed based on the limb feature extraction network and the updated object recognition network, including: Based on the limb feature extraction network, the limb recognition network and the updated object recognition network, a target recognition model is determined, and the target recognition model is used to perform recognition of limbs and local parts of limbs in a target image.
9. The model building method according to any one of claims 1 to 8, wherein: The target recognition model includes a feature enhancement network, wherein the feature enhancement network performs feature enhancement on the image limb features output by the limb feature extraction network.
10. A method for object recognition, comprising: In response to an image recognition request, receiving an image to be recognized; Acquire a trained target recognition model, wherein the target recognition model includes a limb feature extraction network with known parameters and an object recognition network obtained through training; the object recognized by the object recognition network is a local part of a limb; Based on the limb feature extraction network with known parameters, extract the limb features of the image to be identified; Based on the object recognition network obtained through training, an object recognition result corresponding to the image limb feature of the image to be recognized is determined, and the target recognition model is obtained by adopting the model construction method as described in any one of claims 1 to 9.
11. A model building device, comprising: A first acquisition unit is used to acquire a limb recognition model, wherein the limb recognition model includes a limb feature extraction network with known parameters, and the limb recognition model is used to recognize limbs; A feature extraction unit, used for inputting a training image into the limb feature extraction network to obtain image limb features; A model training unit, for determining an object recognition result of the training image through an object recognition network based on the image limb features, and updating the object recognition network based on the object recognition result, wherein the object recognized by the object recognition network is a local part of a limb; The model building unit is used to build a target recognition model based on the limb feature extraction network and the updated object recognition network, and the target recognition model is used to perform recognition of local parts of the limbs in the target image.
12. An object recognition device, comprising: An image receiving unit, configured to receive an image to be recognized in response to an image recognition request; A second acquisition unit is used to acquire a target recognition model obtained through training, wherein the target recognition model includes a limb feature extraction network with known parameters and an updated object recognition network; A feature extraction unit, configured to extract image limb features of the image to be identified based on the limb feature extraction network with known parameters; An object recognition unit is used to determine the object recognition result corresponding to the image limb feature of the image to be recognized based on the object recognition network obtained by the training, and the target recognition model is obtained by adopting the model construction method as described in any one of claims 1 to 9.
13. An electronic device, comprising: Processor, memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor is configured with the model building method according to any one of claims 1 to 9 or the object recognition method according to claim 10.
14. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the model building method according to any one of claims 1 to 9 or the object recognition method according to claim 10 is implemented.
15. A computer program product comprising a computer program, wherein: The computer program is executed by a processor to configure the model building method according to any one of claims 1 to 9 or the object recognition method according to claim 10.
16. A computer program comprising: Instructions, when executed by a processor, cause the processor to perform the model building method according to any one of claims 1 to 9 or the object recognition method according to claim 10.
Citation Information
Patent Citations
Gesture recognition method and system based on knowledge distillation and attention mechanism
CN113449610A
Gesture posture recognition method based on hierarchical convolutional neural network
CN113673313A
Image processing method, image processing device and electronic equipment
CN113762304A
Human hand recognition method and device, electronic equipment and storage medium
CN114627503A
Transfer learning method and device, equipment and storage medium
CN114912540A
