Fig 1.
Bacterial colony morphology varies across and within species.
A) Morphological identification of bacterial species from a mixed culture plated on Chocolate Agar: Rothia mucilaginosa (smallest white circles), Neisseria subflava (larger tan round circles), and Streptococcus mitis (large bullseye circles). B) A common example of 2D colony morphology features include the appearance of the colony edges. C) Morphological identification of bacterial strains, in this case called “smooth”, “wrinkly spreader”, and “fuzzy spreader” [4], from a culture containing only Pseudomonas fluorescens plated on King’s Medium B Agar.
Fig 2.
Random sample of the P. aeruginosa train/validation strain colony dataset.
10 strains (in four-fold replication) were selected randomly without replacement from a complete list of 69 strains via the native sample() command in R. From top to bottom: (left) strain 25, strain, 38, strain 52, strain 113, strain 1; (right) strain 127, strain 316, strain 298, strain 121, strain 174. Colony size has been adjusted for viewing purposes.
Fig 3.
Diversity of P. aeruginosa strains in both classic morphological descriptive variables and derived complexity descriptive variables across 69 strains and 266 colonies.
Histograms are built from all replicates of all strains. A) classic metrics used to describe colony appearance. B) Derived metrics from image processing and computer vision to describe colony complexity including compression ratio (relative reduction in size of data) and 6 descriptive statistics derived from the Sobel–Feldman operator.
Fig 4.
Morphological metrics are generally stable across replicates.
Coefficient of variation (mean / standard deviation) across replicates (black) and across strains (grey). With the exception of the eccentricity and circularity metrics, coefficients of variation across replicates are low (standard deviation << mean), and less than the coefficient of variation across strains.
Fig 5.
Performance comparison of transfer learning methods.
The performance of four trained transfer learning models (ResNet-50, VGG-19, MobileNetV2 and Xception, see methods) were evaluated on both validation (blue circles) and test (orange triangles) datasets. Each computational experiment was replicated five-fold (five separate training runs for each model), allowing statistical comparison of approaches. (A) Accuracy scores (the number of correct predictions divided by the total number of predictions x100). (B) Loss scores (a summation of the errors made for each sample). Statistical comparisons are summarized in S1 Table.
Table 1.
Performance contribution of data pre-processing, augmentation, and training.
To assess contributions, we took the trained ResNet-50 model (Fig 5) as a baseline method and assessed the impact of removing components of our methods pipeline. Each computational experiment was replicated five-fold (five separate training runs for each model), allowing statistical comparison of approaches. Across replicates we report average (+/- standard deviation) accuracy (the number of correct predictions divided by the total number of predictions x100) and loss (a summation of the errors made for each sample). Statistical comparisons are summarized in S2 Table.
Fig 6.
Reduced confusion matrix, aggregating all test data errors across five iterations of the ResNet-50 model.
Of the 69 strains in this study, only 5 strains were not classified with 100% precision (the 5 rows). For brevity, this matrix includes only the strains that were misclassified by our model instead of the whole 69 x 69 confusion matrix.
Table 2.
Performance comparison with shallow learning (SVM) models.
We contrast validation and test accuracy for our trained ResNet model (see also Fig 5 and S1 Table) with accuracy metrics for radial basis function (RBF) SVMs trained on colony metric data (Figs 3 and 4) and on features extracted from the trained ResNet model. See methods for details of SVM models and feature extraction. Statistical comparisons are summarized in S4 Table.
Fig 7.
Avenues for finer scale image segmentation and augmentation.
Insets reveal finer-scale features at smaller spatial scales.