Key point prediction model training method, device, equipment, medium and product

The sample prediction model is used to predict and train the probability distribution of key points in the image, which solves the problems of low training efficiency and large errors in the heat map method, and improves the training efficiency and accuracy of the key point prediction model.

CN118379586BActive Publication Date: 2024-10-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410823324.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-29
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The training efficiency of the sample key point prediction model based on heat maps is low, resulting in large amounts of data and calculations, low training efficiency, and large errors caused by a single distribution parameter, which affects prediction accuracy.

Method used

The sample prediction model is used to predict the probability distribution of the key points of the sample object in the input image, and obtain multiple distribution parameters. The model is trained based on the reference coordinates and distribution parameters of the key points, reducing the amount of data and capturing multi-angle features, reducing errors. .

Benefits of technology

It improves the training efficiency and prediction accuracy of the key point prediction model, reduces the amount of calculation, and enhances the model's fitting accuracy for key point locations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379586B_ABST
    Figure CN118379586B_ABST
Patent Text Reader

Abstract

The present application discloses a training method, device, equipment, medium and product of a key point prediction model, which relates to the field of artificial intelligence. The method comprises: obtaining a sample image containing a sample object; predicting the probability distribution of the key points of the sample object in the sample image by a sample prediction model, and obtaining a plurality of distribution parameters corresponding to n key points respectively; training the sample prediction model based on the reference coordinates corresponding to the jth key point and the plurality of distribution parameters corresponding to the jth key point, and obtaining a key point prediction model. The amount of data of the distribution parameters predicted by the sample prediction model is much smaller than the amount of data of the heat map predicted in the related art, and the amount of calculation of the sample prediction model is small, thereby improving the training efficiency of the sample prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular to a training method, device, equipment, medium and product for a key point prediction model. Background Art

[0002] Pose estimation aims to predict predefined key points on the object to be identified. It is a basic task in computer vision and an important preprocessing operation for many downstream tasks such as motion capture. Pose estimation tasks can usually be achieved by training a sample key point prediction model.

[0003] In the related art, a sample key point prediction model is trained by a heat map-based method. The sample key point prediction model can generate a high-resolution heat map corresponding to the sample image. In the heat map, each pixel corresponds to a value, which is used to characterize the probability that the key point belongs to the pixel. Then, the predicted coordinates of the key point are determined based on the heat map. Finally, the model is trained based on the difference between the predicted coordinates of the key point and the reference coordinates.

[0004] However, in the heat map-based sample key point prediction model training scheme, each key point corresponds to a high-resolution heat map, and the model needs to predict a large amount of data, resulting in low training efficiency. Summary of the invention

[0005] The embodiments of the present application provide a training method, device, equipment, medium and product for a key point prediction model, which can improve the training efficiency of the key point prediction model. The technical solution is as follows.

[0006] In one aspect, a method for training a key point prediction model is provided, the method comprising:

[0007] Acquire a sample image containing a sample object, wherein the sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer;

[0008] Predicting the probability distribution of the key points of the sample object in the sample image by a sample prediction model, obtaining a plurality of distribution parameters corresponding to the n key points respectively, wherein the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different image analysis angles, and the plurality of distribution parameters corresponding to the jth key point are used to characterize the mixed probability distribution of the jth key point, j≤n and j is a positive integer;

[0009] The sample prediction model is trained based on the reference coordinates corresponding to the j-th key point and multiple distribution parameters corresponding to the j-th key point to obtain a key point prediction model, which is used to predict the key point coordinates of the object to be identified in the image.

[0010] On the other hand, a training device for a key point prediction model is provided, the device comprising:

[0011] An acquisition module, used for acquiring a sample image containing a sample object, wherein the sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer;

[0012] A prediction module, used to predict the probability distribution of the key points of the sample object in the sample image through a sample prediction model, and obtain a plurality of distribution parameters corresponding to the n key points, wherein the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different image analysis angles, and the plurality of distribution parameters corresponding to the jth key point are used to characterize the mixed probability distribution of the jth key point, j≤n and j is a positive integer;

[0013] A training module is used to train the sample prediction model based on the reference coordinates corresponding to the j-th key point and multiple distribution parameters corresponding to the j-th key point to obtain a key point prediction model, wherein the key point prediction model is used to predict the key point coordinates of the object to be identified in the image.

[0014] In some embodiments, the distribution parameters include component parameters and component weights, the component parameters are used to characterize the sub-probability distribution of the mixed probability distribution of the key points, and the component weights are used to characterize the confidence of the sub-probability distribution in the mixed probability distribution; the prediction module is used to extract the features of the sample image through the feature extraction network in the key point prediction model to obtain the image feature representation corresponding to the sample image; analyze the image feature representation through the mixed density network in the key point prediction model, predict the probability distribution of the key points of the sample object in the sample image, and obtain multiple component parameters corresponding to the n key points and component weights corresponding to the multiple component parameters.

[0015] In some embodiments, the prediction module is used to determine the target loss based on the reference coordinates corresponding to the j-th key point, multiple component parameters corresponding to the j-th key point, and component weights corresponding to the multiple component parameters respectively; the sample prediction model is trained by the target loss to obtain the key point prediction model.

[0016] In some embodiments, the component parameters include a coordinate mean and a coordinate standard deviation, the coordinate mean is used to characterize the mean parameter of the sub-probability distribution corresponding to the component parameter, and the coordinate standard deviation is used to characterize the standard deviation parameter corresponding to the sub-probability distribution corresponding to the component parameter; the prediction module is used to calculate the coordinate differences between the multiple coordinate means corresponding to the j-th key point and the reference coordinates corresponding to the j-th key point; based on the component weights corresponding to the multiple component parameters, the multiple coordinate differences corresponding to the j-th key point are weighted and fused to obtain the target coordinate difference; based on the component weights corresponding to the multiple component parameters, the multiple coordinate standard deviations corresponding to the j-th key point are weighted and fused to obtain the target standard deviation; the target loss is determined based on the target coordinate difference and the target standard deviation.

[0017] In some embodiments, the key points include key points in two-dimensional form, and the coordinate standard deviation includes a first standard deviation and a second standard deviation; the first standard deviation is used to characterize the degree of discreteness between each predicted position in the probability distribution corresponding to the component parameter and the horizontal coordinate of the coordinate mean, and the second standard deviation is used to characterize the degree of discreteness between each predicted position in the probability distribution corresponding to the component parameter and the vertical coordinate of the coordinate mean.

[0018] In some embodiments, the plurality of distribution parameters include at least one of a distribution parameter of a Gaussian distribution and a distribution parameter of a Laplace distribution.

[0019] In some embodiments, the prediction module is used to divide the sample image into multiple image regions; predict the probability distribution of the key points of the sample object in each image region through the sample prediction model, and obtain the key point prediction results corresponding to the multiple image regions respectively, and the key point prediction results include multiple distribution parameters corresponding to the n key points respectively.

[0020] In some embodiments, the training module is used to determine the regional probabilities corresponding to the multiple image areas respectively based on the multiple distribution parameters corresponding to the j-th key point in the key point prediction result, and the regional probabilities are used to characterize the probability that the j-th key point belongs to the image area; based on the reference image area to which the reference coordinates corresponding to the j-th key point belong and the regional probabilities corresponding to the multiple image areas respectively, determine the regional losses corresponding to the multiple image areas respectively, wherein the reference image area is one of the multiple image areas; based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point in the key point prediction result, determine the target losses corresponding to the multiple image areas respectively; train the sample prediction model according to the regional loss and the target loss to obtain the key point prediction model.

[0021] In some embodiments, the device also includes: a determination module, used to detect the target object in the target image and obtain a detection box corresponding to the target object, wherein the detection box is used to select the target object in the target image; based on the detection box corresponding to the target object, determine the target area in the target image, wherein the target area contains the target object; predict the probability distribution of the key points of the target object in the target area through the key point prediction model to obtain multiple distribution parameters corresponding to the key points; and determine the coordinates of the key points based on the multiple distribution parameters corresponding to the key points.

[0022] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement any of the above-mentioned training methods for the key point prediction models.

[0023] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement any of the above-mentioned key point prediction model training methods.

[0024] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above-described key point prediction model training methods.

[0025] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0026] The sample prediction model is used to predict the probability distribution of the key points of the sample objects in the input image, and multiple distribution parameters for characterizing the mixed probability distribution of the key points are obtained, so that the sample prediction model is trained based on the reference coordinates of the key points and the multiple distribution parameters, wherein the amount of data of the distribution parameters predicted by the sample prediction model is much smaller than the amount of data of the heat map predicted in the related technology, and the computational complexity of the sample prediction model is small, thereby improving the training efficiency of the sample prediction model; in addition, since the multiple distribution parameters predicted by the sample prediction model are obtained based on analysis from different image analysis angles, different image analysis angles can capture various features of the sample objects and reduce the errors caused by a single distribution parameter, thereby improving the prediction accuracy of the trained key point prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 is a schematic diagram of a computer system provided by an exemplary embodiment of the present application;

