PurposeTo develop an artificial intelligence (AI) system for detecting pathological patterns of diabetic macular oedema (DME) with fine-grained image categorisation using optical coherence tomography (OCT) images.MethodsThe development of the AI system consists of two parts, a pretraining process on a public dataset (Asia Pacific Tele-Ophthalmology Society (APTOS)), and the training process on the local dataset. The local dataset was partitioned into the training set, validation set and test set in the ratio of 6:2:2. The Split Subspace Attention Network (SSA-Net) architecture was adopted to train independent models to detect the seven pathological patterns of DME: intraretinal fluid (IRF), subretinal fluid (SRF), pigment epithelial detachment (PED), hyper-reflective retinal foci (HRF), Müller cell cone disruption (MCCD), subretinal hyper-reflective material (SHRM) and intra-cystic hyper-reflective material (ICHRM). The confusion matrix, sensitivity, specificity and receiver operating characteristic (ROC) were used to evaluate the performance of the models.ResultsThe APTOS public dataset consists of 33 853 OCT images and the local dataset consists of 1346 OCT images with DME. In the pretraining process on the public dataset, the accuracy was 0.652 for IRF, 0.928 for SRF, 0.936 for PED and 0.975 for HRF. After the training process on the local dataset, the SSA-Net architecture showed better performance in fine-grained image categorisation on the test set. The area under the ROC curve was 0.980 for IRF, 0.995 for SRF, 0.999 for PED, 0.908 for MCCD, 0.887 for HRF, 0.990 for SHRM and 0.972 for ICHRM. The AI system outputs a heatmap for each result, which can give a visual explanation for the automated identification process. The heatmaps revealed that the regions of interest of the AI system were consistent with the retinal experts.ConclusionsThe proposed SSA-Net architecture for detecting the pathological patterns of DME achieved satisfactory accuracy. However, this study was conducted in one medical centre, and multicentre trials will be needed in the future.