Development of a Machine Learning Model for Determining Alignment in Knees Following Total Knee Arthroplasty

Chandrashekar, Anoop S., Suh, Yehyun, Fox, Jacob A., Mika, Aleksander P., Moyer, Daniel C., Polkowski, Gregory G., Faschingbauer, Martin, & Martin, J. Ryan. (2025). Development of a machine learning model for determining alignment in knees following total knee arthroplasty. *Journal of Arthroplasty.* https://doi.org/10.1016/j.arth.2025.06.016

Malalignment, or incorrect positioning, is a major cause of implant failure after total knee replacement surgery (TKA). Checking alignment by manually analyzing medical images for many patients is not practical, so machine learning (ML) models could help by quickly and accurately measuring alignment and identifying patients at risk of problems. This study aimed to develop an ML model that can accurately determine knee alignment from full-length X-ray images showing the leg from hip to ankle.

The researchers collected long-leg X-rays from 550 patients who had knee replacement surgery. They used 440 of these images to train the ML model to identify key landmarks on the bones and implants, such as the hip joint, parts of the thigh and shin bones, and the implanted knee components. Using these landmarks, the model calculated important alignment angles used by doctors to evaluate knee positioning. The remaining 110 X-rays were used to test how accurate the model was.

The ML model was very fast, analyzing each image in less than 0.1 seconds. It measured alignment angles with very small errors compared to human measurements—less than one degree difference on average for all the angles tested.

In conclusion, this ML model shows high accuracy in assessing knee alignment after surgery and demonstrates great potential to improve clinical workflows and boost research in joint replacement care.

Figure 2 

Image augmentation process. From left to right, original image, vertically flipped image, horizontally flipped image, random rotated image, resized without padding image, and random brightness contrast changed image.