A Method for Acquiring and Rapidly Labeling Training Data for Human Acupoint Location Based on Image Completion

By attaching digital markers to acupoints and using detection networks and image completion technology, the problems of inconsistent annotation and data diversity in the construction of human acupoint recognition datasets are solved. This enables fast and accurate acupoint location annotation and high-quality data generation, adapting to different postures and angles and reducing manual costs.

CN119723612BActive Publication Date: 2025-10-31GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411763972.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-10-31
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In existing technologies, the construction of human acupoint recognition datasets suffers from high inconsistency in labeling, is time-consuming and labor-intensive, and lacks data diversity and representativeness, which limits the generalization ability of artificial intelligence models. Furthermore, existing methods have limited accuracy in detecting small targets and have high computational complexity.

Method used

By attaching digital markers to acupoints, a detection network is used to identify acupoint locations, and high-quality acupoint localization training data is generated by combining image completion technology. This enables accurate and automated annotation to be completed with a single data acquisition, including the creation of a detection network, image completion, and marker removal.

Benefits of technology

It enables rapid and accurate acupoint location and labeling, builds diverse datasets, reduces labor costs, improves data quality and model generalization ability, adapts to different postures and angles, and facilitates data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723612B_ABST
    Figure CN119723612B_ABST
Patent Text Reader

Abstract

This invention discloses a method for acquiring and rapidly labeling training data for human acupoint localization based on image completion. By attaching markers to acupoint locations, a detection network is used to identify the acupoints and their locations represented by these markers, achieving accurate and automated acupoint localization. Using the coordinate information in the acupoint labels and the target detection bounding box, a marker localization image that completely covers the markers is generated, explicitly marking the marker regions in the image and removing these regions. An image completion algorithm is then used to complete the image after marker removal, reconstructing realistic and natural skin texture and performing edge smoothing to restore the image without digit markers. Finally, the acupoint coordinates and category labels obtained through rapid labeling are associated with the image without digit markers obtained through image completion to generate high-quality human acupoint localization training data. This method requires only one data acquisition, making it not only fast but also providing more accurate data labeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of deep learning technology and biomedical image processing, and in particular to a method for acquiring and rapidly annotating training data for human acupoint localization based on image completion. Background Technology

[0002] Acupoints in Traditional Chinese Medicine (TCM) are central to TCM treatments such as acupuncture and massage, possessing significant medical value and broad application prospects. With the modernization and digitalization of TCM, standardized acupoint datasets are crucial for research, education, and clinical applications. Constructing standardized and accurate acupoint data can promote the development of intelligent TCM diagnostic and treatment systems, enabling personalized treatment recommendations and improving the effectiveness and operability of TCM clinical practice. However, the construction of human acupoint recognition datasets currently faces multiple challenges. First, the labeling of acupoint locations highly relies on the experience of TCM practitioners, resulting in significant inconsistencies due to individual differences and subjective judgment. Second, traditional manual labeling is time-consuming and labor-intensive; a professional TCM practitioner needs approximately 6 minutes to label a single image containing 50 acupoints, and about 10 hours to label 100 images. Furthermore, current human acupoint recognition data lacks diversity and representativeness, failing to cover diverse populations of different genders, ages, and body types, as well as acupoint images from various postures and angles, thus limiting the generalization ability of artificial intelligence models. Therefore, there is an urgent need to utilize advanced artificial intelligence technologies, especially computer vision and deep learning, to provide technical support for the rapid and accurate production of high-quality acupoint data, paving the way for the intelligent development of TCM.

[0003] With the development of computer vision and artificial intelligence, more and more researchers are trying to apply deep learning technology to acupuncture point recognition and annotation to improve accuracy and efficiency, such as object detection (SSD, Faster R-CNN) and image segmentation (UNet, Mask R-CNN). However, these methods have limited accuracy for small object detection, long training time, and high computational complexity. In the existing technology, a patent (application number 2024113234665) discloses a method for acupuncture point annotation by detecting labeled acupuncture points using YOLO and then collecting a set of unlabeled acupuncture point images. However, the data accuracy of this method is easily affected by changes in the subject's body position and requires two data collection sessions, which is time-consuming. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a method for collecting and rapidly labeling training data for human acupoint localization based on image completion. By pasting markers at acupoint locations, a detection network is used to identify the acupoints and their locations represented by these markers, achieving accurate and automated acupoint localization. In addition, image completion technology is used to directly repair the acupoint images with markers, obtaining realistic acupoint images without markers, thereby generating high-quality training data for human acupoint localization. This method only requires one data collection, which is not only fast but also provides more accurate data labeling.

