Submitted:
02 October 2023
Posted:
05 October 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Significance of the Research
- Improved Security and Compliance: The proposed research work provides huge potential considering the privacy and security of medical imaging. The research follows the guidelines as per GDPR and DPA for data security that will be a great revolution in the medical industry.
- Enhanced diagnostic capacity: The research framework that constitutes the hybrid model that will ensure the security of data and the accuracy efficiency of disease detection that will ultimately result in early diagnosis and treatment.
- Facilitating Collaboration: Research will promote an innovative culture that allows the mutual collaboration of hospitals and medical institutes to be joined to achieve the improved advancements.
- Benchmark for Potential Innovation: Based on the study analysis, it will guide the future scope of innovation in medical imaging for researchers. The proposed research can be a benchmark for the future development of the idea that can be mutually beneficial for medical institutes.
- Scalable and Flexible Framework: The research illustrates the use of a CNN-based pre-trained model on the federated learning framework that is highly scalable towards the multiple of type of medical images. Provides a robust and enhanced solution for medical image detection.
- Economic Influence: Research will bring important changes to ease the economic impact such as early detection. It will ultimately bring about early disease detection saving cost and resources in the medical industry.
- Global extent and convenience: Using the FL framework as in the proposed research will ensure data privacy, allowing data from diverse sources to enhance machine learning models' learning capability.
3. Literature Review
4. Methodology
4.1. Research Model Design

4.2. Configuration of Models in Federated Learning

- TrainLoader: It is the type of DataLoader that determines the training section of the dataset. It is quite useful in iterating on the transformed images as well as in iterating on the labels over the batches. Variability is also ensured, as it is involved in the reshuffling of the training data prior to every epoch.
- valLoader: It shows the validation section of the dataset. Data iteration takes place over batches on validation images, as well as labels. It is not involved in the data reshuffling; therefore, the order stays intact throughout the epochs.
- testLoader: It is the type DataLoader that demonstrates the test part of the data set. The data iteration takes place over the batched over the test images as well as labels. Unlike TrainLoader, it is not involved in data reshuffling.
- Initialise the variable and list: The initial step involved in the tracking of the model state, validation loss, and the accuracy for the individual epoch.
- Epoch loops: The train model function also loops over a certain number of epochs.
- Phase loops: The function also performs the loops over the training as well as the validation stage of individual epochs.
- Set Models Mode: The function also keeps the mode to ‘train’ if the model is in training mode. In this way certain features including dropout as well as batch normalisation are activated. Similarly, during the validation stage, these parameters are disabled.
- Batch loops: The function also loops with the data batches.
- Forward pass: The function transfers the input label to the corresponding device via model and performs loss calculation.
- Backward pass and optimisation: When using the train model function, if the training is zero, then the gradient of the model is calculated by using the optimisers also known as backward pass.
- Statistics calculation: In the train_model function, the prediction is calculated, and the model run loss as well as accuracy is updated.
- Epoch Statistic Calculation: During the training phase, by the end of every epoch, the loss and accuracy are calculated by the end of every epoch. While in the vase of validation stage, the precision, accuracy, F1-score is calculated while showing the confusion matrix.
- In our case, we have used clients 4, 6 and 8 to train the model individually on the clients while using the ‘train_model’ function, and in this way, model accuracy and loss are given out.
- The weights from the individual clients are kept in ‘w_local’ lists, similarly, the accuracy and loss of the model are kept on their respective lists.
- In the federated learning framework, the ‘fed_avg’ function is used to take the average weight of all models to form the global model.
- The mean loss and accuracy is also calculated on the participants.
- The mean average of all the weights is referred back towards the model on individual devices. It allows every client to receive the similar model update.
- The weight average of the models is stored as the ‘fed_model_client’.
- The output is displayed with the round phase, loss, as well as the accuracy.
- Alterations in ‘validation_loss’ as well as accuracy from the last round are displayed, too.
- 10.
- Return best model: Once all corresponding epoch rounds are accomplished, the one with the least validation loss loads up the model.
4.3. Data Gathering
- Malaria falciparum blood samples were taken from 150 patients at the Chittaging Medical College Hospital, Bangladesh.
- The vivax malaria samples were taken from the same location as above from 150 patients and also 50 from healthy individuals.
- Malaria samples from falciparum were also taken from a similar location in Bangladesh: 148 patients and 45 healthy individuals.
- Vibrax malaria samples were also taken from Bangkok, Thailand, 171 patients.
- In addition, blood cell samples of falciparum malaria were collected from Bangladesh, i.e., 150 patients and other 50 healthy individuals.
- Real-time data, non-synthetic: In the experiments, synthetic data can be quite useful for training the ML models, however, the lab-based model has a limitation to real-time complexity and variance of the disease. The data collected from the real-time provides stronger robust and efficient data for training the models. As in our experiments, we are targeting the real-time data; therefore, the given dataset is collected from the patients in real time, which helps to model generalisation.
- Geographical Relevancy: Another significant impact of using this data set involves it’s correspondence with the geographic relevance where malaria is the serious health issue, i.e., Bangladesh and Thailand. The geographic location of the data helps to make the effective model prediction based on the provided data. The model customisation facility based on geographic location can help achieve higher performance. Similarly, it assists in nonspecific regions for malaria detection as well.
- Reliable dataset: Another important aspect of using these data is the reliability, as the data have been collected from the endorsed hospitals that maintain the standards. Therefore, higher reliability is essential for better model performance.
- Diverse Images: The diverse malaria image collection helps to understand the variations of the causing parasites, which ultimately helps to train the ML model effectively.
- Significant Global Impact: Malaria is one of the serious diseases that affect millions of individuals each year and has major health consequences. Therefore, the reflexion of malaria disease constitutes the main global consideration.
4.4. Exploratory Data Analysis (EDA)
4.4.1. Number of Available Data Sets


