A method and system for assisting in the identification of knee alignment anomalies considering anatomical constraints.

By using an adaptive filling and depth coordinate regression model, combined with anatomical feature constraints, the problem of inaccurate knee joint center positioning in full-length lower limb X-rays was solved, achieving efficient and reliable identification of knee alignment abnormalities, suitable for real-time diagnosis on ordinary PC terminals and mobile devices.

CN122312751APending Publication Date: 2026-06-30亳州市人民医院

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
亳州市人民医院
Filing Date
2026-03-23
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies suffer from drift problems due to the lack of long bone features in full-length X-ray images of the lower limbs, image deformation affecting geometric accuracy, and lack of global anatomical constraints, resulting in inaccurate knee joint center positioning and unreliable measurement results.

Method used

By incorporating anatomical feature constraints through an adaptive filling and depth coordinate regression model, and employing a dense connection structure and SmoothL1Loss loss function, subpixel-level coordinates are directly output. This constructs mechanical axis vectors for the femur, tibia, and the entire lower limb, calculates the included angle and vertical distance, and generates knee alignment anomaly recognition prompts.

Benefits of technology

It achieves the authenticity and robustness of geometric measurement, improves the accuracy of knee joint center positioning and the reliability of recognition results, reduces the amount of computation and hardware requirements, and is suitable for real-time diagnosis on ordinary PC terminals or mobile devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122312751A_ABST
    Figure CN122312751A_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for assisting in the identification of knee alignment anomalies considering anatomical constraints. The method includes: acquiring the original aspect ratio of a raw medical image; adaptively filling the raw medical image based on a comparison between the original aspect ratio and a target aspect ratio; using the filled image as input to a depth coordinate regression model to obtain normalized coordinate vectors of key feature points based on global anatomical constraints; converting the normalized coordinate vectors into physical coordinates in the original coordinate system; calculating the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, and calculating the vertical distance from the center point of the knee joint to the total mechanical axis of the lower limb; and generating knee alignment anomaly identification prompts. Compared with existing technologies, this invention has advantages such as accurate geometric measurements, strong robustness, high clinical deployment efficiency, and reliable identification results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of medical image processing and computer vision, and in particular to a method and system for assisting in the identification of knee alignment anomalies that takes into account anatomical constraints. Background Technology

[0002] Full-length X-rays of the lower extremities are the core imaging basis for orthopedic clinical assessment of lower extremity alignment, identification of genu varum or genu valgum deformities, and formulation of knee replacement and osteotomy correction surgical plans. The hip-knee-ankle angle, as the gold standard parameter for quantifying lower extremity mechanical alignment, depends on the accurate positioning of three points: the center of the femoral head, the center of the knee joint, and the center of the ankle joint.

[0003] Traditional measurement methods involve physicians manually marking anatomical landmarks on film or digital images and calculating angles using goniometers or electronic angle measuring tools. This method is affected by physician experience, visual fatigue, and image quality, resulting in high subjectivity, poor repeatability, and long processing time, and it is difficult to meet the needs of large-scale screening and follow-up.

[0004] In recent years, deep learning technology has been introduced into the field of medical image analysis, with convolutional neural networks demonstrating advantages in automation and high efficiency in keypoint detection tasks. Heatmap regression and direct coordinate regression are two mainstream technical approaches. Heatmap methods locate keypoints by predicting Gaussian response maps, while direct regression methods output continuous coordinate values ​​through fully connected layers. However, full-length lower limb X-rays have unique imaging characteristics, such as large aspect ratio differences, clear bone edges but sparse internal texture, and simple features in long bone regions. Directly applying general methods faces multiple technical challenges, including geometric fidelity, sub-pixel accuracy, and anatomical consistency. Therefore, developing a dedicated analysis system for this specific clinical scenario has significant clinical application value.