[0029] Figure 2 is a schematic diagram of a training method for a key point prediction model provided by an exemplary embodiment of the present application;

[0030] Figure 3 is a flow chart of a training method for a key point prediction model provided by an exemplary embodiment of the present application;

[0031] Figure 4 is a schematic diagram of a training method for a key point prediction model provided by another exemplary embodiment of the present application;

[0032] Figure 5 is a schematic diagram of a training process of a key point prediction model provided by an exemplary embodiment of the present application;

[0033] Figure 6 is a schematic diagram of a training method for a key point prediction model provided by another exemplary embodiment of the present application;

[0034] Figure 7 is a palmprint recognition flow chart provided by an exemplary embodiment of the present application;

[0035] Figure 8 is a flow chart of action, gesture, and gait recognition provided by an exemplary embodiment of the present application;

[0036] Fig. 9 is a schematic diagram of target detection provided by an exemplary embodiment of the present application;

[0037] Fig.10 is a schematic diagram of region extraction provided by an exemplary embodiment of the present application;

[0038] Fig.11 is a structural block diagram of a training device for a key point prediction model provided by an exemplary embodiment of the present application;

[0039] Fig.12 is a structural block diagram of a training device for a key point prediction model provided by another exemplary embodiment of the present application;

[0040] Fig.13 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0042] In the present application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first" and "second", nor are there any limitations on quantity and execution order.

[0043] It should be noted that before collecting relevant user data (e.g., sample images, etc.) and during the process of collecting relevant user data, this application can display a prompt interface, pop-up window, or output voice prompt information. The prompt interface, pop-up window, or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (i.e., when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use, and processing of relevant user data must comply with relevant laws, regulations, and standards.

[0044] First, a brief introduction is given to the terms involved in the embodiments of the present application.

[0045] Artificial Intelligence (AI): It is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0046] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, pre-trained models are also called large models and basic models. After fine-tuning, they can be widely used in downstream tasks in various major directions of artificial intelligence. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0047] Computer Vision (CV): Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to using cameras and computers to replace human eyes to identify, follow, identify and measure targets, and further perform image processing so that the computer processes the images into images that are more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Large model technology has brought important changes to the development of computer vision technology. Pre-trained models in the field of vision such as swin-transformer (multi-level visual converter based on shifted windows), ViT (Vision Transformer), and V-MOE (Vision Mixture of Experts) can be quickly and widely applied to downstream specific tasks after fine tuning. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0048] Figure 1 1 is a block diagram of a computer system 100 provided by an exemplary embodiment of the present application. The computer system 100 can be implemented as a system architecture of a training method for a key point prediction model. The computer system 100 includes: a terminal 110 and a server 120.

[0049] The terminal 110 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a PC (Personal Computer), an unmanned reservation terminal, etc. The terminal 110 may be installed with a client that runs a target application, and the target application may be an application for training a key point prediction model, or an application that provides a training function for a key point prediction model, which is not limited in this application. In addition, this application does not limit the form of the target application, including but not limited to App (Application, application), applets, etc. installed in the terminal 110, and may also be in the form of a web page.

[0050] The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 120 can be the background server of the above-mentioned target application, used to provide background services for the client of the target application.

[0051] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other series of resources in a wide area network or local area network to realize data calculation, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application, which can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing. Optionally, the server 120 can also be implemented as a node in the blockchain system.

[0052] The terminal 110 and the server 120 may communicate with each other via a network, such as a wired or wireless network.

[0053] In the training method of the key point prediction model provided in the embodiment of the present application, the execution subject of each step can be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. Figure 1 Taking the implementation environment of the scheme shown as an example, the training method of the key point prediction model can be executed by the terminal 110 (such as the client of the target application installed and running in the terminal 110 executes the training method of the key point prediction model), or the training method of the key point prediction model can be executed by the server 120, or the terminal 110 and the server 120 can interact and cooperate to execute it, and this application does not limit this.

[0054] Those skilled in the art will appreciate that the number of the terminals 110 may be more or less. For example, there may be only one terminal 110, or there may be dozens or hundreds of terminals 110, or a greater number. The embodiment of the present application does not limit the number and device type of the terminals 110.

[0055] In the related art, a sample key point prediction model is trained by a heat map-based method. The sample key point prediction model can generate a high-resolution heat map corresponding to the sample image. In the heat map, each pixel corresponds to a value, which refers to the probability that the key point belongs to the pixel. Then, the predicted coordinates of the key point are determined based on the heat map. Finally, the model is trained based on the difference between the predicted coordinates and the reference coordinates of the key point. However, in the sample key point prediction model training scheme based on the heat map, each key point corresponds to a high-resolution heat map, and the model needs to predict a large amount of data, resulting in low training efficiency.

[0056] Based on this, an embodiment of the present application provides a training method for a key point prediction model, in which the probability distribution of the key points of the sample objects in the input image is predicted by the sample prediction model, and multiple distribution parameters for characterizing the mixed probability distribution of the key points are obtained, so that the sample prediction model is trained based on the reference coordinates of the key points and the multiple distribution parameters, wherein the amount of data of the distribution parameters predicted by the sample prediction model is much smaller than the amount of data of the heat map predicted in the related technology, and the computational complexity of the sample prediction model is small, thereby improving the training efficiency of the sample prediction model.

[0057] Figure 2 is a schematic diagram of a training method for a key point prediction model provided by an exemplary embodiment of the present application. The method is executed by a computer device, which may be Figure 1 The terminal 110 and / or the server 120 shown. Figure 2 As shown, the steps executed by the computer device are briefly described as follows.

[0058] Step 1: A computer device obtains a sample image 200 containing an object 201 .

[0059] The sample image 200 is annotated with reference coordinates corresponding to a plurality of key points of the object 201 , including the reference coordinates of the key point 202 .

[0060] Step 2: The computer device inputs the sample image 200 into the sample prediction model 210, and the sample prediction model 210 predicts the probability distribution of the key points of the object 201 in the sample image 200, and obtains multiple distribution parameters corresponding to the multiple key points.

[0061] Including multiple distribution parameters corresponding to the key point 202. Schematically, the sample prediction model predicts the probability distribution of the key point 202 through different image analysis angles, thereby obtaining different distribution parameters of the key point 202 at different image analysis angles, and different distribution parameters correspond to different probability distributions. The probability distribution of the key point 202 is used to represent the probability that the key point 202 belongs to each position in the sample image.

[0062] Assuming that the probability distribution predicted by the sample prediction model 210 is a Gaussian distribution, each distribution parameter may include a mean (in coordinate form), a standard deviation, and a weight. That is, each distribution parameter corresponding to the key point 202 represents a Gaussian distribution of the key point 202 predicted by the model, and the weight represents the confidence of each Gaussian distribution. Then, multiple distribution parameters may represent a mixed Gaussian distribution of the key point 202 (e.g. Figure 2 , shown as a mixed probability distribution).

[0063] Step 3: The computer device trains the sample prediction model based on the reference coordinates of the key point 202 and the multiple distribution parameters corresponding to the key point 202 to obtain the key point prediction model.

[0064] Schematically, the distribution parameters include mean (in coordinate form), standard deviation and weight as an example for explanation. For the key point 202, the coordinate difference between the mean in each distribution parameter and the reference coordinate is calculated, and then the coordinate differences corresponding to the multiple distribution parameters are weighted summed by the weights respectively included in the multiple distribution parameters to obtain the total coordinate difference; the standard deviations respectively included in the multiple distribution parameters are weighted summed by the weights respectively included in the multiple distribution parameters to obtain the total standard deviation. Finally, based on the total standard deviation and the total coordinate difference, the target loss is calculated, and the key point prediction model is optimized by minimizing the target loss as the training goal.

[0065] Optionally, a key point prediction model is optimized based on the target losses corresponding to the n key points to obtain a key point prediction model. The computer device inputs the target image into the key point prediction model to predict the key point coordinates of the object to be identified in the target image.

[0066] Figure 3 is a flowchart of a method for training a key point prediction model provided by an exemplary embodiment of the present application. The method is executed by a computer device, which may be Figure 1 The terminal 110 and / or the server 120 shown in the figure, the method includes the following steps 310 to 330.

[0067] Step 310: Acquire a sample image containing a sample object.

[0068] The sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer.

[0069] Sample objects refer to various entity objects contained in sample images, including but not limited to faces, bodies, vehicles, buildings, etc. Optionally, the sample object can be a complete entity, such as a complete building, etc.; the sample object can also be a part of an entity, such as a human palm, etc.

