Dual-stream ResNet-18 with Cross-Attention for Enhanced Knee Osteoarthritis Classification from X-ray Images
Main Article Content
Abstract
Knee osteoarthritis (KOA) is a prevalent musculoskeletal disease that significantly impairs mobility and quality of life. Early and accurate diagnosis from X-ray images is crucial for effective treatment. This study proposes the application of a novel dual-streamResNet-18 model integrated with a cross-attention mechanism for classifying knee osteoarthritis severity according to the Kellgren–Lawrence (KL) grading scale. The dataset comprises 9,786 public knee X-ray images, categorized into five severity levels. During preprocessing, images undergo three main steps: cropping irrelevant regions, enhancing contrast using Contrast Limited Adaptive Histogram Equalization, and selective data augmentation for each class, including rotation (±10 degrees), horizontal flipping, brightness/contrast adjustments, and geometric distortions. Additionally, Weighted Focal Loss is applied during training to address class imbalance, fostering more uniform model learning. The model utilizes a shared ResNet-18 backbone for feature extraction, combined with cross-attention and attention fusion blocks to enhance interaction and information integration between the two branches (raw and CLAHE-processed images). The model's output features a multi-task classification head, including: 5-level KL classification, binary classification for KL_1 vs. others, and subgroup classification for KL 0-1-2. Results demonstrate high accuracy and sensitivity, particularly for severe osteoarthritis stages, while maintaining computational efficiency compared to more complex deep networks. This ResNet-18-based model shows practical potential for aiding medical image diagnosis.
Keywords
Knee osteoarthritis, X-ray images, dual-stream model, CLAHE, attention mechanism, deep learning.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
References
[2] A. Cui, H. Li, D. Wang, J. Zhong, Y. Chen, and H. Lu, “Global, regional prevalence, incidence and risk factors of knee osteoarthritis in population-based studies,” EClinicalMedicine, p. 100587, Nov. 2020, doi: 10.1016/j.eclinm.2020.100587.
[3] S. Novelyn and R. V. Munthe, “Relationship between Body Mass Index and Knee Osteoarthritis at UKI General Hospital in 2017,” Journal of Drug Delivery and Therapeutics, vol. 12, p. 154, Aug. 2022, doi: 10.22270/jddt.v12i4-s.5575.
[4] A. Khader, A. Zyout, A.A. Fahoum, “Combining enhanced spectral resolution of EMG and a deep learning approach for knee pathology diagnosis,” PLoS One. 2024 May 7; 19(5):e0302707. doi: 10.1371/journal.pone.0302707. PMID: 38713653;
[5] C. Lopes, A. Vilaça, C. Rocha, and J. Mendes, “Knee positioning systems for X-ray environment: a literature review,” Physical and Engineering Sciences in Medicine, vol. 46, no. 1. Springer Nature, p. 45, Jan. 24, 2023. doi: 10.1007/s13246-023-01221-y.
[6] S.J. Lu, F. Hassan, S. Vijayanathan, G. Gnanasegaran, “Radionuclide bone SPECT/CT in the evaluation of knee pain: comparing two-phase bone scintigraphy, SPECT and SPECT/CT.” Br J Radiol. 2018 Oct; 91(1090):20180168. doi: 10.1259/bjr.20180168.
[7] T. Cui, R. Liu, Y. Jing, J. Fu, and Jiying Chen, “Development of machine learning models aiming at knee osteoarthritis diagnosing: an MRI radiomics analysis,” J Orthop Surg Res. 2023 May 20;18(1):375. doi: 10.1186/s13018-023-03837-y.
[8] R. Mahum et.al. “A Novel Hybrid Approach Based on Deep CNN Features to Detect Knee Osteoarthritis.” Sensors. 2021; 21(18):6189. https://doi.org/10.3390/s21186189.
[9] S. Olsson, E. Akbarian, A. Lind, A. S. Razavian and M. Gordon, “Automating classification of osteoarthritis according to kellgren-lawrence in the knee using deep learning in an unfiltered adult population,” BMC Musculoskeletal Disorders, 2021.
[10] J. Niu, J. Pan, Z. Qin, F. Huang, and H. Qin, “Small-Sample Bearings Fault Diagnosis Based on ResNet18 with Pre-Trained and Fine-Tuned Method,” Appl. Sci. 2024, 14, 5360. https://doi.org/10.3390/app14125360
[11] S. Ayyachamy, V. Alex, M. Khened, G. Krishnamurthi, “Medical image retrieval using Resnet-18”, Medical Imaging 2019: Imaging Informatics for Healthcare, Research, and Applications, 2019, vol. 10954, Art. no. 1095410. doi:10.1117/12.2515588.
[12] A.S. Mohammed, A.A. Hasanaath, G. Latif, A. Bashar, “Knee Osteoarthritis Detection and Severity Classification Using Residual Neural Networks on Preprocessed X-ray Images.” Diagnostics. 2023; 13(8):1380. https://doi.org/10.3390/diagnostics13081380
[13] P.S.Q. Yeoh, K.W. Lai, S.L. Goh, K. Hasikin, X. Wu, P. Li “Transfer learning-assisted 3D deep learning models for knee osteoarthritis detection: Data from the osteoarthritis initiative,” Front Bioeng Biotechnol. 2023 Apr 13;11:1164655. doi: 10.3389/fbioe.2023.1164655. PMID: 37122858; PMCID: PMC10136763.
[14] S.B. Francis and J.P. Verma “Deep CNN ResNet-18 based model with attention and transfer learning for Alzheimer's disease detection.” Front. Neuroinform. 18:1507217. 2025, doi: 10.3389/fninf.2024.1507217
[15] Islam and M.A.T Rony, “CDK: A novel high-performance transfer feature technique for early detection of osteoarthritis,” Journal of Pathology Informatics, Vol 15, 2024.
[16] R.K. Jain, P.K. Sharma, S. Gaj, A. Sur, and P. Ghosh, “Knee osteoarthritis severity prediction using an attentive multi-scale deep convolutional neural network,” Multimed Tools Appl 83, 6925–6942 (2024). https://doi.org/10.1007/s11042-023-15484-w
[17] P.N. Chowdary et.al., “Enhancing Knee Osteoarthritis severity level classification using diffusion augmented images,” Computer Vision and Pattern Recognition, 2023. Doi: https://arxiv.org/abs/2309.09328