A Novel Ensemble Weight-Assisted Yolov5-Based Deep Learning Technique for the Localization and Detection of Malaria Parasites
Abstract
:1. Introduction
Contributions of This Study
- Upon studying the available dataset, it was found that the dataset was not compatible with the YOLOv5 model, since YOLOv5 requires different formatting than the available datasets formatting. As a result, the pre-processing technique is utilized on the provided dataset to ensure that it complies with the YOLOv5 model.
- Furthermore, variations in the data are integrated into the dataset by augmentation techniques—for instance, random rotation and random flipping of the image to avoid the overfitting of the model, because the model can easily memorize the dataset if the sample size is very small.
- This is a novel technique that has not been used previously to ensemble YOLOv5 weights for the detection of malaria parasites in a blood smear.
- The proposed ensemble technique is also tested against the transfer learning technique of YOLOv5.
- After the completion of the study, comparisons are made with other base models based on the precision, recall, and mAP value.
2. Related Work
3. Methodology
3.1. Problem Statement
3.2. Dataset
3.3. Data Pre-Processing and Annotation
- Vertical Flip: To flip an image vertically, the x coordinates of the image pixel need to be changed, and this can be accomplished using:
- Horizontal Flip: While flipping an image horizontally, the y coordinates of the image pixel need to be changed, and this is implemented using:
- During the image flip, the position of the bounding boxes also changes, and for implementation, the following formulas were used [25]:
- Bounding Box Vertical Flip: Vertical Flip forces the x coordinates to move to different locations. For bounding boxes, the new coordinate can be calculated using:
- Bounding Box Horizontal Flip: The Horizontal Flip deals with the y coordinate, and to manipulate the bounding boxes y coordinate, the following formula is utilized:
3.4. Proposed Ensemble Technique
3.4.1. YOLOv5 Architecture
- Model Backbone: Its end goal is to extract the key features from the provided input image. The Cross Stage Partial Network is used by YOLOv5. It outperforms several deep networks [29].
- Model Neck: It is used to detect and identify similar objects present in the image with different variations in size and scale. It constructs feature pyramids, which leads to a better performance in test datasets.
- Model Head: The final detection is carried out by the Model Head. The class probability, score, and boundary boxes are generated in this component.
Activation Function
Loss Function
Optimization Function
3.4.2. Parameter Changes in the YOLOv5 Model
Algorithm 1: Localization using YOLOv5 |
Input: Plasmodium parasite images. |
Output: Image with boundary boxes around the detected parasites. |
Start |
Get Dataset |
Extract Zip File |
Preprocess Image |
Change width and height of the image to 416 × 416 |
Flip random image horizontally: |
Flip random image vertically: |
Download YOLOv5 model |
Changes in yolo.yml |
nc: 1 #set number of classes to 1 |
depth_multiple: 1.33 |
width_multiple: 1.25 |
Changes in data.yml |
Set path of train_directory |
Set path of validation_directory |
Set epoch to 0 |
While epoch < 165 |
Train YOLOv5 #with new configurations |
Save Weights |
End While loop |
Ensemble best accuracy weight and last weight |
Pass test set to the val.py |
End |
4. Results and Discussions
4.1. Performance Metrics
- Precision:
- Recall:
- mAP:
4.2. Discussion
4.2.1. Strengths
4.2.2. Limitations
5. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- World Health Organization World Malaria Report 2018; World Health Organization: Genève, Switzerland, 2019; ISBN 9789241565653.
- White, N.J.; Ho, M. The pathophysiology of malaria. In Advances in Parasitology; Elsevier: Amsterdam, The Netherlands, 1992; Volume 31, pp. 83–173. [Google Scholar]
- Kwiatkowski, D.; Sambou, I.; Twumasi, P.; Greenwood, B.; Hill, A.; Manogue, K.; Cerami, A.; Castracane, J.; Brewster, D. Tnf concentration in fatal cerebral, non-fatal cerebral, and uncomplicated Plasmodium falciparum malaria. The Lancet 1990, 336, 1201–1204. [Google Scholar] [CrossRef]
- O’Meara, W.P.; Barcus, M.; Wongsrichanalai, C.; Muth, S.; Maguire, J.D.; Jordan, R.G.; Prescott, W.R.; McKenzie, F.E. Reader technique as a source of variability in determining malaria parasite density by microscopy. Malar. J. 2006, 5, 118. [Google Scholar] [CrossRef] [Green Version]
- Talapko, J.; Škrlec, I.; Alebić, T.; Jukić, M.; Včev, A. Malaria: The Past and the Present. Microorganisms 2019, 7, 179. [Google Scholar] [CrossRef] [Green Version]
- ZJan, Z.; Khan, A.; Sajjad, M.; Muhammad, K.; Rho, S.; Mehmood, I. A review on automated diagnosis of malaria parasite in microscopic blood smears images. Multimed. Tools Appl. 2017, 77, 9801–9826. [Google Scholar]
- Faster R-CNN Explained for Object Detection Tasks. Available online: https://blog.paperspace.com/faster-r-cnn-explained-object-detection/ (accessed on 27 January 2022).
- YOLO: Real-Time Object Detection Explained. Available online: https://www.v7labs.com/blog/yolo-object-detection (accessed on 27 January 2022).
- How to Use Yolo v5 Object Detection Algorithm for Custom Object Detection. Available online: https://www.analyticsvidhya.com/blog/2021/12/how-to-use-yolo-v5-object-detection-algoritem-for-custom-object-detection-an-example-use-case/ (accessed on 24 January 2022).
- Roy, S.S.; Goti, V.; Sood, A.; Roy, H.; Gavrila, T.; Floroian, D.; Paraschiv, N.; Mohammadi-Ivatloo, B. L2 Regularized Deep Convolutional Neural Networks for Fire Detection. J. Intell. Fuzzy Syst. 2022, 43, 1799–1810. [Google Scholar] [CrossRef]
- Hung, J.; Carpenter, A. Applying faster r-cnn for object detection on malaria images. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Honolulu, HI, USA, 21–26 July 2017; IEEE: Piscataway Township, NJ, USA, 2017; pp. 808–813. [Google Scholar]
- Pattanaik, P.; Swarnkar, T.; Sheet, D. Object detection technique for malaria parasite in thin blood smear images. In Proceedings of the 2017 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Kansas City, MO, USA, 13–16 November 2017; IEEE: Piscataway Township, NJ, USA, 2017; pp. 2120–2123. [Google Scholar]
- Zedda, L.; Loddo, A.; Di Ruberto, C. A Deep Learning Based Framework for Malaria Diagnosis on High Variation Data Set. In Proceedings of the International Conference on Image Analysis and Processing, Lecce, Italy, 23–27 May 2022; Springer: Cham, Switzerland; pp. 358–370. [Google Scholar]
- Shal, A.; Gupta, R. A comparative study on malaria cell detection using computer vision. In Proceedings of the 12th International Conference on Cloud Computing, Data Science & Engineering (Confluence), Virtual, 27–28 January 2022; IEEE: Piscataway Township, NJ, USA, 2022; pp. 548–552. [Google Scholar]
- Chibuta, S.; Acar, A.C. Real-time Malaria Parasite Screening in Thick Blood Smears for Low-Resource Setting. J. Digit. Imaging 2020, 33, 763–775. [Google Scholar] [CrossRef] [PubMed]
- Loh, D.R.; Yong, W.X.; Yapeter, J.; Subburaj, K.; Chandramohanadas, R. A deep learning approach to the screening of malaria infection: Automated and rapid cell counting, object detection and instance segmentation using Mask R-CNN. Comput. Med. Imaging Graph. 2021, 88, 101845. [Google Scholar] [CrossRef] [PubMed]
- Nakasi, R.; Zawedde, A.; Mwebaze, E.; Tusubira, J.F.; Maiga, G. Localization of malaria parasites and white blood cells in thick blood smears. arXiv 2020, arXiv:2012.01994. [Google Scholar] [CrossRef]
- Quinn, J.A.; Nakasi, R.; Mugagga, P.K.; Byanyima, P.; Lubega, W.; Andama, A. Deep convolutional neural networks for microscopy- based point of care diagnostics. In Proceedings of the Machine Learning for Healthcare Conference, Los Angeles, CA, USA, 19–20 August 2016; pp. 271–281. [Google Scholar]
- Koirala, A.; Jha, M.; Bodapati, S.; Mishra, A.; Chetty, G.; Sahu, P.K.; Mohanty, S.; Padhan, T.K.; Mattoo, J.; Hukkoo, A. Deep Learning for Real-Time Malaria Parasite Detection and Counting Using YOLO-mp. IEEE Access 2022, 10, 102157–102172. [Google Scholar] [CrossRef]
- Manku, R.R.; Sharma, A.; Panchbhai, A. Malaria Detection and Classificaiton. arXiv 2020, arXiv:2011.14329. [Google Scholar] [CrossRef]
- Dong, Y.; Pan, W.D. Image Classification in JPEG Compression Domain for Malaria Infection Detection. J. Imaging 2022, 8, 129. [Google Scholar] [CrossRef] [PubMed]
- Roy, S.S.; Rodrigues, N.; Taguchi, Y.-H. Incremental Dilations Using CNN for Brain Tumor Classification. Appl. Sci. 2020, 10, 4915. [Google Scholar] [CrossRef]
- Torch Hub Series #3: YOLOv5 and SSD—Models on Object Detection. Available online: https://pyimagesearch.com/2022/01/03/torch-hub-series-3-yolov5-and-ssd-models-on-object-detection/ (accessed on 13 January 2022).
- Shorten, C.; Khoshgoftaar, T.M. A survey on Image Data Augmentation for Deep Learning. J. Big Data 2019, 6, 60. [Google Scholar] [CrossRef]
- How Flip Augmentation Improves Model Performance. Available online: https://blog.roboflow.com/how-flip-augmentation-improves-model-performance/ (accessed on 20 February 2022).
- Yolo-v5 Object Detection on a Custom Dataset. Available online: https://towardsai.net/p/computer-vision/yolo-v5-object-detection-on-a-custom-dataset (accessed on 12 February 2022).
- Give Your Software the Power to See Objects in Images and Video. Available online: https://roboflow.com/ (accessed on 19 December 2021).
- Xu, R.; Lin, H.; Lu, K.; Cao, L.; Liu, Y. A Forest Fire Detection System Based on Ensemble Learning. Forests 2021, 12, 217. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Liao, H.-Y.M.; Wu, Y.H.; Chen, P.-Y.; Hsieh, J.-W.; Yeh, I.-H. Cspnet: A new backbone that can enhance learning capability of cnn. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 390–391. [Google Scholar]
- Xu, B.; Wang, N.; Chen, T.; Li, M. Empirical evaluation of rectified activations in convolutional network. arXiv 2015, arXiv:1505.00853. [Google Scholar] [CrossRef]
- Bergstra, J.; Bengio, Y. Quadratic features and deep architectures for chunking. In Proceedings of the Human Language Technologies: Conference of the North American Chapter of the Association of Computational Linguistics, Boulder, CO, USA, 31 May–5 June 2009; pp. 245–248. [Google Scholar]
- Ruder, S. An overview of gradient descent optimization algorithms. arXiv 2016, arXiv:1609.04747. [Google Scholar] [CrossRef]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar] [CrossRef]
- Ganaie, M.; Hu, M.; Malik, A.; Tanveer, M.; Suganthan, P. Ensemble deep learning: A review. Eng. Appl. Artif. Intell. 2022, 115, 2104–02395. [Google Scholar] [CrossRef]
- Padilla, R.; Netto, S.L.; da Silva, E.A.B. A Survey on Performance Metrics for Object-Detection Algorithms. In Proceedings of the 2020 International Conference on Systems, Signals and Image Processing (IWSSIP), Niterói, Brazil, 1–3 July 2020; IEEE: Piscataway Township, NJ, USA, 2020; pp. 237–242. [Google Scholar]
- Raschka, S. An overview of general performance metrics of binary classifier systems. arXiv 2014, arXiv:1410.5330. [Google Scholar] [CrossRef]
- Yoma, N.B.; Wuth, J.; Pinto, A.; de Celis, N.; Celis, J.; Huenupan, F.; Fustos-Toribio, I.J. End-to-end LSTM based estimation of volcano event epicenter localization. J. Volcanol. Geotherm. Res. 2021, 429, 107615. [Google Scholar] [CrossRef]
- Huang, Z.; Xu, W.; Yu, K. Bidirectional LSTM-CRF models for sequence tagging. arXiv 2015, arXiv:1508.01991. [Google Scholar] [CrossRef]
- Subramanian, B.; Olimov, B.; Naik, S.M.; Kim, S.; Park, K.-H.; Kim, J. An integrated mediapipe-optimized GRU model for Indian sign language recognition. Sci. Rep. 2022, 12, 11964. [Google Scholar] [CrossRef] [PubMed]
- Yan, B.; Fan, P.; Lei, X.; Liu, Z.; Yang, F. A Real-Time Apple Targets Detection Method for Picking Robot Based on Improved YOLOv5. Remote Sens. 2021, 13, 1619. [Google Scholar] [CrossRef]
Author | Use of Prebuilt Object Detection Model | Limitations |
---|---|---|
Samson C. et. al. [15] | ✔ | With small images, the mAP value of the YOLO model is very low. |
Dr. Rong et. al. [16] | ✖ | The number of samples in the dataset is very small. |
Rose N. et. al. [17] | ✔ | Poor annotations lead to high FP and FN results in testing. |
John A. et. al. [18] | ✖ | The CNN model was not able to extract minute details from the image, which leads to low accuracy. |
Koirala et. al. [19] | ✔ | The latest YOLO model is not explored. |
Ruskin R. et al. [20] | ✔ | Variations related to automatic field testing are not considered |
Class | X_Center | Y_Center | Width | Height |
---|---|---|---|---|
0 | 0.7992788462 | 0.7896634615 | 0.05288461538 | 0.05288461538 |
0 | 0.6201923077 | 0.7524038462 | 0.05288461538 | 0.05288461538 |
0 | 0.4699519231 | 0.7331730769 | 0.05288461538 | 0.05288461538 |
0 | 0.7896634615 | 0.9302884615 | 0.05288461538 | 0.05288461538 |
0 | 0.9338942308 | 0.4086538462 | 0.05288461538 | 0.05288461538 |
0 | 0.2776442308 | 0.4927884615 | 0.05288461538 | 0.05288461538 |
0 | 0.9459134615 | 0.3137019231 | 0.05288461538 | 0.05288461538 |
0 | 0.9098557692 | 0.5637019231 | 0.05288461538 | 0.05288461538 |
0 | 0.5252403846 | 0.3822115385 | 0.05288461538 | 0.05288461538 |
0 | 0.1382211538 | 0.4543269231 | 0.05288461538 | 0.05288461538 |
Type | Information |
---|---|
Pre-Processing | Auto Orient: Applied |
Resize: Stretch and Crop to 416 × 416 | |
Augmentations | Outputs per training example: 3 |
Flip: Horizontal, Vertical |
Parameters | Values |
---|---|
Frozen Layers | 9 |
Image shape | 416 |
Batch | 16 |
Epochs | 30 |
Weights | yolov5x.pt |
Name | yolov5x_tuned |
Methods | Precision | Recall | [email protected] | Shape |
---|---|---|---|---|
SW + CNN [18] | - | - | 0.685 | 50 × 50 |
Modified YOLO [15] | - | - | 0.76 | 224 × 224 |
Faster RCNN [17] | 0.67 | 0.80 | 0.55 | 512 × 512 |
SSD Net [17] | 0.76 | 0.50 | 0.62 | 512 × 512 |
Transfer Learning in YOLOv5 | 0.67 | 0.71 | 0.67 | 416 × 416 |
ResNet 50 + FRCNN (Trophozoite) [20] | 0.73 | 0.85 | 0.74 | Non-Consistent |
LSTM [37] | 0.65 | 0.68 | 0.71 | 416 × 416 |
Bi LSTM [38] | 0.71 | 0.73 | 0.75 | 416 × 416 |
GRU [39] | 0.67 | 0.70 | 0.69 | 416 × 416 |
Proposed Ensemble YOLOv5 Weights | 0.76 | 0.78 | 0.79 | 416 × 416 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Paul, S.; Batra, S.; Mohiuddin, K.; Miladi, M.N.; Anand, D.; A. Nasr, O. A Novel Ensemble Weight-Assisted Yolov5-Based Deep Learning Technique for the Localization and Detection of Malaria Parasites. Electronics 2022, 11, 3999. https://doi.org/10.3390/electronics11233999
Paul S, Batra S, Mohiuddin K, Miladi MN, Anand D, A. Nasr O. A Novel Ensemble Weight-Assisted Yolov5-Based Deep Learning Technique for the Localization and Detection of Malaria Parasites. Electronics. 2022; 11(23):3999. https://doi.org/10.3390/electronics11233999
Chicago/Turabian StylePaul, Sumit, Salil Batra, Khalid Mohiuddin, Mohamed Nadhmi Miladi, Divya Anand, and Osman A. Nasr. 2022. "A Novel Ensemble Weight-Assisted Yolov5-Based Deep Learning Technique for the Localization and Detection of Malaria Parasites" Electronics 11, no. 23: 3999. https://doi.org/10.3390/electronics11233999
APA StylePaul, S., Batra, S., Mohiuddin, K., Miladi, M. N., Anand, D., & A. Nasr, O. (2022). A Novel Ensemble Weight-Assisted Yolov5-Based Deep Learning Technique for the Localization and Detection of Malaria Parasites. Electronics, 11(23), 3999. https://doi.org/10.3390/electronics11233999