Knee osteoarthritis is one of the main causes of limited mobility and physical disability in the elderly.Early detection and intervention are of great significance for delaying the progression of the disease and improving the quality of life of patients.Aiming at the problem of low detection accuracy of existing knee osteoarthritis diagnosis algorithms,a knee osteoarthritis automatic diagnosis algorithm based on improved YOLOv8s is proposed.This algorithm proposes an improved attention mechanism module(CBAM)of the convolution module,which enable the network to pay more attention to the key information of knee joint images and improve the detection accuracy of knee osteoarthritis;Design a Focal Modulation module based on multi-scale linear attention to improve the multi-scale feature representation ability of the network.The experimental results show that the average accuracy of the algorithm on the test set is 0.791,effectively achieving automatic diagnosis of knee osteoarthritis.