Inspiration

White blood cell (WBC) count is a valuable metric for assisting with the diagnosis or prognosis of various diseases such as coronary heart disease, type 2 diabetes, or infection. In the current pandemic situation, the 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 an ideal count of white blood cells, a drastic decrease in the number of WBC's leads to a higher risk of getting an infection, and an abnormal increase in the number could indicate 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 come up with a method that is fast and accurate in diagnosing blood-based diseases.

What it does

LEUKOCOUNT aids in automating the diagnosis of blood-based diseases.

It uses a deep learning architecture to automate the process of identifying different types of White Blood Cells present in a blood sample. Then count those WBCs in the sample.

The model detects four different types of WBC's:

1.EOSINOPHIL 2.LYMPHOCYTE 3.MONOCYTE 4.NEUTROPHIL

and counts each type of WBC's present in the sample. It attempts in making the entire process of blood-based diagnosis efficient, effortless, cheap, and timing-saving.

Due to the sudden and rapid growth of COVID-19 cases. There is a need for fast, accurate and early detection of SARS-CoV-2 is of vital importance to control the spread of the virus. However, traditional SARS-CoV-2 detection based on RT-PCR assays can be costly, long-drawn-out, and widely unavailable making testing every case an impractical effort. *It was observed that patients admitted with COVID-19 symptoms were more likely to test positive for SARS-CoV-2. *

This model can even act as a prioritizing tool and can help the hospitals identify patients who are most likely to be tested positive using commonly available laboratory test data.

The model takes a cell image as an input and then detects which type of WBC it is and provides users a detailed analysis of their WBC count and even tells them if their WBC count lies in the normal range or not. Users can even download and share the result with their doctor.

How I built it

I build the model using transfer learning techniques and the model used for transfer learning was VGG19. *The weights were taken from the VGG19 model using transfer learning and the last layer was modified according to the input classes. (i.e. 4 classes). *

llustration-of-the-network-architecture-of-VGG-19-model-conv-means-convolution-FC-means

The classification report of the model:

image

The confusion matrix of the classification model is as follows:

image

The classification and confusion matrix indicates that the model has good performance and can be used to detect different types of WBC's. The model was trained on the training data and it was evaluated on the testing data.

The model has: Training accuracy:99% Test accuracy:92%

Once the model was ready, I made an end-to-end application by building a website using (HTML, CSS, JS) for the frontend and a flask for the backend.

Challenges I ran into

It was difficult to find an ideal model for transfer learning, I had to try almost 6-10 different Keras pre-trained model to find the ideal model. After numerous attempts, I was able to use the VGG19 pre-trained model to gain a training accuracy of 98% and test accuracy of 91%. It was initially difficult for me to integrate HTML with flask.

Accomplishments that I'm proud of

This was my first time working with a pre-trained model and using that model's weight to train a different model. I am also proud of achieving a good train and test accuracy. I not only build a model but also a website for it so that end-user can readily use the website and get their results. I am proud of building an end-to-end application for the users.

What I learned

I learned the concept of convolutional neural network and transfer learning and how to build a customized model from a pre-trained model and how to develop an end-to-end application for a deep learning model.

What's next for Leukocount

The next step is to explain classes to include red blood cells and platelets. so that this platform can be widely used by lab technologists for a general blood test and also so to diagnose more blood-based diseases. The end goal is to make this tool scalable that can be used in all the laboratories across the globe, even in rural areas with limited access to the internet like those in Southeast Asia or Africa.

Built With

Share this project:

Updates