[0070] The key points of a sample object refer to the points on the target object. Schematically, the key points can represent the shape, structure, function and other characteristics of the target object, which is conducive to describing and identifying the target object. Different types of sample objects have different key points. For example, the key points of a face include eyebrows, eyes, nose, mouth and chin, etc.; the key points of a human body include the head, neck, shoulders, elbows, wrists, hips, knees and ankles, etc.; the key points of a vehicle include the license plate position, the light position, the wheel position, etc., which will not be repeated here.

[0071] It should be noted that the above-mentioned key points can be set according to task requirements or application scenarios, and the type and number of key points are not limited in the embodiments of the present application.

[0072] Optionally, the sample image may be at least one of an RGB (Red Green Blue) color image, a grayscale image, a depth image, etc., which is not limited in the embodiments of the present application.

[0073] Optionally, the number of sample objects in the sample image may be one or more.

[0074] In some embodiments, the reference coordinates corresponding to the n key points are represented by the pixel coordinates corresponding to the key points. Optionally, the reference coordinates corresponding to the n key points of the sample object in the sample image are manually annotated; or, the sample object in the sample image is subjected to key point detection by a target key point detection model to obtain candidate coordinates corresponding to multiple key points, and then the candidate coordinates corresponding to the multiple key points are manually corrected to obtain the reference coordinates corresponding to the n key points, wherein multiple key points can be deleted during the correction, and the candidate coordinates of the key points can also be adjusted.

[0075] Step 320: predict the probability distribution of the key points of the sample object in the sample image through the sample prediction model to obtain a plurality of distribution parameters corresponding to the n key points.

[0076] The multiple distribution parameters corresponding to the j-th key point are parameters predicted for the j-th key point based on different image analysis angles, and the multiple distribution parameters corresponding to the j-th key point are used to characterize the mixed probability distribution of the j-th key point, j≤n and j is a positive integer.

[0077] Schematically, the probability distribution of key points refers to the probability that the key points belong to each position in the sample image. Inputting the sample image into the sample prediction model will output multiple distribution parameters. The distribution parameters are parameters used to model the probability distribution. Each distribution parameter represents a probability distribution, so multiple distribution parameters can represent a combination of multiple probability distributions. The combination of multiple probability distributions is a mixed probability distribution. The mixed probability distribution is used to represent the mixed probability representation of the key points belonging to each position in the sample image. For example, the mixed probability distribution is composed of probability distribution 1 and probability distribution 2. The probability that the key point 1 belongs to position a in probability distribution 1 is 0.3, and the probability that the key point 1 belongs to position a in probability distribution 2 is 0.4. Then the mixed probability that the key point 1 belongs to position a in the mixed probability distribution can be the average of 0.3 and 0.4, that is, 0.35; or, the mixed probability that the key point 1 belongs to position a in the mixed probability distribution can be the weighted value of 0.3 and 0.4.

[0078] Among them, the number of distribution parameters corresponding to each key point output by the sample prediction model can be customized by the user. For example, if the sample prediction model outputs 5 groups of distribution parameters corresponding to key point 1, it means that the position of key point 1 is jointly represented by 5 probability distributions.

[0079] Optionally, the above sample prediction model can be implemented as a regression model.

[0080] Schematically, the above-mentioned image analysis angles are used to indicate a method of analyzing a sample image using a sample prediction model. Different image analysis angles are described below.

[0081] Optionally, features of the sample image are extracted through a sample prediction model to obtain an image feature representation of the sample image; the image feature representation is analyzed through the sample prediction model to predict the probability distribution of key points of the sample object in the sample image to obtain multiple distribution parameters corresponding to n key points.

[0082] 1. Different image analysis angles represent different image feature representations extracted by the sample prediction model.

[0083] Optionally, the multiple distribution parameters corresponding to the j-th key point are parameters predicted for the j-th key point based on different image feature representations.

[0084] Among them, image feature representation is an abstract expression of image information. Different feature representations will focus on different aspects of the image. For example, color features mainly focus on the global or local color distribution of the image, and shape features mainly focus on the outline or shape of objects in the image.

[0085] Selecting different image feature representations reflects the model's selection of different image information in the sample image, that is, selecting different image analysis angles. In the sample prediction model, multiple (or understood as multiple groups) of image feature representations corresponding to the sample image are extracted and analyzed separately to obtain the distribution parameters corresponding to the multiple (or multiple groups) of image feature representations.

[0086] Optionally, the image feature representation includes at least one of color features, texture features, shape features, spatial relationship features, edge features, etc.

[0087] Schematically, the sample image is feature extracted by the sample prediction model to obtain multiple image feature representations, wherein distribution parameter 1 is predicted by analyzing image feature representation 1; distribution parameter 2 is predicted by analyzing image feature representation 2. Image feature representation 1 is different from image feature representation 2, for example: image feature representation 1 is a color feature, and image feature representation 2 is a texture feature; or, image feature representation 1 is a color feature and an edge feature, and image feature representation 2 is a texture feature and an edge feature, etc.

[0088] Optionally, the image feature representation includes at least one of a global image feature representation and a local image feature representation, etc. The global image feature representation is used to represent the features of the entire sample image, and the local image feature representation is used to represent the features of the region related to the target key point, for example, the image feature representation corresponding to the jth key point is used to represent the features of the image region related to the jth key point.

[0089] Schematically, the above-mentioned image feature representation 1 can be the feature of the complete sample image, and the image feature representation 2 can be the feature of a partial image area in the sample image; or, the image feature representation 1 is the feature of image area 1 in the sample image, and the image feature representation 2 is the feature of image area 2 in the sample image, and the image area 1 and the image area 2 are different.

[0090] 2. Different image analysis angles represent different mapping relationships corresponding to image feature representations in the sample prediction model.

[0091] Optionally, the multiple distribution parameters corresponding to the j-th key point are parameters predicted for the j-th key point based on different mapping relationships.

[0092] Among them, the mapping relationship is used to characterize the relationship between the image feature representation and the output distribution parameters. For one (or a group of) image feature representations, there can be multiple mapping relationships, each mapping relationship has a different weight bias combination, reflecting the different degree of attention the model pays to one (or a group of) image feature representations. For example: for color features, the weight in mapping relationship A is 0.8, and the weight in mapping relationship B is 0.2, indicating that the mapping relationship A pays more attention to the image color features in the output distribution parameters corresponding to the output, and the mapping relationship B pays less attention to the image color features in the output distribution parameters corresponding to the output.

[0093] Selecting different mapping relationships reflects the different levels of attention paid by the model to the image feature representation, which can also be understood as different image analysis angles of the model for the sample image. In the sample prediction model, after the image feature representation is extracted, the image feature representation can be output through a variety of mapping relationships to obtain multiple distribution parameters.

[0094] Schematically, the sample prediction model includes an output layer, the output layer includes 2 (or 2 groups) of output nodes, each (each group) of output nodes represents a mapping relationship, and the image feature representation extracted by the sample prediction model is output to the output layer to obtain 2 (or 2 groups) of distribution parameters; wherein, distribution parameter 1 refers to the parameter obtained by inputting the image feature representation corresponding to the j-th key point into output node 1; distribution parameter 2 refers to the parameter obtained by inputting the image feature representation corresponding to the j-th key point into output node 2.

[0095] It should be noted that the above examples of image analysis angles are only for illustrative purposes, and the embodiments of the present application do not limit this. For example, different mapping relationships can be used to map and output multiple image feature representations to obtain multiple distribution parameters. That is to say, image feature representation 1 is input into the output layer, distribution parameter 1 is obtained through output node 1, and distribution parameter 2 is obtained through output node 2; image feature representation 2 is input into the output layer, distribution parameter 3 is obtained through output node 3, and distribution parameter 4 is obtained through output node 4, and finally distribution parameters 1 to 4 are obtained as parameters for constituting a mixed probability distribution.

[0096] Optionally, the multiple distribution parameters include at least one of the distribution parameters of Gaussian distribution and the distribution parameters of Laplace distribution. Schematically, taking Gaussian distribution as an example, the above distribution parameters include coordinate mean and coordinate standard deviation, wherein the coordinate mean is used to represent the mean (or expectation) of Gaussian distribution, and the coordinate standard deviation is used to represent the standard deviation of Gaussian distribution, and the coordinate standard deviation is used to represent the degree of dispersion between each predicted coordinate in the probability distribution and the coordinate mean.

[0097] In the embodiment of the present application, multiple Gaussian distributions (also known as normal distributions) or Laplace distributions are used to fit the mixed probability distribution to represent the key point positions. By combining multiple single distributions, the complexity of the key point position distribution can be accurately described, thereby improving the model's fitting accuracy for the key point positions. In addition, both Gaussian distribution and Laplace distribution have clear mathematical expressions, and the model can directly predict the expression parameters (i.e., distribution parameters) to represent the distribution, thereby reducing the complexity of the model and improving the model's computational efficiency.

