Diagnose Malaria using Computer Vision
MalarAI is convolutional neural network that is trained to diagnose malaria from blood sample images. The neural network is trained using reliable data from the US National Library of Medecine. It can diagnose malaria with 96% accuracy
How it Works
Dataset Collection
First I found a data set of over 27 500 images of blood smear slides that are labelled as either parasitized or uninfected.
Data Splitting
70% of the data is reserved for training and 30% is left so we can later validate the accuracy of the model.
Image Preprocessing
The Python script randomly flips, zooms, resizes, and rotates the image so that the CNN is more generalized and therefore works on images not in the dataset.
Data Conversion
The program then resizes the image to be 64 x 64 px because all the images fed into the neural network have to be the same size. Then it converts the image into 3 x 64 x 64 tensor. The image has a third dimension beause there are different values for each RGB channel.
Neural Network Structuring
I used pairs of convolution and pooling layers to create 64 different features to measure the images with. The neural network ends with a pair of dense layers to give each feature a different amount of power over the classification decision.
Network Training
I trained the neural network for 40 epochs so the nerual network could learn different features and decide which ones were the most significant for making the final decision. I was able to get a final accuracy of 96% on my model!