Automatic measurement method and device based on anatomical region adaptive completion
By constructing an automatic measurement method with adaptive completion of anatomical regions, using neural networks to identify and sort anatomical regions, and combining key point verification, the problem of measurement failure caused by abnormal identification of anatomical regions is solved, and the measurement process is made more fault-tolerant and the results are more reliable.
Patent Information
- Application Number
- CN202611102108.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-27
AI Technical Summary
Existing automated measurement methods often fail to measure lower limb alignment due to abnormal identification of anatomical regions. This is especially true in cases involving joint replacement prostheses, internal fixation devices for fractures, unclosed epiphyses in children, severe deformities, insufficient exposure, or image quality issues. These problems prevent accurate identification of key anatomical regions and affect the accuracy and completeness of the measurement results.
By constructing an automatic measurement method for adaptive completion of anatomical regions, a neural network is used to identify candidate regions and confidence levels for multiple parts, sort them according to anatomical structural relationships, and complete the measurement using adjacent reliable reference regions. Combined with key point verification, the continuity and accuracy of the measurement are ensured.
It achieves process fault tolerance and result reliability when identifying anomalies in anatomical regions, avoids overall measurement interruption caused by abnormal location of some areas, and ensures the accuracy and completeness of measurement results.
Smart Images

Figure CN123181535A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing, and more specifically, to an automatic measurement method and apparatus based on adaptive completion of anatomical regions. Background Technology
[0002] This section is intended to provide background or context for the content set forth in the claims or specification, and the content described herein is not acknowledged as prior art simply because it is included in this section.
[0003] Lower limb alignment is an important assessment indicator in orthopedic clinical diagnosis and treatment. Through full lower limb weight-bearing X-rays, doctors can assess the mechanical axis relationship between the hip, knee and ankle joints and calculate parameters such as HKA, MAD, mLDFA, mMPTA and JLCA. These parameters are used for knee osteoarthritis, genu varum or genu valgum deformities, preoperative planning for joint replacement surgery, postoperative evaluation of fractures, and follow-up of developmental diseases in children.
[0004] Traditional lower limb alignment measurements typically require doctors to manually mark multiple anatomical points, such as the femoral head center, knee joint center, ankle joint center, femoral condyle, tibial plateau, and bony landmarks, before drawing mechanical axes, anatomical axes, and joint lines. This process is time-consuming, and the measurement results are easily affected by the doctor's experience and image quality.
[0005] In recent years, deep learning technology has been used for region localization, bone segmentation, key point detection, and parameter calculation in whole lower limb X-rays. A common automated measurement process typically includes: first, locating local areas such as the hip, knee, and ankle; then, detecting key points; and finally, calculating the lower limb force line parameters.
[0006] However, most existing automated measurement methods assume that each anatomical region can be correctly identified by the model. In real clinical imaging, due to factors such as joint replacement prostheses, internal fixation devices for fractures, unclosed epiphyses in children, severe deformities, underexposure or overexposure, biased shooting position, image boundary truncation, local occlusion, or metal artifacts, a key anatomical region may be missed, misdetected, detected with low confidence, or have abnormal position or scale, thus affecting the measurement of lower limb force lines.
[0007] Similarly, similar problems exist in situations such as upper limb alignment, spinal parameter measurement, and spinal-pelvic measurement.
[0008] There is currently no effective solution to the above problems. Summary of the Invention
[0009] This application provides an automatic measurement method and apparatus based on adaptive completion of anatomical regions, which at least solves the technical problem in related technologies that subsequent measurements fail due to abnormal identification of the location of the body part.
[0010] According to one aspect of the embodiments of this application, an automatic measurement method based on anatomical region adaptive completion is provided, comprising: acquiring the recognition results of a neural network on multiple parts in a target image, the recognition results including candidate regions, location, and type confidence of each part; sorting the candidate regions in the recognition results into a region sequence according to the anatomical structural relationship between the multiple parts; if a target part with an abnormality is determined based on the region sequence, obtaining the completion region of the target part based on a reliable reference region adjacent to the target part in the region sequence; and performing subsequent measurements if the location region of the target part passes the key point verification of the target part, wherein the location region includes the completion region.
[0011] According to another aspect of the embodiments of this application, an automatic measurement device based on anatomical region adaptive completion is also provided, comprising: an acquisition unit, configured to acquire the recognition results of a neural network on multiple parts in a target image, the recognition results including candidate regions, location, and type confidence of each part; a sorting unit, configured to sort the candidate regions in the recognition results into a region sequence according to the anatomical structural relationship between the multiple parts; a completion unit, configured to obtain the completion region of the target part based on a reliable reference region adjacent to the target part in the region sequence when a target part with an abnormality is determined according to the region sequence; and a measurement unit, configured to perform subsequent measurements when the location region of the target part passes the key point verification of the target part, the location region including the completion region.
[0012] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the storage medium including a stored program that executes the above-described method when the program is run.
[0013] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the above-described method through the computer program.
[0014] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the embodiments of the methods described above.
[0015] In this embodiment, the recognition results of multiple parts in the target image by the neural network are obtained. The recognition results include the candidate region, location and type confidence of each part. According to the anatomical relationship between the multiple parts, the candidate regions in the recognition results are sorted into a region sequence. If the target part with an abnormality is determined according to the region sequence, the completion region of the target part is obtained according to the reliable reference region adjacent to the target part in the region sequence. If the location region of the target part passes the key point verification of the target part, subsequent measurements are performed. The location region includes the completion region. This solution constructs a complete processing chain distinct from related technologies. In this chain, the anatomical order integrates the originally discrete candidate regions into a structural whole with internal spatial constraints, providing a structural foundation for anomaly identification and completion inference. Completion based on adjacent reliable regions does not terminate the process upon anomaly detection; instead, it utilizes the spatial continuity and scale correlation of the anatomical structure to recover candidate regions for the anomaly, allowing the process to continue. Keypoint verification, as a necessary gate before the completion result enters the measurement, requires that the completed region must actually detect key points of the target region before being included in the final measurement. This avoids interruption of the overall process due to anomalies in the location of some regions and eliminates the risk of invalid completed regions being included in the measurement, resulting in false results. The synergistic effect of the completion mechanism and secondary verification enables the overall technical solution to simultaneously achieve both process fault tolerance and result reliability, thereby solving the technical problem in related technologies where subsequent measurements fail due to anomalies in the identification of the region where the part is located. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of an automatic measurement method based on adaptive completion of anatomical regions according to an embodiment of this application; Figure 2 This is a schematic diagram of an adaptive completion scheme for the lower limb anatomical region according to an embodiment of this application; Figure 3 This is a schematic diagram of an adaptive completion scheme for the lower limb anatomical region according to an embodiment of this application; Figure 4 This is a schematic diagram of the adaptive completion mechanism for the lower limb anatomical region according to an embodiment of this application; Figure 5 This is a schematic diagram of the interpolation and completion scheme for the intermediate region of the femoral region that was missed according to an embodiment of this application; Figure 6 This is a schematic diagram of a parameter calculation scheme according to an embodiment of this application; Figure 7 This is a schematic diagram of an automatic measurement device based on adaptive completion of anatomical regions according to an embodiment of this application; Figure 8 This is a structural block diagram of a terminal according to an embodiment of this application. Detailed Implementation
[0017] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] In related technologies, during the detection of lower limb force lines, if the detection of any region among the hip, femur, knee, tibia, or ankle joints fails, subsequent key point detection, femoral / tibial anatomical axis fitting, and calculation of 18 force line parameters may not be able to continue, resulting in the system being unable to output complete results or requiring manual intervention by a doctor. Similarly, similar problems exist in upper limb force lines (anatomical structure relationship in the order of shoulder, humerus, elbow, radius and ulna, wrist), spinal parameter measurement (anatomical structure relationship in the order of cervical vertebrae, thoracic vertebrae, lumbar vertebrae, sacral vertebrae), and spinal-pelvic measurement.
[0020] Therefore, according to one aspect of the embodiments of this application, an embodiment of an automatic measurement method based on adaptive completion of anatomical regions is provided, which can automatically perform region completion when local anatomical region detection fails or is unreliable, so as to improve the continuity and stability of the automatic measurement process in complex cases.
[0021] This approach establishes spatial sequences of anatomical regions (such as the hip, femur, knee, tibia, and ankle joints for lower limb alignment measurements; and the shoulder, humerus, elbow, radius and ulna, and wrist for upper limb alignment measurements). When some regions exhibit missed detections, low confidence levels, abnormal positions, or abnormal scales, it automatically generates complete ROIs (Regions of Interest) and continues subsequent detection, such as keypoint detection, axis fitting, and lower limb alignment parameter calculation. Figure 1 This is a flowchart of an automatic measurement method based on adaptive completion of anatomical regions according to an embodiment of this application, as shown below. Figure 1 As shown, the method may include the following steps: Step S110: Obtain the recognition results of the neural network for multiple parts in the target image. The recognition results include the candidate region, location, and type confidence of each part. The target image includes images of the measurement target (such as upper limb force line, lower limb force line, spine, etc.). The aforementioned neural network is a network with classification function, and this application does not limit it.
[0022] Step S120: According to the anatomical relationship between multiple parts, sort the candidate regions in the recognition results into a region sequence, that is, the structural order between each part is the same as the position of the corresponding candidate region in the sequence.
[0023] Step S130: If a target location with an anomaly is determined based on the region sequence, the completion region of the target location is obtained based on the reliable reference region adjacent to the target location in the region sequence.
[0024] Step S140: After the positioning area of the target part has been verified by the key points of the target part, subsequent measurements are performed. The positioning area includes the completed area.
[0025] The aforementioned subsequent measurements can include measurements of the target, such as lower limb alignment, upper limb alignment, and spinal parameters.
[0026] In the field of automated measurement, related technologies employ a sequential process of region localization, keypoint detection, and parameter calculation. The region localization stage typically utilizes neural networks to output candidate regions for each body part, and the input space for the subsequent keypoint detection model is limited to these candidate regions. This process has an inherent flaw: if the region localization stage malfunctions in identifying a particular anatomical region (including missed detections, low confidence levels, positional deviations, scale anomalies, or disordered sequence), that region cannot provide effective local input for subsequent keypoint detection. Keypoint detection fails to execute properly or outputs unreliable results, ultimately leading to incomplete parameter calculation for the measured target, forcing the entire measurement process to be interrupted, or resulting in unreliable output.
[0027] The technical solution of this application involves: obtaining the recognition results of multiple parts in a target image by a neural network, including the candidate region, location, and type confidence of each part; sorting the candidate regions in the recognition results into a region sequence according to the anatomical relationship between the multiple parts; if a target part with an abnormality is determined based on the region sequence, obtaining the completion region of the target part based on the reliable reference region adjacent to the target part in the region sequence; and performing subsequent measurements after the location region of the target part passes the key point verification of the target part, where the location region includes the completion region. This solution constructs a complete processing chain distinct from related technologies. In this chain, the anatomical order integrates the originally discrete candidate regions into a structural whole with internal spatial constraints, providing a structural foundation for anomaly identification and completion inference. Completion based on adjacent reliable regions does not terminate the process upon anomaly detection; instead, it utilizes the spatial continuity and scale correlation of the anatomical structure to recover candidate regions from the anomaly, allowing the process to continue. Keypoint verification, as a necessary gate before the completion result enters the measurement, requires that the completed region actually detect key points of the target region before being included in the final measurement. This avoids interruption of the overall process due to anomalies in the location of some regions and eliminates the risk of invalid completed regions being included in the measurement, resulting in false results. The synergistic effect of the completion mechanism and secondary verification enables the overall technical solution to simultaneously achieve both process fault tolerance and result reliability, thereby solving the technical problem in related technologies where subsequent measurements fail due to anomalies in the identification of the region where the part is located.
[0028] As an optional embodiment, the following describes the application of the technical solution of this application to lower limb alignment measurement as an example, combined with... Figures 2 to 6 Explanation ( Figure 2 and Figure 3 This is a schematic diagram of the automatic measurement scheme for lower limb force lines. For other situations (such as upper limb force lines, spinal parameter measurement, spinal-pelvic measurement, etc.), the process is similar and will not be described in detail here.
[0029] In the technical solution provided in step S110, the recognition results of the neural network on multiple parts in the target image are obtained. The recognition results include the candidate region, location and type confidence of each part.
[0030] This application utilizes deep learning models for candidate region localization and keypoint detection, but does not limit the specific network structure. The candidate region localization model can employ object detection networks, segmentation networks, or heatmap localization networks; the keypoint detection model can employ pose estimation networks, keypoint regression networks, or detection networks with keypoint branches. Training data includes full lower limb weight-bearing X-ray films, bounding boxes of five types of anatomical regions, and 28 anatomical landmarks. During training, data augmentation methods such as random rotation, brightness transformation, scale transformation, translation, and contrast adjustment can be used to improve the model's generalization ability to different devices, body positions, and complex cases. In the inference phase, the system first outputs candidate region results and then performs spatial sequence verification of the lower limb anatomical regions. Only when the candidate region is complete and reliable does the system directly proceed to ROI clipping; when the detection results are abnormal, the system automatically executes the ROI completion generation process. Specific details are provided below: 1) Obtain a weight-bearing X-ray of the entire lower limb (i.e., the aforementioned target image).
[0031] Obtain a weight-bearing X-ray image of the patient's entire lower extremities. This image can be in DICOM format, or in JPEG, PNG, or other formats that can be read by a medical image processing system. For example, the system reads information such as pixel spacing, image orientation, and image size from the DICOM image for subsequent physical scale conversion of distance-related parameters.
[0032] 2) Preprocess the images (i.e., full lower limb weight-bearing X-rays) and record the scaling, filling, and coordinate mapping parameters.
[0033] The input X-ray film is preprocessed, including grayscale normalization, contrast adjustment, size standardization, boundary filling, and coordinate parameter recording.
[0034] Gray-level normalization: Adjusts the gray-level distribution of images from different devices and under different exposure conditions to a uniform range; Size normalization: Scales the image to the input size required by the candidate region localization model; Aspect ratio preservation padding: Letterbox strategy can be used to avoid geometric distortion of the image; Coordinate recording: Records the original image size, scaling ratio, and padding offset for inverse coordinate transformation of candidate regions and key points.
[0035] 3) Candidate localization of lower limb anatomical regions.
[0036] The preprocessed image is used to locate candidate regions, and candidate bounding boxes (i.e. candidate regions) for the hip joint region, femur region, knee joint region, tibia region and ankle joint region are output, along with the category of the location and the confidence level of the category.
[0037] Candidate region localization can be achieved using object detection networks, segmentation networks, heatmap localization networks, or other image recognition models that can output the location of local regions. This application does not limit the specific network name, but focuses on subsequent anomaly identification and completion based on the spatial sequence of the lower limb anatomical region.
[0038] In the technical solution provided in step S120, the candidate regions in the identification results are sorted into a region sequence according to the anatomical structural relationship between multiple parts.
[0039] The spatial sequence (i.e., the region sequence) of the lower limb anatomical region can be constructed as follows, as explained in detail below: Based on the five categories of candidate regions, center point coordinates, bounding box size, and confidence level, a spatial sequence of lower limb anatomical regions is constructed. In a full lower limb weight-bearing X-ray, the hip joint, femur, knee joint, tibia, and ankle joint are usually arranged sequentially along the longitudinal direction of the image. The subsequent system can use this spatial arrangement rule to determine whether the candidate regions are complete, reliable, and conform to the anatomical structure relationship.
[0040] In the technical solution provided in step S130, when a target part with a detection anomaly is determined based on the region sequence, the completion region of the target part is obtained based on the reliable reference region adjacent to the target part in the region sequence.
[0041] In the embodiment of step S130 above, the target site with detection anomalies is determined based on the region sequence, including at least one of the following: a missed detection site that was not detected in the candidate regions of the region sequence among multiple sites is designated as the target site; a low-confidence site corresponding to a candidate region in the region sequence with a type confidence level lower than a second threshold (e.g., lower than 70%) is designated as the target site; a relationship anomaly site in the region sequence that does not conform to the anatomical structural relationship between multiple sites is designated as the target site; a positional anomaly site corresponding to a candidate region in the region sequence with a positional anomaly is designated as the target site; a scale anomaly site corresponding to a candidate region in the region sequence with a scale anomaly is designated as the target site; if there are multiple candidate regions corresponding to the same site in the region sequence, and the type confidence span of these multiple candidate regions (i.e., the difference between the maximum confidence level and the minimum confidence level, where the minimum confidence level should be higher than the second threshold above) is less than a preset span (e.g., 5%), that is, the confidence levels of these multiple candidate regions are high and close, the site is designated as the target site.
[0042] The aforementioned identification of abnormal target locations essentially involves verifying the completeness and consistency of the candidate regions for those locations. The system performs this completeness and consistency check on the candidate regions to determine if any abnormal regions exist. Abnormal regions include: missed detection regions: no candidate boxes are output for any of the five preset regions; low confidence regions: candidate box confidence is below a preset threshold (e.g., below 50%); abnormal order regions: candidate boxes do not conform to the vertical order of hip, femur, knee, tibia, and ankle joints; abnormal position regions: the center point of the candidate box significantly deviates from the reasonable position calculated from adjacent regions; abnormal scale regions: the width, height, or aspect ratio of the candidate box significantly deviates from the preset range; and duplicate detection regions: multiple candidate boxes appear for the same category, and a valid box cannot be directly determined based solely on confidence.
[0043] In the embodiment of step S130 above, the completion region of the target part is obtained based on the credible reference region adjacent to the target part in the region sequence, including: selecting candidate regions that meet preset conditions from the region sequence, and taking the one whose position is closest to the target part as the credible reference region. The preset conditions include: the type confidence of the candidate region is not lower than a first threshold (such as 70%, 80%, etc.), the position of the candidate region conforms to the anatomical structure relationship between multiple parts, the scale of the candidate region is within the preset range of the corresponding category, and there is no abnormality in the positional relationship with the adjacent candidate regions; and the center position, width, and height of the completion region are determined based on the position of the credible reference region.
[0044] Specifically, when the target region is located in the intermediate region between two reliable reference regions, the center position of the completed region is determined by interpolation based on the two center points of the two reliable reference regions. : ,in, The center point of the reliable reference area preceding the target location. The center point of the reliable reference area after the target location. The relative position weights of the center position of the completed region between the two center points of the two trusted reference regions are used; when the target region is an end region, the center position of the completed region is determined by extrapolation based on the two center points of the two trusted reference regions. : ,in, The direction vector is determined based on the two center points of two reliable reference regions. The center point of the adjacent reliable reference area closer to the target location. The distance ratio between the completed region and the adjacent reliable reference region is calculated; based on the center location of the completed region, the width of the completed region is estimated and constrained according to the completion scale. and height : , Among them, W ref H represents the width or width-weighted average of the reliable reference region. ref W represents the height or height-weighted average of the reliable reference region. min,j W represents the minimum width of the anatomical region of the target site. max,j H represents the minimum width of the anatomical region of the target site. min,j H represents the minimum height of the anatomical region of the target site. max,j The maximum height of the anatomical region of the target site.
[0045] When abnormal regions exist, the system generates a completed Region of Interest (ROI) based on the spatial sequence of the lower limb anatomical region and adjacent reliable regions. The adaptive completion mechanism for the lower limb anatomical region is as follows: Figure 4 As shown below, a detailed explanation follows: The completion of the Region of Interest (ROI) is a core step in this application. The principle behind this step is as follows: when the candidate region localization results contain areas with missed detections, low confidence, abnormal order, abnormal location, or abnormal scale, the system initiates an adaptive anatomical region completion process. The purpose of this process is not to directly generate the final measurement results, but rather to provide tailorable candidate local regions for subsequent keypoint detection. Whether the completed ROI is ultimately adopted requires verification of the effectiveness of keypoint detection results, keypoint confidence, and lower limb anatomical relationship constraints.
[0046] The adaptive completion process for anatomical regions in this application includes: anomaly region identification, selection of reliable reference regions, estimation of completion center point, estimation of completion scale, construction of candidate ROI set, boundary correction, high-resolution cropping of the original image, key point detection and verification, and final ROI selection. This process forms a unified completion framework, where missed detections, low confidence, sequence anomalies, positional anomalies, and scale anomalies can all be considered as anomaly types triggering the completion process, rather than being multiple independent algorithms.
[0047] The system first preprocesses the weight-bearing X-ray images of the entire lower limb and locates candidate anatomical regions in five categories, obtaining candidate Regions of Interest (ROIs) for the hip, femur, knee, tibia, and ankle joints. Subsequently, the system performs integrity and consistency checks on the five candidate ROIs, determining if there are any missed detections, low confidence levels, abnormal order, abnormal location, or abnormal scale regions. If all candidate ROIs are complete and reliable, the system directly maps the normal ROIs back to the original image and performs high-resolution cropping. If abnormal regions exist, the system enters an adaptive anatomical region completion process, generating completed or fused ROIs based on adjacent reliable regions. Normal ROIs, completed ROIs, or fused ROIs, after high-resolution cropping from the original image, undergo keypoint detection, and their validity is verified by the number of keypoints, confidence level, and anatomical relationships. After successful verification, they are included in axis fitting and calculation of 18 lower limb force line parameters; if verification fails, they are marked as uncalculationable or require manual review.
[0048] The difference from the two-stage process: Two-stage automated measurement processes typically rely on the candidate region localization results of the first stage as input for keypoint detection in the second stage. If a certain anatomical region is not detected in the target detection stage, that region cannot be cropped into a local ROI. The subsequent keypoint detection model lacks effective input, easily leading to process interruptions, errors, skipping of the case, or forced keypoint detection without a correct ROI, resulting in missed keypoints. The difference in this application is that after candidate region localization, a lower limb anatomical region spatial sequence verification and adaptive completion step is added. When the system detects incomplete or unreliable detection results, it does not directly terminate the measurement but generates a completed ROI based on adjacent reliable anatomical regions, providing candidate input for the second-stage keypoint detection. This reduces the probability of a single region's missed detection causing overall lower limb alignment measurement failure.
[0049] 1) Input and Region Representation The system represents each candidate ROI output by the candidate region localization model in the following form: , in, Indicates the region category (such as hip region, femur region, knee region, tibia region, and ankle region). , This represents the coordinates (i.e., the center position) of the candidate ROI. , This represents the width and height of the candidate ROI. This indicates the confidence level of the candidate ROI.
[0050] In the automatic measurement scenario of lower limb force lines, the preset anatomical regions are categorized as follows: hip joint region, femur region, knee joint region, tibia region, and ankle joint region. The system constructs a spatial sequence of lower limb anatomical regions according to the above categories. For each type of anatomical region, the system preferentially retains one optimal candidate ROI. If there are multiple candidate ROIs in the same category, the optimal candidate ROI can be selected based on confidence level, spatial consistency with adjacent regions, and scale rationality.
[0051] 2) Abnormal region identification The system performs anomaly detection for each type of anatomical region. If any of the following conditions are met, the region is marked as a region to be completed: Missed detection: No candidate ROI was output for this category; Low confidence: The confidence level of the candidate ROI is lower than a preset threshold T. conf Order anomaly: Candidate ROIs do not conform to the anatomical order of hip, femur, knee, tibia, and ankle joints in the longitudinal arrangement; Location anomaly: The center point of the candidate ROI deviates significantly from the reasonable location range calculated from adjacent reliable regions; Scale anomaly: The width, height, area, or aspect ratio of the candidate ROI exceeds the preset scale range of the corresponding anatomical region; Duplication anomaly: Multiple candidate ROIs exist in the same category, and the effective ROI cannot be determined solely by confidence score (i.e., the confidence scores are very close and higher than the aforementioned preset threshold T). conf ).
[0052] The above-mentioned order anomalies can be judged by comparing the vertical center coordinates of each candidate ROI; position anomalies can be judged by the distance between the center points of the region to be judged and the adjacent credible regions, the directional relationship, and the relative position ratio; scale anomalies can be judged by the range of region width, height, and aspect ratio.
[0053] 3) Selection of trusted reference area For the region R to be completed j The system selects a reliable reference region from the spatial sequence of lower limb anatomical regions. A reliable reference region should meet the following conditions: it has been detected by the candidate region localization model; its confidence level is not lower than a preset threshold; it conforms to the anatomical structure relationship of the lower limb in the longitudinal arrangement order; its scale is within the preset range of the corresponding category; and there are no obvious abnormalities in its positional relationship with adjacent regions.
[0054] If the region to be completed is located between two reliable regions, the system selects the nearest reliable region above and below it as reference regions. If the region to be completed is located at the end of the sequence, such as the hip or ankle joint region, the system selects one or two adjacent reliable regions as extrapolation reference regions.
[0055] 4) Interpolation completion in the middle region When the region to be completed lies between two trusted reference regions, the system uses interpolation to calculate the center point of the completed ROI. Let the center point of the upper trusted reference region be... The center point of the trusted reference area below is The relative position weight of the region to be completed between the two is: Then complete the center point. It can be represented as: , in, It can be determined based on the anatomical type of the area to be completed. It can also be obtained through training data statistics, that is, each anatomical type (or part) corresponds to a fixed value. It can also be set according to the preset anatomical ratio. For anatomical regions such as the femur, knee joint, or tibia located between two reliable regions, the intermediate region interpolation completion method can be used.
[0056] like Figure 5 As shown, in an actual detection case, the candidate region localization model output candidate ROIs for the hip, knee, tibia, and ankle joints, but not for the femur. For a standard two-stage automated measurement process, if the femur is not detected in the first stage of target detection or candidate region localization, subsequent high-resolution ROI clipping for the femur cannot be performed, and keypoint detection in the corresponding region cannot obtain valid input. The system will typically stop processing, report an error, skip the case, or force keypoint detection without a correct ROI, resulting in missed detection of femur-related keypoints.
[0057] This application, upon detecting a missing femoral region, does not directly terminate the measurement process. Instead, it marks the femoral region as the area to be completed and selects the hip and knee joint regions as adjacent reliable reference regions based on its position in the spatial sequence of lower limb anatomical regions. The system generates a femoral completion ROI through intermediate region interpolation based on the center position, boundary relationship, and scale relationship of the hip and knee joint regions. The center point of the completed femur (…) This can be represented as: , The value is the center point of the hip. Weight The value is (The specific value can be determined based on the description in this application or by taking an empirical value.) The value is the center point of the knee. .
[0058] Subsequently, the system performs scale constraints and boundary corrections on the femoral restoration ROI and maps it back to the original high-resolution X-ray image for local cropping, so that the subsequent key point detection model can still detect femoral-related landmarks within the restored ROI.
[0059] It should be noted that, Figure 5 This example illustrates a typical completion implementation for a case of actual missed detection in the femoral region, and does not limit the adaptive completion mechanism of this application to the femoral region only. For missed detections, low confidence, abnormal order, abnormal position, or abnormal scale in the hip, knee, tibia, or ankle joint regions, the system can select adjacent reliable regions based on the relative position of the abnormal region in the spatial sequence of the lower limb anatomical region. It can then generate a completed ROI through interpolation, extrapolation, scale correction, or ROI fusion, and determine whether to include it in subsequent parameter calculations after key point detection and anatomical relationship verification.
[0060] 5) End region extrapolation and completion When the area to be completed is located at the end of the spatial sequence of the lower limb anatomical region, such as the hip joint region or ankle joint region, the system uses extrapolation to calculate the completion center point.
[0061] Let C be the center point of the nearest reliable reference region to the target location. near (Right now The center point of the next closest reliable reference region to the target location is C. far Then the direction vector V is defined as: V=C near -C far Here, the direction vector V represents the direction from the reliable reference region far from the target location to the reliable reference region near the target location. The center point C of the end-completed region... j It can be represented as: C j =C near +d j ·V Where, d j This represents the distance ratio between the target area and the nearest reliable reference area.
[0062] In one implementation, the distance ratio d j This is obtained through statistical analysis of training data. Specifically, in the training set, for the same target region, the true center point of the target region is obtained separately. The nearest trusted reference region's true center point and the true center point of the next most reliable reference region And calculate: , Wherein, median represents the median proportion of similar target parts in the training set, and ||·|| represents the Euclidean distance. Using the median can reduce the impact of abnormal body position, severe deformity or abnormal shooting range on the statistical results.
[0063] For example, when the hip joint area is missed, C near C is the center point of the femoral region. femur C far C is the center point of the knee joint region. knee Direction vector V=C femur -C knee d hip The distance ratio between the hip joint region and the nearest reliable reference region, the femoral region, is used as the center point C for hip joint completion. hip It can be represented as: C hip =C femur +d hip ·(C femur -C knee ), When the ankle area is missed, C near C is the center point of the tibia region. tibia C far C is the center point of the knee joint region. knee Direction vector V=C tibia -C knee d ankle The ankle joint completion center point C represents the ratio of the distance between the ankle joint region and the nearest reliable reference region, the tibia. ankle It can be represented as: C ankle =C tibia +d ankle ·(C tibia -C knee ), 6) Complete the ROI scaling estimate and constraints After obtaining the center point of the completed ROI, the system further estimates the width and height of the completed ROI. The width and height of the completed ROI can be determined according to at least one of the following methods: a preset width and height range corresponding to the category of the region to be completed; the width and height weighted result of adjacent credible regions; the size ratio of the original whole lower limb X-ray film; the average width, height, and aspect ratio of this type of anatomical region in the training data; and the distance between the center points of adjacent credible regions.
[0064] In one implementation, the width of the ROI is padded. and height It can be represented as: , , , The width and height of adjacent reliable reference regions, or their weighted average. , These are the scale adjustment coefficients corresponding to different anatomical regions. , , , These represent the minimum width, maximum width, minimum height, and maximum height of this type of anatomical region, respectively. This indicates that the value will be limited to a preset range.
[0065] After generating the initial completed ROI, the system also performs boundary corrections, including: when the ROI exceeds the boundary of the original image, it is restricted to the range of the original image; when the ROI is too small, it is expanded according to a preset ratio to include the surrounding context of the target anatomical structure; when the ROI is too large, it is shrunk according to a preset maximum scale to reduce the influence of irrelevant areas on key point detection; when the ROI is close to the edge of the image, the maximum effective area within the visible range is retained.
[0066] After obtaining the center point of the completed ROI, the system further estimates the width of the completed ROI. and height The system uses the weighted average of the width and height of adjacent reliable reference regions as the reference scale, and combines it with the scale adjustment coefficient corresponding to the target part category and the preset scale range for constraint.
[0067] When the region to be completed is located between two trusted reference regions, let the width and height of the upper trusted reference region be... , The width and height of the reliable reference area below are... , The width and height of the completed ROI can then be expressed as: , , in, and The weights for the upper and lower trusted reference regions are respectively, satisfying: , In one implementation, and It can be determined based on the confidence level of the corresponding trusted reference region: , , in, and These represent the confidence levels for the upper and lower trusted reference regions, respectively. If the confidence levels for the two reference regions are similar, they can also be set... =0.5, =0.5.
[0068] and The width and height scale adjustment coefficients corresponding to the target part category can be obtained from training data statistics; , , , These are the minimum width, maximum width, minimum height, and maximum height of this type of anatomical region, respectively. This indicates that the calculation results will be limited to a preset range.
[0069] In the technical solution provided in step S140, after the positioning area of the target part is verified by the key points of the target part, subsequent measurements are performed, wherein the positioning area includes the completion area.
[0070] It should be noted that when the target area is a missed area, the completed area is used as the location area; when the target area is a low-confidence area, or an area with abnormal relationship, or an area with abnormal location, or when there are multiple candidate areas, the completed area, the candidate area of the target area, the correction area of the candidate area of the target area, and the fusion area between the completed area and the candidate area of the target area are used as the location area.
[0071] In step S140, the positioning area of the target part is verified using the key points of the target part, including: determining the key point score of the positioning area based on the key points of the target part and the characteristics of the key points in the positioning area; if the key point score of the positioning area reaches the preset score threshold, the positioning area is determined to pass the verification; otherwise, the positioning area is determined to fail the verification.
[0072] Next, based on the characteristics of the key points of the target location and the key points detected from the localization area, the key point score of the localization area is determined, including: the key point confidence score based on the key points of the target location and the key points detected from each localization area. Geometric consistency score and abnormal penalty scores Determine the key point scores for the location area.
[0073] The following is a detailed explanation: 1) Construction of candidate ROI set and final ROI selection For regions marked as anomalous, the system can construct a set of candidate ROIs (i.e., the aforementioned localization regions). This set may include: the ROIs originally output by the candidate localization model, the completed ROIs generated based on the spatial sequence of the lower limb anatomical region, the union of the original detected ROI and the completed ROI, and the corrected ROIs after applying scale constraints or boundary corrections to the original detected ROIs.
[0074] If the region is a missed detection region, the candidate ROI set must at least include a completed ROI; if the region is a low-confidence region, a region with abnormal location, or a region with abnormal scale, the candidate ROI set may simultaneously include the original detected ROI, the completed ROI, the fused ROI, and the corrected ROI. The system then performs original image cropping and keypoint detection on each ROI in the candidate ROI set, and selects the final ROI based on the keypoint detection results.
[0075] The final ROI selection rules are as follows: if the normal detection ROI is complete, has high confidence, and the highest keypoint score, then the normal detection ROI is used; if the normal detection ROI misses a detection, then the completed ROI that has passed the validity verification is used; if the normal detection ROI has low confidence or is in an abnormal position, while the completed ROI has a higher keypoint score, then the completed ROI is used; if both the normal detection ROI and the completed ROI contain some valid structures, then the fused ROI formed by their union is used; if all candidate ROIs fail the keypoint validity verification, then the region or the parameters dependent on the region are marked as uncalcifiable, and manual review is prompted.
[0076] 2) Complete the ROI key point detection and validity verification The completed Region of Interest (ROI) is not directly used as the final measurement basis, but rather as a candidate local region for subsequent keypoint detection. The system performs keypoint detection on the cropped image for each candidate ROI, obtaining the set of keypoints within that ROI and the confidence score of each keypoint. To determine the validity of a candidate ROI, the system calculates a keypoint score for that ROI. .
[0077] When the area to be completed is located at the end, the system can use the weighted average of the width and height of the nearest and second nearest reliable reference areas as the reference scale, or use the width and height of the nearest reliable reference area as the main reference scale, and correct it through the scale adjustment coefficient corresponding to the target part category.
[0078] The completed Region of Interest (ROI) is not directly used as the final measurement basis, but rather as a candidate local region for subsequent keypoint detection. The system performs keypoint detection on the cropped image for each candidate ROI, obtaining the set of keypoints within that ROI and the confidence score of each keypoint. To determine the validity of the candidate ROI, the system calculates the keypoint score Qj for that candidate ROI.
[0079] In one implementation, keypoint scoring It can be represented as: , in, Indicates the completeness of key point detection. This indicates the confidence score for key points. Indicates the geometric consistency score of key points. The term represents the penalty for anomalies. λ1, λ2, λ3, and λ4 are weighting coefficients, and each weighting coefficient satisfies the following conditions: λ1≥0, λ2≥0, λ3≥0, λ4≥0, and λ1+λ2+λ3+λ4=1.
[0080] Keypoint detection completeness It can be represented as: , in, This indicates the number of valid keypoints actually detected within the candidate ROI. This indicates the number of key points that should be inspected for the target area.
[0081] Key point confidence score It can be represented as: , in, Indicates the first p The confidence level of each valid key point. If the confidence level of the key point is not normalized to 0-1, normalization can be performed first.
[0082] Key point geometric consistency score The direction of the joint line can be determined based on the relative positions of key points, the direction of the joint line, the arrangement of the backbone points, and the direction of the lines connecting to key points in adjacent areas. In one implementation, the following can be set: m Given a set of geometric constraint rules, count the number of rules that satisfy the constraints. ,but: , Abnormal penalty items The candidate ROI can be determined based on whether it exhibits keypoint out-of-bounds errors, abnormal keypoint order, abnormal local axis direction, abnormal joint line direction, or parameters calculated using the ROI that significantly exceed a preset physiological range. In one implementation, r abnormal rules can be set, and the number of triggered abnormal rules can be counted. ,but: , when If the score is not lower than the preset scoring threshold TQ, the candidate ROI is determined to have passed the keypoint validation; when... If the score is below the preset scoring threshold TQ, the candidate ROI is determined to have failed the key point verification, and the corresponding region or parameters dependent on that region are marked as uncalculationable, or a manual review is prompted.
[0083] If the completed ROI fails the validity verification, the region or parameters dependent on it will be marked as uncalcifiable and prompted for manual review. Thus, completing the ROI does not directly guarantee measurement accuracy, but reduces the probability of overall measurement failure due to local region detection failure through the process of "region estimation - high-resolution cropping - key point detection - dissection constraint verification".
[0084] The above primarily addresses adaptive completion for missed detection areas or areas without reliable candidate boxes. In such cases, conventional automated measurement processes typically fail outright, while this application can generate completed ROIs based on the spatial sequence of the lower limb anatomical region and verify their effectiveness through subsequent keypoint detection.
[0085] Interpolation completion of intermediate regions and extrapolation completion of distal regions are two core implementation methods. Interpolation completion of intermediate regions is suitable for anatomical regions such as the femur, knee joint, or tibia located between two reliable regions; extrapolation completion of distal regions is suitable for anatomical regions such as the hip joint or ankle joint located at the ends of the spatial sequence of lower limb anatomical regions. Low-confidence region completion, sequence anomaly completion, position anomaly completion, and scale anomaly completion can all be understood as triggering and correcting the above core completion process. That is, first, unreliable candidate ROIs are identified, then a completed ROI is generated through interpolation or extrapolation, and the final ROI is determined through key point detection and anatomical consistency verification.
[0086] After completing the above processing, 28-point detection and calculation of 18 force line parameters are performed, see [link to relevant documentation]. Figure 6 : 1) Scale constraints and boundary corrections are applied to normal and completed ROIs, and the images are cropped from the original high-resolution image.
[0087] The system maps both the normally detected ROIs and the completed ROIs back to the coordinate system of the original full lower limb X-ray film, and crops local images from the original high-resolution images. Compared to detecting key points only in scaled images, this method preserves the details of bony boundaries and fine anatomical landmarks.
[0088] The rule for choosing between normal ROI and completed ROI is as follows: when the normal ROI is complete and reliable, the normal ROI shall be used; for abnormal areas, the completed ROI shall be used; for areas with low reliability but not completely wrong, the union of the normal ROI and the completed ROI can be used to form a fused ROI, and then the key point detection results can be used to verify whether it can be used for parameter calculation.
[0089] For example, in the lower limb force line algorithm, the initial target detection will detect 5 detection boxes. Among them, there may be 3 detection boxes with very high confidence (that is, the ROI is complete and reliable), 1 box is not detected (that is, an abnormal area), and 1 box with a confidence of around 0.5 (which can be set) (that is, a low confidence but not completely wrong area). At this time, the completion algorithm will be started for the last two boxes.
[0090] If, in a given dataset, all five bounding boxes to be detected have very high confidence (i.e., complete and reliable), the completion algorithm will not be triggered. The completion algorithm essentially provides a safety net; under normal circumstances, if the bounding boxes detected by object detection are incomplete, the next step of keypoint detection cannot proceed.
[0091] 2) Detect the 28 anatomical landmarks required for lower limb alignment measurement within each ROI.
[0092] Within each Region of Interest (ROI), 28 anatomical landmarks were identified for lower limb alignment measurement. These 28 anatomical landmarks included hip-related points, femoral-related points, knee-related points, tibial-related points, and ankle-related points.
[0093] There are a total of 8 bone shaft landmarks, including 4 femoral bone shaft landmarks and 4 tibial bone shaft landmarks. The femoral bone shaft landmarks are used to fit the femoral anatomical axis, and the tibial bone shaft landmarks are used to fit the tibial anatomical axis.
[0094] 3) Map the key point coordinates back to the original coordinate system of the whole lower limb X-ray film.
[0095] The coordinates of key points detected within the ROI are mapped back to the original coordinate system of the full lower limb X-ray film based on the ROI clipping position, scaling ratio, and fill offset. For key points originating from the completed ROI, the system records their source region as the completed region to prompt the physician for review in the output report.
[0096] 4) Fit the femoral and tibial anatomical axes based on the femoral and tibial shaft landmarks.
[0097] The femoral anatomical axis was fitted based on four femoral diaphysis landmarks, and the tibial anatomical axis was fitted based on four tibial diaphysis landmarks. Axis fitting can be performed using the least squares linear fitting method or a robust fitting method to reduce the impact of deviations at individual key points on the axis direction.
[0098] This application fits the anatomical axis by using bone shaft landmarks, without relying on the results of medullary canal segmentation. Therefore, it has better adaptability in complex scenarios such as internal fixation with metal, joint replacement, fracture deformity, or unclosed epiphyses.
[0099] 5) Automatically calculate 18 lower limb force line parameters based on key points and axes.
[0100] Based on 28 anatomical landmarks, the femoral anatomical axis, the tibial anatomical axis, and joint lines, the system automatically calculates 18 lower limb force line parameters, including: HKA, MAD, MA, aFTA, aLDFA, aMPTA, aLDTA, aMFA, LPFA, mLDFA, mMPTA, mLDTA, JLCA, Mikulicz line, femoral length, tibia length, DFHD, ICDMLC.
[0101] The mechanical axis parameters are calculated based on the centers of the hip, knee, and ankle joints; the anatomical axis parameters are calculated based on the femoral and tibial anatomical axes; the joint angle parameters are calculated based on the angles between the mechanical axis, anatomical axis, and joint lines; and the length and distance parameters are calculated based on point-to-point or point-to-line distances.
[0102] 6) Output a structured measurement report and a visual annotation map, and mark the completed areas.
[0103] The system outputs a structured measurement report and a visual annotation map. The structured report includes the values, units, key points involved in the calculation, whether a completed ROI was used, the category of the completed region, and the reason why the parameters could not be calculated.
[0104] Visual annotations can overlay key points, mechanical axes, femoral anatomical axes, tibial anatomical axes, joint lines, complete ROI boundaries, angle markers, and distance markers onto the original X-ray images, making it easier for clinicians to review.
[0105] The technical problems to be solved by this application include: 1) When the hip, femur, knee, tibia or ankle joint regions are missed, the completed ROI can be automatically generated based on the adjacent anatomical regions; 2) When the confidence of the candidate region is too low, the position is abnormal, the order is abnormal or the scale is abnormal, the abnormality can be identified and the completion process can be triggered; 3) The completed ROI can be cropped from the original high-resolution X-ray to preserve the details of local bony landmarks; 4) Key point detection and axis fitting are continued in the completed ROI to reduce the probability of overall measurement failure due to the failure of a single region detection; 5) Anatomical axis is fitted based on 28 anatomical landmarks and femoral / tibial shaft landmarks, and 18 lower limb force line parameters are automatically calculated.
[0106] This application discloses an automatic measurement method based on adaptive completion of anatomical regions. The method involves acquiring and preprocessing weight-bearing X-ray images of the entire lower limb; locating candidate regions for the hip, femur, knee, tibia, and ankle joints; constructing a spatial sequence of lower limb anatomical regions based on the category, center position, scale, and confidence level of each candidate region; determining whether there are any missed, low-confidence, abnormal sequence, abnormal position, or abnormal scale regions; when abnormal regions exist, interpolation or extrapolation is performed based on the positional and scale relationships of adjacent located regions to generate a completed ROI; cropping local images from the original high-resolution images based on the normal and completed ROIs; detecting 28 anatomical landmarks required for lower limb alignment measurement; fitting anatomical axes based on femoral and tibial shaft landmarks; calculating 18 lower limb alignment parameters, including HKA, MAD, mLDFA, mMPTA, and JLCA; and outputting a structured measurement report and a visual annotation map. This application enables automatic completion when local anatomical region detection fails, reducing the probability of incomplete calculation of lower limb alignment parameters due to abnormalities in a single region, and improving the stability of automatic measurement in complex cases. The purpose of this application is to provide an automatic measurement method based on adaptive completion of anatomical regions. By introducing spatial sequence verification of lower limb anatomical regions and an adaptive completion mechanism for abnormal regions after region localization, this method solves the problem that existing automatic lower limb alignment measurement methods cannot completely calculate overall parameters when a single local region fails to be detected.
[0107] This application has the following beneficial effects: 1) It reduces the probability of overall measurement failure due to the failure of detection of a single anatomical region; 2) It improves the stability of the automatic measurement process by judging missed detections, low confidence, abnormal order, abnormal position, and abnormal scale through the spatial sequence of lower limb anatomical regions; 3) It generates completed ROIs through interpolation or extrapolation, enabling the system to continue key point detection in complex cases; 4) The completed ROI is cropped from the original high-resolution image, which helps to preserve local anatomical details; 5) The anatomical axes of the femur and tibia are obtained by fitting the key points of the bone shaft, which can reduce the dependence on the results of medullary canal or bone segmentation; 6) It calculates 18 lower limb force line parameters at one time, covering mechanical axis, anatomical axis, joint angle, and morphological parameters; 7) It outputs completed region markers and manual review prompts, which facilitates doctors' understanding and verification of automatic measurement results.
[0108] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0110] According to another aspect of the embodiments of this application, an automatic measurement device based on anatomical region adaptive completion is also provided for implementing the above-described automatic measurement method based on anatomical region adaptive completion. Figure 7 This is a schematic diagram of an automatic measurement device based on anatomical region adaptive completion according to an embodiment of this application, as shown below. Figure 7 As shown, the device may include: The acquisition unit 71 is used to acquire the recognition results of the neural network for multiple parts in the target image, wherein the recognition results include the candidate region, part location and type confidence of each part.
[0111] The sorting unit 72 is used to sort the candidate regions in the recognition result into a region sequence according to the anatomical relationship between the multiple parts.
[0112] The completion unit 73 is used to obtain the completion region of the target part based on the reliable reference region adjacent to the target part in the region sequence when the target part is determined to have a detection anomaly based on the region sequence.
[0113] The measurement unit 74 is used to perform subsequent measurements when the positioning area of the target part passes the key point verification of the target part, wherein the positioning area includes the completion area.
[0114] The above modules are used to obtain the recognition results of multiple parts in the target image by the neural network. The recognition results include the candidate region, location and type confidence of each part. According to the anatomical relationship between the multiple parts, the candidate regions in the recognition results are sorted into a region sequence. If the target part with an abnormality is determined based on the region sequence, the completion region of the target part is obtained based on the reliable reference region adjacent to the target part in the region sequence. If the localization region of the target part passes the key point verification of the target part, subsequent measurements are performed. The localization region includes the completion region. This solution constructs a complete processing chain distinct from related technologies. In this chain, the anatomical order integrates the originally discrete candidate regions into a structural whole with internal spatial constraints, providing a structural foundation for anomaly identification and completion inference. Completion based on adjacent reliable regions does not terminate the process upon anomaly detection; instead, it utilizes the spatial continuity and scale correlation of the anatomical structure to recover candidate regions for the anomaly, allowing the process to continue. Keypoint verification, as a necessary gate before the completion result enters the measurement, requires that the completed region must actually detect key points of the target region before being included in the final measurement. This avoids interruption of the overall process due to anomalies in the location of some regions and eliminates the risk of invalid completed regions being included in the measurement, resulting in false results. The synergistic effect of the completion mechanism and secondary verification enables the overall technical solution to simultaneously achieve both process fault tolerance and result reliability, thereby solving the technical problem in related technologies where subsequent measurements fail due to anomalies in the identification of the region where the part is located.
[0115] Optionally, the completion unit is further configured to: select candidate regions that meet preset conditions from the region sequence, and take the region whose position is closest to the target part as the reliable reference region, wherein the preset conditions include: the type confidence of the candidate region is not lower than a first threshold, the position of the candidate region conforms to the anatomical structure relationship between the multiple parts, the scale of the candidate region is within a preset range of the corresponding category, and the positional relationship with adjacent candidate regions is not abnormal; and determine the center position, width, and height of the completion region based on the position of the reliable reference region.
[0116] Optionally, the completion unit is also used for: When the target region is located in the middle region between two reliable reference regions, the center position of the completed region is determined by interpolation based on the two center points of the two reliable reference regions. : ,in, The center point of the reliable reference area preceding the target location. The center point of the reliable reference area following the target location. The relative position weight of the center position of the completed region between the two center points of the two trusted reference regions is used; when the region where the target part is located is an end region, the center position of the completed region is determined by extrapolation based on the two center points of the two trusted reference regions. : ,in, The direction vector is determined based on the two center points of the two reliable reference regions. The center point of the adjacent reliable reference region that is closer to the target location. The ratio of the distance between the completed region and the adjacent reliable reference region; Based on the center position of the completed region, the width of the completed region is estimated and constrained according to the completion scale. and height : , , Among them, W ref H represents the width or width-weighted average of the reliable reference region. ref W represents the height or height-weighted average of the reliable reference region. min,j W is the minimum width of the anatomical region of the target site. max,j H represents the minimum width of the anatomical region of the target site. min,j H represents the minimum height of the anatomical region of the target site. max,j The maximum height of the anatomical region of the target site.
[0117] Optionally, the measurement unit is further configured to: designate undetected candidate regions in the region sequence among the plurality of parts as the target parts; designate low-confidence parts corresponding to candidate regions in the region sequence with type confidence below a second threshold as the target parts; designate abnormal relationship parts in the region sequence that do not conform to the anatomical structural relationship between the plurality of parts as the target parts; designate abnormal positional parts corresponding to candidate regions in the region sequence with abnormal positions as the target parts; designate abnormal scale parts corresponding to candidate regions in the region sequence with abnormal scales as the target parts; and designate the part as the target part when there are multiple candidate regions corresponding to the same part in the region sequence and the type confidence span of the multiple candidate regions is less than a preset span.
[0118] Optionally, the measurement unit is further configured to: determine the key point score of the positioning area based on the key points of the target location and the features of the key points in the positioning area; if the key point score of the positioning area reaches a preset score threshold, determine that the positioning area has passed the verification; otherwise, determine that the positioning area has failed the verification.
[0119] Optionally, the measuring unit is also used for: Based on the key points of the target location, and the key point confidence score of the key points detected from each of the positioning regions, the following criteria are used: Geometric consistency score and abnormal penalty scores Determine the key point score of the location area. : , in, To determine the completeness of key point detection based on the number of key points in the target location and the effective key points actually detected from the positioning area, λ1, λ2, λ3, and λ4 are weighting coefficients.
[0120] Optionally, the measurement unit is further configured to: before verifying the positioning area of the target part using the key points of the target part, if the target part is a missed detection part, use the completed area as the positioning area; if the target part is a low-confidence part, or a part with abnormal relationships, or a part with abnormal positions, or if there are multiple candidate areas, use the completed area, the candidate areas of the target part, the correction area of the candidate areas of the target part, and the fusion area between the completed area and the candidate areas of the target part as the positioning area.
[0121] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of the device, can run in a corresponding hardware environment, and can be implemented in software or hardware, wherein the hardware environment includes a network environment.
[0122] According to another aspect of the embodiments of this application, a server or terminal for implementing the above-described automatic measurement method based on anatomical region adaptive completion is also provided.
[0123] Figure 8 This is a structural block diagram of a terminal according to an embodiment of this application, such as... Figure 8 As shown, the terminal may include: one or more (only one is shown in the figure) processors 801, memory 803, and transmission devices 805, such as... Figure 8 As shown, the terminal may also include input / output devices 807.
[0124] The memory 803 can be used to store software programs and modules, such as the program instructions / modules corresponding to the automatic measurement method and device based on anatomical region adaptive completion in this embodiment. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 803, thereby realizing the aforementioned automatic measurement method based on anatomical region adaptive completion. The memory 803 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 803 may further include memory remotely located relative to the processor 801, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0125] The aforementioned transmission device 805 is used to receive or send data via a network, and can also be used for data transfer between the processor and memory. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 805 includes a Network Interface Controller (NIC), which can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 805 is a radio frequency (RF) module used for wireless communication with the Internet.
[0126] Specifically, memory 803 is used to store application programs.
[0127] The processor 801 can invoke the application program stored in the memory 803 via the transmission device 805 to perform the following steps: The neural network identifies multiple parts of a target image, wherein the identification results include candidate regions, location, and type confidence for each part. Based on the anatomical relationships between the multiple parts, the candidate regions in the identification results are sorted into a region sequence; If a target location with an anomaly is determined based on the region sequence, the completion region of the target location is obtained based on the reliable reference region adjacent to the target location in the region sequence. Subsequent measurements are performed when the positioning area of the target location passes the key point verification of the target location, wherein the positioning area includes the completed area.
[0128] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0129] Those skilled in the art will understand that Figure 8 The structure shown is for illustrative purposes only. The terminal can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices. Figure 8 This does not limit the structure of the aforementioned electronic device. For example, the terminal may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 8 The different configurations shown.
[0130] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0131] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to execute program code for an automatic measurement method based on adaptive completion of anatomical regions.
[0132] Optionally, in this embodiment, the storage medium may be located on at least one of the multiple network devices in the network shown in the above embodiment.
[0133] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: The neural network identifies multiple parts of a target image, wherein the identification results include candidate regions, location, and type confidence for each part. Based on the anatomical relationships between the multiple parts, the candidate regions in the identification results are sorted into a region sequence; If a target location with an anomaly is determined based on the region sequence, the completion region of the target location is obtained based on the reliable reference region adjacent to the target location in the region sequence. Subsequent measurements are performed when the positioning area of the target location passes the key point verification of the target location, wherein the positioning area includes the completed area.
[0134] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0135] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0136] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0137] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0138] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0141] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0142] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. An automatic measurement method based on adaptive completion of anatomical regions, characterized in that, include: The neural network identifies multiple parts of a target image, wherein the identification results include candidate regions, location, and type confidence for each part. Based on the anatomical relationships between the multiple parts, the candidate regions in the identification results are sorted into a region sequence; If a target location with an anomaly is determined based on the region sequence, the completion region of the target location is obtained based on the reliable reference region adjacent to the target location in the region sequence. Subsequent measurements are performed when the positioning area of the target location passes the key point verification of the target location, wherein the positioning area includes the completed area.
2. The method according to claim 1, characterized in that, Based on the reliable reference regions adjacent to the target region in the region sequence, the completion region of the target region is obtained, including: Candidate regions that meet preset conditions are selected from the region sequence, and the region whose location is closest to the target part is selected as the reliable reference region. The preset conditions include: the type confidence of the candidate region is not lower than a first threshold, the location of the candidate region conforms to the anatomical structure relationship between the multiple parts, the scale of the candidate region is within the preset range of the corresponding category, and there is no abnormality in the positional relationship with adjacent candidate regions. Based on the location of the trusted reference region, determine the center position, width, and height of the completed region.
3. The method according to claim 2, characterized in that, Based on the location of the trusted reference region, the center position, width, and height of the completed region are determined, including: When the target region is located in the middle region between two reliable reference regions, the center position of the completed region is determined by interpolation based on the two center points of the two reliable reference regions. : ,in, The center point of the reliable reference area preceding the target location. The center point of the reliable reference area following the target location. The relative position weight of the center position of the completed region between the two center points of the two trusted reference regions is used; when the region where the target part is located is an end region, the center position of the completed region is determined by extrapolation based on the two center points of the two trusted reference regions. : ,in, The direction vector is determined based on the two center points of the two reliable reference regions. The center point of the adjacent reliable reference region that is closer to the target location. The ratio of the distance between the completed region and the adjacent reliable reference region; The width and height of the completed area are determined based on the center position of the completed area.
4. The method according to claim 1, characterized in that, Based on the region sequence, the target location where an anomaly is detected is determined, including at least one of the following: The undetected candidate regions in the region sequence among the multiple regions are taken as the target regions; The low-confidence regions corresponding to candidate regions in the region sequence whose type confidence is lower than the second threshold are taken as the target regions; The abnormal regions in the region sequence that do not conform to the anatomical structural relationships between the multiple regions are designated as the target regions; The location anomaly corresponding to the candidate region with location anomaly in the region sequence is taken as the target region; The scale anomalous region corresponding to the candidate region of scale anomalous region in the region sequence is taken as the target region; If there are multiple candidate regions corresponding to the same location in the region sequence, and the type confidence span of the multiple candidate regions is less than a preset span, then the location is taken as the target location.
5. The method according to any one of claims 1 to 4, characterized in that, Verification of the positioning area of the target part using key points of the target part includes: Based on the characteristics of the key points of the target location and the key points of the positioning area, the key point score of the positioning area is determined; If the key point score in the location area reaches a preset score threshold, the location area is determined to have passed the verification; otherwise, the location area is determined to have failed the verification.
6. The method according to claim 5, characterized in that, Based on the characteristics of the key points of the target location and the key points in the positioning area, a key point score for the positioning area is determined, including: Based on the key points of the target location and the key point confidence score of each key point in the positioning area. Geometric consistency score of key points in the positioning area and abnormal penalty scores Determine the key point score of the location area. : , in, The key point detection completeness is determined based on the number of key points in the target location and the number of valid key points actually detected from the positioning area. λ1, λ2, λ3, and λ4 are weighting coefficients, and λ1+λ2+λ3+λ4=1.
7. The method according to claim 5, characterized in that, Before verifying the positioning area of the target part using key points of the target part, the method further includes: If the target area is a missed area, the completed area will be used as the positioning area. When the target region is a low-confidence region, an abnormal relationship region, an abnormal location region, or has multiple candidate regions, the completed region, the candidate regions of the target region, the corrected region of the candidate regions of the target region, and the fusion region between the completed region and the candidate regions of the target region are used as the positioning region.
8. An automatic measuring device based on adaptive completion of anatomical regions, characterized in that, include: An acquisition unit is used to acquire the recognition results of the neural network for multiple parts in a target image, wherein the recognition results include the candidate region, location, and type confidence of each part; The sorting unit is used to sort the candidate regions in the identification result into a region sequence according to the anatomical relationship between the multiple parts; The completion unit is used to obtain the completion region of the target part based on the reliable reference region adjacent to the target part in the region sequence when the target part is determined to have a detection anomaly based on the region sequence. A measurement unit is used to perform subsequent measurements when the positioning area of the target part passes the key point verification of the target part, wherein the positioning area includes the completion area.
9. A computer-readable storage medium, characterized in that, The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when it is run.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the method described in any one of claims 1 to 7 through the computer program.