[0005] To achieve the above objectives, the technical solution provided by this invention is as follows:

[0006] A method for acquiring and rapidly annotating training data for human acupoint localization based on image completion includes:

[0007] The subjects removed their clothing according to the instructions of the traditional Chinese medicine practitioners to fully expose the acupoints. The professional practitioners then accurately affixed numbered markers to the acupoints, with each number corresponding to a specific acupoint category and the center of the marker coinciding with the acupoint location.

[0008] Image data was acquired using a multi-angle sampling method to obtain images of human body parts with digital markers affixed;

[0009] A detection network is created and trained using images with digital markers. The trained detection network is then used to quickly and automatically annotate the images with digital markers to obtain accurate acupoint coordinates and category labels, including the coordinates of the marker center point and the category label of the corresponding acupoint.

[0010] The acupoint coordinates and category labels generated by the detection network, along with the corresponding images with digital markers, are input into the marker localization module. Using the center point coordinates of the markers in the acupoint labels and the length and width of the target bounding box, a marker localization image that can completely occlude the markers is generated, thereby explicitly marking the marker regions in the image and removing these regions.

[0011] The image with the markers removed is input into an image completion algorithm to complete it and reconstruct a realistic and natural skin texture.

[0012] The image after completion is optimized by using the completion region edge smoothing method, which makes the edges of the completed texture in the marker region smoother and the image more realistic, thereby restoring the human acupoint image without digital markers;

[0013] The acupoint coordinates and category labels generated by the association detection network and the image without digit circular markers generated by the image completion algorithm are used to obtain training data for locating human acupoints with precise labels.

[0014] Furthermore, a detection network is created and trained using acquired images with digitally labeled objects, including:

[0015] Create a detection network;

[0016] A small number of samples were randomly selected from the collected images with digital markers as the training set for the detection network to recognize the markers, and the coordinate positions of the markers and their corresponding acupoint categories were marked on the training set.

[0017] The detection network is trained using a labeled marker recognition training set. By training on markers with obvious detection features, the network can quickly learn how to locate the center point coordinates of the markers and accurately identify the numbers on the markers to label the corresponding acupoints.

[0018] Furthermore, the detection network created is the YOLO detection network, which is based on the YOLOv5 network model and consists of three parts: Backbone, Neck, and Head.

[0019] in,

[0020] Backbone uses deep learning modules and mechanisms to achieve deep learning and representation of image features through layer-by-layer feature extraction and multi-scale feature fusion;

[0021] The Neck employs an FPN+PAN structure; FPN uses a top-down architecture with lateral connections to construct high-level semantic feature maps at all scales; PAN adds bottom-up routes to supplement and enhance localization information.

[0022] The main part of the Head consists of three Detect detectors, which use grid-based anchors to perform target detection on feature maps at different scales.

[0023] The loss function of the YOLOv5 network model consists of three types of loss: confidence loss L... obj Classification loss L class and the predicted box position loss L box As shown in equation (1):

[0024] L Total =L obj +L class +L box (1)

[0025] Confidence loss L obj As shown in equation (2); where, S 2 The image is divided into an S×S grid, c is the confidence score derived by the model, and a is the a-th predicted bounding box in a certain grid. Let represent the probability that the target exists at position i, j, and . On the contrary, λ n and λ o These are the confidence loss coefficients for no target and with a target, respectively.

[0026]

[0027] Classification loss L class As shown in equation (3); N represents the total number of categories, x i y is the predicted value for the current category. i This represents the probability of the current class after the activation function. This is the true value for the current category;

[0028]

