Key point detection model training method, key point detection method, equipment and storage medium

By training the key point detection model, using the sample data set and predicted heat map to generate loss function for training, the problem of low efficiency and low accuracy of X-ray image processing in traditional methods is solved, and more efficient and accurate Key point detection.

CN119399490APending Publication Date: 2025-02-07WUXI UNICOMP TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411454076.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

Traditional methods are inefficient in the X-ray image processing of diamond composite sheets, are susceptible to the operator's subjective judgment, are slow in calculation speed, and are not very accurate when identifying tiny defects, which cannot meet the rapid detection needs of industrial production.

Method used

A training method for key point detection model is proposed. By obtaining sample data sets, including training sample images and initial key point information, the image is detected based on the key point detection model to be trained, the predicted heat map is generated, and the target key points are passed Information generates key point label data and loss functions, performs model training, and improves detection efficiency and accuracy.

Benefits of technology

It improves the efficiency and accuracy of key point detection, and can detect key points and tiny defects in diamond composite sheets more quickly and accurately, meeting the rapid detection needs of industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399490A_ABST
    Figure CN119399490A_ABST
Patent Text Reader

Abstract

The invention discloses a training method of a key point detection model, a key point detection method, equipment and a storage medium. The training method of the key point detection model comprises the following steps: acquiring a sample data set; obtaining a to-be-trained key point detection model, and detecting the training sample image based on the to-be-trained key point detection model to obtain a predicted thermodynamic diagram corresponding to the training sample image; determining target key point information matched with the predicted thermodynamic diagram based on attribute information of the predicted thermodynamic diagram and the initial key point information under the condition that the sizes of the predicted thermodynamic diagram and the training sample image are not consistent; generating key point label data based on the target key point information, and generating a loss function based on the target key point label data and the predicted thermodynamic diagram; and training the to-be-trained key point detection model by taking reduction of the loss function as a training target. And the key point detection efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of quality detection, and in particular to a training method for a key point detection model, a key point detection method, a device and a storage medium. Background Art

[0002] In the field of quality inspection technology, the accurate inspection and evaluation of diamond composite sheets plays an important role. The X-ray images of diamond composite sheets are usually processed by intuitive analysis and manual inspection of the images. Traditional methods are inefficient and easily affected by the subjective judgment of the operator. When processing high-resolution images, the calculation speed is often slow and cannot meet the needs of rapid inspection in industrial production. In addition, traditional methods perform poorly in identifying tiny defects in diamond composite sheets, which may lead to inaccurate product quality assessment. Summary of the invention

[0003] The present invention provides a key point detection model training method, a key point detection method, a device and a storage medium to solve the problems of low efficiency and low accuracy of key point detection in traditional methods.

[0004] According to one aspect of the present invention, a method for training a key point detection model is provided, the method comprising:

[0005] Acquire a sample data set, where the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image;

[0006] Obtain a key point detection model to be trained, detect the training sample image based on the key point detection model to be trained, and obtain a prediction heat map corresponding to the training sample image, where the prediction heat map represents the predicted key point information of the object to be detected;

[0007] In the case where the sizes of the predicted heat map and the training sample image are inconsistent, the target key point information matching the predicted heat map is determined based on the attribute information of the predicted heat map and the initial key point information;

[0008] Generate key point label data based on target key point information, and generate a loss function based on the target key point label data and the predicted heat map;

[0009] Taking reducing the loss function as the training goal, the key point detection model to be trained is trained to obtain a trained key point detection model.

[0010] According to another aspect of the present invention, a key point detection method is provided, the method comprising:

[0011] Acquire an X-ray image of the object to be detected, detect the X-ray image of the object to be detected based on a pre-trained key point detection model, and obtain a key point heat map corresponding to the object to be detected; wherein the key point detection model is trained based on the training method of the key point detection model of any embodiment of the present invention;

[0012] Determine the key point detection results of the object to be detected based on the key point heat map.

[0013] According to one aspect of the present invention, a training device for a key point detection model is provided, the device comprising:

[0014] A sample data set acquisition module is used to acquire a sample data set, wherein the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image;

[0015] A model acquisition module is used to acquire a key point detection model to be trained, detect a training sample image based on the key point detection model to be trained, and obtain a prediction heat map corresponding to the training sample image, wherein the prediction heat map represents the prediction key point information of the object to be detected;

[0016] A target key point information acquisition module is used to determine the target key point information matching the predicted heat map based on the attribute information of the predicted heat map and the initial key point information when the sizes of the predicted heat map and the training sample image are inconsistent;

[0017] A loss function acquisition module is used to generate key point label data based on target key point information, and to generate a loss function based on the target key point label data and the predicted heat map;

[0018] The model training module is used to train the key point detection model to be trained with the reduction of the loss function as the training goal, so as to obtain the trained key point detection model.

[0019] According to one aspect of the present invention, there is provided a key point detection device, the device comprising:

[0020] A key point heat map acquisition module is used to acquire an X-ray image of an object to be detected, and detect the X-ray image of the object to be detected based on a pre-trained key point detection model to obtain a key point heat map corresponding to the object to be detected; wherein the key point detection model is trained based on the training method of the key point detection model of any embodiment of the present invention;

[0021] The key point detection result acquisition module is used to determine the key point detection result of the object to be detected based on the key point heat map.

[0022] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0023] at least one processor; and

[0024] a memory communicatively connected to at least one processor; wherein,