[0005] Patent application CN115568988A provides a method and apparatus for calculating the angles formed by two bone segments that make up a joint, which can be used for real-time measurement of knee flexion, valgus, and varus angles in computer-assisted knee replacement surgery. It utilizes an optical tracking system to establish a transformation relationship between the coordinate system of a 3D virtual skeleton model and the coordinate system of landmarks collected from the actual bone surface. The angles are calculated using landmarks extracted from the model, selected from: hip joint center H, femoral-knee joint center FK, lateral epicondyle LE, medial epicondyle ME, tibial-knee joint center TK, tibial tuberosity TB, and ankle joint center AK. This includes: calculating the direction vectors of the femoral and tibial mechanical axes; and calculating the flexion angle during knee flexion movement around the transverse axis in the sagittal plane. The valgus and varus angles can be determined by projecting the femoral and tibial axes onto the coronal plane Pc or transverse plane. However, relying on a three-dimensional optical tracking system, it cannot directly process two-dimensional X-ray images, and lacks backbone position auxiliary constraints and geometric fidelity preprocessing mechanisms, thus limiting its application scenarios and resulting in insufficient positioning robustness.

[0006] In summary, existing technologies have significant limitations in processing full-length lower limb X-ray images: 1) The "drift" problem caused by the lack of long bone features: In full-length radiographs of the lower limb, the bone shaft regions of the femur and tibia are extremely long and have a uniform texture. Heatmap-based methods (which mainly focus on local features) are prone to failure in the middle region of the bone shaft, causing the predicted knee joint center to drift vertically along the bone shaft axis.

[0007] 2) Image distortion affects geometric accuracy: The original dimensions of medical images vary greatly. Traditional scaling operations, if aspect ratio is not taken into account, will change the physical angles of the bones, rendering the measurement results unusable.

[0008] 3) Lack of global anatomical constraints: Existing models typically predict the knee center in isolation, ignoring the anatomical fact that the knee center must be located at the intersection of the femoral axis and the tibial axis. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for assisting in the identification of knee alignment abnormalities that takes into account anatomical constraints, with accurate geometric measurements, strong robustness, high efficiency in clinical deployment, and reliable identification results.

[0010] The objective of this invention can be achieved through the following technical solutions: A method for assisting in the identification of knee alignment anomalies considering anatomical feature constraints includes the following steps: Obtain the original aspect ratio of the original medical image; based on the comparison between the original aspect ratio and the target aspect ratio, adaptively fill the original medical image to generate a filled image; and obtain the coordinate mapping relationship between the original coordinate system of the original medical image and the network input coordinate system of the filled image. The filled image is used as input to a depth coordinate regression model to obtain a normalized coordinate vector of key feature points based on global anatomical constraints. The key feature points include core diagnostic key points and anatomical auxiliary constraint points. Using the coordinate mapping relationship, the normalized coordinate vector is converted into physical coordinates in the original coordinate system; Based on the physical coordinates, construct the femoral mechanical axis vector, the tibial mechanical axis vector, and the lower limb full-length mechanical axis vector, calculate the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, and calculate the vertical distance from the center point of the knee joint to the lower limb full-length mechanical axis vector. Based on the included angle and the vertical distance, an abnormal knee alignment detection prompt is generated.

[0011] Furthermore, the specific method of adaptive filling is as follows: When the original aspect ratio is greater than the target aspect ratio, the height of the original medical image is locked and scaled, and zero pixels are symmetrically filled on both sides of the image width until the target width is reached; when the original aspect ratio is less than the target aspect ratio, the width of the original medical image is locked and scaled, and zero pixels are symmetrically filled on both sides of the image height until the target height is reached.

[0012] Furthermore, the coordinate mapping relationship is obtained based on the amount of pixels filled and the scaling ratio.

[0013] Furthermore, the key diagnostic points include the femoral head center, knee joint center, and ankle joint center of both lower limbs; The anatomical auxiliary constraint points include the femoral anatomical axis endpoints and tibial anatomical axis endpoints located in the diaphysis of both femurs and tibias.

[0014] Furthermore, the depth coordinate regression model includes a feature extraction network and a regression head, wherein, The feature extraction network adopts a dense connection structure, which concatenates the shallow feature map and the deep feature map in the channel dimension to output a high-dimensional feature map, and then performs global average pooling to obtain a one-dimensional feature vector. The regression head is used to transform the one-dimensional feature vector into a normalized coordinate vector.

[0015] Furthermore, the dense connection structure splices feature maps from different levels along the channel dimension through skip connections. The shallow feature map contains skeletal edge contour information, and the deep feature map contains skeletal semantic information.

[0016] Furthermore, the dimension of the one-dimensional feature vector is the same as the number of channels of the high-dimensional feature map.

[0017] Furthermore, the feature extraction network adopts the DenseNet201 network.

