Seven independent convolutional neural network (CNN) architectures were evaluated, including VGG16, VGG19, ResNet18, ResNet50, ResNet101, DenseNet121, and DenseNet161. Deeper CNNs (e.g., ResNet, DenseNet) have been shown to enhance performance by increasing the number of layers, using repeated modules with more complex or parallel filters, bottleneck connections, and dropout. Older architectures (e.g., VGGNet) were still selected in this study because they have consistently produced comparable results in medical image analyses.
12 Due to the limited number of images used for training, transfer learning was also used during the training process to improve the performance.
19 In our study, the weights of each architecture pretrained on ImageNet were kept, and only the weights of fully connected layers were updated on the training dataset. Furthermore, before being employed in the model development, raw UWF-OCT images were preprocessed. First, all original images were scaled to the same size, from 2300 × 1480 pixels to 230 × 148 pixels. We downsized the input images without cropping to increase the prediction speed while at the same time keeping all information of the images. Second, image normalization was performed using the mean and variance values of the pretraining dataset. Third, to increase the heterogeneity, the images in the training dataset were randomly augmented by horizontal and vertical flipping. The number of newly generated images in each epoch was the same. This data augmentation method was universally used to increase the robustness, especially for the training process with a small sample size.
The hyperparameters of each algorithm were fine tuned based on the model performance on the validation dataset. The models with the highest areas under the receiver operating characteristic (ROC) curve (AUCs) were selected as the final ones. The Youden index method
20 was used to determine the optimal cutpoint in the ROC curve. Additional information on the image preprocessing and AI training process is provided in
Supplementary Methods S3 and
S4.