[0025] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the key point detection model training method or key point detection method of any embodiment of the present invention.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to implement the key point detection model training method or key point detection method of any embodiment of the present invention when executed by a processor.

[0027] The technical solution of the embodiment of the present invention is as follows: by acquiring a sample data set, the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image; acquiring a key point detection model to be trained, detecting the training sample image based on the key point detection model to be trained, and obtaining a predicted heat map corresponding to the training sample image, wherein the predicted heat map represents the predicted key point information of the object to be detected; in the case where the sizes of the predicted heat map and the training sample image are inconsistent, determining the target key point information that matches the predicted heat map based on the attribute information of the predicted heat map and the initial key point information; generating key point label data based on the target key point information, and generating a loss function based on the target key point label data and the predicted heat map; training the key point detection model to be trained with the reduction of the loss function as the training goal, and obtaining a trained key point detection model, thereby solving the problems of low efficiency and low accuracy of key point detection in traditional methods and improving the efficiency and accuracy of key point detection.

[0028] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0030] Figure 1 is a flow chart of a training method for a key point detection model provided in Embodiment 1 of the present invention;

[0031] Figure 2 This is an X-ray image of a diamond composite sheet provided in Example 1 of the present invention;

[0032] Figure 3 is an initial key point diagram of a diamond composite sheet provided in Example 1 of the present invention;

[0033] Figure 4 is a predicted heat map of the initial key points provided in the first embodiment of the present invention;

[0034] Figure 5 is a heat map corresponding to the four initial key points provided in the first embodiment of the present invention;

[0035] Figure 6 is a flow chart of a key point detection method provided by Embodiment 2 of the present invention;

[0036] Figure 7 It is a structural schematic diagram of a training device for a key point detection model provided in Embodiment 3 of the present invention;

[0037] Figure 8 is a structural schematic diagram of a key point detection device provided by Embodiment 4 of the present invention;

[0038] Fig. 9 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] Embodiment 1

[0042] Figure 1 This is a flowchart of a training method for a key point detection model provided in the first embodiment of the present invention. This embodiment can be applied to the case of training a high-precision model suitable for key point detection of an object to be detected. The method can be executed by a training device for a key point detection model. The training device for the key point detection model can be implemented in the form of hardware and / or software. The training device for the key point detection model can be configured on a variety of terminal smart devices, servers or computers, etc., wherein the terminal smart devices include mobile phones, tablet computers and PCs, etc. Figure 1 As shown, the method includes:

[0043] S110 , obtaining a sample data set, where the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image.

[0044] In this embodiment, the object to be detected may be a product that needs to be inspected at key points, including but not limited to a diamond composite sheet. The training sample image may be an image of the object to be detected acquired by an image acquisition device. For example, if the object to be detected is a diamond composite sheet, an X-ray scanning device may be used to scan the diamond composite sheet to obtain an X-ray image as a training sample image; or an image acquisition device such as a camera may be used to capture an image of the diamond composite sheet to obtain a training sample image.

[0045] It is understandable that for different objects to be detected, sample data sets of different objects to be detected can be obtained respectively, and key point detection models can be trained respectively for different objects to be detected to perform key point detection on different objects to be detected. The training sample images corresponding to the objects to be detected can be collected during the historical production process or historical testing process of the objects to be detected.

[0046] Optionally, the training sample image may be a grayscale image or an RGB image. The initial key point information may be obtained by annotating the key points of the object to be detected using relevant annotation tools. The key points here may be in the form of annotated areas / annotated points. Based on the annotated areas / annotated points being determined as initial key points, the information corresponding to the annotated areas / annotated points is determined as initial key point information. Exemplarily, the initial key point information may be the position information of the annotated areas / annotated points in the training sample image, such as coordinate information.

[0047] In some embodiments, an X-ray scanning device may be used to scan the object to be detected to obtain an X-ray image of the object to be detected, and a target detection algorithm or manual marking may be used to mark the key points of the object to be detected, and the marked key points are used as initial key points. Taking a diamond composite sheet as an example, an X-ray scanning device is used to scan the diamond composite sheet to obtain an X-ray image of the diamond composite sheet. The key points may be the four corner points of the diamond composite sheet. The target detection algorithm is used to mark the four corner points of the diamond composite sheet, and the marked four corner points are used as the four key points of the diamond composite sheet. For example, see Figure 2 and Figure 3 , Figure 2 This is an X-ray image of a diamond composite sheet provided in Example 1 of the present invention. Figure 3 It is an initial key point map of a diamond composite sheet provided in Example 1 of the present invention. By obtaining a training sample image of an object to be detected and annotating the key point information of the training sample image, the initial key point information of the training sample image can be accurately grasped. It is understandable that the key points of different objects to be detected may be different, and the key points of the same object to be detected in different detection scenes may also be different. The key points of the object to be detected can be determined according to the detection requirements. The initial key point information corresponding to the training sample image is the annotation information of the key points of the object to be detected in the training sample image, such as position annotation information.

[0048] Before training the key point detection model, the sample data set can be divided, for example, the sample data set can be divided into a training set and a test set in a ratio of 4:1, wherein the training set is used to train the key point detection model, and the test set is used to test the performance of the key point detection model.

