I was inspired to do this project by my previous final in my Microbial Diversity class regarding using bacteria for the bio-remediation of pharmaceutical waste.
In labs the most common way of counting bacterial colonies is by hand. A handful of companies and projects have recently created automated solutions to this issue and they have proven to be very useful tools.
By creating an image processing pipeline this could enable labs to more easily generate their own datasets for use in machine learning projects. This could also be translated to other bio-manufacturing industries.
This portfolio entry has been adapted from the final slideshow presentation for the class.
Image from AGAR: A Microbial Colony Dataset for Deep Learning Detection
Image from AGAR: A Microbial Colony Dataset for Deep Learning Detection.
The image processing workflow that was implemented was a delightful adventure into the wide range of image handling techniques in order to pull out relevant features from an image.
My first steps in exploring the features of the petri dish was breaking it apart into distinct color spaces to achieve high levels of contrast and finding that the B channel from the LAB colorspace provided wonderful contrast between the bacterial colonies and the rest of the image.
After this, I decided to isolate the edges of the dish as preliminary experimentation when utilizing K means segmentation resulted in reliable segmenting issues. By creating a disk based on the largest connected component in a binarized channel view of the image we are able to cut out the edge of the petri dish.
Through additional experimentation with the K means clustering method, using the B channel and 4 segments resulted in the most consistent segmentation of the bacterial colonies.
Erosion is also implemented to clean up any artifacts in the image after the k means segmentation.
Colonies are then extracted by discriminating based on the size of connected components and the eccentricity of the colonies.
This method of segmentation wasn't perfect across all 5 bacterial colonies and has several challenges where the segmentation fails if the bacterial colonies are grouped together or if they are on the edge of the dish and then masked out.
I had a great time learning about all the different ways to extract useful information from an image and applying it to a real world problem. My greatest takeaway from this project was learning about how to break apart a problem in a completely new field through experimentation.
References:
Majchrowska, Sylwia, et al. "AGAR: A Microbial Colony Dataset for Deep Learning Detection." arXiv, 2021, eprint 2108.01234.
"Generation of Microbial Colonies Dataset with Deep Learning Style Transfer." Scientific Reports, vol. 12, no. 1, 2022, pp. 1-14.