Full text
Heliyon 10 (2024) e25714 Available online 7 February 2024 2405-8440/© 2024 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Contents lists available at ScienceDirect Heliyon journal homepage: www.cell.com/heliyon Research article Increasing segmentation performance with synthetic agar plate images Michal Cicatka a,∗, Radim Burget a, Jan Karasek b, Jan Lancosb aBrno University of Technology, Faculty of Electrical Engineering and Communications, Dept. of Telecommunication, Technicka 12, Brno, 61600, Czech Republic bR&D Automation, Microbiology & Diagnostics, Bruker Daltonics GmbH & Co. KG, Fahrenheitstraße 4, Bremen, 28359, Germany A R T I C L E I N F O A B S T R A C T Keywords: Agar plates Synthetic images generation Deep learning Semantic segmentation Background: Agar plate analysis is vital for microbiological testing in industries like food, pharmaceuticals, and biotechnology. Manual inspection is slow, laborious, and error-prone, while existing automated systems struggle with the complexity of real-world agar plates. A shortage of diverse datasets hinders the development and evaluation of robust automated systems. Methods: In this paper, two new annotated datasets and a novel methodology for synthetic agar plate generation are presented. The datasets comprise 854 images of cultivated agar plates and 1,588 images of empty agar plates, encompassing various agar plate types and microorganisms. These datasets are an extension of the publicly available BRUKERCOLONY dataset, collectively forming one of the largest publicly available annotated datasets for research. The methodology is based on an efficient image generation pipeline that also simulates cultivation-related phenomena such as haemolysis or chromogenic reactions. Results: The augmentations significantly improved the Dice coefficient of trained U-Net models, increasing it from 0.671 to 0.721. Furthermore, training the U-Net model with a combination of real and 150% synthetic data demonstrated its efficacy, yielding a remarkable Dice coefficient of 0.729, a substantial improvement from the baseline of 0.518. UNet3+ exhibited the highest performance among the U-Net and Attention U-Net architectures, achieving a Dice coefficient of 0.767. Conclusions: Our experiments showed the methodology’s applicability to real-world scenarios, even with highly variable agar plates. Our paper contributes to automating agar plate analysis by presenting a new dataset and effective methodology, potentially enhancing fully automated microbiological testing. 1. Introduction In the field of biomedical research, where total laboratory automation is a growing trend [1], precise analysis of microbes on agar plates remains a vital task. This is because it is involved in the automation of many routine laboratory procedures, such as disk diffusion tests [2], detection of chromogenic reactions [3], colony counting [4], or colony picking, which is closely related to * Corresponding author. E-mail addresses: [email protected] (M. Cicatka), [email protected] (R. Burget), [email protected] (J. Karasek), [email protected] (J. Lancos). https://doi.org/10.1016/j.heliyon.2024.e25714 Received 15 June 2023; Received in revised form 26 January 2024; Accepted 1 February 2024
Heliyon 10 (2024) e25714 2 M. Cicatka, R. Burget, J. Karasek et al. sample preparation for mass spectrometry analysis [5]. Despite many previous studies on this topic and the availability of automated robots for processing agar plates in the market, a perfect one-size-fits-all solution is still lacking. The proposed solutions often utilize image segmentation, a fundamental computer vision technique employed in various domains ranging from transportation for safety enhancement [6,7], to healthcare for precise tumor detection [8,9]. The lack of robustness of available solutions in real-world scenarios could be attributed to insufficient training data for machine-learning-based segmentation approaches. The purpose of this work is to present a novel methodology for the generation of synthetic agar plates with microbes and evaluate its performance with a comprehensive publicly available BRUKERDSUT dataset of real-life samples. This dataset helps to ensure that future studies can compare their results to more robust and realistic data, ultimately improving the accuracy and reliability of the field as a whole. The BRUKERDUST dataset is a valuable addition to the existing collection of microbial image datasets. While there are other datasets available, such as the MicrobIA Haemolysis Dataset published in [10], they are limited in their variability and number of samples. The BRUKERDUST dataset, on the other hand, contains unique images of plates with various types of agars and microbes, providing a diverse range of samples for researchers to work with. Additionally, the BRUKERDUST dataset is a natural extension of the previously published BRUKERCOLONY dataset, as it was obtained with the same prototype of a colony-picking robot and under the same lighting conditions, ensuring consistency in the image properties. BRUKERCOLONY dataset along with the BRUKERDUST dataset is to our knowledge the biggest publicly available dataset of agar plates annotated with segmentation maps which also captures the variability of real-life data. We are also introducing a new BRUKERAGAR dataset which contains high-quality images of plates with various agar types, providing a valuable resource for researchers in the field of synthetic data generation and beyond. To our knowledge, this type of dataset has not been previously published, making it a valuable addition to the scientific community. The findings of this work are meant to improve colony localization tasks in the prototype of MBT Pathfinder® colony picking robot. 2. Related work The first widely known tool for image processing of agar plates is the OpenCFU [11] which was specifically designed to detect circular colonies using traditional image processing techniques from the OpenCV [12] framework such as thresholding and particle filtering. OpenCFU was outperformed by the AutoCellSeg [13] which used techniques such as watershed segmentation. Another tool used is called CellProfiler [14]. It is a tool for analyzing different kinds of cell images including microscopic images. The versatility of this tool stems from the possibility of creating custom processing pipelines. All of these tools require user interaction, and since none of the approaches utilize machine learning, they are likely to be outperformed by more sophisticated solutions that do. Another approach to microbial colony semantic segmentation was brought by the article [15]. The authors trained a CBDN (convolutional deep belief network) network which acts as a feature extractor and the segmentation itself was performed with SVM (support vector machine). The article faces limitations due to the use of a small custom dataset, making comparisons with other studies challenging. Additionally, the method employed in the study focuses on analyzing small cropped patches of microbial colonies rather than entire images, which may have implications for the accuracy and applicability of the results. The article [16]targeted the foreground and background contrast improvement by acquiring the image with lighting near the infrared spectrum. The postprocessing of the acquired image was then performed by simple thresholding. The proposed solution requires a custom acquisition unit, making it challenging to integrate into common laboratories. Additionally, the limited number of samples used in their study raises questions about the generalizability of their proposed solution to other types of samples. The article [17] applies semantic segmentation of agar plate images with a trained U-Net and a U-Net with pretrained backbone models. The authors aim to segment the microbes into two groups (BVG+ and BVG-). The training was performed with a custom dataset with 108 images. Once again the articles use a custom dataset with a limited number of samples. Analyzing agar plate images poses a significant challenge due to the absence of comprehensive benchmarking data for a unified and reliable evaluation of proposed solutions. This scarcity stems from the vast variability in agar plates, including agar types, microorganisms, and streaking patterns. The extensive diversity in these elements makes the image data highly variable. Moreover, acquiring data requires specialized equipment and is restricted by regulatory constraints, further limiting its availability. Consequently, datasets related to agar plates are often small-scale, akin to numerous instance segmentation datasets in the biomedical technology domain. Notable datasets include those from the MicrobIA project. The MicrobIA Haemolysis dataset contains 235 agar plate images with microbes annotated with pixel-wise segmentation masks. In article [10]the Segments enumeration dataset of approximately 28 500 images of microbial patches was also presented. Each image has a classification label based on the number of colonies in the image (1 to 7 colonies and outliers) which makes them suitable for use in colony counting tasks. Another dataset is the AGAR dataset presented in the article [18] which is annotated with bounding boxes around the colonies. It contains 18,000 plates and it is well suited for use in colony counting applications. For completeness, we also include the dataset DIBas which contains 660 images of microscopic bacterial images (33 species each of 20 images). Another publicly available dataset is the BRUKERCOLONY dataset published in [19]. This dataset is going to be inspected in detail in the methodology section of this article. Challenges related to biomedical data acquisition can be partially mitigated through the use of data augmentations and synthetic image generation techniques [20]. Augmentations entail controlled modifications applied to existing data, enhancing dataset diversity. Conversely, synthetic image generation enables the creation of artificial data samples that replicate real-world scenarios or anonymize existing data. Furthermore, recent research [21]emphasizes the importance of data-efficient instance segmentation models in computer vision. It introduces the Copy-Paste augmentation technique, where objects are randomly pasted onto images. This method proves effective in enhancing instance segmentation, even without modeling the surrounding visual context for pasting objects.
Heliyon 10 (2024) e25714 3 M. Cicatka, R. Burget, J. Karasek et al. In the realm of synthetic image generation for agar plate analysis, various approaches have been explored. One notable method, introduced in [22], employs generative adversarial networks to generate binary masks, subsequently used to render colonies into agar plate images. It is worth mentioning that this work is an extension of a previous article [23]. However, the proposed solution primarily utilizes red and white agar from the MicrobIA dataset for both training and evaluation, with the evaluation focused on a limited set of blood agar samples. Another approach to agar plate image generation is presented in [24], where random colony patches from selected dishes in the AGAR dataset are generated and superimposed onto empty agar plates. The study also demonstrates that applying photorealistic style transfer to the resulting agar plate images enhances the performance of benchmarking object detection models. Although the authors employ a more diverse and extensive AGAR dataset for training several object detectors, their performance evaluation focuses solely on bounding box positions. In biomedical image segmentation, U-Net [25] stands as the gold standard, demonstrating remarkable efficiency in utilizing annotated samples and showcasing superior performance even with a small dataset. Attention U-Net [26] integrates attention gates to focus on target structures, enhancing prediction accuracy and sensitivity without relying on explicit localization modules. Conversely, UNet3+ [27] addresses accurate segmentation by leveraging full-scale skip connections and deep supervisions, notably benefiting organs at varying scales while optimizing computational efficiency. Additionally, several approaches toward the acquisition of agar plates have been explored. Article [28] discusses an automatic colony counting system that can be implemented with basic image processing knowledge and a low budget, making it accessible to many laboratories. Study [16] proposes a cost-effective system that uses near-infrared light to obtain colony images and an automatic method for detecting and counting colonies with promising precision and time-saving capabilities. These related works collectively highlight the ongoing efforts in automating colony counting processes while considering factors such as cost, ease of implementation, and image quality. To summarize, state-of-the-art methods for microbial image analysis often use custom datasets that are small, not variable enough, and often not publicly available. This leads to difficulties in comparing proposed solutions and limits their applicability in real-world settings. Moreover, many of these datasets are not annotated, which further impedes progress in the field. While synthetic data generation methods exist, they do not provide enough high-quality data and may not be practical for real-life scenarios. Furthermore, none of the existing solutions address visual changes in agar plates caused by chromogenic agar types or blood haemolysis. To address these challenges, there is a need for a publicly available, complex dataset with labeled images that can serve as a basis for developing and evaluating machine learning algorithms for microbial image analysis. Such a dataset would enable researchers to develop and compare robust, generalized solutions that can be used in a variety of real-world applications. 3. Materials and methods The main objective of the experiments is to implement and evaluate an image processing pipeline for generating annotated agar plate images with microbes. We put a special emphasis on data variability. The pipeline performance was benchmarked with the gold standard segmentation architecture U-Net and more up-to-date Attention U-Net, and UNet3+ architectures. 3.1. Data acquisition In our research workflow, we initiated the process by acquiring the essential data for our image generator. The foundation of this generator is an empty agar plate image. This image is subsequently populated with colony patches, and each patch is paired with its corresponding binary mask annotation. As a result, we are able to generate a segmentation annotation mask for each agar plate image. We leveraged multiple datasets in this study. Our primary dataset, detailed in [19], was the BRUKERCOLONY dataset, serving as our foundational training dataset and the source for extracting microbial colony patches. Additionally, we introduced two novel datasets: the BRUKERAGAR dataset and the BRUKERDUST dataset. These datasets featured images captured using the same colonypicking robot as those in the BRUKERCOLONY dataset, ensuring uniform image sizes and consistent lighting conditions throughout our data sources. 3.1.1. BRUKERCOLONY dataset The BRUKERCOLONY dataset was partitioned into three segments: training (70%), evaluation (20%), and testing (10%). The training segment played a pivotal role in the extraction of microbial patches, as elaborated in the subsequent subsection. It encompassed 547 meticulously annotated images of agar plates predominantly featuring microbial monocultures on red or white agar. Some of these images capture identical samples acquired under varying lighting conditions and/or rotations. We present visual representations of the color distribution of the aforementioned datasets as follows: Fig. 1showcases selected samples from the MicrobIA dataset, and Fig. 2displays samples from the BRUKERCOLONY dataset. It is apparent that the color diversity within the BRUKERCOLONY dataset surpasses that of the MicrobIA dataset. For the extraction of colony patch images, we exclusively employed the training portion of the BRUKERCOLONY dataset. This choice aimed to mitigate potential evaluation bias introduced by employing data during the model training phase. In total, we extracted 20,417 colony patch images. The raw colony patches were acquired using a straightforward image processing pipeline same as in [19]. We determined colony positions utilizing watershed segmentation, where ground truth masks served as the markers for the algorithm. The colony center was computed by averaging the coordinates of all points along the contour in the segmented
Heliyon 10 (2024) e25714 4 M. Cicatka, R. Burget, J. Karasek et al. Fig. 1. Color distributions of selected samples from the MICROBIA dataset. Fig. 2. Color distributions of selected samples from the BRUKERCOLONY dataset. Fig. 3. Color distributions of selected samples from the BRUKERDUST dataset.
Heliyon 10 (2024) e25714 5 M. Cicatka, R. Burget, J. Karasek et al. Fig. 4. Colony patch on various backgrounds (the top left image is the original image from which the colony patch was extracted and the image to the right is its mask). Fig. 5. Colony patch annotation adjustments. image. Subsequently, both the mask and the image were cropped and stored using the derived contour. Example of an extracted colony patch can be seen in Fig. 4. Out of the pool of extracted images, we deliberately selected those depicting intact colonies to ensure the exclusion of images with sharply truncated edges, thus maintaining a real-world appearance in the subsequent image generation process. In cases where a colony patch contained multiple colonies, manual adjustments were applied to the mask to isolate the colony of interest (as exemplified in Fig. 5). Furthermore, we employed morphological dilation on the masks to rectify minor imperfections that may have arisen from potential annotation errors. This step not only contributed to a smoother colony mask but also guaranteed the presence of agar pixels along the colony peripheries. 3.1.2. BRUKERAGAR dataset As the BRUKERCOLONY dataset lacked images of empty agar plates without cultivated microbes, we took the initiative to create a custom dataset to fill this gap. To ensure the dataset’s authenticity and reflect real-world variability, we captured images of empty agar plates, each featuring one of 23 distinct agar types, with ten plates available per type. These plates were photographed from a top-down perspective under six different lighting conditions using the prototype of MBT Pathfinder® colony-picking robot. Additionally, we obtained bottom-view images of each agar plate, although they were not used in this specific work. Consequently, this comprehensive effort resulted in a dataset comprising a total of 1,610 images, which we have made publicly accessible at the following URL: https://github .com /michalcicatka /BRUKERAGAR -DATASET. Exemplary images from this dataset can be found in Fig. 6. 3.1.3. BRUKERDUST dataset To address the limited variety of agar types and microbes found in the previously mentioned publicly available datasets, we recognized the necessity for a comprehensive evaluation dataset tailored to our image generator. This led to the creation of the bespoke BRUKERDUST dataset. After obtaining images for the BRUKERAGAR dataset, we took Petri dishes and inoculated them with swabs collected from various laboratory surfaces. These inoculated dishes were then left to cultivate at room temperature for a duration of 72 hours. Subsequently, we scanned all the resulting agar plates under six distinct lighting configurations using the MBT
Heliyon 10 (2024) e25714 6 M. Cicatka, R. Burget, J. Karasek et al. Fig. 6. Examples of BRUKERAGAR dataset. Fig. 7. Examples of agar plates visual phenomena. Pathfinder® colony picking robot. Following visual inspections, we manually annotated the agar plates that were cultivated with microbes. In total, we scanned and processed 854 images for this dataset. It has been made publicly accessible online at the following URL: https://github .com /michalcicatka /BRUKERDUST -DATASET. Judging from the charts depicted in Fig. 1,2and 3, it becomes evident that when considering the color distribution, the BRUKERDUST dataset surpasses both the MicrobIA dataset and the BRUKERCOLONY dataset in terms of diversity. 3.2. Synthetic data generation Following the data acquisition phase, we proceeded to implement the image generator. Beyond its fundamental image generation capability, our generator incorporates advanced features. Specifically, we integrated functionalities to simulate agar haemolysis and chromogenic reactions. These phenomena are visually represented in Fig. 7using real agar plate images. These enhancements significantly improve our ability to replicate real-world scenarios in our synthetic images. The process of generating synthetic agar plate images encompasses several sequential steps. Initially, a random batch of colony patches is selected, and alterations are made to their color, size, and rotation, effectively introducing variability into the dataset. Subsequently, great care is taken in arranging these colonies within the agar plate image to prevent any overlap. Overlaps would lead to an unnatural appearance, which we aim to avoid. Once this meticulous placement is achieved, the synthetic agar plate image is considered complete. Finally, additional augmentations in the form of simulating chromogenic appearance and blood agar haemolysis, can be applied. These augmentations not only further enrich the dataset’s diversity, but may also serve future research needs, such as generating specific data for the study of chromogenic samples or the identification of specific microbes that cause haemolysis. 3.2.1. Colony patch batch selection The selection of colony patches for each synthetic image plays a vital role in achieving the desired microbial coverage on the agar plate. To determine the extent of microbial coverage on the agar plate, we set a specific coverage ratio. Colony patches are then sequentially chosen to populate the agar plate, and this selection process continues until the targeted coverage is achieved. The experiments described in the following subsections used random target coverage levels ranging between 15% and 60%.
Heliyon 10 (2024) e25714 7 M. Cicatka, R. Burget, J. Karasek et al. In addition to colony patch selection, we introduce further morphological modifications to enrich the dataset. These modifications encompass random flipping and rotation of colony patches. By randomly flipping and rotating colony patches, we enhance dataset diversity, ensuring that colonies can appear in various orientations. To further diversify these synthetic images, we take an additional step. We convert the colony patches into the HSV (Hue, Saturation, Value) color space. Within this color space, we introduce a random hue adjustment ranging from -45 to 45 degrees. This specific hue adjustment was determined empirically, resulting in colony patches displaying a wide range of colors. These combined modifications significantly contribute to the dataset’s diversity, enabling the training of segmentation models capable of handling the intricacies of real-world data. 3.2.2. Colony patch positioning To determine the valid positions of colony patches on the agar plate, we employ a genetic algorithm. This algorithm generates both the resulting agar image and its corresponding segmentation annotation mask. The fitness of the generated image is calculated based on a binary mask, taking into account two crucial factors. The first factor considers the total number of pixels on the binary mask that adheres to a specified maximum distance from the image center, ensuring that colony patches are placed within the Petri dish boundaries in the image. The second factor accounts for the cumulative pixel count of all colony patches in the image, reflecting whether any colony patches overlap. Consequently, agar plates containing colony patches outside the plate’s boundaries or overlapping colony patches yield a lower fitness score. To optimize the algorithm’s performance, in our experiments, we used a downsized image mask and colony patches to 512 to 512 pixels. This approach strikes a balance between computational efficiency and the possibility of neighboring colony patches touching. It’s important to note that the minimal colony patch size is influenced by the downsampling factor. However, empirical testing has confirmed that this factor has an insignificant impact on the results. This fitness evaluation is expressed through Eq. (1). 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑁 ∑ 𝑛=1 𝑀𝑥𝑦 ∶(𝑀𝑥𝑦 ≠0∧|𝑀𝑥𝑦𝐶|<𝑟) 𝑇𝑜𝑡𝑎𝑙= 𝑁 ∑ 𝑛=1 𝑃𝑀 𝑛𝑥𝑦 ∶𝑃𝑀 𝑛𝑥𝑦 ≠0 𝐹𝑖𝑡𝑛𝑒𝑠𝑠=𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑇𝑜𝑡𝑎𝑙 (1) Here, 𝑀represents the currently assessed mask, 𝑃𝑀 stands for the mask of a colony patch, 𝐶denotes the center of the image, and 𝑟represents the radius of the Petri dish. 3.2.3. Colony patch superimposition The superimposition of colony patches onto the agar plate image is a crucial step in the image generation process. To achieve this, we have developed a straightforward yet effective approach. Initially, we compute the average background (agar) color of the colony patch’s neighboring area. This is done by calculating the mean value of all pixels in the source image of the colony patch that are marked as background in the colony patch mask. Mathematically, this process is represented by Eq. (2). 𝑃𝐵=𝑀𝑒𝑎𝑛(𝑃𝐼 𝑥𝑦)∶ 𝑃𝑀 𝑥𝑦 ≠0(2) Here, 𝑃𝐵 represents the mean colony patch background color, 𝑃𝐼 stands for the colony patch image, and 𝑃𝑀 is the colony patch mask. With this information, we can calculate the alpha channel of the colony patch as the distance of each pixel channel from the average background color (Eq. (3)). Here, 𝛼represents the alpha channel of the colony patch. 𝛼𝑅=|𝐼𝑥𝑦𝑅−𝑃𝐵 𝑅| 𝛼𝐺=|𝐼𝑥𝑦𝐺−𝑃𝐵 𝐺| 𝛼𝐵=|𝐼𝑥𝑦𝐵−𝑃𝐵 𝐵| 𝑃𝐼 𝑥𝑦𝛼= 255 − (𝛼𝑅+𝛼𝐺+𝛼𝐵) (3) Due to the translucent nature of many colonies, the background color can influence the overall color of the colony, which needs to be compensated for. To address this, we apply a color adjustment with Eq. (4). In Eq. (4), 𝐶𝑆 denotes a color shift, 𝑃𝐼𝑀 represents the mean color of the colony patch, 𝑃𝐵 is the mean colony batch background color, 𝐴𝑃 𝐼 is the adjusted colony patch image, and 𝑃𝐼 is the colony patch image. CS =𝑃𝐼𝑀 −𝑃𝐵 𝐴𝑃 𝐼𝑥𝑦 =𝑃𝐼 𝑥𝑦 −𝐶𝑆 ⋅(1 − 𝑃𝐼 𝑥𝑦𝛼 255 ) (4) Since a simple copy-paste augmentation alone does not produce a realistic appearance, we have taken steps to overcome this limitation. To achieve a more convincing result, we have implemented a blending algorithm. During the colony superimposition process, this algorithm takes into account the color of each colony patch and weights it by its alpha channel. This results in a
Heliyon 10 (2024) e25714 8 M. Cicatka, R. Burget, J. Karasek et al. Fig. 8. Comparing superimposition with and without blending algorithm. Fig. 9. Examples of simulated agar plate visual phenomena. seamless blending of the patch’s edges into the empty agar plate image. The precise description of this blending process is captured by Eq. (5). In this equation, 𝑆𝐼 represents the synthetic image, 𝐵𝐼 is the baseline empty agar image, and 𝑃𝐼 is the patch image. 𝑆𝐼𝑥𝑦 =(1−𝑃𝐼 𝑖𝑗𝛼)⋅𝐵𝐼𝑥𝑦 +𝑃𝐼 𝑖𝑗𝛼 ⋅𝑃𝐼 𝑖𝑗 (5) For a visual representation of the resulting colony patch with an adjusted alpha channel placed on various backgrounds, please refer to Fig. 4. Furthermore, Fig. 8offers a compelling comparison of agar plate image details acquired without the blending algorithm, underlining the significance of this enhancement in achieving a realistic appearance. 3.2.4. Agar plate image augmentation During microbial cultivation on the agar plate, some visual phenomena may occur. One of the most common would be haemolysis (breakdown of red blood cells) of the blood agars which causes a change of agar color around the colony’s neighboring area. Another common phenomenon would be visual changes in the chromogenic agars. We developed algorithms to simulate these phenomena in synthetic dishes. The haemolysis simulation uses an adjusted binary mask as a weighting factor for the alteration. The adjustment consists of morphological dilation and Gaussian blur. The visual phenomena are then simulated by decreasing the Value and Saturation of the affected pixels in the HSV model weighted by the adjusted mask. This is done before the superimposition of the colonies, so only the agar is affected. The principle is very similar when simulating the chromogenic changes. The color of the chromogenic area is selected first. The binary mask adjusted in a very similar way as with the haemolysis is used to weigh the degree of alteration of each processed pixel. The alterations consist of shifting hue, value, and saturation when a pixel is represented in the HSV color space. The agar plate augmentations are going to be further explored in the experiment setup subsection (Sec. 3.3). Examples of the agar augmentations are in Fig. 9 3.3. Experiment setup The evaluation of the synthetic data generation pipeline is assessed through the performance of trained segmentation models. To optimize the training process, each image sample was divided into 16 images, each sized at 512 by 512 pixels. This division allowed for the inclusion of more images in each training mini-batch. Dice loss [29]was used in all experiments.
Heliyon 10 (2024) e25714 9 M. Cicatka, R. Burget, J. Karasek et al. Fig. 10. Diagram of the agar augmentation experiment. For evaluating model performance, we employed two widely used segmentation metrics: the Jaccard score, also called IoU (Eq. (6)), and the Dice coefficient, also called the F1 score (Eq. (7)). In the mentioned equations, 𝐷𝑖𝑐𝑒 represents the Dice coefficient, 𝐽𝑎𝑐𝑐𝑎𝑟𝑑 signifies the Jaccard score, 𝑇𝑃 stands for true positive, 𝐹𝑃 represents false positive, and 𝐹𝑁 denotes false negative. 𝐽𝑎𝑐𝑐𝑎𝑟𝑑 =𝑇𝑃 𝑇𝑃 +𝐹𝑃 +𝐹𝑁 (6) 𝐷𝑖𝑐𝑒 =2𝑇𝑃 2𝑇𝑃 +𝐹𝑃 +𝐹𝑁 (7) All experiments were evaluated using the same testing dataset, comprising exclusively of real-life images. This dataset was derived from a combination of 10% (51 images) of the BRUKERCOLONY dataset (with the remainder allocated for training and validation experiments) and 43 randomly selected samples from the BRUKERDUST dataset. It is worth noting that during the process of subdividing the sample images into smaller units, some images might not contain any microbes. To prevent division by zero when calculating metrics, these particular images were excluded from the testing dataset. The first experiment aimed to evaluate how the inclusion of synthetic data, both with and without agar augmentations, affected the performance of the model. In the second experiment, we investigated how altering the ratio of real to synthetic data influenced the model’s performance. The first two experiments utilized trained U-Net models for evaluation. Apart from the established U-Net architecture, we conducted an architecture experiment involving Attention U-Net and UNet3+. 3.3.1. Agar augmentation experiment The agar augmentation experiment, following the diagram in Fig. 10, was designed to understand whether our proposed enhancements such as the blending algorithm and chromogenicity and blood haemolysis simulation had any significant impact on the model’s performance. It involved the generation of a dataset using our image generator. Each sample in this dataset was saved in four different configurations of superimpositions: 1. Without blending the agar plate image and colony patch images together. 2. With blending the agar plate image and colony patch images together. 3. With blending the agar plate image and colony patch images together, along with additional augmentations. 4. Without blending the agar plate image and colony patch images together, but with additional augmentations. These additional augmentations included a 50% probability of haemolysis simulation and a 50% probability of chromogenic agar simulation. Subsequently, the resulting datasets were utilized to augment the original training and validation datasets by 100%. Following this augmentation, a U-Net model was trained using these datasets, and its performance was evaluated using the testing dataset. The trained U-Net models consisted of 5 encoder/decoder blocks and initiateed with 32 channels in the first convolutional layer. During the training phase, we implemented early stopping with a patience of 10 epochs and utilized exponential learning rate decay, reducing the learning rate by a factor of 0.1, starting from the 15th epoch, from the initial learning rate of 1e-5. The training process was executed in a Python environment using the TensorFlow Framework, leveraging the computational capabilities of an NVIDIA RTX 4090 GPU. 3.3.2. Training data volume experiment The training data volume experiment, which follows the diagram in Fig. 11, provided insights into whether increasing the proportion of synthetic data in the training dataset had any significant impact on the model’s segmentation capabilities. The initial step involved training a U-Net model exclusively on real-world data sourced from the BRUKERCOLONY dataset. This model served as our baseline. Subsequently, synthetic datasets were generated using the image generator. Within these datasets,