[0098] Step 330 , training the sample prediction model based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point to obtain a key point prediction model.

[0099] In some embodiments, a target loss is determined based on a reference coordinate corresponding to the j-th key point and a plurality of distribution parameters corresponding to the j-th key point; and a sample prediction model is trained based on the target loss to obtain a key point prediction model.

[0100] Schematically, the target loss is calculated by the target loss function, where the target loss function can be implemented as a negative log-likelihood function. The negative log-likelihood function is used to evaluate the difference between the mixed probability distribution of the key points generated by the model and the reference coordinates. By minimizing the loss value calculated by the negative log-likelihood function, the optimal model parameters can be found so that the mixed probability distribution generated by the model can better fit the position of the key points.

[0101] Optionally, the distribution parameters include a coordinate mean and a coordinate standard deviation, the coordinate mean is used to characterize the mean of the probability distribution corresponding to the key point, and the coordinate standard deviation is used to characterize the standard deviation of the probability distribution corresponding to the key point. Then the above method for determining the target loss also includes: determining the target loss based on the difference between the coordinate means respectively included in the multiple distribution parameters corresponding to the jth key point and the reference coordinates corresponding to the jth key point, and the coordinate standard deviation respectively included in the multiple distribution parameters corresponding to the jth key point.

[0102] Among them, the target loss is determined based on the average value of the difference between the coordinate mean respectively included in the multiple distribution parameters corresponding to the j-th key point and the reference coordinate corresponding to the j-th key point, and the average value of the coordinate standard deviation respectively included in the multiple distribution parameters corresponding to the j-th key point.

[0103] Alternatively, the target loss is determined based on the weighted sum of the difference between the coordinate means respectively included in the multiple distribution parameters corresponding to the j-th key point and the reference coordinates corresponding to the j-th key point, and the weighted sum of the coordinate standard deviations respectively included in the multiple distribution parameters corresponding to the j-th key point. It should be noted that only the method of training the model through the j-th key point is described here. For a single sample image, if there are multiple key points, it is necessary to obtain the target losses corresponding to the multiple key points, and then train the model through the target losses corresponding to the multiple key points.

[0104] Indicatively, the parameters of the sample prediction model are updated with minimizing the target loss as the training goal. Optionally, when the target loss is less than or equal to the preset loss, the sample prediction model is stopped from training to obtain the key point prediction model; or, when the number of training times is greater than or equal to the preset number of times, the sample prediction model is stopped from training to obtain the key point prediction model. The above-mentioned preset loss and preset number of times can be set according to actual experience, and the embodiments of the present application are not limited to this.

[0105] Among them, the key point prediction model is used to predict the key point coordinates of the object to be identified in the image.

[0106] In some embodiments, after the key point prediction model is trained, the coordinates of the target key points of the target object in the target image can be predicted by the key point prediction model. Optionally, the process of predicting the coordinates of the target key points also includes the following steps 1 to 4.

[0107] Step 1: Detect the target object in the target image and obtain the detection box corresponding to the target object.

[0108] The detection box is used to select the target object in the target image.

[0109] Optionally, a target image stored in a computer device is obtained; or an image captured by the computer device is obtained as the target image; or a video frame in a video captured by the computer device is obtained as the target image, etc.

[0110] Schematically, through target detection algorithms, such as SSD (Single Shot MultiBox Detector) and YOLO (You Only Look Once), etc., the target object (such as a person, vehicle, animal, etc.) in the target image is identified and the corresponding detection box is output. The detection box is usually a rectangle, which is used to select the position of the target object in the target image.

[0111] Step 2: Determine the target area in the target image based on the detection box corresponding to the target object.

[0112] The target area contains the target object.

[0113] Optionally, the area selected by the detection box in the target image is taken as the target area. Schematically, the target area is the area inside the detection box, which includes the entire target object, such as the entire human body, the entire building, etc.

[0114] Alternatively, further detection is performed on the area selected by the detection frame in the target image to obtain a target area, which includes a target part of the target object. Schematically, the target part can be a palm area, a head area, etc. of a human body; or the target part can be a window, a door, etc. of a building.

[0115] Step 3: Predict the probability distribution of the key points of the target object in the target area through the key point prediction model to obtain multiple distribution parameters corresponding to the key points.

[0116] Optionally, the target area is input into a key point prediction model, and the features of the target area are extracted through the key point prediction model to obtain a target feature representation; the target feature representation is analyzed through the key point prediction model to predict the probability distribution of key points of the target object in the target area to obtain multiple distribution parameters corresponding to the key points.

[0117] In schematic form, taking the key points implemented as key points of the human head as an example, the key point prediction model can predict multiple distribution parameters corresponding to the key points of the head, each distribution parameter is used to represent a probability distribution, and multiple distribution parameters represent multiple probability distributions corresponding to the key points of the head. For example: distribution parameter 1 represents probability distribution 1, and distribution parameter 2 represents probability distribution 2.

[0118] Step 4: Determine the coordinates of the key points based on the multiple distribution parameters corresponding to the key points.

[0119] Optionally, a mixed probability distribution of head key points can be constructed by multiple distribution parameters. For example, a mixed probability distribution refers to a combination of probability distribution 1 and probability distribution 2. The probability that a head key point belongs to position a in probability distribution 1 is 0.3, and the probability that a head key point belongs to position a in probability distribution 2 is 0.4. Then, the probability that a head key point belongs to position a in the mixed probability distribution can be the average of 0.3 and 0.4, that is, 0.35; or, the probability that a head key point belongs to position a in the mixed probability distribution can be the weighted sum of 0.3 and 0.4.

[0120] After obtaining the mixed probability distribution, the position with the highest probability value in the mixed probability distribution is used as the coordinate of the key point; alternatively, the expected value of the mixed probability distribution (i.e., the weighted average position) is calculated and used as the coordinate of the key point; alternatively, the median position of the mixed probability distribution is used as the coordinate of the key point, etc. The embodiments of the present application do not limit this.

[0121] In the above embodiment, after the key point prediction model is trained, the key point prediction model can be used to predict the key point positions of objects in the image. Before predicting the key point positions, the target object in the image can be detected to determine the display area of ​​the target object in the image, thereby determining the target area that the key point prediction model needs to analyze, thereby avoiding the waste of computing power caused by the key point prediction model analyzing the entire target image, thereby improving the prediction efficiency of the key point prediction model, and at the same time, it can also reduce the impact of the background area in the target image (which can be understood as the area other than the target area) on the key point prediction, thereby improving the prediction accuracy of the model.

[0122] In summary, the training method of the key point prediction model provided in the embodiment of the present application predicts the probability distribution of the key points of the sample object in the input image through the sample prediction model, and obtains multiple distribution parameters for characterizing the mixed probability distribution of the key points, so as to train the sample prediction model based on the reference coordinates of the key points and the multiple distribution parameters, wherein the amount of data of the distribution parameters predicted by the sample prediction model is much smaller than the amount of data of the heat map predicted in the related technology, and the calculation amount of the sample prediction model is small, thereby improving the training efficiency of the sample prediction model; in addition, since the multiple distribution parameters predicted by the sample prediction model are obtained based on analysis from different image analysis angles, different image analysis angles can capture various features of the sample object and reduce the errors caused by a single distribution parameter, thereby improving the prediction accuracy of the trained key point prediction model.

[0123] In some embodiments, the above distribution parameters include component parameters and component weights, the component parameters are used to characterize the sub-probability distribution of the mixed probability distribution of the key point, and the component weights are used to characterize the confidence of the sub-probability distribution in the mixed probability distribution. Figure 4 , the above Figure 3 The illustrated embodiment can also be implemented as Figure 4 Steps 410 to 432 in .

[0124] Step 410: Acquire a sample image containing a sample object.

[0125] The sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer.

[0126] In some embodiments, the sample image is a sample image obtained after preprocessing. Optionally, the preprocessing method includes at least one of the following methods.

[0127] (1) Image resizing: Resizing sample images to a fixed size helps ensure that the model has consistent input sizes when processing all input images, thereby simplifying model design and speeding up processing.

[0128] (2) Image grayscale: Converting color images into grayscale images helps reduce the amount of computation and improve the robustness of the model.

[0129] (3) Image enhancement: Such as contrast enhancement and histogram equalization. Image enhancement can enhance the features of the image and improve the accuracy of key point prediction.

[0130] (4) Noise removal: There may be various noises in the sample image, such as Gaussian noise. Filters (such as Gaussian filters) can be used to smooth the image and remove noise to improve the effect of key point prediction.

[0131] (5) Edge detection: In some embodiments, the key points include edge points located at the edge of the image. Therefore, an edge detection algorithm (such as the Sobel operator, the Canny edge detector, etc.) can be used to detect the edges in the image, thereby helping the model to predict the key points more accurately.