[0029] Predicted box location loss function L box As shown in equation (4), CIoU is used for calculation, taking into account the overlap area, center point distance, and aspect ratio; CIoU is shown in equation (5), where IoU is the intersection-union ratio of the predicted box and the ground truth box, and C and c gt The center points of the predicted and ground truth boxes are ρ and d, respectively. ρ is the Euclidean distance between the two center points, and d is the diagonal distance of the smallest closure region that can simultaneously contain both boxes. A penalty factor αv is added to CIoU, as shown in equations (6, 7), where w, h, and w gt h gt These are the position parameters for the predicted and ground truth bounding boxes;

[0030] L box =1-CIoU (4)

[0031]

[0032] Furthermore, the detection network identifies acupoint categories by recognizing numbers on markers and marks the coordinates of acupoints by detecting the center point of the markers.

[0033] Furthermore, the markers with numbers are circular number markers;

[0034] The marker localization module uses the acupoint coordinates and category labels obtained by the detection network to accurately locate the circular digital markers in the image. It calculates the center and radius of the marker area using the coordinates and bounding boxes provided by the acupoint labels, generates a binary marker localization image that can completely cover the marker, and then uses the marker localization image to remove the marker area from the original image.

[0035] Furthermore, the optimization of the completed image using the edge smoothing method of the completed region includes:

[0036] Let the size of the completed image φ(x,y) be m×n, and the completed region φ rec The size of (x,y) is a×b, and other background regions φ back (x,y) is divided into eight parts, namely φ back1 (x,y)~φ back8 (x,y);

[0037] First, construct two matrices J and K:

[0038]

[0039] Matrix J and K are divided into column matrices [J1J2J3] and row matrices [K1K2K3], respectively. T Columns J1, J2, and J3 correspond to φ back1 ,φ back2 and φ back3 The row matrix, rows K1, K2, K3 correspond to φ back1 ,φ back4 and φ back6 Column matrix;

[0040] Therefore, the gradient of φ(x,y) in the x-direction is expressed as:

[0041]

[0042] The gradient of v(x,y) in the y-direction is expressed as:

[0043]

[0044] Among them, H in formulas (9) and (10) rec and Q rec Details are as follows:

[0045]

[0046] Next, calculate the sum of the gradients of φ(x,y) in the x and y directions:

[0047] TV[φ(x,y)] 2 =Tr[[Jφ(x,y)] T [Jφ(x,y)]]+Tr[[φ(x,y)K][φ(x,y)K] T ], (12)

[0048] Then, by completing the region φ rec Solving the minimization problem in formula (13) by taking the derivative of (x,y) as 0, as shown below:

[0049]

[0050] Formula (13) can be rewritten using formulas (8) to (12) as follows:

[0051]

[0052] make Solving the matrix equation yields φ. rec (x,y);

[0053] Finally, using φ rec (x,y) replaces the edges of the completed region generated by the image completion algorithm, thus obtaining the smooth edges of the completed region.

[0054] Compared with existing technologies, the principles and advantages of this technical solution are as follows:

[0055] 1. Fast annotation speed: This invention uses a deep learning detection network for data annotation, which greatly reduces the manpower and time required for traditional manual annotation.

[0056] 2. High labeling accuracy: Automatic labeling via detection network reduces subjective errors caused by manual labeling, ensuring consistency and accuracy in labeling each acupoint location.

[0057] 3. High data diversity: This process can be repeated on subjects of different genders, ages and body types, thereby building a more representative and diverse dataset.

[0058] 4. High adaptability: The method is applicable to acupoint annotation under different human postures, body shapes and angles, with strong adaptability and generalization ability, and can cover diverse data scenarios.

[0059] 5. Unified standardization: By using digital markers to correspond to the names of acupoints, the standardization of data is ensured, which facilitates the comparison and integration of different data.

[0060] 6. High degree of automation: The detection network generates acupoint coordinates and category labels, which greatly reduces manual intervention and improves the efficiency of data collection.

[0061] 7. Reduce annotation costs: Compared to methods that rely entirely on manual annotation by professionals, this semi-automated annotation method can significantly reduce time and labor costs.