[0018] Furthermore, the depth coordinate regression model employs the SmoothL1Loss loss function.

[0019] The present invention also provides a knee alignment anomaly auxiliary recognition system that takes into account anatomical feature constraints, comprising: The image preprocessing module is used to obtain the original aspect ratio of the original medical image, and based on the comparison between the original aspect ratio and the target aspect ratio, adaptively fill the original medical image to generate a filled image, and obtain the coordinate mapping relationship between the original coordinate system of the original medical image and the network input coordinate system of the filled image. The feature extraction module is used to take the filled image as input to the depth coordinate regression model to obtain the normalized coordinate vector of key feature points based on anatomical global constraints. The key feature points include core diagnostic key points and anatomical auxiliary constraint points. The coordinate restoration module is used to convert the normalized coordinate vector into physical coordinates in the original coordinate system using the coordinate mapping relationship; The geometric calculation module is used to construct the femoral mechanical axis vector, the tibial mechanical axis vector, and the lower limb full-length mechanical axis vector based on the physical coordinates, calculate the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, and calculate the vertical distance from the center point of the knee joint to the lower limb full-length mechanical axis vector. The recognition output module is used to generate knee alignment anomaly recognition prompt information based on the included angle and the vertical distance.

[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. Ensuring Geometric Measurement Authenticity: Given the significant aspect ratio variations in full-length lower limb X-rays, traditional resizing operations can cause nonlinear distortions in the physical angle between the femur and tibia, leading to the failure of HKA angle measurements. This invention abandons the traditional deep learning approach of forcibly stretching images to a fixed size. Instead, it designs an isotropic geometrical fidelity mapping mechanism that adaptively fills and maps the original medical images. This ensures that when the image is mapped from its original high-resolution space to the network input space, the geometric vector directions of all skeletal anatomical axes remain strictly consistent. Standardized input is performed while preserving the original image aspect ratio, eliminating skeletal angle distortions caused by non-uniform scaling at the physical source. This provides a reliable geometric basis for the subsequent accurate calculation of the hip-knee-ankle angle.

[0021] 2. Improved Robustness of Low-Texture Region Localization: Addressing the challenge of single texture features in the femoral and tibial shaft regions of full-length lower limb X-rays, which easily leads to localization drift, this invention creatively introduces an anatomical-assisted constraint mechanism. The depth coordinate regression model of this invention can output normalized coordinate vectors based on key feature points with global anatomical constraints. These key feature points include core diagnostic key points and anatomical-assisted constraint points. The auxiliary key points are used to determine the skeletal midline, forming geometric constraints on the joint center, forcing the network to understand the overall orientation and morphology of the bones, and improving the accuracy of subsequent angle calculations. This multi-task constraint allows the network to utilize the global features of the bone shaft to reversely lock the joint center position, effectively solving the problem of inaccurate localization of single joint features in blurred images.

[0022] 3. Optimized clinical deployment efficiency: Compared with the mainstream complex networks based on heatmap generation, this invention adopts an end-to-end direct coordinate regression architecture. On the one hand, this architecture eliminates the computationally intensive deconvolution decoding module, significantly reducing the number of model parameters and inference time. On the other hand, the model directly outputs sub-pixel level coordinate values ​​without the need for complex post-processing operations such as Argmax, greatly reducing the requirements for hardware computing power and making it extremely easy to achieve low-latency real-time diagnosis on ordinary PC terminals or mobile devices in hospitals.

[0023] 4. Improved Feature Extraction Accuracy: Addressing the visual characteristic of X-ray images where bone edges are clear but internal textures are sparse, this invention abandons the traditional layer-by-layer downsampling design that loses high-frequency information. Instead, it constructs a densely connected feature aggregation network. Utilizing a dense connection mechanism, high-frequency anatomical edge features (such as cortical bone contours) extracted by the shallow network are directly transmitted to the deep regression head, where they are concatenated with the deep semantic features at the channel level. This design specifically solves the technical challenge of subtle bony landmarks easily disappearing in deep networks in low-contrast X-ray images, achieving high-sensitivity capture of sparse key points in conjunction with a fully connected regression head.

[0024] 5. Improved reliability of recognition results: This invention achieves this through dual-index geometric quantization, which includes calculating the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, as well as calculating the vertical distance from the center point of the knee joint to the mechanical axis of the entire lower limb, effectively improving the reliability of recognition results. Attached Figure Description

[0025] Figure 1 A diagram illustrating the complete architecture of an intelligent knee joint varus / valgus recognition system. Figure 2 This is a schematic diagram of a deep regression network architecture; Figure 3 This is a schematic diagram of auxiliary points. Detailed Implementation

[0026] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0027] Example 1 This embodiment provides a knee alignment anomaly auxiliary recognition method considering anatomical feature constraints, including: acquiring the original aspect ratio of the original medical image; adaptively filling the original medical image based on the comparison between the original aspect ratio and the target aspect ratio to generate a filled image, and acquiring the coordinate mapping relationship between the original coordinate system of the original medical image and the network input coordinate system of the filled image; using the filled image as input to a depth coordinate regression model to obtain normalized coordinate vectors of key feature points based on global anatomical constraints, the key feature points including core diagnostic key points and anatomical auxiliary constraint points; using the coordinate mapping relationship to convert the normalized coordinate vectors into physical coordinates in the original coordinate system; constructing femoral mechanical axis vectors, tibial mechanical axis vectors, and lower limb full-length mechanical axis vectors based on the physical coordinates, calculating the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, and calculating the vertical distance from the knee joint center point to the lower limb full-length mechanical axis vector; and generating knee alignment anomaly recognition prompt information based on the angle and the vertical distance.

