Recent developments in Artificial Intelligence and Machine learning have enabled more efficient and precise medical diagnosis. Still, the development of these AI and ML models from scratch is expensive and time-consuming. An alternative to creating these models from scratch is fine-tuning pre-trained models. Attempts were made to create such models for pneumonia detection. Tensorflow with Keras API was used as the framework. Resnet-50 weighing ImageNet was used as the pre-trained Convolutional Neural Network model and fine-tuned to detect pneumonia in X-rays collected from children ages 1-5 visiting Guangzhou Women and Children’s Medical Center. Multiple data augmentation and preprocessing modifications were applied to the training dataset including rescale=1./255, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, rotation_range=15, width_shift_range=0.1, height_shift_range=0.1. Batch sizes containing 16 images were used for training, validation, and testing of the model. Class weighting was used as a method to compensate for imbalances between the number of pneumonia and normal classes. Only the last 10 layers of the ResNet50 model were set to be trainable. GlobalAveragepooling2D was used to reduce the dimensionality of feature maps. The dense layer had 128 neurons with relu activation and regularized via L1L2 regularization, dropout rate for this layer was set at 0.3. The final dense layer contained 1 neuron with sigmoid activation. Adam was used as the optimizer for this model with an initial learning rate of 10^-4 subject to modification by the ReduceLROnPlateau function. Binary-cross-entropy was used as the loss function. 25 epochs (training rounds) were used to train the model. The fine-tuned model was able to detect normal and pneumonia cases with a precision of 0.89 and 0.97 and F1 scores of 0.92 and 0.95, respectively. These findings demonstrate the promising use case of transfer learning in creating efficient and effective deep learning models for medical image classification.
Leveraging Transfer Learning for Pneumonia Detection: Fine-Tuning a Deep Neural Network Model for Medical Imaging
Category
Student Abstract Submission