[0132] (6) Target detection: In some embodiments, object detection may be performed on the acquired original image to determine the area where the sample object exists. The original image is then cropped based on the detection result to obtain a sample image containing the sample object, thereby reducing the amount of data that the model needs to process.

[0133] It should be noted that the above examples of pretreatment methods are only illustrative and are not limited to this in the embodiments of the present application.

[0134] Step 420, predicting the probability distribution of the key points of the sample object in the sample image through the sample prediction model, and obtaining a plurality of component parameters corresponding to the n key points and component weights corresponding to the plurality of component parameters.

[0135] Among them, the component weights corresponding to the multiple component parameters and the multiple component weights corresponding to the j-th key point are used to characterize the mixed probability distribution of the j-th key point, j≤n and j is a positive integer. Schematically, each component parameter is used to model a sub-probability distribution of the mixed probability distribution, and the component weight corresponding to the component parameter is used to characterize the confidence of the sub-probability distribution corresponding to the component parameter in the mixed probability distribution.

[0136] For example: a mixed probability distribution is composed of probability distribution 1 and probability distribution 2, the weight of probability distribution 1 is 0.6, and the weight of probability distribution 2 is 0.4; the probability that key point 1 belongs to position a in probability distribution 1 is 0.3, and the probability that key point 1 belongs to position a in probability distribution 2 is 0.4, then the mixed probability that key point 1 belongs to position a in the mixed probability distribution can be the weighted fusion value of 0.3 and 0.4, that is, 0.34.

[0137] In some embodiments, the component parameters include a coordinate mean and a coordinate standard deviation, the coordinate mean is used to characterize the mean parameter of the sub-probability distribution corresponding to the component parameter, and the coordinate standard deviation is used to characterize the standard deviation parameter of the sub-probability distribution corresponding to the component parameter.

[0138] Optionally, the key points include at least one of one-dimensional key points, two-dimensional key points, three-dimensional key points, etc., which is not limited in this embodiment of the present application.

[0139] Taking the key points implemented in two-dimensional form as an example, the coordinate standard deviation includes the first standard deviation and the second standard deviation. The first standard deviation is used to characterize the degree of discreteness between the horizontal coordinates of each predicted position and the coordinate mean in the probability distribution corresponding to the component parameters, and the second standard deviation is used to characterize the degree of discreteness between the vertical coordinates of each predicted position and the coordinate mean in the probability distribution corresponding to the component parameters.

[0140] Among them, each predicted position in the probability distribution corresponding to the component parameter can be each position in the sample image. For example, assuming that the predicted positions include a (2, 3) and b (3, 5), the probability of a is 0.8, the probability of b is 0.2, and the coordinate mean is (1, 1), then the first standard deviation can be = , the second standard deviation can be = It should be noted that the calculation process here is only to illustrate the meaning of the first standard deviation and the second standard deviation. In the embodiment of the present application, the sample prediction model will directly output the first standard deviation and the second standard deviation.

[0141] In the above embodiment, when the key points are in two-dimensional form, in the distribution parameters output by the sample prediction model, the coordinate standard deviation is subdivided into a first standard deviation and a second standard deviation, which describe the discrete degree of the horizontal coordinate and the vertical coordinate respectively. The model can more accurately describe the distribution of the key points in the two-dimensional space, which helps the model to predict the position of the key points more accurately.

[0142] Optionally, features of the sample image are extracted through a feature extraction network in a key point prediction model to obtain an image feature representation corresponding to the sample image; the image feature representation is analyzed through a mixed density network in the key point prediction model to predict the probability distribution of key points of the sample object in the sample image, and multiple component parameters corresponding to the n key points and component weights corresponding to the multiple component parameters are obtained.

[0143] Schematically, the feature extraction network can be implemented as VGG (Visual Geometry Group), ResNet (Residual Network), etc.; the mixed density network is used to output the parameters of the probability distribution. In the key point prediction task, due to factors such as noise, occlusion, and perspective changes in the image, there is a certain uncertainty in the position of the key points. Therefore, the mixed density network can be used to predict multiple probability distributions of the key points, thereby more accurately describing this uncertainty.

[0144] In the above embodiment, the feature extraction network can efficiently extract image features related to key point prediction from the sample image. These features can accurately represent key information such as the shape and texture of the sample object, which is beneficial to the subsequent key point prediction. The mixed density network can predict the key point probability distribution of the sample object in the sample image by analyzing the image feature representation. By introducing multiple component parameters and corresponding component weights, the distribution of key points can be described more accurately, avoiding the prediction error that may be caused by a single distribution model.

[0145] For illustration, please refer to Figure 5 , which shows a schematic diagram of the training process of a key point prediction model. Figure 5 As shown, a sample image 500 including a sample object 501 is input into a sample detection model 510. The sample detection model 510 predicts the probability distribution of key points of the sample object 501 through a mixed density network 511 to obtain multiple component parameters corresponding to multiple key points.

[0146] Assume that the number of components of the mixed probability distribution is (L is an integer greater than 1). Constructing the i-th sub-probability distribution in the mixed probability distribution requires: coordinate mean , the covariance matrix , component weight .in:

[0147]

[0148] Covariance matrix can be decomposed into the standard deviation , that is:

[0149]

[0150] and are the standard deviations on the horizontal and vertical axes, respectively. , The parameters used to construct the covariance matrix for model prediction, that is, the i-th component parameters that the sample prediction model needs to predict include: coordinate mean , Standard Deviation and , component weight .

[0151] Step 431, determining the target loss based on the reference coordinates corresponding to the j-th key point, the multiple component parameters corresponding to the j-th key point, and the component weights corresponding to the multiple component parameters.

[0152] Schematically, the multiple component parameters corresponding to the j-th key point and the component weights corresponding to the multiple component parameters respectively constitute a set of distribution components, namely:

[0153]

[0154] This set of distribution components is used to characterize the mixed probability distribution corresponding to the jth key point. For illustration, please refer to Figure 5 , taking the key point 502 as an example, the distribution component set of the key point 502 includes L component parameters output by the mixed density network 511: (x1, σ1), (x2, σ2), …, (x i , σ i ),…,(x L , σ L ), where (x i , σ i ) i is the coordinate mean, σ i refers to the coordinate standard deviation, and each component parameter represents a sub-probability distribution, such as Figure 5 As shown, the probability distribution component 502 refers to a sub-probability distribution with x1 as the coordinate mean and σ1 as the coordinate standard deviation; the distribution component set of the key point 502 also includes the component weights corresponding to the L component parameters output by the mixed density network 511: , the sub-probability distributions represented by the L component parameters are mixed based on the component weights to obtain a mixed probability distribution 503.

[0155] The target loss can be calculated according to the distribution component set of the jth key point. Optionally, the method for determining the target loss also includes the following steps 1 to 4.

[0156] Step 1: Calculate the coordinate difference between the mean of multiple coordinates corresponding to the j-th key point and the reference coordinates corresponding to the j-th key point.

[0157] In schematic form, the maximum likelihood estimation (MLE) can make the mixed probability distribution constructed by the model as close as possible to the probability distribution in the real data. Then, for the real coordinates of each key point , we can get the coordinate mean of each component parameter in the prediction and reference coordinates The coordinate difference is:

[0158]

[0159] Step 2: Based on the component parameters corresponding to the multiple component parameters, weighted fusion is performed on the multiple coordinate differences corresponding to the j-th key point to obtain the target coordinate difference.

[0160] Indicatively, the coordinate differences corresponding to the L component parameters are weighted and summed by the component weights corresponding to the L component parameters to obtain the target coordinate difference .

[0161] Step 3: Based on the weights corresponding to the multiple component parameters, the multiple coordinate standard deviations corresponding to the jth key point are weightedly fused to obtain the target standard deviation.

[0162] Indicatively, the target standard deviation is obtained by weighting and summing the coordinate standard deviations respectively included in the L component parameters by the component weights corresponding to the L component parameters. .

[0163] Take the coordinate standard deviation including the first standard deviation and the second standard deviation as an example. The first standard deviations respectively included in the L component parameters are weighted and summed by the component weights corresponding to the L component parameters to obtain the total first standard deviation. The second standard deviations respectively included in the L component parameters are weighted and summed by the component weights corresponding to the L component parameters to obtain the total second standard deviation. The total first standard deviation and the total second standard deviation are used as the target standard deviation. .

[0164] Step 4: Determine the target loss based on the target coordinate difference and the target standard deviation.

[0165] Schematically, the target loss refers to the error of the likelihood estimation, that is, the error of the likelihood estimation is determined based on the target coordinate difference and the target standard deviation. Optionally, for the convenience of calculation, the error is generally logarithmic to reduce the optimization complexity.

[0166] In some embodiments, if the multiple distribution parameters are distribution parameters corresponding to Gaussian distribution, the target loss The calculation formula is shown in Formula 1 below:

[0167] Formula 1:

[0168] Among them, in formula 1 refers to the target standard deviation calculated above, Refers to the target coordinate difference obtained by the above calculation.

[0169] In some embodiments, if the multiple distribution parameters are distribution parameters corresponding to the Laplace distribution, the target loss The calculation formula is shown in Formula 2 below:

[0170] Formula 2:

[0171] Among them, in formula 2 refers to the target standard deviation calculated above, Refers to the target coordinate difference obtained by the above calculation.

[0172] In other embodiments, the above-mentioned multiple distribution parameters include distribution parameters corresponding to Gaussian distribution and distribution parameters corresponding to Laplace distribution. The target coordinate difference and target standard deviation corresponding to the Gaussian distribution can be determined according to the distribution parameters corresponding to the Gaussian distribution, and the Gaussian distribution loss can be determined according to the above-mentioned formula one; the target coordinate difference and target standard deviation corresponding to the Laplace distribution can be determined according to the distribution parameters corresponding to the Laplace distribution, and the Laplace distribution loss can be determined according to the above-mentioned formula two; the Gaussian distribution loss and the Laplace distribution loss are added to obtain the target loss.

[0173] Step 432, training the sample prediction model through target loss to obtain a key point prediction model.

[0174] Schematically, the sample prediction model is trained by minimizing the target loss to obtain the key point prediction model. Figure 5 As shown, the loss value L is calculated, and the sample detection model 510 is trained with minimizing the loss value L as the training goal, so as to obtain a key point prediction model.

[0175] In summary, the embodiments of the present application provide a training method for a key point prediction model, which predicts the probability distribution of the key points of the sample objects in the input image through the sample prediction model, and obtains multiple distribution parameters for characterizing the mixed probability distribution of the key points, so that the sample prediction model is trained based on the reference coordinates of the key points and the multiple distribution parameters, wherein the distribution parameters include component parameters and their corresponding component weights, and the component weights represent the confidence of the probability distribution, so that the model can distinguish the importance of different probability distributions, and give higher weights to more reliable probability distributions, so that the model can more accurately describe the uncertainty of the key point positions and improve the accuracy of the predicted key point coordinates.

[0176] In some embodiments, when training the sample prediction model, by dividing the sample image into regions and predicting the probability distribution of key points in each region, the model's prediction of key point positions can be optimized more specifically. Figure 6 , the above Figure 3 or Figure 4 The illustrated embodiment can also be implemented as Figure 6 Steps 610 to 634 in .

[0177] Step 610: Acquire a sample image containing a sample object.

[0178] The sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer.

[0179] Step 621, dividing the sample image into multiple image regions.

[0180] Optionally, the sample image is evenly divided into a plurality of image regions. Schematically, taking the sample image as a rectangle as an example, the sample image can be divided into a plurality of sub-images of the same size, each of which contains a portion of the image.

[0181] Alternatively, a sliding window is used to crop the sample image to obtain multiple image regions. Schematically, a window is slid from left to right and from top to bottom on the sample image, each time moving a certain step length, and for each window position, a corresponding image region is cropped.

[0182] Step 622: predict the probability distribution of key points of the sample object in each image region through the sample prediction model to obtain key point prediction results corresponding to multiple image regions.

[0183] The key point prediction result includes multiple distribution parameters corresponding to n key points, where the multiple distribution parameters corresponding to the j-th key point are parameters predicted for the j-th key point based on different image analysis angles, and the multiple distribution parameters corresponding to the j-th key point are used to characterize the mixed probability distribution of the j-th key point, j≤n and j is a positive integer.

[0184] Taking the target image area among multiple image areas as an example, optionally, the features of the target image area are extracted through a sample prediction model to obtain a sub-image feature representation; the sub-image feature representation is analyzed through the sample prediction model to predict the probability distribution of the key points of the sample objects in the target image area, and the key point prediction result corresponding to the target image area is obtained.

[0185] The method for predicting the probability distribution of the key points of the sample objects in the target image region may refer to the description of the method for predicting the probability distribution of the key points of the sample objects in the sample image in step 320 and step 420, which will not be repeated here.

[0186] Illustratively, assuming that the current image includes image area a and image area b, for key point 1, the sample prediction model outputs distribution parameters 1 and 2 of key point 1 in image area a, and distribution parameters 3 and 4 of key point 1 in image area b.

[0187] Step 631, based on multiple distribution parameters corresponding to the j-th key point in the key point prediction result, determine the region probabilities corresponding to multiple image regions respectively.

[0188] Among them, the region probability is used to represent the probability that the jth key point belongs to the image region.

[0189] Taking a target image region among multiple image regions as an example for explanation, optionally, a mixed probability distribution of the target image region is constructed according to multiple distribution parameters corresponding to the jth key point in the key point prediction result of the target image region.

[0190] Optionally, the distribution parameters include component parameters and component weights, the component parameters are used to characterize the sub-probability distribution of the mixed probability distribution of the key point, and the component weights are used to characterize the confidence of the sub-probability distribution in the mixed probability distribution. Among them, the component parameters include coordinate mean and coordinate standard deviation, the coordinate mean is used to characterize the mean parameter of the sub-probability distribution corresponding to the component parameter, and the coordinate standard deviation is used to characterize the standard deviation parameter of the sub-probability distribution corresponding to the component parameter.

[0191] Schematically, component parameter 1 of the target image area represents Gaussian distribution a, and the weight of component parameter 1 is 0.8; component parameter 2 of the target image area represents Gaussian distribution b, and the weight of component parameter 2 is 0.2; Gaussian distribution a and Gaussian distribution b are weighted and summed according to the weights to obtain a mixed probability distribution of the target image area.

[0192] After obtaining the mixed probability distribution of the target image area, in the mixed probability distribution, the average value of the probabilities corresponding to each predicted position is used as the regional probability; or, the maximum probability among the probabilities of each predicted position is used as the regional probability; or, the median of the probabilities of each predicted position is used as the regional probability, which is not limited in the embodiments of the present application.

[0193] Step 632, based on the reference image region to which the reference coordinates corresponding to the j-th key point belong and the region probabilities corresponding to the multiple image regions, determine the region losses corresponding to the multiple image regions respectively.

[0194] The reference image region is one of the multiple image regions.

[0195] Illustratively, the regional loss may be calculated by at least one of the cross entropy loss functions, etc. That is, if an image region is a reference image region, the training goal is to make the regional probability of the region output by the model as close to 1 as possible. If an image region is not a reference image region, the training goal is to make the regional probability of the model output as close to 0 as possible.

[0196] Optionally, for each image region, a cross entropy loss function is used to calculate the loss to obtain regional losses corresponding to multiple image regions.

[0197] Step 633, based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point in the key point prediction result, determine the target losses corresponding to the multiple image regions respectively.

[0198] The method for calculating the target loss of the image area can refer to the description of the method for calculating the target loss of the sample image in step 431, which will not be repeated here.

[0199] Step 634, training the sample prediction model according to the region loss and the target loss to obtain a key point prediction model.

[0200] Schematically, the regional losses corresponding to multiple image regions are added together to obtain the total regional loss, and the target losses corresponding to multiple image regions are added together to obtain the total target loss; by minimizing the total regional loss and the total target loss and training the sample detection model for the training target, a key point prediction model can be obtained.

[0201] In summary, the embodiment of the present application provides a training method for a key point prediction model, which divides a sample image into multiple image regions and trains a sample prediction model based on these regions. By dividing the image into multiple regions, the model can focus more on the local details in each region, thereby more accurately predicting the key points, reducing the complexity of full-image prediction, and improving prediction accuracy. In addition, this embodiment not only considers the prediction accuracy of the key points in the region (target loss), but also considers the distribution probability of the key points relative to the reference region (regional loss), thereby guiding the model to learn more effectively and improving the prediction accuracy of the trained key point prediction model.

[0202] The key point prediction model obtained by the training method provided in the embodiment of the present application can be applied to a variety of scenarios, such as: palmprint recognition scenario; action, gesture, gait recognition scenario, etc. The palmprint recognition process and the action, gesture, gait recognition process provided in the embodiment of the present application are introduced below.

[0203] 1. Palmprint recognition process.

[0204] Before each user starts palmprint recognition, the palm detection model and the palm key point prediction model trained by the above training method together form a palm following recognition component. For an example, please refer to Figure 7 , which shows a palmprint recognition flow chart. Figure 7 As shown, the palmprint recognition process includes the following steps.

[0205] S701: Take a photo.

[0206] The computer device acquires a plurality of continuous image frames by taking pictures.

[0207] S702: Palm following recognition.

