WEEK 4: Malaria Parasite Classification

Cem Bektaşoğlu
bbm406f19
Published in
3 min readDec 22, 2019

Hi everyone! This week, we implemented Convolutional Neural Network. Nowadays, there are many models based on CNN architecture. We explained some of them last week. You can find third week here. In our project, we plan to determine the most suitable model by using different convolutional neural network models. And this week we implemented the VGG-16 and achieved some results.

We have reserved 80% of the malaria cells dataset to be used
for training, 10% for validation and the rest of it for testing.

4.1. Preliminary results

Firstly we tested our dataset with pre-trained VGG-16 model. And we achieved result which is average success accuracy of %50.44 and the average loss of 0.0220

First outputs of pre-trained model.

We trained the model with malaria cell dataset. The highest accuracy score was %94 for validation process. Then we tested this model with test dataset. We obtained a %92 accuracy score. The parameters we used to conduct this experiment are as follows.

  • batch size = 8
  • epoch num = 7
  • optimizer = SGD , momentum = 0.9
  • learning rate = 0.001
  • Loss function = CrossEntropyLoss

We assigned the batch size 8 for shortening time to train process. We have tried 25 epochs. But after the 8th epoch, as you can see in the graph accuracy doesn’t change. So we decided to assign the number of epochs to 7.

Train graph
Validation graph

We have used stochastic gradient descent(SGD) algorithm for the optimizer. In deep learning problems, various optimizer algorithms used to finding optimal weight values. There are differences in performance and speed between these algorithms. Generally, the default optimizer is SGD in Deep Learning models. SGD is slower than other algorithms and sometimes its result is very bad. But we observed it is available for our dataset.

Cross-Entropy is the most common loss function for classification problems.

After training the model, an example of the results from the test file is as follows:

Final outputs of the trained model.

See you next week…

--

--