BackgroundIn China, diabetes is a common, high-incidence chronic disease. Diabetes has become a serious public health problem. However, the current diagnosis and treatment methods are difficult to control the progress of diabetes. Traditional Chinese Medicine (TCM) has become an option for the treatment of diabetes due to its low cost, satisfactory curative effect and good accessibility. Objective: Based on the tongue image data to realize the fine classification of the diabetic population, provide a diagnostic basis for the formulation of individualized treatment plans for diabetes, ensure the accuracy and consistency of the diagnosis of TCM, and promote the objective, standardized and standardized development of TCM diagnosis. Methods: We use the TFDA-1 tongue examination instrument to collect the tongue images of the subjects. Tongue Diagnosis Analysis System (TDAS) is used to extract the color feature, texture feature and tongue coating ratio feature of the tongue image. Auto-Encoder extracts auto-encoding features from tongue images through self-supervised learning extraction. We use K-means to perform fusion calculations on TDAS features and self-encoding features to classify tongue images. TDAS features are used to describe the differences between clusters and the characteristics of clusters. Vision Transformer (ViT) combined with Grad-weighted Class Activation Mapping (Grad-CAM) is used to verify the clustering results and calculate positioning diagnostic information. Results: According to the input tongue image data, K-means divides the diabetic population into 4 clusters with clear boundaries between clusters. Cluster 3 had the highest TB-L and TC-L, and Cluster 2 had the lowest TB-L and TC-L (P