[0062] 8. Improve data quality: After removing markers using image completion, the image quality is closer to the natural state, which helps the model learn more realistic acupoint features and improves the model's performance in practical applications.

[0063] 9. Facilitates data management and updates: The use of markers and digital management make data easy to expand and update, enabling the rapid addition of new samples and annotation information, thus improving the flexibility of data management. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the services required in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 This is a flowchart illustrating the principle of the image completion-based method for training data acquisition and rapid annotation of human acupoints.

[0066] Figure 2 This is a schematic diagram of the method for collecting and rapidly annotating training data for human acupoint localization based on image completion according to the present invention;

[0067] Figure 3 This is a schematic diagram of the structure of a multi-angle image acquisition mobile platform (A1 is a display showing the acquired image with digital graphic markers, B1 is the target object being acquired, C1 is a depth camera, and D1 is an industrial robotic arm).

[0068] Figure 4 This is a flowchart illustrating the process of labeling acupoints using the YOLO detection network.

[0069] Figure 5 This paper presents a marker removal and completion method based on the Large Mark Inpainting (LaMa) image completion algorithm. Detailed Implementation

[0070] The present invention will be further described below with reference to specific embodiments:

[0071] like Figure 1 As shown in this embodiment, the method for acquiring and rapidly annotating training data for human acupoint localization based on image completion includes the following steps:

[0072] S1: The subject removes clothing according to the instructions of a traditional Chinese medicine practitioner to fully expose the acupoints. A professional practitioner accurately affixes numbered markers (such as ①, ②, etc.) to the acupoints. The numbers must correspond one-to-one with the acupoint category (e.g., ① represents Hegu acupoint, ② represents Yemen acupoint), and the center point of the marker must also coincide with the acupoint.

[0073] S1-1: To address the challenges of the numerous types of acupoints, their varying locations, and the difficulty of traditional Chinese medicine (TCM) image annotation, a "digital acupoint annotation method" was designed. This method uses markers bearing numerical labels to represent acupoints. Each number corresponds to a specific acupoint, and the center point of the marker corresponds to the acupoint location (assuming there are K acupoints, the numbers are 1, 2, ..., K). This method allows TCM practitioners to place markers on acupoints, which are then annotated onto the image using annotation software. This approach, replacing direct image annotation by TCM practitioners, allows for more intuitive and accurate acupoint location annotation. Furthermore, detection networks (such as YOLO) can be used to identify these markers, thereby recognizing the corresponding acupoint locations and categories, enabling rapid acupoint image annotation.

[0074] S1-2: As Figure 2 As shown, this embodiment uses the YOLO detection network to locate and identify acupoints by leveraging the numerical values ​​of markers and their center point coordinates. It then uses the marker coordinates obtained from YOLO and the detection bounding boxes to generate a marker location image for locating and removing markers. Finally, the Large Mark Inpainting (LaMa) image completion algorithm is used to restore realistic and natural skin texture. Finally, the acupoint coordinates and category labels generated by the detection network are correlated with the image files generated by the image completion algorithm to obtain labeled human acupoint location training data.

[0075] S2: This embodiment designs a mobile platform for automatic image data acquisition, including components such as an industrial robotic arm and a depth camera. The robotic arm moves along a preset trajectory. During this movement, the depth camera on the robotic arm takes a fixed-point photograph at each step, capturing multi-view images of the object with attached markers. The subject must maintain their position during the device's operation to ensure the quality of the acquired images. This multi-view image acquisition method yields images with digital markers.

[0076] S2-1: As Figure 3 As shown, in order to collect diverse data and high-quality images, this embodiment designs a mobile platform, which includes components such as an industrial robotic arm and a depth camera. The depth camera is fixed on the robotic arm, and the robotic arm drives the depth camera to collect images of human acupoints.

[0077] S2-2: This embodiment plans the motion path of the robotic arm on the mobile platform, and designs a set of grid-like stopping points to evenly cover the area above the acupoint collector. During acupoint collection, the robotic arm traverses each stopping point according to the preset path, and collects a human acupoint image at each stopping point. In this way, randomized human acupoint image data with markers are collected at different heights and angles.

