Classifying Cat Blood: AI and Animal Medicine
While image classification by Deep Learning is well-established in human medicine, it is rarely used in animal science. Some veterinarians hope to change that.
Join the DZone community and get the full member experience.Join For Free
I’ve recently been researching the use of Deep Learning across a range of medical applications. In particular, convolutional neural networks and their use in image classification, as diagnostic tools for tumor detection, blood flow quantification, brain image analysis, and pathology.
It struck me that there should be a reasonable level of uptake of AI in veterinary medicine ("How different can it be," I thought naively.), but when I investigated, I discovered that animal health is sadly lacking in AI development. I did find an interesting scientific paper from earlier this year about the use of Deep Learning in the diagnostic scanning of cat blood cells, so I thought I’d summarize it into an article. The authors have also written a blog post about it. They are based at the Faculty of Veterinary Medicine in Zagreb, and although they are not AI specialists, they decided to explore how to use Deep Learning to replace a manual task: the estimation of reticulocyte percentage in cats.
What Are Reticulocytes?
Though I own a preposterous number of cats, I have no idea about their reticulocytes, so I’ve copied a section and graphic from the authors’ blog post in explanation:
Reticulocytes are immature red blood cells (RBCs) which are, in a small number, physiologically (normally) present in blood. After they are released from the bone marrow, they can persist in the circulation for several days before they finally mature into red blood cells…If we have an anemic cat, we want to know if this cat is producing new RBCs. If we find a lot of reticulocytes then the answer is “yes” — this cat’s bone marrow is responding to an anemia by increasing RBC production and releasing reticulocytes. But, if we don’t find any, or don’t find enough reticulocytes, we have a big problem — this cat is obviously not producing new RBCs and has, so called, “nonregenerative” anemia. Cats actually have two types of reticulocytes: more immature aggregate reticulocytes with big aggregates of RNA, and more mature punctate reticulocytes with one or more small granules of residual RNA. Only younger, aggregate reticulocytes, reflect the current bone marrow response to anemia and are included in the reticulocyte count. This is important because, due to the morphological continuum between these two types of cells, it is really hard for humans to draw a line between aggregate and punctate reticulocytes, making manual counting very subjective.
Aggregate (a-e) and punctate (f-j) reticulocytes, but some veterinarians would call the cell in e) a punctate reticulocyte, illustrating the subjectivity of manual counting.
At present, determining reticulocyte percentage is mostly a process of manual counting by light microscopy. Automated systems such as flow cytometry exist but are not always consistent whenever there are artifacts or anomalies (although manual counting is also subjective because of the continuum between aggregate and punctate reticulocytes as observed in the diagram above). In effect, with any counting process, there can be variations and inaccuracies in the reported results.
Using Deep Learning to Detect Reticulocytes
Can AI perform any better than established techniques? The researchers set out to train a convolutional neural network to examine images of cat blood smears and determine the ratio of aggregate reticulocytes to punctate reticulocytes. Their aim was to assess whether Deep Learning could be faster than a manual technique and cheaper than existing automated methods, exhibiting a better response to artifacts and anomalies. To maximize accessibility to other research teams, the team selected basic equipment — a standard laboratory microscope with a basic microscope camera and a smartphone camera — and provided full code and data.
The researchers collected images of cat blood smears most likely to be misclassified in order to teach the model using the most ambiguous samples. They selected to use the Single Shot MultiBox Detector (SSD) model and used Keras to implement it, taking an open source, pre-trained SSD300 model and training it on 800 labeled images.
For a given image, the model output a rectangular bounding box around each detected object, adding a label to indicate the predicted object type and a confidence score to reflect certainty about the prediction.
After training, when supplied with validation data, the model accurately classified 98.7% of aggregate reticulocytes in the images supplied from a microscope camera. With images from the smartphone camera, which were less uniform and made the task harder for the model, it still returned a predicted reticulocyte percentage within the error margin of human assessment (88.5%).
From the authors’ blog post:
A visualization of model predictions on four images from our test sets. Images (a) and (b) were taken with a microscope camera, images c) and (d) with a smartphone camera. In image (b) the cell with the arrow was misclassified as a punctate reticulocyte both by the model and by both veterinarians. In image (d) the model failed to correctly classify a cell that was clearly recognizable as an aggregate reticulocyte and was correctly classified by both veterinarians.
The study proved that object detection using Deep Learning for image classification is applicable to veterinary medicine, approaching or even exceeding human-level performance on that task. The authors encourage others in their domain to turn to Deep Learning and build solutions to enable cheaper and more accurate diagnoses, allowing animal science to catch up with human medicine.
What I think is particularly interesting is that the research team showed that it is not necessary to have a background in computer science to implement a Deep Learning model and train it with data specific to their specialism. It shows that when AI is accessible to domain experts, they are best placed to spot scenarios where it can excel, train it successfully against edge cases, and apply it to advance progress in their area of expertise.
Understanding the value of AI and learning how to use it seems to be key to its uptake among those that can best apply it to advance science. The learning curve needs to be as smooth as possible because working in a nascent subject is always testing. My previous article about learning AI for free may prove helpful to some on their journey to AI mastery.
DZone readers: do you have any tips or tricks for veterinarians, geologists, or nuclear scientists who are considering dipping their toes into Deep Learning? Please share them in the comments!
Opinions expressed by DZone contributors are their own.