Classification of blood cells
In a disclosed example, a computer-implemented method includes storing image data that includes an input image of a blood sample within a blood monitoring device. The method also includes generating, by a machine learning model, a segmentation mask that assigns pixels in the input image to one of a plurality of classes, which correlate to respective known biophysical properties of blood cells. The method also includes extracting cell images from the input image based on the segmentation mask, in which each extracted cell image includes a respective cluster of the pixels assigned to a respective one of the plurality of classes.
1 . A computer-implemented method comprising:
storing image data that includes an input image of a blood sample within a blood monitoring device, wherein the blood monitoring device comprises a microfluidic device that includes a microchannel configured to emulate blood vessels in vivo, the input image includes the blood sample within the microchannel, and the microchannel includes a functionalized adhesion region that is adapted to adhere to blood cells of interest within the blood sample, and the image is acquired while the blood sample is flowing through the microchannel;
generating, by a first machine learning model, a segmentation mask that assigns pixels in the input image to one of a plurality of classes, wherein the plurality of classes correlate to respective known biophysical properties of blood cells, and the first machine learning model is trained to detect red blood cells and/or subtypes of red blood cells;
extracting cell images from the input image based on the segmentation mask, in which each extracted cell image includes a respective cluster of the pixels assigned to the one of the plurality of classes; and
classifying, by a second machine learning model, each of the extracted cell images to specify morphological subtypes of the red blood cells and/or the subtypes of red blood cells detected by the first machine learning model, wherein the second machine learning model is trained to distinguish subtypes of red blood cells based on morphology.
2 . The method of claim 1 , wherein the second machine learning model comprises a convolutional neural network to employ convolutions and filters to classify each of the extracted cell images.
3 . The method of claim 1 , wherein the extracting further comprises:
clustering the pixels in the segmentation mask to define respective pixel clusters according to the assigned class to detect red blood cells in the input image;
identifying centroids for each respective pixel cluster; and
detecting bounding boxes around each of the identified centroids, wherein each cell image is generated based on pixels within the detected bounding box.
4 . The method of claim 3 , wherein the first machine learning model comprises a first convolutional neural network to classify pixels in the image according to a respective class of sickle red blood cells (sRBCs) thereof and to generate the segmentation mask to include cell objects segmented from clusters of pixels based on the assigned class of the pixels.
5 . The method of claim 4 , wherein the first convolutional neural network is configured to downsample the input image to generate feature vectors and to upsample the input image based on the feature vectors to generate the segmentation mask.
6 . The method of claim 1 , further comprising computing a count for a number of red blood cells and/or subtypes thereof detected by the first machine learning model.
7 . The method of claim 1 , wherein the plurality of classes include at least two of background, deformable adhered sickle red blood cell (sRBC), non-deformable adhered sRBC, and non-functionally adhered/other deformable sRBC.
8 . The method of claim 1 , wherein at least some of the known biophysical properties of blood cells relate to an adhesive property of blood cells within the adhesion region, and
wherein the subtype of red blood cell includes a combined class of adhered sickle red blood cells (sRBCs), and wherein the second machine learning model is configured to classify the red blood cells, based on morphology, into deformable and non-deformable subtypes of sRBCs.
9 . The method of claim 8 , wherein the image data includes a series of successive frames of video images, and the method further comprises tracking a behavior of respective red blood cells in the series of successive frames and providing an output indicative of the adhesive property of the respective red blood cells.
10 . One or more non-transitory machine readable media having instructions, which when executed by a processor perform the method of claim 1 .
11 . A system comprising:
a microfluidic device configured to contain a blood sample, the microfluidic device comprising a channel configured to emulate blood vessels in vivo, wherein the channel comprises at least one functionalized adhesion region adapted to adhere to blood cells of interest within the blood sample;
a processor; and
one or more non-transitory machine readable media to store instructions and data, the data including an input image of the blood sample within the channel, the processor configured to access the media and execute the instructions comprising:
a first machine learning model trained to detect red blood cells and/or subtypes of red blood cells and generate a segmentation mask that assigns pixels in the input image to one of a plurality of classes that correlate to respective known biophysical properties of red blood cells;
extraction code programmed to extract cell images from the input image based on the segmentation mask, in which each extracted cell image includes a respective cluster of the pixels assigned to a respective one of the plurality of classes; and
a second machine learning model trained to classify the extracted cell images to specify morphological subtypes for the red blood cells and/or the subtypes of red blood cells detected by the first machine learning model.
12 . The system of claim 11 , wherein the plurality of classes include at least two of background, deformable adhered sickle red blood cell (sRBC), non-deformable adhered sRBC, and non-functionally adhered/other deformable sRBC.
13 . The system of claim 11 , wherein the first machine learning model comprises a first convolutional neural network to classify pixels in the input image according to a respective class of sickle red blood cells (sRBCs) thereof and to generate the segmentation mask to include cell objects segmented from clusters of pixels based on the assigned class of the pixels.
14 . The system of claim 13 , wherein the second machine learning model comprises a second convolutional neural network to employ convolutions and filters to classify each of the extracted cell images.
15 . The system of claim 13 , wherein the first convolutional neural network is programmed to downsample the input image to generate feature vectors and to upsample the input image based on the feature vectors to generate the segmentation mask.
16 . The system of claim 11 , further comprising program code programmed to compute a count for a number of cells having the given type of blood cell detected by the first machine learning model.
17 . The system of claim 11 , wherein at least some of the known biophysical properties of blood cells relate to an adhesive property of blood cells within the adhesion region, and
wherein the subtype of red blood cell includes a combined class of adhered sickle red blood cells (sRBCs), and wherein the second machine learning model is configured to classify the red blood cells, based on morphology, into deformable and non-deformable subtypes of sRBCs.
18 . The system of claim 17 , wherein the input image includes a series of successive frames of video images, and the instructions further comprise code programmed to track a behavior of respective cells in the series of successive frames and provide an output indicative of the adhesive property of the respective red blood cells.
19 . The system of claim 11 , wherein the input image is acquired while the blood is flowing through the channel of the microfluidic device.
20 . The system of claim 11 wherein the input image is acquired while the blood is not flowing through the microfluidic device.
21 . A system comprising:
a microfluidic device configured to contain a blood sample, the microfluidic device comprising a channel configured to emulate blood vessels in vivo;
a processor; and
one or more non-transitory machine readable media to store instructions and data, the data including an input image of the blood sample within the channel, the processor configured to access the media and execute the instructions comprising:
a first machine learning model trained to detect red blood cells and/or subtypes of red blood cells and generate a segmentation mask that assigns pixels in the input image to one of a plurality of classes that correlate to respective known biophysical properties of red blood cells;
extraction code programmed to extract cell images from the input image based on the segmentation mask, in which each extracted cell image includes a respective cluster of the pixels assigned to a respective one of the plurality of classes; and
a second machine learning model trained to classify the extracted cell images to specify morphological subtypes for the red blood cells and/or the subtypes of red blood cells detected by the first machine learning model,
wherein the extraction code is further programmed to:
cluster the pixels in the segmentation mask to define respective pixel clusters according to the assigned class to detect cell objects in the input image;
identify centroids for each respective pixel cluster; and
detect bounding boxes around each of the identified centroids, wherein each extracted cell image is generated based on pixels within the detected bounding box.