[0078] S3: Randomly select a small number of samples from the collected image set as the training set for the detection network to recognize the markers. Use Labellme annotation software to annotate the coordinates (acupoints) of the markers and their corresponding acupoint categories on the training set.

[0079] S4: In this embodiment, the YOLO detection network is trained using a labeled marker recognition training set. By training with markers that have obvious detection features, the YOLO deep learning object detection network can quickly learn how to locate the center coordinates (acupoints) of the markers, and accurately identify the numbers on the markers and label the corresponding acupoint categories.

[0080] S4-1: Input the small set of images with digital markers labeled in S3 into the YOLO detection network, enabling it to learn rapid recognition and localization of digital markers. Since the automatic sampling device captures acupoint images from multiple angles, the scale of the markers varies in images from different perspectives. YOLO's multi-scale accurate detection characteristics and the model's fast detection speed perfectly match the design requirements of this invention.

[0081] S4-2: The YOLO detection network is based on the YOLOv5 network model, a real-time single-stage object detection algorithm with advantages such as high detection accuracy and fast processing speed. Its maximum image detection speed can reach 140 frames per second, greatly satisfying the demand for fast and high-precision image detection. For example... Figure 4 As shown, the YOLOv5 network is mainly divided into three parts: Backbone, Neck, and Head.

[0082] YOLOv5's Backbone utilizes a series of efficient deep learning modules and mechanisms to achieve deep learning and representation of image features through layer-by-layer feature extraction and multi-scale feature fusion. The C3 structure, in particular, reduces computational redundancy while maintaining feature diversity and model lightweightness, enabling Backbone to strike a balance between accuracy and efficiency, providing a robust feature foundation for object detection tasks.

[0083] Neck employs an FPN+PAN structure. FPN uses a top-down architecture with lateral connections to construct high-level semantic feature maps at all scales, a classic feature pyramid structure. However, because FPN involves multiple layers of networks, the target information at the lower levels becomes blurred. PAN adds a bottom-up approach to compensate for and enhance this localization information.

[0084] The main part of the Head consists of three Detect detectors, which are the process of detecting objects using grid-based anchors on feature maps of different scales. When the input is 640×640, the feature maps at the three scales are 80×80, 40×40, and 20×20, respectively.

[0085] S4-3: The loss function of YOLOv5 consists of three types of loss: confidence loss L... obj Classification loss L class and the predicted box position loss L box As shown in equation (1):

[0086] L Total =L obj +L class +L box (1)

[0087] Confidence loss L obj As shown in equation (2); where, S 2 The image is divided into an S×S grid, c is the confidence score derived by the model, and a is the a-th predicted bounding box in a certain grid. Let represent the probability that the target exists at position i, j, and . On the contrary, λ n and λ o These are the confidence loss coefficients for no target and with a target, respectively.

[0088]

[0089] Classification loss L class As shown in equation (3). N represents the total number of categories, x i y is the predicted value for the current category. i This represents the probability of the current class after the activation function. This is the true value for the current category.

[0090]

[0091] Predicted box location loss function L box As shown in Equation (4), CIoU (Complete-IoU Loss) is used to calculate the loss, taking into account the overlap area, center distance, and aspect ratio—three important geometric factors in the target box regression loss. CIoU is shown in Equation (5), where IoU is the intersection-union ratio of the predicted box and the ground truth box, and C and c gt The center points of the predicted and ground truth boxes are ρ and d, respectively. ρ is the Euclidean distance between the two center points, and d is the diagonal distance of the smallest closure region that can simultaneously contain both boxes. A penalty factor αv is added to CIoU, as shown in equations (6, 7), where w, h, and w gt hgt These are the position parameters for the predicted and ground truth bounding boxes;

[0092] L box =1-CIoU (4)

[0093]

[0094] S5: The trained YOLO detection network quickly and automatically labels the remaining large number of images with digital markers to obtain accurate acupoint coordinates and category labels, including the coordinates of the marker center point (the location of the acupoint) and the category label of the corresponding acupoint.