[0049] In order to improve the generalization ability of the key point detection model, the training sample images in the sample data set can be preprocessed, such as one or more of random cropping, random inversion, random scaling, random rotation, random color space transformation, random noise, format conversion, standardization and normalization. Random cropping refers to randomly selecting a certain area from the training sample image, such as a 640×640 area, and more training sample images are generated by selecting different cropped areas during each training. Random horizontal flipping refers to mirroring the cropped training sample image in the horizontal and vertical directions with a probability of 50%. Random rotation refers to randomly rotating the image within a certain angle range to improve the robustness of the key point detection model to the direction angle. Assuming that the original training sample image is I, the rotation angle is θ, and the rotation range is [-α, α], the rotated image and key points can be expressed as:

[0050] I rot =Rotate(I,θ)

[0051] [x rot ,y rot ]=[x,y]·θ

[0052] Among them, I rot represents the rotated training sample image, [x, y] represents the initial key point coordinates, [x rot ,y rot ] represents the coordinates of the key points after rotation.

[0053] Random scaling is to adjust the size of the training sample image, keep the content of the training sample image while changing its size ratio, and improve the robustness of the key point detection model to scale changes. Color space transformation includes one or more of brightness adjustment, contrast adjustment, saturation adjustment, and hue adjustment. These transformations can simulate training sample images under different exposure conditions. Among them, random brightness adjustment can be achieved by adding a random offset to the RGB value of each pixel. Assuming that the original pixel values ​​are R, G, B, and the random brightness offset is ΔB (usually randomly selected within a certain range), the adjusted pixel value R 1 , G 1 , B 1 It can be expressed as:

[0054] R 1 =clip(R+ΔB)

[0055] G 1 =clip(G+ΔB)

[0056] B 1 =clip(B+ΔB)

[0057] Random contrast adjustment is achieved by changing the ratio of the training sample image pixel value to the average brightness. Let the average brightness of the training sample image pixel be L, the random contrast factor be c, and the adjusted pixel value R 2 , G 2 , B 2 It can be expressed as:

[0058] R 2 =clip(L+c·(RL))

[0059] G 2 =clip(L+c·(GL))

[0060] B 2 =clip(L+c·(BL))

[0061] Random saturation adjustment changes the purity of the color. This can be achieved by converting the image from RGB space to HSV or HLS space, then adjusting the saturation component, and then converting back to RGB space. Let the saturation of the original pixel in HSV space be S, and the randomly increased saturation change be ΔS, then the adjusted saturation S′ is:

[0062] S′=clip(S+ΔS)

[0063] The addition of random noise can make the key point detection model more robust and less susceptible to slight disturbances in the image. Usually, Gaussian noise is the most commonly used type of noise, and its mathematical expression is:

[0064] I noise =I+n(0,σ 2 )

[0065] Where I represents the training sample image before adding Gaussian noise, I noise represents the training sample image after adding Gaussian noise, n(0, σ 2 ) means the mean is 0 and the variance is σ 2 Gaussian noise.

[0066] After preprocessing, the training sample image data is converted into Tensor format, and the training sample image data is standardized and normalized, that is, the training sample image pixel values ​​are adjusted to have zero mean and unit variance. This is crucial to speed up the convergence of the key point detection model and prevent the gradient disappearance or explosion problem during training. At the same time, it ensures that the key point detection model can fairly compare the importance of different features during training, thereby improving the stability and learning efficiency of the key point detection model.

[0067] S120, obtaining a key point detection model to be trained, detecting a training sample image based on the key point detection model to be trained, and obtaining a prediction heat map corresponding to the training sample image, wherein the prediction heat map represents the predicted key point information of the object to be detected.

[0068] In this embodiment, a key point detection model to be trained is created in advance, the parameters of the key point detection model to be trained are initialized, and the initialized key point detection model is trained based on a sample data set to obtain a trained key point detection model. The key point detection model may be a LiteHRNet model, and the model structure of the key point detection model is not limited here, and may be created according to user needs. Optionally, the key point detection model may include multiple network blocks, such as a residual network block, a separation convolutional network block, and a re-parameterized convolutional network block.

[0069] The prediction heat map may be a prediction image obtained by detecting the training sample image based on the key point detection model to be trained. The prediction heat map may be a grayscale image, and the prediction key points in the prediction heat map may be key points corresponding to the maximum pixel value or the minimum pixel value. The prediction key point information may be extracted through the prediction heat map, for example, the coordinate information of the prediction key point in the prediction heat map may be used as the prediction key point information.

[0070] The key point included in the training sample image may be one or more, and correspondingly, the predicted heat map may be one or more. Exemplarily, each predicted heat map may include one key point.

[0071] S130: When the sizes of the predicted heat map and the training sample image are inconsistent, determine the target key point information that matches the predicted heat map based on the attribute information of the predicted heat map and the initial key point information.

[0072] During the training of the key point detection model, the training sample images of the object to be detected need to be transformed into images of the same size and input into the key point detection model. The size of the predicted heat map obtained is the same as the input image size of the key point detection model, which causes the size of the predicted heat map to be inconsistent with the size of the training sample images of the object to be detected. For example, the size of the training sample images of the object to be detected is 1000×1000, the input image size of the key point detection model is 640×640, and the size of the predicted heat map obtained by the key point detection model is 640×640. It can be understood that the initial key point information is set based on the training sample images. In the process of calculating the loss function during the training of the key point detection model, in order to maintain consistency, the initial key point information needs to be converted into target key point information that matches the size of the predicted heat map. Errors may occur in the above conversion process, affecting the accuracy of the loss function and further affecting the performance of the key point detection model.

[0073] To address the above issues and improve the accuracy of the key point detection model, it is necessary to process the predicted heat maps and training sample images with inconsistent sizes to eliminate the errors caused by the conversion process.

