Muscle ultrasound quantification is a valuable complementary diagnostic tool for diabetic peripheral neuropathy (DPN), enhancing physicians’ diagnostic capabilities. Quantitative assessment is generally regarded as more reliable and sensitive than visual evaluation, which often necessitates specialized expertise. This work develops a computer-aided diagnostic (CAD) system based on muscle ultrasound that integrates the bag of features (BOF) and an ensemble subspace k-nearest neighbor (KNN) algorithm for DPN detection. The BOF creates a histogram of visual word occurrences to represent the muscle ultrasound images and trains an ensemble classifier through cross-validation, determining optimal parameters to improve classification accuracy for the ensemble diagnosis system. The dataset includes ultrasound images of six muscles from 53 subjects, consisting of 27 control and 26 patient cases. An empirical analysis was conducted for each binary classifier based on muscle type to select the best vocabulary tree properties or K values for BOF. The result indicates that ensemble subspace KNN classification, based on the bag of features, achieved an accuracy of 97.23%. CAD systems can effectively diagnose muscle pathology, thereby addressing limitations and identifying issues in individuals with diabetes. This research underscores muscle ultrasound as a promising diagnostic tool to aid physicians in making accurate diagnoses, streamlining workflow, and uncovering muscle-related complications in DPN patients.