Machine learning medical image classification notebooks

Image classification is an interesting challenge that requires many images for training. Here we propose to explore 4 different machine learning classification approaches (from random forest to ResNet) on an image set created from the IXI data set using famous python packages: scikit-learn and Keras/TensorFlow.

This example is split into 4 notebooks. The first notebook is about reading and preparing image sets.

The second notebook introduces 4 machine learning classification approaches and allow user to train them. The goal is also to change some hyper-parameters to reach F1 score greater than 0.95. Classical classification metrics are also introduced in this notebook. The last network training (finetuning ResNet50) is long and thus GPU can be usefull for this part.

Image classification network with convolution layers and then fully connected (MLP)

The third notebook is on interpretability. It allows us to understand better how CNN network works and why the results are so good on the used images. It is based on GradCAM.

GradCAM activation map of the predicted class superposed on tested image.

The notebook 4 introduces the knowledge distillation. It is applied to help a light student model to perform as well as a heavy teacher model.

There is a last notebook that illustrates the auto differentiation and the gradient descent optimization algorithm.

The following archive contains all necessary materials: TP4_Classification.zip

This project is GitLab versioned here.


Posted

in

, ,

by

Tags: