Figure 2

Computational design. (a) During a peritoneal dialysis (PD) session, OpticLine captures 100 images during each drain in batches of 5 spaced 100 ms apart, with a gap of 1 s between batches. Each batch is independently analysed and fed into the counts processing algorithm, which calculates the mean white blood cell (WBC) concentration for each drain. These mean drain concentrations are then averaged to a final mean PD session concentration. This concentration, along with a “healthy, caution, or risk” notification is reported to the patient at the end of their PD session. (b) The images in each batch are preprocessed with a series of filters and blurs. The value of each pixel in each batch image is evaluated against the average value of the pooled pixels at the same (x, y) coordinates in the other four images of the batch. If the difference between the value of one pixel in an image and the average value of the pooled pixels at that location in the other four images is greater than the defined batch difference threshold, that pixel is marked as positive in the cell mask. This mask is analysed to calculate the number of cells. (c) Our algorithm takes the interquartile range (IQR) of the cell counts for each set of 100 images to eliminate outliers, leaving 50 cell counts for each drain. These 50 counts are then converted to concentrations with the linear regression model developed during algorithm training. These 50 concentrations are then averaged to report the mean WBC concentration for the drain. (d) Example screen displays. At the end of a PD session, OpticLine displays a graph of the patient’s WBC concentration throughout the duration of the session; the average, maximum, and minimum WBC concentration for the session; and a notification reporting whether the session’s mean WBC concentration falls in the healthy, caution, or risk zone. If the concentration is healthy, no follow-up steps are required; if in the caution zone, patients are advised to monitor their symptoms; if in the high-risk zone, the patient is recommended to contact their care team immediately for further testing.