[0074] The target key point information refers to the key point information obtained when the initial key point information is converted to the predicted heat map in the same size conversion. Specifically, the image transformation relationship is determined based on the attribute information of the training sample image and the attribute information of the predicted heat map, and the initial key point information is transformed based on the image transformation relationship to obtain the target key point information. Among them, the attribute information may include size information and / or resolution information; accordingly, the image transformation relationship may include a size scaling relationship and a sampling relationship, and the sampling relationship may include upsampling or downsampling.

[0075] Optionally, target key point information matching the predicted heat map is determined based on the attribute information of the predicted heat map and the initial key point information, including: based on the image transformation relationship between the predicted heat map and the training sample image, the initial key point information is transformed to obtain the target key point information.

[0076] Specifically, the scaling relationship, i.e., the scaling ratio, can be determined based on the size information of the predicted heat map and the size information of the training sample image. The sampling relationship can be determined based on the resolution information of the predicted heat map and the resolution information of the training sample image. The size information here can be the length and width of the image. By transforming the initial key point information based on the image transformation relationship, the target key point information adapted to the predicted heat map is obtained. The target key point information can be the expected key point information corresponding to the predicted key point information.

[0077] When the size of the predicted heat map is inconsistent with the size of the training sample image, the initial key point information is scaled based on the scaling relationship, and / or the initial key point information is sampled based on the sampling relationship. Exemplarily, the initial key point information may be [423, 29]. Based on the scaling ratio in the scaling relationship, the initial key point information is scaled to obtain the first information [483.43, 25.29]. Based on the four-fold downsampling in the sampling relationship, the intermediate key point information is downsampled to obtain the second information [120.8575, 6.3225]. For example, the second information may be determined as the target key point information. Based on the image transformation relationship between the predicted heat map and the training sample image, the initial key point information is transformed to obtain the target key point information adapted to the predicted heat map, so that in the training process of the key point detection model, the expected heat map corresponding to the predicted heat map is determined based on the target key point information, that is, the key point label data. The model is trained by calculating the loss function through the key point label data and the predicted heat map, thereby avoiding the situation where the initial key point information and the predicted heat map are not compatible, resulting in an inaccurate loss function, which further affects the performance of the key point detection model.

[0078] Optionally, the initial key point information and the target key point information are the key point pixel coordinate information, respectively. It is understandable that the key point pixel coordinate information is generally an integer. In the above example, when the second intermediate key point information is [120.8575, 6.3225], the second information can generally be rounded to obtain the target key point information as [120, 6]. The above rounding operation results in a pixel error of [0.8575, 0.3225]. The above pixel error interferes with the training process of the key point model. Furthermore, when the target key point information is inversely transformed (upsampling and resizing), the above pixel error increases. In response to the above problem, the offset information can be determined after the rounding operation, and the information obtained after the rounding is corrected based on the offset information to reduce the error caused by the rounding operation.

[0079] Optionally, based on the image transformation relationship between the predicted heat map and the training sample image, the initial key point information is transformed to obtain target key point information, including: based on the image transformation relationship between the predicted heat map and the training sample image, the initial key point information is transformed to obtain first intermediate key point information; the first intermediate key point information is rounded to obtain second intermediate key point information; the offset information is determined based on the neighborhood pixel point information of the second intermediate key point information, and the target key point information is determined based on the offset information and the second intermediate key point information.

[0080] Since the size of the predicted heat map is inconsistent with the size of the training sample image, the initial key point information is transformed to obtain the first intermediate key point information, such as the information obtained by scaling and sampling the initial key point information. In the process of transforming the initial key point information, sub-pixels may appear in the first intermediate key point information. Since sub-pixels in digital images cannot be represented, the first intermediate key point information needs to be rounded and the processed first intermediate key point information is determined as the second intermediate key point information. For example, the first intermediate key point information is [120.8575, 6.3225] and the second key point information is [120, 6].

[0081] The offset information is a kind of vector information, including both the offset value and the offset direction. For example, +1 means moving 1 unit in the positive direction. The offset information is the information to be adjusted for the second intermediate key point information. The second intermediate key point information is adjusted based on the offset information to obtain the target key point information. The offset information may include offset information in two directions, and the offset information in each direction may be determined based on the neighborhood pixel point information of the second intermediate key point information in that direction.

[0082] Optionally, the offset information is determined based on the neighborhood pixel point information of the second intermediate key point information, including: comparing two neighborhood pixel point information of the second intermediate key point information in the first direction to obtain a first comparison result, and determining the offset information in the first direction based on the first comparison result; comparing two neighborhood pixel point information of the second intermediate key point information in the second direction to obtain a second comparison result, and determining the offset information in the second direction based on the second comparison result; determining the target key point information based on the second intermediate key point information, the offset information in the first direction and the offset information in the second direction.

[0083] Specifically, the first comparison result may be to compare two neighboring pixel point information of the second intermediate key point information in the first direction to determine the size of the two neighboring pixel point information in the first direction. For example, the two neighboring pixel point information in the first direction are the first neighboring pixel point information and the second neighboring pixel point information, respectively. By comparison, it can be known that the first neighboring pixel point information is larger than the second neighboring pixel point information, and the offset direction in the first direction is offset toward the first neighboring pixel point information.

[0084] The second comparison result may be to compare two neighboring pixel point information of the second intermediate key point information in the second direction to determine the size of the two neighboring pixel point information in the second direction. For example, the two neighboring pixel point information in the second direction are the third neighboring pixel point information and the fourth neighboring pixel point information, respectively. By comparison, it can be known that the third neighboring pixel point information is greater than the fourth neighboring pixel point information, and the offset direction in the second direction is offset toward the third neighboring pixel point information.