[0028] The above method predicts key points of the original medical images using a deep coordinate regression model, including key feature points of core diagnostic key points and anatomical auxiliary constraint points. By using anatomical auxiliary constraint points, the network is forced to learn the overall orientation of the skeleton, thereby locking the joint center in reverse, effectively improving the accuracy of coordinate prediction, and thus ensuring the mathematical validity and accuracy of subsequent angle calculations.

[0029] like Figure 1As shown, this embodiment details the complete process of a knee alignment anomaly-assisted identification method considering anatomical feature constraints, specifically including: S1: Image Acquisition and Size Analysis First, read the original medical image, which can be in DICOM or PNG format, and obtain its original width and height.

[0030] S2: Aspect Ratio Calculation The aspect ratio of the original medical image is calculated and compared with the aspect ratio of the target size input to the model. In this embodiment, the target size is 256×128 and the aspect ratio is 2.0.

[0031] S3: Adaptive Filling and Coordinate Mapping Records To address the distortion of skeletal physical angles caused by traditional image resizing operations, this invention proposes an isotropic geometrically faithful mapping mechanism. This mechanism, with angle invariance as its core constraint, dynamically generates an asymmetric zero-padding strategy by calculating the physical aspect ratio of the original image. This strategy ensures that the geometric vector directions of all skeletal anatomical axes remain strictly consistent when the image is mapped from the original high-resolution space to the network input space, thereby guaranteeing the mathematical validity of subsequent angle calculations.

[0032] Specifically, the adaptive filling logic is as follows: If the aspect ratio of the original image is greater than the target size, that is, the image is mainly long and narrow, the system will lock the height of the image and scale it, and symmetrically fill the width of the image with zero pixels until the target width is reached. If the aspect ratio of the original image is smaller than the target size, meaning the image is mainly wide and flat, the system will lock the width of the image and scale it, and symmetrically fill the height of the image with zero pixels.

[0033] While performing the above operations, the amount of pixels filled and the scaling ratio are automatically recorded. After the model outputs the predicted coordinates, these parameters are used to construct an inverse mapping function to accurately restore the predicted coordinates to the coordinate system of the original high-resolution image, thereby ensuring the physical authenticity of the geometric measurements.

[0034] S4: Model Processing The filled image is used as input to the depth coordinate regression model to obtain the normalized coordinate vector of key feature points based on global anatomical constraints. These key feature points include core diagnostic key points and anatomical auxiliary constraint points.

[0035] In this embodiment, the depth coordinate regression model adopts an "end-to-end direct coordinate regression" architecture. Compared with the traditional heatmap method, this architecture avoids the resolution loss and quantization error caused by downsampling, and can achieve sub-pixel level positioning accuracy.

[0036] Specifically, the processing flow of the depth coordinate regression model is as follows: Figure 2 As shown, it includes: Phase 1: Feature Extraction (Backbone: DenseNet201) The filled image is input into the feature extraction network, which adopts a dense connection structure to concatenate the shallow feature map and the deep feature map in the channel dimension, and output a high-dimensional feature map.

