Automating the Pipeline from Glomerular Detection to Morphometric Measure
ARC is currently collaborating with a research team from CSCAR, along with the med school, to automate an approach to measure glomerular morphometry using neural networks along with segmentation and masking. Currently, these processes require hand identification and measurement, which can be tedious and time consuming. Introducing automated measures will allow the team to more quickly process morphometric data.
The project is divided into three major tasks. First, we aim to identify glomeruli in a slide image and return labeled boxed images of each individual glomerulus. We implemented a RetinaNet detection network on previously labeled data. We reduced the size of each image by 35%. We then sliced each whole slide image into overlapping 1500×1500 pixel images, with a 500 pixel overlap. These smaller images were then used in training our algorithm.
The second task was to isolate the glomerular tuft from its surroundings. ARC worked together with the CSCAR and nephrectomy teams to compare two techniques: the first using a deep learning segmentation network and the second using a contour fitting algorithm. The contour-fitting algorithm extracted contours from the input images, using the Python open-cv library, and compared the resulting contours to known general shapes of glomeruli. Although this algorithm performed well on glomeruli with well-defined borders, it did not perform consistently across all images and was thus dropped. The CSCAR team then implemented a segmentation network implementation of the U-net architecture in the FastAI library, using the ResNet34 network as the CNN backbone.
ARC also provided assistance in adding a post-processing step to modify double glomeruli identifications. By using the mask created in the previous segmentation step, we created a binary image of the double glomeruli. We then used a watershed algorithm to divide the binary image into segments and crop the segments into separate images. Finally, we re-ran the modified croppedimages through the segmentation network to obtain a modified mask. The modified mask was applied to each modified image. After testing this algorithm on 391 images, the algorithm correctly identified images that contained double glomeruli and was able to successfully crop half of these images. Finally, the nephrectomy and CSCAR team worked together to use ImageJ to obtain morphometric measures.
In the coming months, the team will work together to obtain new training and testing data to apply these algorithms on a larger number and variety of samples.