[0085] The first direction and the second direction may be a horizontal direction and a vertical direction, respectively. Taking the horizontal direction as an example, if the left pixel point information of the second intermediate key point information is greater than the right pixel point information, it can be determined that the offset direction is negative. Taking the vertical direction as an example, if the upper pixel point information of the second intermediate key point information is greater than the lower pixel point information, it can be determined that the offset direction is positive. The pixel point information here may be a pixel value.

[0086] Optionally, the numerical value in the offset information may be fixed, or may be calculated based on the neighborhood pixel information of the second intermediate key point information. For example, the offset value in the offset information is fixed, and illustratively, the offset value may be 0.25. When the offset direction is determined to be positive, the offset information may be determined to be +0.25, and when the offset direction is determined to be negative, the offset information may be determined to be -0.25.

[0087] For example, see Figure 4 , Figure 4It is a predicted heat map of the initial key points provided by the first embodiment of the present invention. Each square represents a pixel point, and the data in the pixel point is a pixel value, that is, pixel point information, which can be obtained by normalization. According to the search for the maximum value point, the second intermediate key point information can be found to be (2,2). By comparing the neighboring pixel point information on the left and right sides (x direction, horizontally to the right) and the upper and lower sides (y direction, vertically downward) of the second intermediate key point, it can be seen that the pixel point information on the right is greater than the pixel point information on the left, the offset direction is positive, and the offset size is a fixed value of 0.25. It can be determined that the offset information in the horizontal direction is 0.25, so the intermediate key point information in the horizontal direction is 2.25. Similarly, the pixel point information on the upper side is greater than the pixel point information on the lower side, the offset direction is negative, and the offset information in the vertical direction is -0.25, so the intermediate key point information in the vertical direction is y=1.75. Therefore, the coordinates of the target key point information are (2.25,1.75).

[0088] For example, the offset value in the offset information is the difference between the neighboring pixel point information of the second intermediate key point information, and the offset value may be positively correlated with the difference between the neighboring pixel point information of the second intermediate key point information. The offset information can be determined by the offset value and the offset direction to correct the second intermediate key point information and obtain the target key point information.

[0089] S140, generating key point label data based on the target key point information, and generating a loss function based on the target key point label data and the predicted heat map.

[0090] In this embodiment, the key point label data may be a key point heat map, that is, an expected heat map corresponding to the predicted heat map. The key point label data may be obtained through a two-dimensional Gaussian kernel function and target key point information. The calculation formula of the two-dimensional Gaussian kernel function is as follows:

[0091]

[0092] Among them, (x i ,y i ) represents the key point coordinates of the i-th object to be detected, and (x, y) is the target key point information. The key point label data is generated by the Gaussian kernel function, and the target key point information corresponding to the four initial key points respectively generates the corresponding key point label data. For example, see Figure 5 , Figure 5 It is the key point label data corresponding to the four initial key points provided in the first embodiment of the present invention.

[0093] The loss function is a standard used to measure the training effect of the key point detection model. The smaller the loss function, the better the training effect of the key point detection model; and vice versa.

[0094] Optionally, the loss function can be an L2 loss function, and the calculation formula is:

[0095] L=L2(p hm , kp hm )

[0096] Among them, L represents the loss function, p hm Represents the prediction heat map, kp hm Represents key point label data.

[0097] S150, training the key point detection model to be trained with the reduction of the loss function as the training goal, to obtain a trained key point detection model.

[0098] In this embodiment, the key point detection model is trained by continuously adjusting the model parameters, and when the loss function is minimized, the key point detection model training is completed.

[0099] Based on the above training method, different key point detection models can be obtained by training with different sample data sets. There are differences in the performance of multiple key point detection models. The optimal model can be screened out from the above multiple sample test sets based on the sample test set.

[0100] Optionally, the method also includes: obtaining a sample test set, multiple test sample images in the sample test set and initial key point information of each test sample image; for any sample test set, performing key point detection processing on the test sample image based on a key point detection model to obtain test key point information of the test sample image; determining performance data of the key point detection model based on the test key point information of the test sample image and the initial key point information of the test sample image; and determining a target key point detection model based on the performance data corresponding to each of the multiple key point detection models.

[0101] Specifically, the performance data of the key point detection model may be data reflecting the prediction accuracy of the key point detection model. Optionally, the target key point detection model is determined by comparing the size of the loss function value. For example, multiple test sample images are respectively input into the key point detection model to obtain multiple loss function values. By comparing the size of the loss function values, the key point detection model with the smallest loss function value can be determined as the target key point detection model.

[0102] Optionally, the performance data of the key point detection model is determined through the key point detection qualification information, and then the target key point detection model is determined.

[0103] Optionally, each test sample image includes at least one key point of the object to be detected; the initial key point information is the initial key point information of at least one key point; the test key point information is the test key point information of at least one key point; the performance data of the key point detection model is determined based on the test key point information of the test sample image and the initial key point information of the test sample image, including: determining the detection offset distance of at least one key point in the test sample image based on the initial key point information and the test key point information corresponding to the test sample image; determining the key point detection qualification information corresponding to the test sample image based on the detection offset distance of at least one key point in the test sample image; and determining the performance data of the key point detection model based on the key point detection qualification information corresponding to multiple test sample images.