[0095] S5-1: This embodiment uses the YOLO detection network combined with the "digital marker acupoint labeling method" to label acupoints by recognizing the numbers on the markers and to mark the coordinates of the acupoints by detecting the center point of the markers.

[0096] S6: This embodiment utilizes a marker localization module to assist in the marker removal process. The coordinates of acupoints and their category labels generated by the detection network, along with the corresponding images containing numerical markers, need to be input into the marker localization module. Using the coordinates of the marker's center point in the acupoint label and the length and width of the target bounding box, a marker localization image that completely occludes the marker is generated. This explicitly marks the marker regions in the image, and these marker regions are then removed.

[0097] S6-1: The marker localization module, using the acupoint coordinates and category labels obtained from the YOLO detection network, can accurately locate circular digital markers in the image. It calculates the center and radius of the marker region using the coordinates and bounding boxes provided by the acupoint labels, generating a binary marker localization image that completely covers the marker. The marker region in the original image is then removed using the marker localization image.

[0098] S7: This embodiment uses the Large Mark Inpainting (LaMa) image completion algorithm to complete the image by removing marker occlusion. The image after removing the marker is input into the LaMa image completion algorithm to reconstruct a realistic and natural skin texture;

[0099] S7-1: As Figure 5 As shown, this invention inputs the image after removing the markers into an image completion algorithm. The deep learning image completion algorithm can generate realistic and natural skin textures on the markers. By automatically removing markers through the image completion algorithm, the errors and tedious operations caused by manually removing labels and resampling are effectively avoided.

[0100] S7-2: LaMa uses an improved U-Net architecture to effectively extract local and global features from images. By combining downsampling and upsampling paths, the model can gradually learn information from local to global perspectives. The LaMa network structure can be divided into three main parts: an encoder, a Fast Fourier Residual Block (FFT) block, and a decoder. Introducing Fourier transform into traditional convolutional layers enables the model to capture a wider range of frequency features, especially long-range dependencies. Therefore, in the LaMa network, Fourier convolutional layers help the model learn the global structure of the image faster, which contributes to faster convergence.

[0101] S7-3: To better handle occluded regions, LaMa uses a composite loss function that combines perceptual loss, adversarial loss, and Fourier loss.

[0102] Among them, perceptual loss is based on deep features extracted from pre-trained convolutional neural networks (such as VGG networks). It is used to measure the difference between the generated image and the original image in high-level semantic features, which can help the model generate more natural restoration results and effectively improve the visual quality of the restored area.

[0103] Adversarial loss introduces the idea of ​​Generative Adversarial Networks (GANs), using a discriminator to evaluate the realism of the restored image. The generator optimizes by learning to deceive the discriminator, thus improving the naturalness of the generated image.

[0104] Fourier loss utilizes the Fourier transform to calculate the difference between high-frequency and low-frequency components, promoting natural transitions and fine textures in the frequency domain. The introduction of Fourier loss helps LaMa maintain a balance between global structure and local detail, thereby accelerating convergence.

[0105] The composite loss function that combines these three types of losses can not only preserve the structural information and high-frequency details of the image, but also improve the visual quality of the restoration result.

[0106] S8: The image after completion is optimized by using the completion region edge smoothing method, which makes the edges of the completed texture in the marker region smoother and the image more realistic, thereby restoring the human acupoint image without digital markers;

[0107] Optimizing the completed image using edge smoothing methods for the completed region includes:

[0108] Let the size of the completed image φ(x,y) be m×n, and the completed region φ rec The size of (x,y) is a×b, and other background regions φ back (x,y) is divided into eight parts, namely φ back1(x,y)~φ back8 (x,y);

[0109] First, construct two matrices J and K:

[0110]

[0111] Matrix J and K are divided into column matrices [J1J2J3] and row matrices [K1K2K3], respectively. T Columns J1, J2, and J3 correspond to φ back1 ,φ back2 and φ back3 The row matrix, rows K1, K2, K3 correspond to φ back1 ,φ back4 and φ back6 Column matrix;