4.4.2. How Parasitised and Nonparasitised Cells Look Like

5. Data Preparation
- The initial stage involves reading the images from the directory.
- Decoding of the image content that involves converting into grid form as RGB.
- Conversion of images into float point tensor.
- Rescaling the tensors into the form that allows the scale range from 0 and 255 to be 0s and 1s as the CNN models takes in the smaller inputs.
5.1. Visualize the Training Images


6. Malaria Experiments and Results
6.1. FL_Densenet and FL_Resnet50 (4 Clients)

-
Accuracy: The overall correct malaria predictions out of all predictions, the accuracy can be calculated as follows:
- DenseNet: (1276 + 1353)/(1276 + 1353 + 39 + 84) = 0.9463 or 94.63%
- ResNet50: (1254 + 1366)/(1254 + 1366 + 26 + 106) = 0.9486 or 94.86%
- 2.
-
Precision: It shows the accuracy of the positive prediction of malaria and can be observed in the following equation:
- DenseNet: 1276/(1276 + 39) = 0.9703 or 97.03%
- ResNet50: 1254/(1254 + 26) = 0.9796 or 97.96%
- 3.
-
Recall (sensitivity): It involves the fraction of positive predictions which is correctly determined:
- DenseNet: 1276/(1276 + 84) = 0.9382 or 93.82%
- ResNet50: 1254/(1254 + 106) = 0.9220 or 92.20%
- 4.
-
Specificity: It involves the fractions of negative prediction that are correctly determined:
- DenseNet: 1353/(1353 + 39) = 0.9720 or 97.20%
- ResNet50: 1366/(1366 + 26) = 0.9813 or 98.13%
- 5.
-
F1 Score: The weighted average of precision and recall of both models can be calculated as follows:
- DenseNet: 2 * (0.9703 * 0.9382)/(0.9703 + 0.9382) = 0.9540 or 95.40%
- ResNet50: 2 * (0.9796 * 0.9220)/(0.9796 + 0.9220) = 0.9501 or 95.01%
6.2. FL_Densenet and FL_Resnet50 (6 Clients)
-
Accuracy: (TP+TN)/(TP+FP+FN+TN)
- Densenet: (688+1272)/(688+0+168+1272) = 0.9213 (92.13%)
- Restnet50: (666+1269)/(666+3+703+1269) = 0.7250 (72.50%)
-
Precision: TP/(TP+FP)
- Densenet: 688/(688+0) = 1 (100%)
- Restnet50: 666/(666+3) = 0.9955 (99.55%)
-
Recall: TP/(TP+FN)
- Densenet: 688/(688+168) = 0.8037 (80.37%)
- Restnet50: 666/(666+703) = 0.4864 (48.64%)
-
F1-score: 2*(precision*recall)/(precision+recall)
- Densenet: 2*(1*0.8037)/(1+0.8037) = 0.8911 (89.11%)
- Restnet50: 2*(0.9955*0.4864)/(0.9955+0.4864) = 0.6530 (65.30%)
-
Specificity: TN/(TN+FP)
- Densenet: 1272/(1272+0) = 1 (100%)
- Restnet50: 1269/(1269+3) = 0.9976 (99.76%)