[0104] Specifically, each test sample image includes one or more key points, and all key points in each test sample image can be detected. The detection offset distance can be understood as a measure of the degree of offset between the initial key point information corresponding to the test sample image and the test key point information. For example, the detection offset distance can be the Euclidean distance between the initial key point information corresponding to the test sample image and the test key point information. The key point detection qualification information can be the accuracy information of at least one key point of the same object to be detected. The detection result of any key point can be an accurate detection or an incorrect detection.

[0105] Optionally, determining key point detection qualification information corresponding to the test sample image based on the detection offset distance of at least one key point in the test sample image includes: determining key point detection qualification information corresponding to the test sample image based on the detection offset distance of at least one key point in the test sample image and a preset threshold.

[0106] Specifically, the preset threshold value may be a pre-set data for measuring the qualified information of key point detection, for example, it may represent the actual pixel error. When the detection offset distance exceeds the preset threshold value, it indicates that the key point corresponding to the test sample image is detected incorrectly; when the detection offset distance is less than the preset threshold value, it indicates that the key point corresponding to the test sample image is accurately detected. Exemplarily, a key point in the test sample image is detected, and the preset threshold value is 0.5, and the preset threshold value of 0.5 represents an error of 1.5 pixels. The qualified information of key point detection corresponding to the test sample image may be the proportion of at least one key point in the test sample image that is accurately detected. Taking the test sample image including N key points as an example, the number of accurately detected key points M is determined, M≤N, which may be the qualified information M / N of key point detection corresponding to the test sample image.

[0107] Exemplarily, for the first key point detection model, the key point detection qualified information corresponding to the test sample image (here, it can be the average of the key point detection qualified information corresponding to multiple test sample images) can be 60%. For the second key point detection model, the key point detection qualified information corresponding to the test sample image can be 65%. By comparing the key point detection qualified information corresponding to the test sample image detected in different key point detection models, the key point detection model with the highest key point detection qualified information is determined as the target key point detection model.

[0108] In the above embodiment, there are multiple preset thresholds. By judging the detection result of the key point detection model through each preset threshold, key point detection qualified information can be obtained respectively, that is, key point detection qualified information corresponding to multiple preset thresholds respectively.

[0109] Specifically, there may be multiple preset thresholds. By calculating the key point detection qualified information corresponding to the test sample images under different preset thresholds, the multiple key point detection qualified information can be weighted and summed to obtain the target key point detection qualified information. Exemplarily, the test sample image is detected, and the preset thresholds are set to 0.1, 0.5 and 1 respectively. The preset threshold of 0.1 represents a 0.3 pixel error, the preset threshold of 0.5 represents a 1.5 pixel error, and the preset threshold of 1 represents a 3 pixel error. When the preset threshold is 0.1, the key point detection qualified information corresponding to the test sample image can be 30%; when the preset threshold is 0.5, the key point detection qualified information corresponding to the test sample image can be 60%; when the preset threshold is 1, the key point detection qualified information corresponding to the test sample image can be 90%. The key point detection qualified information corresponding to the test sample image determined based on each preset threshold is averaged (or weighted) and the target key point detection qualified information corresponding to the test sample image can be obtained as 60%.

[0110] For multiple key point detection models, judgments are made based on the above-mentioned multiple preset thresholds respectively to obtain the target key point detection qualified information corresponding to each key point detection model, and the target key point detection model is determined based on the target key point detection qualified information corresponding to multiple key point detection models. For example, the target key point detection model can be determined by the key point detection model corresponding to the maximum value in the target key point detection qualified information.

[0111] The technical solution of this embodiment is to obtain a sample data set including a training sample image of an object to be detected and initial key point information of the training sample image, detect the training sample image based on the key point detection model to be trained, obtain a predicted heat map corresponding to the training sample image, transform the initial key point information based on the image transformation relationship between the predicted heat map and the training sample image to obtain first intermediate key point information, round the first intermediate key point information to obtain second intermediate key point information, determine offset information based on neighborhood pixel point information of the second intermediate key point information, determine target key point information based on the offset information and the second intermediate key point information, and compare the second intermediate key point information with the two neighboring pixels in the first direction. domain pixel point information, obtain a first comparison result, determine the offset information in the first direction based on the first comparison result, compare the second intermediate key point information with the two neighboring pixel point information in the second direction, obtain a second comparison result, determine the offset information in the second direction based on the second comparison result, determine the target key point information based on the second intermediate key point information, the offset information in the first direction and the offset information in the second direction, generate key point label data based on the target key point information, generate a loss function based on the target key point label data and the predicted heat map, train the key point detection model to be trained with the reduction of the loss function as the training goal, obtain the trained key point detection model, and increase the robustness and efficiency of the key point detection model.

[0112] Embodiment 2

[0113] Figure 6 This is a flowchart of a key point detection method provided by the second embodiment of the present invention. The embodiment can be applied to the case of detecting key points of an object to be detected. The method can be executed by a key point detection device. The key point detection device can be implemented in the form of hardware and / or software. The key point detection device can be configured on a variety of terminal smart devices, such as computers. Figure 6 As shown, the method includes:

[0114] S210 , obtaining an X-ray image of the object to be detected, detecting the X-ray image of the object to be detected based on a pre-trained key point detection model, and obtaining a key point heat map corresponding to the object to be detected.

[0115] The key point detection model is trained based on the training method of the key point detection model in any embodiment of the present invention.

[0116] S220: Determine the key point detection result of the object to be detected based on the key point heat map.