[0037] In this embodiment, the feature extraction network is the backbone network of the deep coordinate regression model, using DenseNet201. DenseNet's dense connection mechanism enables maximum reuse of feature maps in the channel dimension. Given that the texture features of X-ray films are mainly concentrated at the bone edges, and most of the background area consists of low-frequency grayscale information, this architecture can preserve the edge detail features of the lower layers to the greatest extent and pass them to the higher layers, effectively preventing the loss of subtle bone features during deep network convolution.

[0038] Phase Two: Feature Aggregation and Direct Coordinate Regression Feature aggregation: After the input image is processed by the backbone network to extract features, a high-dimensional feature map is output. Then, a global average pooling strategy is used to compress the spatial dimension of the feature map to obtain a one-dimensional high-dimensional feature vector (for the DenseNet201 architecture, this vector is usually 1920-dimensional).

[0039] The regression head consists of a fully connected layer and an activation function. The fully connected layer maps the high-dimensional feature vectors to a 28-dimensional output vector. The network ends with the sigmoid function as the activation function, strictly limiting the output values ​​to the range [0, 1]. The output values ​​represent the relative normalized coordinates (x / W, y / H) of each keypoint in the image coordinate system. This design allows the model to adapt to input images of different resolutions without requiring complex coordinate transformations during the inference phase.

[0040] The depth coordinate regression model described above uses SmoothL1Loss (beta=0.1) as the loss function during training. Compared to MSE, SmoothL1Loss exhibits the advantages of L1 Loss (stable gradient, no explosion) when the error is large, and L2 Loss (smooth convergence) when the error is small. This provides better robustness to individual annotation noise that may exist in X-ray images. The optimizer used during training is AdamW, combined with the OneCycleLR learning rate scheduling strategy to achieve fast convergence.

[0041] In this embodiment, the normalized coordinate vector includes core diagnostic key points and anatomical auxiliary constraint points. Specifically, the core diagnostic key points include the femoral head center, knee joint center, and ankle joint center of both lower limbs, and the anatomical auxiliary constraint points include the femoral anatomical axis endpoints and tibial anatomical axis endpoints located in the diaphysis regions of both femurs and tibias.

[0042] like Figure 3 The diagram shows key points on one lower limb, involving 6 core diagnostic key points and 8 anatomical auxiliary constraint points.

[0043] Six key identification points: These correspond to the centers of the femoral head, knee joint, and ankle joint on both lower limbs, respectively. These six points are used to directly calculate the HKA angle, i.e., the hip-knee-ankle angle.

[0044] Eight anatomically auxiliary restraint points: located in the diaphysis of both femurs and tibias, four on each side. Specifically, these include: Femoral accessory points: located at the proximal and distal ends of the femoral anatomical axis; Tibial accessory points: located at the proximal and distal ends of the tibial anatomical axis.

[0045] During the model training phase, these auxiliary constraint points force the neural network to learn the orientation and morphological features of the entire skeleton. Since two points determine a straight line in geometry, when the network accurately predicts two auxiliary points on the skeletal shaft, it effectively locks the central axis of the skeleton, thus forming a strong geometric constraint on the center of the knee joint located at the end of the axis, eliminating longitudinal positioning errors caused by blurred texture at the joint.

[0046] S5: Coordinate Restoration The normalized coordinate vector is denormalized using the parameters of the coordinate mapping relationship recorded in the preprocessing stage, restoring it to the physical coordinates of the original image.

[0047] S6: Geometric Calculation and Recognition Extract the six core points: the centers of the hip joints, knee joints, and ankle joints on both sides, and perform the following geometric calculations: 1) Vector Construction: The system constructs the following three key vectors based on the keypoint coordinates, including: Femoral mechanical axis vector V_Femur: pointing from the center of the femoral head to the center of the knee joint; Tibial mechanical axis vector V_Tibia: pointing from the center of the knee joint to the center of the ankle joint; The lower limb full-length mechanical axis vector V_Mech points directly from the center of the femoral head to the center of the ankle joint.

[0048] 2) Angle Calculation: The angle between V_Femur and V_Tibia is calculated using the vector dot product formula. This angle is the hip-knee-ankle angle, or HKA Angle, which is of core concern in clinical identification.