[0112] Therefore, the gradient of φ(x,y) in the x-direction is expressed as:

[0113]

[0114] The gradient of φ(x,y) in the y-direction is expressed as:

[0115]

[0116] Among them, H in formulas (9) and (10) rec and Q rec Details are as follows:

[0117]

[0118] Next, calculate the sum of the gradients of φ(x,y) in the x and y directions:

[0119] TV[φ(x,y)] 2 =Tr[[Jφ(x,y)] T [Jφ(x,y)]]+Tr[[φ(x,y)K][φ(x,y)K] T ], (12)

[0120] Then, by completing the region φ rec Solving the minimization problem in formula (13) by taking the derivative of (x,y) as 0, as shown below:

[0121]

[0122] Formula (13) can be rewritten using formulas (8) to (12) as follows:

[0123]

[0124] make Solving the matrix equation yields φ. rec (x,y);

[0125] Finally, using φ rec (x,y) replaces the edges of the completed region generated by the image completion algorithm, thus obtaining the smooth edges of the completed region.

[0126] S9: By associating the coordinates and category labels of acupoints with markers generated by the YOLO detection network with the image without digit markers generated by the LaMa image completion algorithm, we obtain training data for locating human acupoints with precise labels.

[0127] The only difference between images with digital markers obtained directly from image data acquisition and images without digital markers generated by the LaMa image completion algorithm is the presence or absence of markers. Therefore, theoretically, their corresponding label categories and coordinates are consistent, meaning the acupoint labels for the two types of images are identical. Thus, by associating acupoint locations and category labels with the unmarked image files, we can obtain precisely labeled training data for locating human acupoints.

[0128] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Therefore, any changes made in accordance with the shape and principle of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for acquiring and rapidly annotating training data for human acupoint localization based on image completion, characterized in that, include: The subjects removed their clothing according to the instructions of the traditional Chinese medicine practitioners to fully expose the acupoints. The professional practitioners then accurately affixed numbered markers to the acupoints, with each number corresponding to a specific acupoint category and the center of the marker coinciding with the acupoint location. Image data was acquired using a multi-angle sampling method to obtain images of human body parts with digital markers affixed; A detection network is created and trained using images with digital markers. The trained detection network is then used to quickly and automatically annotate the images with digital markers to obtain accurate acupoint coordinates and category labels, including the coordinates of the marker center point and the category label of the corresponding acupoint. The acupoint coordinates and category labels generated by the detection network, along with the corresponding images with digital markers, are input into the marker localization module. Using the center point coordinates of the markers in the acupoint labels and the length and width of the target bounding box, a marker localization image that can completely occlude the markers is generated, thereby explicitly marking the marker regions in the image and removing these regions. The image with the markers removed is input into an image completion algorithm to complete it and reconstruct a realistic and natural skin texture. The image after completion is optimized by using the completion region edge smoothing method, which makes the edges of the completed texture in the marker region smoother and the image more realistic, thereby restoring the human acupoint image without digital markers; The acupoint coordinates and category labels generated by the association detection network and the image without digit circular markers generated by the image completion algorithm are used to obtain training data for locating human acupoints with precise labels.

2. The method for acquiring and rapidly annotating training data for human acupoint localization based on image completion according to claim 1, characterized in that, Create a detection network and train it using acquired images with digital tags, including: Create a detection network; A small number of samples were randomly selected from the collected images with digital markers as the training set for the detection network to recognize the markers, and the coordinate positions of the markers and their corresponding acupoint categories were marked on the training set. The detection network is trained using a labeled marker recognition training set. By training on markers with obvious detection features, the network can quickly learn how to locate the center point coordinates of the markers and accurately identify the numbers on the markers to label the corresponding acupoints.