[0117] In this embodiment, the key point detection result may be key point detection qualification information obtained by detecting the object to be detected, indicating whether the key points of the object to be detected are correctly detected.

[0118] Optionally, the method further includes: verifying the eligibility of the object to be detected based on the distances between different key points.

[0119] By calculating the distance between different key points and comparing the distance between different key points with the threshold, it is determined whether the object to be detected is qualified.

[0120] The technical solution of this embodiment obtains an X-ray image of the object to be detected, detects the X-ray image of the object to be detected based on a pre-trained key point detection model, obtains a key point heat map corresponding to the object to be detected, determines the key point detection result of the object to be detected based on the key point heat map, and verifies the qualification of the object to be detected based on the distance between different key points, thereby solving the problems of low efficiency and low accuracy of key point detection in traditional methods and improving the efficiency and accuracy of key point detection.

[0121] Embodiment 3

[0122] Figure 7 Schematic diagram of a training device for a key point detection model provided in Embodiment 3 of the present invention. Figure 7 As shown, the device comprises:

[0123] The sample data set acquisition module 310 is used to acquire a sample data set, wherein the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image;

[0124] The model acquisition module 320 is used to acquire the key point detection model to be trained, detect the training sample image based on the key point detection model to be trained, and obtain the prediction heat map corresponding to the training sample image, where the prediction heat map represents the prediction key point information of the object to be detected;

[0125] A target key point information acquisition module 330 is used to determine the target key point information matching the predicted heat map based on the attribute information of the predicted heat map and the initial key point information when the sizes of the predicted heat map and the training sample image are inconsistent;

[0126] A loss function acquisition module 340, used to generate key point label data based on target key point information, and to generate a loss function based on the target key point label data and the predicted heat map;

[0127] The model training module 350 is used to train the key point detection model to be trained with the reduction of the loss function as the training goal, so as to obtain a trained key point detection model.

[0128] On the basis of the above embodiment, optionally, the target key point information acquisition module 330 is further used to transform the initial key point information based on the image transformation relationship between the predicted heat map and the training sample image to obtain the target key point information.

[0129] Optionally, the target key point information acquisition module 330 is also used to transform the initial key point information based on the image transformation relationship between the predicted heat map and the training sample image to obtain the first intermediate key point information; round the first intermediate key point information to obtain the second intermediate key point information; determine the offset information based on the neighborhood pixel point information of the second intermediate key point information, and determine the target key point information based on the offset information and the second intermediate key point information.

[0130] Optionally, the target key point information acquisition module 330 is also used to compare the two neighboring pixel point information in the first direction of the second intermediate key point information to obtain a first comparison result, and determine the offset information in the first direction based on the first comparison result; compare the two neighboring pixel point information in the second direction of the second intermediate key point information to obtain a second comparison result, and determine the offset information in the second direction based on the second comparison result; determine the target key point information based on the second intermediate key point information, the offset information in the first direction, and the offset information in the second direction.

[0131] Optionally, the device also includes: a sample test set acquisition module, used to acquire a sample test set, multiple test sample images in the sample test set and initial key point information of each test sample image; a performance data acquisition module, used to perform key point detection processing on the test sample image based on the key point detection model for any key point detection model, obtain test key point information of the test sample image, and determine the performance data of the key point detection model based on the test key point information of the test sample image and the initial key point information of the test sample image; a model determination module, used to determine the target key point detection model based on the performance data corresponding to multiple key point detection models.

[0132] Optionally, the performance data acquisition module is also used to determine the detection offset distance of at least one key point in the test sample image based on the initial key point information and the test key point information corresponding to the test sample image; determine the key point detection qualification information corresponding to the test sample image based on the detection offset distance of at least one key point in the test sample image; and determine the performance data of the key point detection model based on the key point detection qualification information corresponding to multiple test sample images respectively.

[0133] Optionally, the performance data acquisition module is also used to determine the key point detection qualification information corresponding to the test sample image based on the detection offset distance of at least one key point in the test sample image and a preset threshold; wherein, there are multiple preset thresholds, and the key point detection qualification information includes the key point detection qualification information corresponding to the multiple preset thresholds respectively.

[0134] The training device for the key point detection model provided in the embodiment of the present invention can execute the training method for the key point detection model provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.

[0135] Embodiment 4

[0136] Figure 8 Schematic diagram of a key point detection device provided by Embodiment 4 of the present invention. Figure 8 As shown, the device comprises:

[0137] The key point heat map acquisition module 410 is used to acquire an X-ray image of the object to be detected, and detect the X-ray image of the object to be detected based on a pre-trained key point detection model to obtain a key point heat map corresponding to the object to be detected; wherein the key point detection model is trained based on the key point detection model training method of any embodiment of the present invention;

[0138] The key point detection result acquisition module 420 is used to determine the key point detection result of the object to be detected based on the key point heat map.

[0139] Optionally, the device further includes a qualification verification module for performing qualification verification on the object to be detected based on the distances between different key points.

[0140] The key point detection device provided in the embodiment of the present invention can execute the key point detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0141] Embodiment 5

[0142] Fig. 9 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0143] like Fig. 9 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0144] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0145] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the XX method.

[0146] In some embodiments, the training method of the key point detection model or the key point detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the XX method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the training method of the key point detection model or the key point detection method in any other appropriate manner (e.g., by means of firmware).

[0147] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0148] The computer programs for implementing the training method of the key point detection model or the key point detection method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0149] Embodiment 6

[0150] Embodiment 6 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a training method for a key point detection model, the method comprising:

[0151] A sample data set is obtained, wherein the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image; a key point detection model to be trained is obtained, and the training sample image is detected based on the key point detection model to be trained to obtain a predicted heat map corresponding to the training sample image, wherein the predicted heat map represents the predicted key point information of the object to be detected; when the sizes of the predicted heat map and the training sample image are inconsistent, target key point information matching the predicted heat map is determined based on the attribute information of the predicted heat map and the initial key point information; key point label data is generated based on the target key point information, and a loss function is generated based on the target key point label data and the predicted heat map; the key point detection model to be trained is trained with the reduction of the loss function as the training goal, and a trained key point detection model is obtained.

[0152] Alternatively, the computer instructions are used to cause a processor to perform a key point detection method, the method comprising:

[0153] Acquire an X-ray image of an object to be detected, detect the X-ray image of the object to be detected based on a pre-trained key point detection model, and obtain a key point heat map corresponding to the object to be detected; wherein the key point detection model is trained based on the training method of the key point detection model of any embodiment of the present invention; determine the key point detection result of the object to be detected based on the key point heat map.

[0154] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0155] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0156] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0157] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0158] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0159] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A training method for a key point detection model, characterized in that: include: Acquire a sample data set, wherein the sample data set includes a training sample image of an object to be detected and initial key point information of the training sample image; Acquire a key point detection model to be trained, detect the training sample image based on the key point detection model to be trained, and obtain a prediction heat map corresponding to the training sample image, wherein the prediction heat map represents the predicted key point information of the object to be detected; In the case where the sizes of the predicted heat map and the training sample image are inconsistent, determining target key point information matching the predicted heat map based on the attribute information of the predicted heat map and the initial key point information; Generate key point label data based on the target key point information, and generate a loss function based on the target key point label data and the predicted heat map; Taking reducing the loss function as a training goal, the key point detection model to be trained is trained to obtain a trained key point detection model.

2. The method according to claim 1, characterized in that The determining, based on the attribute information of the predicted heat map and the initial key point information, target key point information matching the predicted heat map includes: Based on the image transformation relationship determined based on the attribute information of the predicted heat map and the attribute information of the training sample image, the initial key point information is transformed based on the image transformation relationship to obtain the target key point information.

3. The method according to claim 2, characterized in that The initial key point information and the target key point information are key point pixel coordinate information respectively; The transforming process of the initial key point information based on the image transformation relationship between the predicted heat map and the training sample image to obtain the target key point information includes: The initial key point information is transformed based on the image transformation relationship between the predicted heat map and the training sample image to obtain first intermediate key point information; Rounding the first intermediate key point information to obtain second intermediate key point information; The offset information is determined based on the neighborhood pixel point information of the second intermediate key point information, and the target key point information is determined based on the offset information and the second intermediate key point information.

4. The method according to claim 3, characterized in that: The determining of the offset information based on the neighborhood pixel point information of the second intermediate key point information includes: Compare the second intermediate key point information with two neighboring pixel point information in the first direction to obtain a first comparison result, and determine the offset information in the first direction based on the first comparison result; Compare the two neighboring pixel point information in the second direction of the second intermediate key point information to obtain a second comparison result, and determine the offset information in the second direction based on the second comparison result; The target key point information is determined based on the second intermediate key point information, the offset information in the first direction, and the offset information in the second direction.

5. The method according to claim 1, characterized in that There are multiple sample data sets, and a key point detection model is obtained by training each sample data set; The method further comprises: Acquire a sample test set, a plurality of test sample images in the sample test set, and initial key point information of each of the test sample images; For any of the key point detection models, perform key point detection processing on the test sample image based on the key point detection model to obtain test key point information of the test sample image; determine performance data of the key point detection model based on the test key point information of the test sample image and the initial key point information of the test sample image; A target key point detection model is determined based on the performance data respectively corresponding to the plurality of key point detection models.

6. The method according to claim 5, characterized in that Each of the test sample images includes at least one key point of the object to be detected; the initial key point information is the initial key point information of the at least one key point; The test key point information is the test key point information of the at least one key point; The determining the performance data of the key point detection model based on the test key point information of the test sample image and the initial key point information of the test sample image includes: Determine a detection offset distance of the at least one key point in the test sample image based on the initial key point information corresponding to the test sample image and the test key point information; Determining key point detection qualification information corresponding to the test sample image based on the detection offset distance of the at least one key point in the test sample image; The performance data of the key point detection model is determined based on the key point detection qualification information respectively corresponding to a plurality of test sample images.

7. The method according to claim 6, characterized in that The determining key point detection qualification information corresponding to the test sample image based on the detection offset distance of the at least one key point in the test sample image includes: Determining key point detection qualification information corresponding to the test sample image based on the detection offset distance of the at least one key point in the test sample image and a preset threshold; There are multiple preset thresholds, and the key point detection qualified information includes key point detection qualified information corresponding to the multiple preset thresholds respectively.

8. A key point detection method, characterized in that: include: Acquire an X-ray image of an object to be detected, detect the X-ray image of the object to be detected based on a pre-trained key point detection model, and obtain a key point heat map corresponding to the object to be detected; wherein the key point detection model is trained based on the training method of the key point detection model described in any one of claims 1 to 7; The key point detection result of the object to be detected is determined based on the key point heat map.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the training method of the key point detection model described in any one of claims 1 to 7, or the key point detection method described in claim 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the training method of the key point detection model described in any one of claims 1 to 7, or the key point detection method described in claim 8 when executed.