6.3. FL_Densenet and FL_Resnet50 (8 Clients)
- 1.
-
Accuracy: (TP+TN)/(TP+FP+FN+TN)
- Densenet: (1308+712)/(1308+552+68+712) = 0.7504 (75.04%)
- Restnet50: (666+1269)/(666+3+703+1269) = 0.7250 (72.50%)
- 2.
-
Precision: TP/(TP+FP)
- Densenet: 1308/(1308+552) = 0.7033 (70.33%)
- Restnet50: 666/(666+3) = 0.9955 (99.55%)
- 3.
-
Recall (sensitivity): TP/(TP+FN)
- Densenet: 1308/(1308+68) = 0.9506 (95.06%)
- Restnet50: 666/(666+703) = 0.4864 (48.64%)
- 4.
-
F1-Score: 2*(Precision*Recall)/(Precision+Recall)
- Densenet: 2*(0.7033*0.9506)/(0.7033+0.9506) = 0.8087 (80.87%)
- Restnet50: 2*(0.9955*0.4864)/(0.9955+0.4864) = 0.6530 (65.30%)
- 5.
-
Specificity (True Negative Rate): TN/(TN+FP)
- Densenet: 712/(712+552) = 0.5635 (56.35%)
- Restnet50: 1269/(1269+3) = 0.9976 (99.76%)
6.4. Significance Test
| Metrics | Model Name | T-Stats | P-Value |
|---|---|---|---|
| Accuracy | FL_DENSENET And FL RESNET50 | 11.45726 | 0 |
| Precision | FL_DENSENET And FL RESNET50 | −0.09118 | 0.92746 |
| Re-call | FL_DENSENET And FL RESNET50 | 0.09637 | 0.92335 |
| F1-Score | FL_DENSENET And FL RESNET50 | 0.25665 | 0.79778 |

