We aimed to assess the reliability and validity of OpenPose, a posture estimation algorithm, for measuring hip-knee-ankle (HKA) angle in patients with knee osteoarthritis, by comparing it with radiography. In this prospective study, we analysed 60 knees (30 patients) with knee osteoarthritis. We measured HKA angle using OpenPose and radiography before or after total knee arthroplasty and assessed the test–retest reliability of each method with intraclass correlation coefficient (1, 1). We evaluated the ability to estimate the radiographic measurement values from the OpenPose values using linear regression analysis and used intraclass correlation coefficients (2, 1) and Bland–Altman analyses to evaluate the agreement and error between OpenPose and radiographic measurements. OpenPose had excellent test–retest reliability (intraclass correlation coefficient (1, 1) = 1.000) and excellent agreement with radiography (intraclass correlation coefficient (2, 1) = 0.915), with regression analysis indicating a large correlation (R2 = 0.865). OpenPose also had a 1.1° fixed error and no systematic error when compared with radiography. This is the first study to validate the use of OpenPose for the estimation of HKA angle in patients with knee osteoarthritis. OpenPose is a reliable and valid tool for measuring HKA angle in patients with knee osteoarthritis. OpenPose, which enables non-invasive and simple measurements, may be a useful tool to assess changes in HKA angle and monitor the progression and post-operative course of knee osteoarthritis. Furthermore, this validated tool can be used not only in clinics and hospitals, but also at home and in training gyms; thus, its use could potentially be expanded to include self-assessment/monitoring.