3. The method for acquiring and rapidly annotating training data for human acupoint localization based on image completion according to claim 1, characterized in that, The detection network created is the YOLO detection network, which is based on the YOLOv5 network model and consists of three parts: Backbone, Neck, and Head. in, Backbone uses deep learning modules and mechanisms to achieve deep learning and representation of image features through layer-by-layer feature extraction and multi-scale feature fusion; The Neck employs an FPN+PAN structure; FPN uses a top-down architecture with lateral connections to construct high-level semantic feature maps at all scales; PAN adds bottom-up routes to supplement and enhance localization information. The main part of the Head consists of three Detect detectors, which use grid-based anchors to perform target detection on feature maps at different scales. The loss function of the YOLOv5 network model consists of three types of loss: confidence loss L... obj Classification loss L class and the predicted box position loss L box As shown in equation (1): L Total L obj +L class +L box (1) Confidence loss L obj As shown in equation (2); where, S 2 This indicates that the image is divided into an S×S grid. Let 'a' be the confidence score derived from the model, and 'a' be the a-th predicted bounding box in a given grid. Let represent the probability that the target exists at position i, j, and . On the contrary, λ noobj and λ obj These are the confidence loss coefficients for no target and with a target, respectively. Classification loss L class As shown in equation (3); N represents the total number of categories, y i This represents the probability of the current class after the activation function. This is the true value for the current category; Predicted box location loss function L box As shown in equation (4), CIoU is used for calculation, taking into account the overlap area, center point distance, and aspect ratio; CIoU is shown in equation (5), where IoU is the intersection-union ratio of the predicted box and the ground truth box, and C and c gt The center points of the predicted and ground truth boxes are ρ and d, respectively. ρ is the Euclidean distance between the two center points, and d is the diagonal distance of the smallest closure region that can simultaneously contain both boxes. A penalty factor αv is added to CIoU, as shown in equations (6, 7), where w, h, and w gt h gt These are the position parameters for the predicted and ground truth bounding boxes; L box =1-CIoU (4) 4. The method for collecting and rapidly labeling training data for human acupoint location based on image completion as described in claim 1, wherein the detection network labels the acupoint category by recognizing the numbers on the markers and labels the coordinate position of the acupoint by detecting the center point of the markers.

5. The method for acquiring and rapidly annotating training data for human acupoint localization based on image completion according to claim 1, characterized in that, The markers with numbers are circular. The marker localization module uses the acupoint coordinates and category labels obtained by the detection network to accurately locate the circular digital markers in the image. It calculates the center and radius of the marker area using the coordinates and bounding boxes provided by the acupoint labels, generates a binary marker localization image that can completely cover the marker, and then uses the marker localization image to remove the marker area from the original image.

6. The method for acquiring and rapidly annotating training data for human acupoint localization based on image completion according to claim 1, characterized in that, Optimizing the completed image using edge smoothing methods for the completed region includes: Let the size of the completed image φ(x,y) be m×n, and the completed region φ rec The size of (x,y) is a×b, and other background regions φ back (x,y) is divided into eight parts, namely First, construct two matrices J and K: Matrix J and K are divided into column matrices [J1J2J3] and row matrices [K1K2K3], respectively. T , where columns J1, J2 and J3 correspond to φ back1 ,φ back2 and φ back3 The row matrix, rows K1, K2 and K3 correspond to φ back1 ,φ back4 and φ back6 The column matrix; therefore, the gradient of φ(x,y) in the x-direction is expressed as: The gradient in the y-direction is represented as: Among them, H in formulas (9) and (10) rec and Q rec Details are as follows: Next, calculate the sum of the gradients of Φ(x,y) in the x and y directions: TV[φ(x,y)] 2 =Tr[[Jφ(x,y)] T [Jφ(x,y)]]+Tr[[φ(x,y)K][φ(x,y)K] T ], (12) Then, by adjusting φ rec Solving the minimization problem in formula (13) by taking the derivative of (x,y) as 0, as shown below: Formula (13) can be rewritten using formulas (8) to (12) as follows: make Solving the matrix equation yields φ. rec (x,y); Finally, using φ rec (x,y) replaces the edges of the completed region generated by the image completion algorithm, thus obtaining the smooth edges of the completed region.

Citation Information

Patent Citations

  • Human body acupoint recognition, positioning and application system based on computer vision technology

    CN112184705A

  • Massaging robot acupoint detecting and positioning method based on YOLO

    CN114022554A