7. Summary
- In the case where it is necessary to determine the actual malaria disease as much as possible, densenet is preferred due to higher recall.
- In the case where it is required to determine the actual malaria disease, and in reality, it is malaria, then resnet50 is preferred due to it’s higher precision.
- In the case where it is required to determine the balancing among the false positive as well as false negative, then densenet performs well due to higher recall.
- In the case where it is required to correctly determine the higher negative cases, that is, no-malaria, resnet50 performs well due to it’s effective specificity results.
References
- Ali, S.; Raut, S. Detection of Diabetic Retinopathy from fundus images using Resnet50," 2023 2nd International Conference on Paradigm Shifts in Communications Embedded Systems, Machine Learning and Signal Processing (PCEMS), Nagpur, India, 2023, pp. 1–5. [CrossRef]
- S. S., M; Rao, M.D.S.; Rani, M.S.; Durga, K.; Kranthi, A. S. S. M; Rao, M.D.S.; Rani, M.S.; Durga, K.; Kranthi, A. Covid-19 X-Ray Image Detection using ResNet50 and VGG16 in Convolution Neural Network," 2022 IEEE Conference on Interdisciplinary Approaches in Technology and Management for Social Innovation (IATMSI), Gwalior, India, 2022; pp. 1–5. [CrossRef]
- Jing, S.; Kun, H.; Xin, Y.; Juanli, H. Optimization of Deep-Learning Network Using Resnet50 Based Model for Corona Virus Disease (COVID-19) Histopathological Image Classification. In Proceedings of the 2022 IEEE International Conference on Electrical Engineering, Big Data and Algorithms (EEBDA), Changchun, China; 2022; pp. 992–997. [Google Scholar] [CrossRef]
- Huy, V.T.Q.; Lin, C.-M. An Improved Densenet Deep Neural Network Model for Tuberculosis Detection Using Chest X-Ray Images. IEEE Access 2023, 11, 42839–42849. [Google Scholar] [CrossRef]
- S and A. L., R. P J. Study of Deep Learning Approaches for Diagnosing Covid-19 Disease using Chest CT Images," 2023 7th International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, 2023, pp. 263–269. [CrossRef]
- Chowdhury, D.; et al. Detection of Sars-Cov-2 from human chest CT images in Multi-Convolutional Neural Network’s environment," 2023 11th International Conference on Internet of Everything, Microwave Engineering, Communication and Networks (IEMECON), Jaipur, India, 2023, pp. 1–7. [CrossRef]
- Zhou, Z.; Liu, Y.; Wang, Q.; Toe, T.T. Detection of Pneumonia Based on ResNet Improved by Attention Mechanism," 2023 IEEE 3rd International Conference on Power, Electronics and Computer Applications (ICPECA), Shenyang, China, 2023, pp. 859–863. [CrossRef]
- Tariq, T.; Suhail, Z.; Nawaz, Z. Knee Osteoarthritis Detection and Classification Using X-Rays," in IEEE Access, vol. 11, pp. 48292–48303, 2023. [CrossRef]
- Amelia Jiménez-Sánchez, Mickael Tardy, Miguel A. González Ballester, Diana Mateus, Gemma Piella, Memory-aware curriculum federated learning for breast cancer classification, Computer Methods and Programs in Biomedicine, Volume 229, 2023, 107318, ISSN 0169-2607. [CrossRef]
- Jakaite, L.; Schetinin, V.; Maple, C. Bayesian Assessment of Newborn Brain Maturity from Two-Channel Sleep Electroencephalograms. Comput. Math. Methods Med. 2012, 2012, 1–7. [Google Scholar] [CrossRef] [PubMed]
- Jakaite, L.; Schetinin, V.; Maple, C.; Schult, J. Bayesian Decision Trees for EEG Assessment of newborn brain maturity’, in 2010 UK Workshop on Computational Intelligence (UKCI), Colchester, United Kingdom, Sep. 2010, pp. 1–6. [CrossRef]
- Schetinin, V.; Jakaite, L.; Nyah, N.; Novakovic, D.; Krzanowski, W. Feature Extraction with GMDH-Type Neural Networks for EEG-Based Person Identification. Int. J. Neur. Syst. 2018, 28, 1750064. [Google Scholar] [CrossRef] [PubMed]
- Schetinin, V.; Jakaite, L.; Jakaitis, J.; Krzanowski, W. Bayesian Decision Trees for predicting survival of patients: A study on the US National Trauma Data Bank’. Computer Methods and Programs in Biomedicine 2013, 111, 602–612. [Google Scholar] [CrossRef] [PubMed]
- Swapna, G.; Vinayakumar, R.; Soman, K.P. Diabetes detection using deep learning algorithms. ICT express, 2018, 4, 243–246. [Google Scholar]
- Available online: https://www.kaggle.com/datasets/iarunava/cell-images-for-detecting-malaria.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).