[0049] 3) Deviation calculation: Using the point-to-line distance formula, calculate the vertical distance from the center point of the knee joint to the mechanical axis vector V_Mech of the entire lower limb.

[0050] 4) Identification Output: The system comprehensively analyzes the HKA angle value and deviation distance. If the measured value exceeds the normal physiological threshold (e.g., angle deviation > 6° or deviation distance > set threshold), the system will automatically output auxiliary identification prompts such as "suspected genu varum (O-leg)" or "suspected genu valgum (X-leg)".

[0051] If the above methods are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a 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 a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0052] Example 2 This embodiment provides a knee alignment anomaly auxiliary recognition system that takes anatomical feature constraints into account, including: The image preprocessing module reads the original medical images, obtains the original width and height, calculates the aspect ratio and compares it with the target size, performs adaptive padding, records the amount of padding pixels and scaling ratio, and constructs coordinate mapping relationships. With angle invariance as the core constraint, it dynamically generates an asymmetric zero-padding strategy by calculating the physical aspect ratio of the original image, ensuring that the geometric vector directions of all skeletal anatomical axes remain strictly consistent when the image is mapped from the original high-resolution space to the network input space.

[0053] The feature extraction module uses a densely connected structure to extract features from the padded image, concatenating shallow and deep feature maps along the channel dimension to output a high-dimensional feature map. It employs the DenseNet201 network, utilizing a dense connection mechanism to directly pass high-frequency anatomical edge features extracted by the shallow network to the deep layers, where they are concatenated with the deep semantic features at the channel level. Global average pooling is then applied to the high-dimensional feature map to obtain a one-dimensional feature vector, which is then processed by a fully connected regression layer to output a normalized coordinate vector containing the coordinates of 14 keypoints. Figure 3 As shown, this module employs a densely connected feature aggregation network. Utilizing a dense connection mechanism, it directly transmits high-frequency anatomical edge features extracted by the shallow network to the deep regression head, performing channel-level concatenation with the deep semantic features. This addresses the issue of subtle bony landmarks in low-contrast X-rays easily disappearing in deep networks. The dense connection mechanism of DenseNet201 achieves maximum reuse of feature maps in the channel dimension, preserving and transmitting low-level edge details to higher levels. A global average pooling layer compresses the spatial dimension of the feature map, resulting in a 1920-dimensional one-dimensional high-dimensional feature vector. A fully connected regression layer maps the high-dimensional feature vector to a 28-dimensional output vector. The Sigmoid activation function strictly limits the output value to the range of 0 to 1, representing the relative normalized coordinates of 14 key points in the image coordinate system. These 14 key points include 6 core recognition key points and 8 anatomical auxiliary constraint points. The 6 core recognition key points correspond to the femoral head center, knee joint center, and ankle joint center of both lower limbs, respectively, and are used to directly calculate the HKA angle. Eight anatomical auxiliary constraint points are located in the diaphysis of the bilateral femurs and tibias, four on each side, including the proximal and distal endpoints on the femoral anatomical axis and the proximal and distal endpoints on the tibial anatomical axis. This module establishes a geometric constraint mechanism for the joint center by these auxiliary points, forcing the convolutional neural network to learn the orientation and morphological characteristics of the entire bone. It uses the geometric principle that two points determine a straight line to lock the midline of the bone, thus forming a geometric constraint on the center of the knee joint.

[0054] The coordinate restoration module utilizes the parameters recorded in the preprocessing stage to construct an inverse mapping function, restoring the normalized coordinates output by the model to their physical coordinates in the original high-resolution image coordinate system. The model loss function is SmoothL1Loss (beta=0.1). Compared to MSE, SmoothL1Loss exhibits L1 Loss (gradient stability, no explosion) when the error is large, and L2 Loss (smooth convergence) when the error is small. This provides better robustness to individual annotation noise that may exist in X-ray images. The optimizer is AdamW, coupled with the OneCycleLR learning rate scheduling strategy to achieve fast convergence.

[0055] The geometric calculation module is used to perform geometric calculations and recognition output based on the restored physical coordinates, extract 6 core recognition key points, construct femoral mechanical axis vector, tibial mechanical axis vector and lower limb full-length mechanical axis vector, and calculate the angle between the femoral mechanical axis vector and the tibial mechanical axis vector.