[0208] The computer device first performs palm detection on an initial image frame in multiple consecutive images through a palm detection model. After the palm detection, the palm area is framed in the initial image frame through a detection frame; then, a palm key point prediction model is used to perform key point detection on the palm area framed in the initial image frame to determine multiple hand key points; then, in multiple image frames after the initial image frame, the palm key point prediction model is used to predict the positions of multiple hand key points therein to determine the position of the detection frame framing the palm area in the multiple image frames after the initial image frame, thereby achieving follow-up recognition of the palm.

[0209] S703: Extracting a region of interest (ROI).

[0210] Schematically, the ROI area is determined based on the detection boxes identified in multiple consecutive image frames, for example, the palm area selected by the detection boxes corresponding to multiple consecutive image frames is used as the ROI area; or, the palm area selected by the detection box in the last image frame is used as the ROI area.

[0211] S704: Send to the backend for palmprint recognition.

[0212] The user's palm photo is registered in the background registration library, and the palm in the ROI area is compared with each palm photo in the background registration library for palm print recognition, and the user's identity is finally determined.

[0213] 2. Action, gesture, and gait recognition process.

[0214] After locating the human body or hand area through the target detection model, the key point prediction model trained by the above training method can locate the key points of the human body or hand to complete the subsequent action, gesture, and gait recognition. For illustration, please refer to Figure 8 , which shows a flow chart of action, gesture, and gait recognition. Figure 8 As shown, the action, gesture, and gait recognition process includes the following steps.

[0215] S801: Take a photo.

[0216] The computer device takes a photo of the image frame to be recognized.

[0217] S802: Target detection.

[0218] For illustration, please refer to Fig. 9 The computer device performs target detection on the image frame to be identified 900 through the target detection model, and selects the target object 901 in the image frame to be identified 900 through the detection frame 902.

[0219] S803: Human body posture estimation.

[0220] The computer device uses a key point prediction model to perform key point detection on the target object area selected in the image frame to be identified, and determines multiple object key points.

[0221] S804: Extracting a region of interest (ROI).

[0222] Based on multiple object key points, extract the ROI area from the selected target object area. For an example, please refer to Fig.10 , identifying the key points of the hand in the target object area selected by the frame, thereby obtaining a detection frame 1002 for framing the palm 1001.

[0223] S805: Action recognition / gesture recognition / gait recognition.

[0224] Action recognition / gesture recognition / gait recognition is performed according to the ROI area. For example, gait recognition can be used to determine the fall and disease signals of the target object in the image, so as to detect the health status of the target object. Action recognition or gesture recognition can be applied to automatic teaching of fitness, sports and dance, etc. Action recognition or gesture recognition can help detect whether the target object's actions are correct and standard, so as to help the target object learn and exercise.

[0225] For illustration, please refer to Fig.11 , which shows a structural block diagram of a training device for a key point prediction model, such as Fig.11 As shown, the device comprises:

[0226] An acquisition module 1100 is used to acquire a sample image containing a sample object, wherein the sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer;

[0227] A prediction module 1120 is used to predict the probability distribution of the key points of the sample object in the sample image through a sample prediction model, and obtain a plurality of distribution parameters corresponding to the n key points, wherein the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different image analysis angles, and the plurality of distribution parameters corresponding to the jth key point are used to characterize the mixed probability distribution of the jth key point, where j≤n and j is a positive integer;

[0228] The training module 1130 is used to train the sample prediction model based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point to obtain a key point prediction model, and the key point prediction model is used to predict the key point coordinates of the object to be identified in the image.

[0229] For illustration, please refer to Fig.12 In some embodiments, the distribution parameters include component parameters and component weights, the component parameters are used to characterize the sub-probability distribution of the mixed probability distribution of the key point, and the component weights are used to characterize the confidence of the sub-probability distribution in the mixed probability distribution; the prediction module 1120 is used to extract the features of the sample image through the feature extraction network in the key point prediction model to obtain the image feature representation corresponding to the sample image; analyze the image feature representation through the mixed density network in the key point prediction model, predict the probability distribution of the key points of the sample object in the sample image, and obtain multiple component parameters corresponding to the n key points and component weights corresponding to the multiple component parameters.

[0230] In some embodiments, the prediction module 1120 is used to determine the target loss based on the reference coordinates corresponding to the j-th key point, the multiple component parameters corresponding to the j-th key point, and the component weights corresponding to the multiple component parameters respectively; the sample prediction model is trained by the target loss to obtain the key point prediction model.

[0231] In some embodiments, the component parameters include a coordinate mean and a coordinate standard deviation, the coordinate mean is used to characterize the mean parameter of the sub-probability distribution corresponding to the component parameter, and the coordinate standard deviation is used to characterize the standard deviation parameter corresponding to the sub-probability distribution corresponding to the component parameter; the prediction module 1120 is used to calculate the coordinate differences between the multiple coordinate means corresponding to the j-th key point and the reference coordinates corresponding to the j-th key point; based on the component weights corresponding to the multiple component parameters, the multiple coordinate differences corresponding to the j-th key point are weighted and fused to obtain the target coordinate difference; based on the component weights corresponding to the multiple component parameters, the multiple coordinate standard deviations corresponding to the j-th key point are weighted and fused to obtain the target standard deviation; the target loss is determined based on the target coordinate difference and the target standard deviation.

[0232] In some embodiments, the key points include key points in two-dimensional form, and the coordinate standard deviation includes a first standard deviation and a second standard deviation; the first standard deviation is used to characterize the degree of discreteness between each predicted position in the probability distribution corresponding to the component parameter and the horizontal coordinate of the coordinate mean, and the second standard deviation is used to characterize the degree of discreteness between each predicted position in the probability distribution corresponding to the component parameter and the vertical coordinate of the coordinate mean.

[0233] In some embodiments, the plurality of distribution parameters include at least one of a distribution parameter of a Gaussian distribution and a distribution parameter of a Laplace distribution.

[0234] In some embodiments, the prediction module 1120 is used to divide the sample image into multiple image regions; predict the probability distribution of the key points of the sample object in each image region through the sample prediction model, and obtain the key point prediction results corresponding to the multiple image regions respectively, and the key point prediction results include multiple distribution parameters corresponding to the n key points respectively.

[0235] In some embodiments, the training module 1130 is used to determine the regional probabilities corresponding to the multiple image regions respectively based on the multiple distribution parameters corresponding to the j-th key point in the key point prediction result, and the regional probabilities are used to characterize the probability that the j-th key point belongs to the image region; based on the reference image region to which the reference coordinates corresponding to the j-th key point belong and the regional probabilities corresponding to the multiple image regions respectively, determine the regional losses corresponding to the multiple image regions respectively, wherein the reference image region is one of the multiple image regions; based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point in the key point prediction result, determine the target losses corresponding to the multiple image regions respectively; train the sample prediction model according to the regional loss and the target loss to obtain the key point prediction model.

[0236] In some embodiments, the device also includes: a determination module 1140, which is used to detect the target object in the target image and obtain a detection box corresponding to the target object, and the detection box is used to select the target object in the target image; based on the detection box corresponding to the target object, determine the target area in the target image, and the target area contains the target object; predict the probability distribution of the key points of the target object in the target area through the key point prediction model to obtain multiple distribution parameters corresponding to the key points; based on the multiple distribution parameters corresponding to the key points, determine the coordinates of the key points.

[0237] In summary, the training device of the key point prediction model provided in the embodiment of the present application predicts the probability distribution of the key points of the sample object in the input image through the sample prediction model, and obtains multiple distribution parameters for characterizing the mixed probability distribution of the key points, so as to train the sample prediction model based on the reference coordinates of the key points and the multiple distribution parameters, wherein the amount of data of the distribution parameters predicted by the sample prediction model is much smaller than the amount of data of the heat map predicted in the related technology, and the calculation amount of the sample prediction model is small, thereby improving the training efficiency of the sample prediction model; in addition, since the multiple distribution parameters predicted by the sample prediction model are obtained based on analysis from different image analysis angles, different image analysis angles can capture various features of the sample object and reduce the errors caused by a single distribution parameter, thereby improving the prediction accuracy of the trained key point prediction model.

[0238] It should be noted that the specific limitations in the embodiments of the training device for one or more key point prediction models provided above can be found in the limitations of the training method for the key point prediction model above, and will not be repeated here. Each module of the above-mentioned device can be implemented in whole or in part by software, hardware, and a combination thereof. Each module can be embedded in or independent of the processor of the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0239] An embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein a computer program is stored in the memory; and the processor is used to execute the computer program in the memory to implement the training method of the key point prediction model provided in the above-mentioned method embodiments.

[0240] For example, Fig.13 1 is a structural block diagram of a computer device 1300 provided by an exemplary embodiment of the present application. Optionally, the computer device 1300 is a server 1300 .

[0241] Typically, the server 1300 includes a processor 1301 and a memory 1302 .

[0242] The processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1301 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1301 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0243] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1302 is used to store at least one instruction, which is used to be executed by the processor 1301 to implement the training method of the key point prediction model provided by each method embodiment in the present application.

