This is a master's degree project of Artificial Intelligence developed in 2021.
The objective of the project is to build a CNN model with subsequent training phase, validation and comparison of the results with some pretrained network models on which fine tuning is performed.
More details can be found in the documentation provided.
The classes the network has to detect are the following:
- Bacterial Pneumonia
- COVID-19
- Normal
- Viral Pneumonia
An example of these (respectively from left to right) are provided in the figure below.
The starting dataset and the training set can be found here.
To balance the dataset, 1000 samples per class were chosen.
Since some classes had fewer samples than required, the data augmentation technique with 15 transformations per sample was applied.
An example of the application of this technique on a sample of COVID-19 is shown below.
The CNN is composed by several convolutional layers followed by pooling ones.
Then, the feature map is flattened and two Dense layers composed by 512 and 4 respectively are added with a Dropout layer in between.
The visual representation of the network's structure is the following:
The final accuracy obtained is 78,14%. Accuracy and loss graphs are shown below.