[0056] The recognition output module calculates the HKA angle and the vertical distance from the center point of the knee joint to the mechanical axis of the entire lower limb. It comprehensively analyzes the angle value and the deviation distance. If the measured value exceeds the normal physiological threshold, it outputs an auxiliary recognition prompt.

[0057] The rest is the same as in Example 1.

[0058] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A knee misalignment anomaly assisted identification method considering anatomical feature constraints, characterized in that, Includes the following steps: Obtain the original aspect ratio of the original medical image; based on the comparison between the original aspect ratio and the target aspect ratio, adaptively fill the original medical image to generate a filled image; and obtain the coordinate mapping relationship between the original coordinate system of the original medical image and the network input coordinate system of the filled image. The filled image is used as input to a depth coordinate regression model to obtain a normalized coordinate vector of key feature points based on global anatomical constraints. The key feature points include core diagnostic key points and anatomical auxiliary constraint points. Using the coordinate mapping relationship, the normalized coordinate vector is converted into physical coordinates in the original coordinate system; Based on the physical coordinates, construct the femoral mechanical axis vector, the tibial mechanical axis vector, and the lower limb full-length mechanical axis vector, calculate the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, and calculate the vertical distance from the center point of the knee joint to the lower limb full-length mechanical axis vector. Based on the included angle and the vertical distance, an abnormal knee alignment detection prompt is generated.

2. The method of claim 1, wherein the method further comprises: The specific method of adaptive filling is as follows: When the original aspect ratio is greater than the target aspect ratio, the height of the original medical image is locked and scaled, and zero pixels are symmetrically filled on both sides of the image width until the target width is reached; when the original aspect ratio is less than the target aspect ratio, the width of the original medical image is locked and scaled, and zero pixels are symmetrically filled on both sides of the image height until the target height is reached.

3. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 2, characterized in that, The coordinate mapping relationship is obtained based on the amount of pixels filled and the scaling ratio.

4. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 1, characterized in that, The key diagnostic points include the center of the femoral head, the center of the knee joint, and the center of the ankle joint in both lower limbs; The anatomical auxiliary constraint points include the femoral anatomical axis endpoints and tibial anatomical axis endpoints located in the diaphysis of both femurs and tibias.

5. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 1, characterized in that, The depth coordinate regression model includes a feature extraction network and a regression head, wherein... The feature extraction network adopts a dense connection structure, which concatenates the shallow feature map and the deep feature map in the channel dimension to output a high-dimensional feature map, and then performs global average pooling to obtain a one-dimensional feature vector. The regression head is used to transform the one-dimensional feature vector into a normalized coordinate vector.

6. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 5, characterized in that, The dense connection structure splices feature maps from different levels along the channel dimension through skip connections. The shallow feature map contains skeletal edge contour information, and the deep feature map contains skeletal semantic information.

7. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 5, characterized in that, The dimension of the one-dimensional feature vector is the same as the number of channels in the high-dimensional feature map.

8. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 5, characterized in that, The feature extraction network used is the DenseNet201 network.

9. The knee alignment anomaly auxiliary identification method considering anatomical feature constraints according to claim 1, characterized in that, The depth coordinate regression model uses the SmoothL1Loss loss function.

10. A knee alignment anomaly auxiliary recognition system considering anatomical feature constraints, characterized in that, include: The image preprocessing module is used to obtain the original aspect ratio of the original medical image, and based on the comparison between the original aspect ratio and the target aspect ratio, adaptively fill the original medical image to generate a filled image, and obtain the coordinate mapping relationship between the original coordinate system of the original medical image and the network input coordinate system of the filled image. The feature extraction module is used to take the filled image as input to the depth coordinate regression model to obtain the normalized coordinate vector of key feature points based on anatomical global constraints. The key feature points include core diagnostic key points and anatomical auxiliary constraint points. The coordinate restoration module is used to convert the normalized coordinate vector into physical coordinates in the original coordinate system using the coordinate mapping relationship; The geometric calculation module is used to construct the femoral mechanical axis vector, the tibial mechanical axis vector, and the lower limb full-length mechanical axis vector based on the physical coordinates, calculate the angle between the femoral mechanical axis vector and the tibial mechanical axis vector, and calculate the vertical distance from the center point of the knee joint to the lower limb full-length mechanical axis vector. The recognition output module is used to generate knee alignment anomaly recognition prompt information based on the included angle and the vertical distance.