[0244] In some embodiments, the server 1300 may further optionally include: an input interface 1303 and an output interface 1304. The processor 1301, the memory 1302, the input interface 1303, and the output interface 1304 may be connected via a bus or a signal line. Each peripheral device may be connected to the input interface 1303 and the output interface 1304 via a bus, a signal line, or a circuit board. The input interface 1303 and the output interface 1304 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 1301 and the memory 1302. In some embodiments, the processor 1301, the memory 1302, the input interface 1303, and the output interface 1304 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1301, the memory 1302, the input interface 1303, and the output interface 1304 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.

[0245] Those skilled in the art will understand that Fig.13 The structure shown in the figure does not constitute a limitation on the computer device 1300, and the computer device 1300 may include more or less components than shown in the figure, or combine some components, or adopt a different component arrangement.

[0246] In an exemplary embodiment, the present application provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the training method of the key point prediction model provided by the above-mentioned various method embodiments.

[0247] In an exemplary embodiment, the present application provides a computer-readable storage medium storing a computer program, which is loaded and executed by a processor to implement the training method of the key point prediction model provided by the above-mentioned various method embodiments.

[0248] In an exemplary embodiment, the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the processor of the computer device loads and executes to implement the training method of the key point prediction model provided in the above method embodiment.

[0249] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0250] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned computer-readable storage medium may be a read-only memory, a disk or an optical disk, etc.

[0251] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0252] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A training method for a key point prediction model, It is characterized in that The method comprises: Acquire a sample image containing a sample object, wherein the sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer; The features of the sample image are extracted by a sample prediction model to obtain an image feature representation corresponding to the sample image; the image feature representation is analyzed by the sample prediction model to predict the probability distribution of the key points of the sample object in the sample image to obtain a plurality of distribution parameters corresponding to the n key points, the distribution parameters including component parameters and component weights, wherein the sample prediction model predicts the probability distribution of the key points of the sample object in the sample image by a mixed density network to obtain a plurality of component parameters corresponding to the n key points and component weights corresponding to the plurality of component parameters; the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different image analysis angles, and the plurality of distribution parameters corresponding to the jth key point are used to characterize the mixed probability distribution of the jth key point, j≤n and j is a positive integer; wherein different image analysis angles represent different mapping relationships corresponding to the image feature representation in the sample prediction model, the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different mapping relationships, and different mapping relationships represent different levels of attention to the image feature representation; The sample prediction model is trained based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point to obtain a key point prediction model, wherein the key point prediction model is used to predict the key point coordinates of the object to be identified in the image; The method further includes: dividing the sample image into a plurality of image regions; predicting the probability distribution of the key points of the sample object in each image region by the sample prediction model to obtain the key point prediction results corresponding to the plurality of image regions, wherein the key point prediction results include a plurality of distribution parameters corresponding to the n key points; determining the region probabilities corresponding to the plurality of image regions based on the plurality of distribution parameters corresponding to the jth key point in the key point prediction results, wherein the region probabilities are used to characterize the probability that the jth key point belongs to the image region; determining the region losses corresponding to the plurality of image regions based on the reference image region to which the reference coordinates corresponding to the jth key point belong and the region probabilities corresponding to the plurality of image regions, wherein the reference image region is one of the plurality of image regions; determining the target losses corresponding to the plurality of image regions based on the reference coordinates corresponding to the jth key point and the plurality of distribution parameters corresponding to the jth key point in the key point prediction results; and training the sample prediction model according to the region losses and the target losses to obtain the key point prediction model.

2. The method according to claim 1, It is characterized in that The step of training the sample prediction model based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point to obtain the key point prediction model includes: Determine a target loss based on a reference coordinate corresponding to the j-th key point, a plurality of component parameters corresponding to the j-th key point, and component weights respectively corresponding to the plurality of component parameters; The sample prediction model is trained by using the target loss to obtain the key point prediction model.

3. The method according to claim 2, It is characterized in that The component parameters include a coordinate mean and a coordinate standard deviation, the coordinate mean is used to characterize the mean parameter of the sub-probability distribution corresponding to the component parameter, and the coordinate standard deviation is used to characterize the standard deviation parameter corresponding to the sub-probability distribution corresponding to the component parameter; The determining the target loss based on the reference coordinates corresponding to the j-th key point, the multiple component parameters corresponding to the j-th key point, and the component weights respectively corresponding to the multiple component parameters includes: Calculate the coordinate differences between the mean values ​​of multiple coordinates corresponding to the j-th key point and the reference coordinates corresponding to the j-th key point; Based on the component weights respectively corresponding to the multiple component parameters, weighted fusion of multiple coordinate difference values ​​corresponding to the j-th key point is performed to obtain a target coordinate difference value; Based on the component weights corresponding to the multiple component parameters, weighted fusion of multiple coordinate standard deviations corresponding to the j-th key point is performed to obtain a target standard deviation; The target loss is determined according to the target coordinate difference and the target standard deviation.

4. The method according to claim 3, It is characterized in that The key points include key points in two-dimensional form, and the coordinate standard deviation includes a first standard deviation and a second standard deviation; the first standard deviation is used to characterize the degree of discreteness between each predicted position in the probability distribution corresponding to the component parameter and the horizontal coordinate of the coordinate mean, and the second standard deviation is used to characterize the degree of discreteness between each predicted position in the probability distribution corresponding to the component parameter and the vertical coordinate of the coordinate mean.

5. The method according to any one of claims 1 to 4, It is characterized in that The multiple distribution parameters include at least one of a distribution parameter of a Gaussian distribution and a distribution parameter of a Laplace distribution.

6. The method according to any one of claims 1 to 4, It is characterized in that After the sample prediction model is trained based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point to obtain the key point prediction model, the method further includes: Detecting a target object in a target image and obtaining a detection frame corresponding to the target object, wherein the detection frame is used to select the target object in the target image; Determine a target region in the target image based on a detection frame corresponding to the target object, wherein the target region contains the target object; Predicting the probability distribution of key points of the target object in the target area by the key point prediction model to obtain a plurality of distribution parameters corresponding to the key points; The coordinates of the key points are determined based on a plurality of distribution parameters corresponding to the key points.

7. A training device for a key point prediction model, It is characterized in that The device comprises: An acquisition module, used for acquiring a sample image containing a sample object, wherein the sample image is annotated with reference coordinates corresponding to n key points of the sample object, where n is a positive integer; A prediction module, used to extract the features of the sample image through a sample prediction model to obtain an image feature representation corresponding to the sample image; analyze the image feature representation through the sample prediction model, predict the probability distribution of the key points of the sample object in the sample image, and obtain a plurality of distribution parameters corresponding to the n key points, wherein the distribution parameters include component parameters and component weights, wherein the sample prediction model predicts the probability distribution of the key points of the sample object in the sample image through a mixed density network to obtain a plurality of component parameters corresponding to the n key points and component weights corresponding to the plurality of component parameters; the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different image analysis angles, and the plurality of distribution parameters corresponding to the jth key point are used to characterize the mixed probability distribution of the jth key point, j≤n and j is a positive integer; wherein different image analysis angles represent different mapping relationships corresponding to the image feature representation in the sample prediction model, and the plurality of distribution parameters corresponding to the jth key point are parameters predicted for the jth key point based on different mapping relationships, and different mapping relationships represent different levels of attention to the image feature representation; A training module, used for training the sample prediction model based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point to obtain a key point prediction model, wherein the key point prediction model is used to predict the key point coordinates of the object to be identified in the image; The prediction module is further used to divide the sample image into multiple image regions; predict the probability distribution of the key points of the sample object in each image region by the sample prediction model, and obtain the key point prediction results corresponding to the multiple image regions respectively, wherein the key point prediction results include multiple distribution parameters corresponding to the n key points respectively; The training module is also used to determine the regional probabilities corresponding to the multiple image areas respectively based on the multiple distribution parameters corresponding to the j-th key point in the key point prediction result, and the regional probabilities are used to characterize the probability that the j-th key point belongs to the image area; determine the regional losses corresponding to the multiple image areas respectively based on the reference image area to which the reference coordinates corresponding to the j-th key point belong and the regional probabilities corresponding to the multiple image areas, wherein the reference image area is one of the multiple image areas; determine the target losses corresponding to the multiple image areas respectively based on the reference coordinates corresponding to the j-th key point and the multiple distribution parameters corresponding to the j-th key point in the key point prediction result; train the sample prediction model according to the regional loss and the target loss to obtain the key point prediction model.

8. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the training method of the key point prediction model as described in any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the training method of the key point prediction model as described in any one of claims 1 to 6.

10. A computer program product, It is characterized in that It comprises a computer program, which, when executed by a processor, implements the training method of the key point prediction model as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Training method and device of attitude estimation model, electronic equipment and storage medium

    CN117115595A