LEUKOCOUNT aids in automating the process of detection of blood-based diseases. White blood cell (WBC) count is a valuable metric for assisting with diagnosis or prognosis of various diseases such as coronary heart disease, type 2 diabetes, or infection. In the current pandemic situation, with number of patients increasing exponentially each day. It is difficult to manually count and keep track of their white blood cells.
It is crucial to maintain ideal count of white blood cells, drastic decrease in the number of WBC's leads to higher risk of getting an infection and an abnormal increase in the number could indicated diseases such as bone-marrow, cancer, etc.
Apart from this a WBC count can detect hidden infections within your body and alert doctors to undiagnosed medical conditions, such as autoimmune diseases, immune deficiencies, and blood disorders. This test also helps doctors monitor the effectiveness of chemotherapy or radiation treatment in people with cancer.
Recent studies have revealed that raised white blood cell and neutrophil counts along with a fall in lymphocyte count are seen in some patients with COVID-19. Other studies have shown that determining the neutrophil-to-lymphocyte ratio could serve as a biomarker that could predict the infection's outcome.
This motivated me to use deep learning architecture to automate the process of counting different types of White Blood Cells present in a blood sample.
LEUKOCOUNT uses deep learning models to detect four different types of WBC's:
- EOSINOPHIL
- LYMPHOCYTE
- MONOCYTE
- NEUTROPHIL and counts each type of WBC's present in the sample. It attempts in making the entire process of detecting and counting number of WBC's efficient, effortless, cheap and timing-saving.
The data was procured from kaggle. Source:https://www.kaggle.com/paultimothymooney/blood-cells. The dataset contains 12,500 augmented images of various types of white blood cells (JPEG) with metadata in CSV form. That includes 3,000 images divided into 4 different white blood cell types (classes).This data was further broken down into training and testing dataset,in order to train and evaluate the model performance.
More data was generated using image augumentation.
I used transfer learning techinique to build a deep learning model that could identify different types of white blood cells.The model used for transfer learning was VGG19. Architecture of VGG19 is shown below:
The weights were taken from the VGG19 model using transfer learning and the laster layer was modified according to the input classes.(i.e. 4 classes).The model was trained on the training data and it was evaluated on the testing data.
The classification and confusion matrix indicates that the model has good performance and can be used for identifying different types of WBC's.
The result was produced in form of a graph that indicated the number of different types of WBCs present in the sample. A sample result is shown here:
Currently the different types of WBC's in a sample are being counted manually which requires expensive medical equipments,is a very time consuming process, leads to delay in the diagnosing a particular disease,since WBC's play an important role in diagnosing almost all types of diseases.
To run, download the source code. Open the source code directory in any editor(preferably VS-Code) and run app.py file.
Using terminal then use the command: python app.py
Visit :http://127.0.0.1:5000/ link to interact with the website!