Intelligent recognition and counting method and system for bacterial colonies based on deep learning
By constructing an uncertainty quantification framework based on Dirichlet distribution, the influence of image quality and model cognition is decoupled, enabling dynamic evaluation and adaptive compensation of colony identification results. This solves the problem of high false positive rate in existing technologies and improves the accuracy of colony identification and automated detection capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YICHANG NO 2 PEOPLES HOSPITAL
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-05
AI Technical Summary
Existing deep learning-based colony identification systems cannot effectively distinguish between image quality issues and model cognitive biases in complex environments, resulting in a high probability of misjudgment. They also lack self-awareness and are difficult to achieve reliable human-machine collaboration and efficient automated detection.
By constructing an uncertainty quantification framework based on Dirichlet distribution, random uncertainty and cognitive uncertainty are decoupled, conflict correction factors are generated, image compensation and neural network dynamic correction paths are triggered, and cross-validation is performed to achieve dynamic evaluation and adaptive compensation of recognition results.
It improves the accuracy and robustness of colony identification, reduces identification bias and counting errors caused by changes in illumination, focal length shift, or changes in sample feature distribution, and improves the reliability and automation level of detection.
Smart Images

Figure CN122157251A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of colony analysis, specifically to a method and system for intelligent colony identification and counting based on deep learning. Background Technology
[0002] Colony identification and counting are crucial technical aspects of microbial testing, food safety analysis, medical testing, and environmental monitoring. Traditional colony counting methods primarily rely on manual visual inspection or semi-automatic analysis methods based on image processing algorithms. With the development of computer vision and deep learning technologies, colony identification methods based on convolutional neural networks are increasingly being applied to the automatic classification and counting of petri dish images. By extracting features and recognizing patterns from colony images, these methods enable the automatic identification and counting of different colony categories, improving detection efficiency and automation.
[0003] In existing technologies, deep learning recognition systems for microbial colony images typically only output prediction results, lacking quantitative assessment methods for the confidence level of model judgments and failing to effectively filter out unreliable regions. Especially in complex situations such as colony fusion, blurred imaging, and low-contrast samples, the model may still output "deterministic results," but its actual misjudgment probability may be high. For example, when the input image contains interference such as blurriness, reflection, or contamination, the model cannot determine whether the current prediction deviation is caused by image quality degradation; when novel or variant colony morphologies not covered in the training set appear, the model also cannot identify them as out-of-distribution (OOD) samples and may still output high-confidence erroneous results, lacking self-awareness. Traditional fully automated recognition systems struggle to establish reliable human-machine collaboration mechanisms and cannot automatically filter "high-risk predictions," leading to a high burden of manual review or a high risk of misjudgment. Summary of the Invention
[0004] The purpose of this application is to provide a method and system for intelligent colony identification and counting based on deep learning. This method effectively alleviates the interference of image quality fluctuations caused by physical factors such as uneven lighting and focal length deviation during image acquisition, improves the stability of colony category identification and the accuracy of counting results, thereby enhancing the automation level and reliability of intelligent decision-making in the colony analysis process.
[0005] The objective of this application can be achieved through the following technical solution: Firstly, a deep learning-based intelligent colony identification and counting method, comprising the following steps:
[0006] Obtain the physical semantic feature tensor of the culture dish to be tested, which is acquired synchronously;
[0007] The physical semantic feature tensor is input into a neural network structure containing multiple convolutions and nonlinear activations for non-negative mapping processing to generate feature image data and positive output vectors corresponding to each colony category.
[0008] The positive output vector is used as the parameter vector of the Dirichlet distribution to calculate the predicted probability distribution and concentration of each colony category.
[0009] Based on the predicted probability distribution and its concentration, a random uncertainty index characterizing image quality and a cognitive uncertainty index characterizing model cognition are calculated respectively. The dominant type of the random uncertainty index and the cognitive uncertainty index is determined, and a conflict correction factor is generated.
[0010] When the random uncertainty index exceeds the first preset threshold, image compensation control parameters are generated according to the conflict correction factor, the compensated image is acquired through the image compensation control parameters, and the compensated image is re-input into the neural network structure for re-perception, and the first path recognition result is output.
[0011] When the cognitive uncertainty index exceeds the second preset threshold, the neural network structure is dynamically corrected according to the conflict correction factor, and the second path recognition result is output.
[0012] Cross-validation is performed on the first path identification result and the second path identification result. The prediction bias before and after compensation and the probability drift before and after correction are calculated to determine whether the two path identification results converge on the same category distribution characteristics. If so, the colony category and counting result are output; otherwise, a difficult case label signal is generated.
[0013] Secondly, the deep learning-based intelligent colony identification and counting system includes the following modules:
[0014] The data acquisition module is used to acquire the physical semantic feature tensor of the culture dish to be tested, which is acquired synchronously.
[0015] The feature extraction module is used to input the physical semantic feature tensor into a neural network structure containing multiple convolutions and nonlinear activations for non-negative mapping processing, and generate feature image data and positive output vectors corresponding to each colony category.
[0016] The probability analysis module is used to use the positive output vector as the parameter vector of the Dirichlet distribution to calculate the predicted probability distribution and concentration of each colony category.
[0017] The probability assessment module is used to calculate the random uncertainty index characterizing image quality and the cognitive uncertainty index characterizing model cognition based on the predicted probability distribution and its concentration, respectively, to determine the dominant type of the random uncertainty index and the cognitive uncertainty index, and to generate a conflict correction factor.
[0018] The path analysis module is used to generate image compensation control parameters based on the conflict correction factor when the random uncertainty index exceeds a first preset threshold, acquire a compensated image through the image compensation control parameters, re-input the compensated image into the neural network structure for re-perception, and output a first path recognition result.
[0019] The path recognition module is used to dynamically correct the neural network structure according to the conflict correction factor and output the second path recognition result when the recognition uncertainty index exceeds the second preset threshold.
[0020] The output verification module is used to perform cross-verification on the first path identification result and the second path identification result, calculate the prediction bias before and after compensation and the probability drift before and after correction, so as to determine whether the two path identification results converge on the same category distribution characteristics; if so, output the colony category and counting result; otherwise, generate a difficult case label signal.
[0021] Compared with the prior art, the beneficial effects of this application are:
[0022] 1. In this invention, by constructing the positive output vector as a Dirichlet distribution parameter vector and combining the concentration of the predicted probability distribution to calculate the random uncertainty index and the cognitive uncertainty index, the source of risk of the identification result is quantitatively distinguished. This can effectively solve the technical problem that existing colony identification methods cannot distinguish between image quality problems and misjudgments caused by model cognitive bias, thereby improving the stability and reliability of colony category identification results.
[0023] 2. In this invention, a conflict correction factor is generated based on uncertainty-dominant type determination, and the image compensation re-sensing path and the neural network dynamic correction path are triggered respectively. At the same time, the recognition results of the two paths are cross-validated and converged. This can effectively reduce the recognition deviation and counting error caused by changes in illumination, focal length shift or changes in sample feature distribution, solve the technical problem of large fluctuations in recognition accuracy in complex imaging environments, and thus improve the accuracy and robustness of colony recognition and counting results. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating the steps of the deep learning-based intelligent colony identification and counting method of this application;
[0025] Figure 2 This is a schematic diagram of the modules of the deep learning-based intelligent colony identification and counting system of this application. Detailed Implementation
[0026] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0027] Example 1,
[0028] Application Overview:
[0029] In traditional colony detection methods, the diversity of colony morphology in petri dishes and fluctuations in lighting conditions lead to unstable image quality. Image recognition algorithms with fixed parameters cannot dynamically adapt to the coupling relationship between changes in colony type and deterioration of imaging conditions, resulting in decreased recognition accuracy and amplified counting errors.
[0030] For example, in batch testing processes in microbiology laboratories, factors such as stains on the surface of petri dishes and shifts in the angle of the light source can cause image blurring or overexposure. While traditional convolutional neural networks can extract colony contour features, they do not decouple image quality degradation from model cognitive uncertainty. Classification confidence is calculated based solely on a single probability output, failing to distinguish between random errors caused by image noise and systematic biases caused by unfamiliar sample features. When rare colony morphologies appear in the tested samples, traditional methods cannot identify the model's cognitive blind spots for that sample, resulting in a lack of adaptive compensation mechanisms in classification decisions. Consequently, the reliability of the identification results decreases in low-quality images and scenarios with samples of unknown morphology.
[0031] If the above problems are not addressed, misjudgments caused by fluctuations in image quality will lead to distorted experimental data, affecting the accuracy of microbial analysis. At the same time, the lack of robustness of the fixed threshold classification strategy will result in low efficiency of batch testing, increase the cost of manual review, and threaten the automation level and reliability of laboratory testing processes.
[0032] Faced with the aforementioned problems, this application first recognizes that traditional methods cannot effectively distinguish the impact of image quality degradation and insufficient model cognition on recognition results, resulting in a lack of targeted compensation strategies. To address this, this application attempts to establish an uncertainty quantification framework based on the Dirichlet distribution, measuring random uncertainty and cognitive uncertainty respectively by analyzing the information entropy and concentration of the predicted probability distribution. Furthermore, this application finds that relying solely on single-path re-identification cannot simultaneously address the needs of image compensation and model correction; therefore, a dual-path collaborative strategy based on a conflict correction factor is needed, combined with a cross-validation mechanism to achieve dynamic fusion of recognition results. By comparing the differences between fixed-threshold classification and adaptive uncertainty assessment, this application ultimately chooses to fuse physical semantic feature tensors, positive output vectors, and uncertainty indices using multi-dimensional parameters to construct a dynamic evaluation model for recognition confidence, and achieves hierarchical compensation and correction based on dominant type determination.
[0033] like Figure 1 As shown, the deep learning-based intelligent colony identification and counting method includes the following steps: obtaining the physical semantic feature tensor of the simultaneously acquired culture dishes; the physical semantic feature tensor refers to the multidimensional feature matrix formed by preprocessing the image data of the culture dishes acquired by a multispectral camera or high-resolution imaging device. Specifically, images can be acquired using an RGB-D camera or a multispectral sensor, and generated through preprocessing algorithms such as normalization and denoising. This tensor is used to characterize the physical morphology and spectral response characteristics of the colonies, providing input data for subsequent neural network feature extraction.
[0034] The physical semantic feature tensor is input into a neural network structure containing multiple convolutions and nonlinear activations for nonnegative mapping, generating feature image data and positive output vectors corresponding to each colony category. Feature image data refers to spatial feature maps extracted by the convolutional neural network, containing multi-level feature information such as colony morphology, edges, and texture. Specifically, it can be generated through multiple convolutional and pooling operations and used for subsequent colony counting analysis. The positive output vector is a strictly positive vector generated by the neural network through a nonlinear activation function (such as ReLU or Softplus), where each element represents the response intensity of the corresponding colony category and serves as the parameter vector input for the Dirichlet distribution.
[0035] The positive output vector is used as the parameter vector of the Dirichlet distribution to calculate the predicted probability distribution and its concentration for each colony category. The predicted probability distribution refers to the probability vector of each category generated based on the expected value of the normalized Dirichlet distribution parameter vector, satisfying the probability normalization constraint (sum of 1), and reflecting the distribution of the model's prediction confidence for each colony category. The concentration refers to the sum of all elements of the Dirichlet distribution parameter vector. The larger the value, the more concentrated the probability distribution and the higher the model confidence; conversely, the smaller the value, the more dispersed the distribution and the greater the uncertainty.
[0036] Based on the predicted probability distribution and its concentration, a stochastic uncertainty index characterizing image quality and a cognitive uncertainty index characterizing model cognition are calculated respectively. The dominant type of these stochastic and cognitive uncertainty indices is determined, and a conflict correction factor is generated. The stochastic uncertainty index is a quantitative indicator obtained by calculating the information entropy of the predicted probability distribution, reflecting the degree of random prediction error caused by quality degradation factors such as noise interference, blurring, and overexposure in the input image. The cognitive uncertainty index is a quantitative indicator obtained by calculating the inverse of the concentration, reflecting the model's familiarity with the features of the current sample; a larger value indicates insufficient model cognition of the sample type and the existence of cognitive blind spots. The conflict correction factor is a pair of weighted coefficients calculated based on the numerical ratio of the normalized stochastic and cognitive uncertainty indices, used to guide the weight allocation of subsequent image compensation and model correction strategies.
[0037] When the random uncertainty index exceeds a first preset threshold, image compensation control parameters are generated based on the conflict correction factor. A compensated image is then acquired using these parameters and re-inputted into the neural network structure for re-sensing, outputting a first path recognition result. The image compensation control parameters refer to a set of camera control instructions generated based on the first weight coefficient in the conflict correction factor, including exposure time adjustment and lens focus pulse adjustment, used to improve image quality and reduce random uncertainty. The first path recognition result refers to the colony category prediction result output by the neural network processing of the re-acquired image after image compensation, used for cross-validation with the second path recognition result.
[0038] When the cognitive uncertainty index exceeds a second preset threshold, the neural network structure is dynamically corrected according to the conflict correction factor, and a second path identification result is output. Dynamic correction of the neural network structure refers to activating a backup branch structure in the neural network based on the second weight coefficient in the conflict correction factor. This backup branch includes additional convolutional layers, attention modules, and fully connected layers, which enhance the model's ability to identify rare or complex samples through auxiliary feature extraction and feature fusion. The second path identification result refers to the colony category prediction result output after dynamic model correction, which is used together with the first path identification result for cross-validation.
[0039] Cross-validation is performed on the first path identification result and the second path identification result to calculate the prediction bias before and after compensation, and the probability drift before and after correction, to determine whether the two path identification results converge on the same category distribution feature. If so, the colony category and counting result are output; otherwise, a hard case marker signal is generated. The prediction bias refers to the vector distance (such as L2 norm or cosine distance) between the first path identification result and the preliminary category identification result, quantifying the change in the prediction result before and after image compensation. The probability drift refers to the relative entropy (KL divergence) between the second path identification result and the preliminary category identification result, quantifying the degree of shift in the probability distribution before and after model correction. When both the prediction bias and the probability drift are less than the preset convergence threshold, and the two path results point to the same colony main category, convergence is determined, and the final identification and counting results are output; otherwise, a hard case marker signal is generated, prompting manual review.
[0040] The core innovation of this application lies in constructing a dual uncertainty quantification framework based on the Dirichlet distribution. By decoupling random uncertainty and cognitive uncertainty, it achieves synergistic optimization of image quality compensation and model cognitive correction. This scheme overcomes the limitations of traditional fixed threshold classification methods by dynamically evaluating recognition confidence and triggering adaptive compensation strategies, thereby improving the accuracy and robustness of colony identification.
[0041] In automated colony detection in a microbiology laboratory, an RGB-D camera is used to acquire multispectral image data of the culture dishes in real time. Image preprocessing algorithms are used to normalize, denoise, and perform color space conversion on the original images, constructing a physical semantic feature tensor that includes spatial features and spectral response characteristics. This tensor has dimensions H×W×C, where H and W are the image height and width (e.g., 512×512 pixels), and C is the number of feature channels (e.g., three RGB channels plus a depth channel, for a total of four channels).
[0042] The physical semantic feature tensor is input into a pre-trained convolutional neural network structure, which contains multiple convolutional layers, pooling layers, and fully connected layers. The convolutional layers use 3×3 kernels with a stride of 1 and padding of 1; the pooling layers use 2×2 max pooling with a stride of 2. The network architecture uses a backbone network such as ResNet or DenseNet, and achieves non-negative mapping through the ReLU activation function. The network output consists of two parts: first, feature image data extracted through multiple convolutions, with a spatial resolution of H / 8×W / 8 (downsampled after three pooling operations) and 256 channels, used for subsequent colony counting analysis; second, a positive output vector corresponding to each colony category, with a dimension of K (K is the total number of colony categories, e.g., K=10 represents 10 colony types), where each element is strictly greater than 0, representing the response intensity of that category.
[0043] The positive output vector is used as the parameter vector α of the Dirichlet distribution, where Based on the properties of the Dirichlet distribution, the predicted probability distribution for each colony category is generated by normalizing the expected value of the parameter vector. ;
[0044] in, (j ranges from 1 to K), for example, if ,but At the same time, the concentration is calculated. In this example This value reflects the concentration of the probability distribution; the larger the S value, the higher the model's confidence in the prediction results.
[0045] Calculate the information entropy based on the predicted probability distribution p. As an indicator of stochastic uncertainty, it is used to quantify the degree of noise interference in an input image. In the example above, The reciprocal of concentration, 1 / S, is calculated as an indicator of cognitive uncertainty, used to quantify the model's unfamiliarity with the features of the current samples. In this example, cognitive uncertainty... The two uncertainty indicators are normalized, assuming the normalization range of information entropy is... Then the normalized stochastic uncertainty index Assume the normalized range of the inverse of concentration is... Then the normalized cognitive uncertainty index The dominant type is determined based on the proportion of normalized values; in this example, random uncertainty accounts for [percentage missing]. Cognitive uncertainty accounts for 0.29%. Based on this proportion, a conflict correction factor is generated, where the first weight coefficient... Second weighting coefficient .
[0046] Determine whether the random uncertainty index exceeds a first preset threshold (e.g., 0.5). In this example, the normalized random uncertainty index... The threshold has not been exceeded, so the image compensation process will not be triggered for now. In another experimental scenario... If this occurs, image compensation is triggered. At this point, the illumination compensation component and focus compensation component are extracted based on the first weighting coefficient in the conflict correction factor (assumed to be 0.8). Let the baseline illumination adjustment amount be... Benchmark Focus Adjustment Each pulse corresponds to a light compensation component. ,
[0047] Focus on compensation components One pulse. If the current exposure time Current pulse count Then adjust the exposure time Adjusted pulse number The images are reacquired using these image compensation control parameters, and the compensated images are input into the neural network for re-sensing to generate the first path recognition result.
[0048] Determine whether the cognitive uncertainty index exceeds a second preset threshold (e.g., 0.6). In this example, the normalized cognitive uncertainty index... If the threshold is not exceeded, the model correction process will not be triggered. If a rare colony morphology is encountered in another experimental scenario, If this happens, dynamic model correction is triggered. At this point, based on the second weight coefficient in the conflict correction factor (assumed to be 0.7), the backup branch structure in the neural network is activated. The backup branch structure contains two additional convolutional layers (3×3 kernels, 256 channels), a channel attention module (Squeeze-and-Excitation module), and a fully connected layer (output dimension K). The feature vectors of the backup branch and the main branch are weighted and fused. Let the main branch output feature vector... The alternate branch outputs a feature vector. Then the corrected eigenvector The fused feature vector is processed by a fully connected layer and a Softmax layer to generate the second path recognition result.
[0049] Cross-validation is performed on the first path identification results and the second path identification results. First, the colony category corresponding to the highest probability in the predicted probability distribution is used as the preliminary category identification result; in this example, the preliminary identification result is category 0 (corresponding probability 0.64). Assuming that after image compensation, the probability vector of the first path identification result is... The probability vector of the second path recognition result is The vector distance between the first path recognition result and the preliminary category recognition result is calculated to obtain the prediction bias. Calculate the relative entropy between the second path recognition result and the initial category recognition result to obtain the probability drift. Determine the prediction bias. With probability drift Are all less than the preset convergence threshold (e.g.) , In this example, all conditions are met. Also, and The category index corresponding to the highest probability is 0 (Escherichia coli). Therefore, it is determined that the convergence is on the same category distribution feature.
[0050] For the counting part, after determining the colony type to be Escherichia coli, threshold segmentation is performed on the feature image data. The optimal threshold is automatically calculated using the Otsu method. The feature image data (spatial resolution 64×64, 256 channels) is average pooled along the channel dimension to obtain a single-channel feature map (64×64). Threshold segmentation is then applied to this feature map to extract pixels with values greater than [a certain threshold]. The region is designated as the active colony unit region. Connectivity analysis is performed on the active colony unit region, and an 8-connectivity algorithm is used to identify all connected pixel groups. Assuming that 125 independent connected components are obtained through connectivity analysis, the colony count result is 125. The final output is the colony category identifier "Escherichia coli" and the corresponding count value 125, resulting in "Escherichia coli, count: 125".
[0051] Through the above-described scheme, this application achieves accurate differentiation and dynamic compensation for both image quality degradation and insufficient model cognition. By introducing Dirichlet distribution modeling to predict probabilities, both random and cognitive uncertainties can be quantified simultaneously, thereby generating targeted compensation strategies. The image quality compensation mechanism improves the quality of input data by adjusting acquisition parameters, while the model cognition correction mechanism expands feature representation capabilities by activating backup branches; the two work synergistically to improve recognition accuracy. The cross-validation mechanism ensures the consistency and reliability of recognition results by calculating prediction bias and probability drift. This scheme effectively addresses the challenges posed by image quality fluctuations and the diversity of colony morphology, reduces false positives and false negatives, improves the automation level and accuracy of microbial detection, and provides reliable technical support for batch testing in laboratories.
[0052] This application further proposes generating positive output vectors for feature image data and each colony category, including:
[0053] The physical semantic feature tensor is input into a neural network structure with multiple convolutional and pooling layers to extract multi-scale spatial features;
[0054] The extracted multi-scale spatial features and the physical semantic feature tensor are aligned and concatenated in the neural network structure to output a fused intermediate tensor;
[0055] The fused intermediate tensor is input into the neural network structure for feature enhancement, and the corresponding convolution output feature map is extracted to output feature image data.
[0056] The fused intermediate tensor is sequentially input into multiple nonlinear activation function processing units for channel-by-channel nonnegative mapping to generate a positive output vector characterizing the degree of colony response.
[0057] Multi-scale feature extraction employs convolutional kernels with different receptive fields (e.g., 3×3, 5×5, 7×7), capturing multi-level feature representations from local details to global morphology through parallel convolutional branches. Feature alignment unifies feature maps of different scales to the same spatial resolution through bilinear interpolation or deconvolution operations. Feature concatenation is performed along the channel dimension, generating a fused intermediate tensor containing both the original and extracted features. The feature enhancement module uses residual connections and attention mechanisms. Skip connections preserve low-level detail features, while channel and spatial attention mechanisms enhance the expressive power of key features. Non-negative mapping uses ReLU or Softplus activation functions to ensure that all elements of the output vector are strictly greater than 0, satisfying the mathematical constraints of the Dirichlet distribution parameter vector.
[0058] Specifically, multi-scale spatial feature extraction is achieved through three parallel convolutional branches. The first branch uses a 3×3 convolutional kernel (64 output channels) to capture local detail features, the second branch uses a 5×5 convolutional kernel (64 output channels) to capture medium receptive field features, and the third branch uses a 7×7 convolutional kernel (64 output channels) to capture global morphological features. The output feature maps of the three branches have the same resolution and are fused along the channel dimension through a concatenation operation to obtain a 192-channel multi-scale feature map.
[0059] During feature alignment and concatenation, the 192-channel multi-scale feature map is aligned spatially with the original physical semantic feature tensor (4 channels). If the multi-scale feature map has a resolution of 64×64 after downsampling, while the original tensor has a resolution of 512×512, then the original tensor is downsampled to 64×64 using average pooling. Then, concatenation is performed along the channel dimension to obtain a 196-channel (192+4) fused intermediate tensor. This fused intermediate tensor contains both high-level semantic features and low-level spatial details, providing a rich information foundation for subsequent feature enhancement.
[0060] The feature enhancement module employs a residual block structure. Each residual block contains two 3×3 convolutional layers (maintaining 196 channels), batch normalization, and ReLU activation. The residual blocks directly add the input to the output via skip connections, avoiding the vanishing gradient problem. Following the residual blocks, a channel attention module (Squeeze-and-Excitation module) is introduced. This module generates channel weights through global average pooling, two fully connected layers (compression ratio 16), and sigmoid activation, weighting the features of each channel to enhance the expressive power of key features. After passing through two residual blocks and the channel attention module, the output is 256-channel feature image data.
[0061] In the channel-wise nonnegative mapping process, the fused intermediate tensor (196 channels) is input to a global average pooling layer. The feature map of each channel (64×64) is compressed into a single value, resulting in a 196-dimensional vector. This vector is then passed through two fully connected layers (256-dimensional hidden layer and K-dimensional output layer, where K is the total number of colony categories). The first layer uses ReLU activation, and the second layer uses the Softplus activation function. Ensure the output is strictly greater than 0. Finally, generate a K-dimensional positive output vector, which serves as the parameter vector for the Dirichlet distribution.
[0062] Through the above technical solutions, this application achieves multi-scale feature extraction and fusion, capable of simultaneously capturing local details and global morphological information of bacterial colonies. The introduction of residual connections and attention mechanisms enhances feature representation capabilities and avoids the gradient vanishing problem in deep network training. Carefully designed non-negative mapping ensures that the output vector satisfies the mathematical constraints of the Dirichlet distribution, laying the foundation for subsequent uncertainty quantification.
[0063] This application further proposes methods for calculating the predicted probability distribution and concentration of each colony category, including:
[0064] The positive output vector is used as the parameter vector of the Dirichlet distribution to construct the probability density function of each category, and the predicted probability distribution corresponding to each colony category is generated based on the expected value after normalization of the parameter vector.
[0065] The concentration of each colony category is obtained by summing the elements of the positive output vector corresponding to each colony category.
[0066] The Dirichlet distribution is a multivariate continuous probability distribution defined on a probability simplex, and its probability density function is:
[0067] ,in This is a multivariate Beta function. Based on the properties of the Dirichlet distribution, the expected value of the predicted probability for each category is... ,in The predicted probability distribution is generated by normalizing the parameter vector α. ,in ,satisfy The probability normalization constraint.
[0068] Concentration S is defined as the sum of all elements of the parameter vector, i.e. (i ranges from 1 to K). The physical meaning of concentration S can be understood as the 'precision' or 'determinism' parameter of the Dirichlet distribution. When the value of S is large, the probability distribution tends to concentrate around a certain category, with small variance, indicating high confidence in the model's prediction results; when the value of S is small, the probability distribution tends to be uniform, with large variance, indicating large uncertainty in the model. There is an inverse relationship between concentration and the variance of the predicted probability distribution. The larger the S value, the smaller the variance.
[0069] For example, in one specific embodiment, suppose the positive value vector output by the neural network is... (Corresponding to 4 colony types). Then the sum of the parameter vectors... Predicted probability distribution Since the S-value is large (28.0) and the probability of the first class is higher than that of other classes (0.714), it indicates that the model has high confidence in the predicted result (class 1). The variance of the probability of the first class is calculated. The variance is very small, further validating the high confidence level.
[0070] In another comparative scenario, suppose the positive vector output by the neural network is... Then the sum of the parameter vectors Predicted probability distribution Since the S-value is small (8.0) and the probabilities of each category are similar, it indicates that the model has high uncertainty regarding the prediction results. The variance of the first category probability is calculated. The relatively large variance reflects high uncertainty.
[0071] Through the above technical solution, this application utilizes the Dirichlet distribution to model and predict probabilities, not only outputting the predicted probabilities for each category but also quantifying the confidence level of the model through the concentration parameter. This lays the mathematical foundation for subsequent uncertainty decomposition, enabling random uncertainty and cognitive uncertainty to be independently quantified and analyzed.
[0072] This application further proposes to calculate stochastic uncertainty indices characterizing image quality and cognitive uncertainty indices characterizing model cognition based on the predicted probability distribution and its concentration, respectively, including:
[0073] The information entropy of the predicted probability distribution is calculated and used as a random uncertainty index to quantify the degree of noise interference in the input image;
[0074] The reciprocal of the concentration is calculated as an indicator of cognitive uncertainty, used to quantify the degree of unfamiliarity of the model with the features of the current sample.
[0075] Information entropy H(p) is defined as: (i from 1 to K), where log is the natural logarithm. Information entropy reflects the degree of disorder or uncertainty in the probability distribution. When the probabilities of each class are close to a uniform distribution ( When the probability of a certain class approaches 1, the information entropy reaches its maximum value log(K), indicating the highest random uncertainty; when the probability of a certain class approaches 1, the information entropy reaches its maximum value log(K), indicating the highest random uncertainty. ,other When the information entropy is close to 0, it indicates the lowest random uncertainty. Information entropy quantifies the prediction uncertainty caused by quality issues such as noise, ambiguity, and occlusion in the input data itself, and belongs to the random error at the data level.
[0076] Cognitive uncertainty U is defined as the reciprocal of concentration, i.e. Cognitive uncertainty reflects the model's familiarity with the features of the current sample. When the concentration S is large, the cognitive uncertainty U is small, indicating that the model has seen enough similar samples of the current sample type during training and possesses strong cognitive ability. When the concentration S is small, the cognitive uncertainty U is large, indicating that the model is unfamiliar with the features of the current sample, which may be a rare or novel sample outside the training data distribution, indicating a cognitive blind spot. Cognitive uncertainty quantifies the prediction uncertainty caused by insufficient training data or sample distribution bias, and belongs to the systematic bias at the model level.
[0077] By calculating the information entropy and the inverse of concentration separately, this application achieves decoupled quantification of stochastic uncertainty and cognitive uncertainty. The two have different physical meanings, and their corresponding compensation strategies also differ. Stochastic uncertainty is mainly caused by image quality issues and should be addressed by adjusting imaging parameters (such as exposure and focus) to improve input data quality. Cognitive uncertainty is mainly caused by insufficient model training and should be addressed by activating backup branches or introducing auxiliary models to expand feature representation capabilities. This decoupled quantization provides clear guidance for the formulation of subsequent adaptive compensation strategies.
[0078] For example, in the first implementation scenario, assume the predicted probability distribution is as follows: (3 types of colonies), concentration Then information entropy Cognitive uncertainty In this scenario, although the information entropy is not at its lowest value, its concentration is high and the cognitive uncertainty is very low, indicating that the model is very familiar with this type of colony. The main uncertainty comes from image quality. Image compensation strategies should be prioritized.
[0079] In the second implementation scenario, assume the predicted probability distribution is as follows: Concentration Then information entropy Cognitive uncertainty In this scenario, the high information entropy and low concentration indicate both image quality issues and insufficient model cognition. A combined image compensation and model correction strategy should be adopted, with the weights of both dynamically allocated based on a conflict correction factor.
[0080] Through the above technical solutions, this application establishes a dual uncertainty quantification framework based on Dirichlet distribution, which can accurately distinguish the degree of influence of image quality degradation and insufficient model cognition on the recognition results, and provides a scientific basis for the formulation of adaptive compensation strategies.
[0081] This application further proposes conflict correction factors including:
[0082] The random uncertainty index and the cognitive uncertainty index are normalized; based on the numerical ratio of the normalized random uncertainty index and the cognitive uncertainty index, a first weighting coefficient and a second weighting coefficient are determined to form a conflict correction factor.
[0083] The normalization process uses the Min-Max scaling method to map the stochastic uncertainty index H(p) to... The interval. The theoretical range of information entropy is... Where K is the total number of colony types. The normalization formula is: For cognitive uncertainty indicators Its theoretical scope is To facilitate normalization, an empirical upper bound is set. (For example, 0.5 or 1.0), the normalization formula is: After normalization, and The range of values is This facilitates subsequent weight calculations.
[0084] The calculation of the first weighting coefficient w1 and the second weighting coefficient w2 is based on the normalized proportion of the uncertainty index. The calculation formula is: , As can be seen from the definition... The first weighting coefficient w1 reflects the proportion of random uncertainty in the total uncertainty and is used to guide the image compensation intensity; the second weighting coefficient w2 reflects the proportion of cognitive uncertainty in the total uncertainty and is used to guide the model correction intensity. The conflict correction factor is defined as the weighting coefficients... .
[0085] For example, in one specific embodiment, it is assumed that the total number of colony types is... Information entropy Concentration Then the normalized value of the random uncertainty index. Cognitive uncertainty ,set up Then the normalized value of the cognitive uncertainty index First weighting coefficient Second weighting coefficient Conflict correction factor This indicates that random uncertainty dominates the current scenario (approximately 72%), and image quality compensation strategies should be the primary approach, supplemented by a certain degree of model correction.
[0086] In another comparative scenario, let's assume information entropy. Concentration .but , First weighting coefficient Second weighting coefficient Conflict correction factor This indicates that cognitive uncertainty dominates the current scenario (approximately 66%), and the main strategy should be model correction, supplemented by a certain degree of image compensation.
[0087] Through the above technical solution, this application realizes an adaptive weight allocation mechanism based on uncertainty-dominated type. The conflict correction factor can dynamically reflect the relative severity of image quality problems and model cognitive deficiencies in the current scene, providing quantitative weight guidance for subsequent compensation strategies and avoiding the problem of low compensation efficiency caused by fixed weight allocation.
[0088] This application further proposes image compensation control parameters including:
[0089] Using the first weighting coefficient in the conflict correction factor, the illumination compensation component and focus compensation component related to image quality are extracted; the illumination compensation component is mapped to exposure time, and the focus compensation component is mapped to the pulse adjustment number of the lens drive motor to form image compensation control parameters.
[0090] The calculation of the illumination compensation component is based on the first weighting coefficient and the reference illumination adjustment. The calculation formula is: ,in As the first weighting coefficient, Reference illumination adjustment (unit: milliseconds). Reference illumination adjustment Determined through experimental calibration, the typical value range is 5ms to 15ms. When the random uncertainty is high ( (For larger light compensation components, the illumination compensation component increases accordingly, which means that the exposure time needs to be adjusted more significantly.)
[0091] The focus compensation component is calculated based on the first weighting coefficient and the baseline focus adjustment. The calculation formula is: ,in Reference focus adjustment amount (unit: pulse count). Reference focus adjustment amount The stepping accuracy is determined by the stepping precision of the lens drive motor, typically ranging from 30 to 100 pulses. When random uncertainty is high ( (The larger the focus compensation component, the greater the focus compensation component, which means that the lens position needs to be adjusted more significantly to improve focus sharpness.)
[0092] The exposure time mapping is based on the current exposure time and the illumination compensation component. If the current image is too dark (average pixel value below 128), the exposure time is increased. If the current image is overexposed (average pixel value greater than 200), reduce the exposure time. The pulse adjustment number mapping calculation is based on the current lens position and focus compensation components. If the current image is blurry (the sharpness score calculated by the Laplacian operator is below a threshold), then the lens position is adjusted: The adjustment direction is determined through gradient ascent search. The image compensation control parameters are defined as follows: .
[0093] For example, in one specific embodiment, assume a first weighting coefficient Reference illumination adjustment amount Benchmark Focus Adjustment One pulse. Then the illumination compensation component. Focus on compensation One pulse (rounded down). Current exposure time. If the current image has an average pixel value of 100 (too dark), then adjust the exposure time. Current camera pulse count The current image sharpness score is 0.4 (blurry). Gradient ascent search determines that the number of pulses should be increased. The adjusted number of pulses is then... Image compensation control parameters .
[0094] Based on the image compensation control parameter ICP, the camera is controlled to re-acquire the image. The camera exposure time is set to 25.5ms, and the lens motor is driven to the 158-pulse position to acquire a new image. The average pixel value of the new image increases to 145 (close to the ideal value of 128), and the sharpness score improves to 0.85 (sharp). The compensated image is then re-input into the neural network for forward propagation, generating a new positive output vector. A new predicted probability distribution is calculated as the first path recognition result.
[0095] Through the above technical solution, this application realizes an adaptive image compensation mechanism based on a conflict correction factor. By dynamically adjusting the exposure time and focus position, it can effectively improve image quality problems caused by uneven illumination, out-of-focus blur, and other factors, reduce random uncertainty, and improve recognition accuracy. This mechanism avoids the over-compensation or under-compensation problems caused by fixed compensation parameters, and achieves precise control of the compensation intensity.
[0096] This application further proposes that the output of the second path identification result includes:
[0097] Based on the second weight coefficient in the conflict correction factor, the backup branch structure in the neural network is activated, and the backup branch structure is used to perform auxiliary feature extraction on the physical semantic feature tensor, and output the second path recognition result.
[0098] The backup branch structure is a pre-designed auxiliary feature extraction path in a neural network, containing additional convolutional layers, attention modules, and fully connected layers. The purpose of the backup branch is to expand the model's feature representation capabilities, especially for rare or underrepresented sample types in the training data. The backup branch structure remains dormant during normal inference and is only activated when cognitive uncertainty exceeds a threshold. Activation of the backup branch is achieved through a second weighting coefficient. control, The larger the value, the higher the weight of the output of the backup branch in the final feature fusion.
[0099] The implementation of the backup branch structure includes two 3×3 convolutional layers (256 channels, stride 1), each followed by batch normalization and ReLU activation. A spatial attention module is introduced after the convolutional layers, generating two feature maps through max pooling and average pooling along the channel dimension. These maps are then concatenated and processed by a 7×7 convolution (outputting 1 channel) and sigmoid activation to generate a spatial weight map, which is used to weight the feature maps. The spatial attention module highlights key spatial regions and enhances the perception of detailed features such as colony edges and textures. Finally, global average pooling and a fully connected layer (outputting K dimensions) are used to generate the feature vector for the backup branch. .
[0100] The feature fusion between the main branch and the backup branch uses a weighted summation method. Let the feature vector output by the main branch be... (K-dimensional), the feature vector output by the alternate branch is (K-dimensional), the fusion formula is: The fused feature vector After normalization by the Softmax layer, a corrected predicted probability distribution is generated, which serves as the result of the second path recognition.
[0101] For example, in one specific embodiment, assume a second weighting coefficient The main branch outputs feature vectors. (Corresponding to 3 colony types), the alternate branch outputs feature vectors. The fused feature vector .
[0102] After Softmax normalization, This probability distribution serves as the result of the second path identification.
[0103] Compare the output of the original main branch (assuming it is after Softmax) The predicted probability distribution changed after correction by the backup branch. The probability of the first class decreased from 0.70 to 0.53, while the probability of the second class increased from 0.20 to 0.32. This indicates that the backup branch captured feature information not fully represented by the main branch, potentially identifying the sample as having mixed colony characteristics or belonging to a boundary sample. This correction can reduce cognitive uncertainty and improve the ability to identify rare or complex samples.
[0104] Through the above technical solution, this application realizes an adaptive model correction mechanism based on a conflict correction factor. By activating the backup branch structure and dynamically adjusting the fusion weights, the feature representation capability of the model can be expanded to cope with insufficiently covered sample types in the training data. This mechanism avoids the cognitive blind spot problem caused by a fixed model structure and improves the model's adaptability to the diversity of colony morphology.
[0105] This application further proposes calculating the prediction bias before and after compensation, as well as the probability drift before and after correction, to determine whether the two path recognition results converge on the same category distribution features, including:
[0106] Calculate the vector distance between the first path identification result and the preliminary category identification result to obtain the prediction bias; calculate the relative entropy between the second path identification result and the preliminary category identification result to obtain the probability drift; determine whether the prediction bias and the probability drift are both less than a preset convergence threshold; if both are less than the preset convergence threshold, and the first path identification result and the second path identification result point to the same main colony category, then it is determined that they have converged on the same category distribution feature.
[0107] The prediction bias is calculated using Euclidean distance (L2 norm) to measure the difference between the first path identification result and the preliminary category identification result. Let the probability vector of the first path identification result be... The probability vector of the preliminary category identification result is Then the predicted bias The prediction bias reflects the magnitude of change in the prediction result before and after image compensation. If the B value is small, it indicates that the prediction results before and after compensation are basically the same, indicating that image compensation has not introduced errors. If the B value is large, it indicates that compensation has caused a large change in the prediction result, which may be due to overcompensation or incorrect compensation direction.
[0108] The probability drift is calculated using KL divergence, measuring the degree of deviation in the probability distribution between the second path identification result and the initial category identification result. Let the probability vector of the second path identification result be... The KL divergence is defined as: The probability drift reflects the relative entropy of the probability distribution before and after model correction. If the D value is small, it indicates that the probability distribution before and after correction is basically the same, meaning that the model correction did not introduce bias. If the D value is large, it indicates that the correction caused a large shift in the probability distribution, which may identify different colony categories.
[0109] Convergence determination is based on two conditions: (1) both the prediction bias B and the probability drift D are less than the preset convergence threshold; (2) the first path identification result Compared with the second path identification results The category index corresponding to the highest probability is the same. The convergence threshold is determined based on experimental calibration and is usually set as: the prediction bias threshold. probability drift threshold .like and ,and If the count is successful, the colony is considered converged, and the colony type and count results are output; otherwise, it is considered non-converged, a difficult case marker signal is generated, and manual review is required.
[0110] For example, in one specific embodiment, assume the preliminary category identification result First path identification result Second path identification results Calculate the predicted bias. .
[0111] Calculate probability drift .because ,and (All are category 0), which is considered convergence. The output colony category is category 0 (assumed to be Escherichia coli), and colony counting is performed in conjunction with the feature image data.
[0112] In another comparison scenario, assuming the initial category identification result... First path identification result Second path identification results .
[0113] Calculate the prediction bias:
[0114] ;
[0115] Calculate probability drift .because or ,and The sample was deemed non-convergent. A difficult case marker signal was generated, indicating that the identification results for this sample were inconsistent and required manual verification. This sample may belong to a boundary sample or a mixed colony, and the image compensation and model correction failed to reach a consensus.
[0116] Through the above technical solution, this application implements a cross-validation mechanism for dual-path recognition results. By calculating the prediction bias and probability drift, the effectiveness of image compensation and model correction can be quantified, ensuring that both strategies converge on the same category distribution features. This mechanism improves the reliability of the recognition results, avoids misjudgments that may be caused by a single path, and at the same time, by identifying difficult samples that require manual review through hard example marker signals, it ensures the accuracy of batch detection.
[0117] In this technical solution, the data acquisition module synchronously acquires images of the culture dish under test and simultaneously obtains environmental parameter data corresponding to the image acquisition time, including exposure time, focusing distance, and aperture setting. This module performs unified encoding processing on the raw image data and environmental parameter data to construct a physical semantic feature tensor containing a pixel matrix and environmental parameter vectors, achieving synchronous modeling of image content information and imaging environment state information. By constructing an image-environment joint data structure, a traceable data foundation is provided for subsequent uncertainty source analysis, enhancing the system's ability to interpret imaging interference factors.
[0118] The feature extraction module inputs the physical semantic feature tensor into a neural network structure containing multiple convolutional layers, pooling layers, and nonlinear activation functions for non-negative mapping. This module performs multi-scale spatial feature extraction within the network and aligns and concatenates image spatial features with environmental parameter features in the fusion layer to form a fused intermediate tensor. Based on this, it outputs feature image data for spatial localization, used for subsequent colony region extraction and counting; and it performs constraint mapping on the responses of each category through non-negative activation functions, generating positive output vectors representing the support strength of each colony category. This design overcomes the limitations of traditional Softmax's direct normalization output, preserving the absolute information of category support strength and providing a data carrier for subsequent evidence modeling.
[0119] The probability analysis module uses the positive output vector as a parameter base to construct a corresponding Dirichlet distribution parameter vector, and calculates the predicted probability distribution and concentration of each colony category based on this parameter vector. Concentration reflects the aggregation level of the model's overall evidence strength for the current sample, while the predicted probability distribution represents the relative support relationship between different categories. By retaining the total information of the parameter vector, this module achieves the transformation from "probability output" to "evidence output," providing a mathematical basis for uncertainty decoupling.
[0120] The probability assessment module calculates stochastic uncertainty and cognitive uncertainty indices based on predicted probability distribution and concentration data. The stochastic uncertainty index quantifies the noise interference and blurriness of the input image under current imaging conditions, while the cognitive uncertainty index quantifies the model's unfamiliarity with the features of the current sample or the risk of out-of-distribution problems. This module normalizes the two types of uncertainty indices and determines their dominant type, generating a conflict correction factor based on their numerical ratio. This establishes a correlation mapping between the source of uncertainty and subsequent processing paths, enabling distinguishable analysis of the source of uncertainty.
[0121] When the random uncertainty index exceeds a first preset threshold, the path analysis module generates image compensation control parameters based on a conflict correction factor, and adjusts imaging parameters such as exposure time or focus distance accordingly, then re-acquires compensated image data. The compensated image is then input into the neural network structure for re-sensing processing, outputting the first path recognition result. This module reduces image noise and interference through physical-level imaging optimization, achieving closed-loop correction of imaging quality issues and improving the stability and reliability of the recognition results.
[0122] When the cognitive uncertainty index exceeds a second preset threshold, the path recognition module dynamically modifies the neural network structure based on a conflict correction factor. This includes activating backup branches or adjusting intermediate feature weights to enhance the representation of current sample features and output a second path recognition result. This module focuses on cognitive enhancement at the semantic level, performing structural optimization for potentially out-of-distribution samples or samples with anomalous features to improve the model's adaptability to unknown or rare colony morphologies.
[0123] The output verification module cross-verifies the first path identification result with the second path identification result. By calculating the prediction bias before and after compensation and the probability drift before and after correction, it determines whether the two path identification results converge on the same category distribution characteristics. When both the prediction bias and the probability drift are less than the preset convergence threshold, and the two path identification results point to the same colony main category, the final colony category and count result are output; otherwise, a hard case label signal is generated, and the current sample is included in the subsequent incremental learning process. This module constructs a terminal control mechanism for result verification and anomaly identification, realizing self-checking and self-healing of the identification results.
[0124] Through the coordinated operation of the above modules, this technical solution constructs a closed-loop identification system with evidence modeling as the core, uncertainty decoupling as the driving force, and physical compensation and cognitive correction as the dual paths of collaboration. It effectively solves the problem of not being able to distinguish between image quality issues and model cognitive blind spots in traditional colony identification, and improves the accuracy and reliability of colony identification and counting results in complex imaging environments.
[0125] The above embodiments are only used to illustrate the technical methods of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of this application without departing from the spirit and scope of the technical methods of this application.
Claims
1. A deep learning-based intelligent colony identification and counting method, characterized in that, Includes the following steps: Obtain the physical semantic feature tensor of the culture dish to be tested, which is acquired synchronously; The physical semantic feature tensor is input into a neural network structure containing multi-layer convolution and non-linear activation function processing units for non-negative mapping processing, generating feature image data and positive output vectors corresponding to each colony category; The positive output vector is used as the parameter vector of the Dirichlet distribution to calculate the predicted probability distribution and concentration of each colony category. Based on the predicted probability distribution and its concentration, a random uncertainty index characterizing image quality and a cognitive uncertainty index characterizing model cognition are calculated respectively. The dominant type of the random uncertainty index and the cognitive uncertainty index is determined, and a conflict correction factor is generated. When the random uncertainty index exceeds the first preset threshold, image compensation control parameters are generated according to the conflict correction factor, the compensated image is acquired through the image compensation control parameters, and the compensated image is re-input into the neural network structure for re-perception, and the first path recognition result is output. When the cognitive uncertainty index exceeds the second preset threshold, the neural network structure is dynamically corrected according to the conflict correction factor, and the second path recognition result is output. Cross-validation is performed on the first path identification result and the second path identification result to calculate the prediction bias before and after compensation and the probability drift before and after correction, so as to determine whether the two path identification results converge on the same category distribution feature. If so, output the colony type and count results; Otherwise, generate a hard case marker signal.
2. The method for intelligent colony identification and counting based on deep learning according to claim 1, characterized in that, The process of generating feature image data and positive output vectors corresponding to each colony category includes: The physical semantic feature tensor is input into the neural network structure to extract multi-scale spatial features; The extracted multi-scale spatial features and the physical semantic feature tensor are aligned and concatenated in the neural network structure to output a fused intermediate tensor; The fused intermediate tensor is input into the neural network structure for feature enhancement, and the corresponding convolution output feature map is extracted to output feature image data. The fused intermediate tensor is sequentially input into multiple nonlinear activation function processing units for channel-by-channel nonnegative mapping to generate a positive output vector characterizing the degree of colony response.
3. The method for intelligent colony identification and counting based on deep learning according to claim 1, characterized in that, The process of calculating the predicted probability distribution and concentration of each colony category includes: Based on the parameter vector, a probability density function for each category is constructed, and a predicted probability distribution for each colony category is generated based on the expected value after normalization of the parameter vector. The concentration of each colony category is obtained by summing the elements of the positive output vector corresponding to each colony category.
4. The method for intelligent colony identification and counting based on deep learning according to claim 1 or 3, characterized in that, The process of calculating the stochastic uncertainty index representing image quality and the cognitive uncertainty index representing the cognitive model includes: The information entropy of the predicted probability distribution is calculated and used as a random uncertainty index to quantify the degree of noise interference in the input image; The reciprocal of the concentration is calculated as an indicator of cognitive uncertainty, used to quantify the degree of unfamiliarity of the model with the features of the current sample.
5. The intelligent colony identification and counting method based on deep learning according to claim 1 or 2, characterized in that: After calculating the predicted probability distribution and concentration of each colony category, the method further includes: The colony category corresponding to the highest probability in the predicted probability distribution is used as the preliminary category identification result; The feature image data is segmented by thresholding, and regions exceeding a preset image threshold are extracted as active colony units. Connectivity analysis is performed on the active colony units, and the number of independent connected components is counted to generate preliminary counting results. After outputting the second path identification result, the method further includes: When the random uncertainty index does not exceed the first preset threshold and the cognitive uncertainty index does not exceed the second preset threshold, the preliminary category identification result and the preliminary counting result are output as the final identification result.
6. The method for intelligent colony identification and counting based on deep learning according to claim 1, characterized in that, The process of generating conflict correction factors includes: The random uncertainty index and the cognitive uncertainty index are normalized; based on the numerical ratio of the normalized random uncertainty index and the cognitive uncertainty index, a first weighting coefficient and a second weighting coefficient are determined to form a conflict correction factor.
7. The method for intelligent colony identification and counting based on deep learning according to claim 1, characterized in that, The process of generating image compensation control parameters includes: The illumination compensation component and focus compensation component related to image quality are extracted using the first weighting coefficient in the conflict correction factor. The illumination compensation component is mapped to exposure time, and the focus compensation component is mapped to the pulse adjustment number of the lens drive motor to form image compensation control parameters.
8. The method for intelligent colony identification and counting based on deep learning according to claim 1, characterized in that, The neural network structure also includes a backup branch structure, and the process of outputting the second path recognition result includes: Based on the second weight coefficient in the conflict correction factor, the backup branch structure in the neural network structure is activated, and the backup branch structure is used to perform auxiliary feature extraction on the physical semantic feature tensor, and output the second path recognition result.
9. The method for intelligent colony identification and counting based on deep learning according to claim 1, characterized in that, The process of determining whether the results of two path recognitions converge on the same category distribution features includes: Calculate the vector distance between the first path recognition result and the preliminary category recognition result to obtain the prediction bias; calculate the relative entropy between the second path recognition result and the preliminary category recognition result to obtain the probability drift. Determine whether the prediction bias and the probability drift are both less than a preset convergence threshold; if both are less than the preset convergence threshold, and the first path identification result and the second path identification result point to the same main colony category, then it is determined that they have converged on the same category distribution feature.
10. A deep learning-based intelligent colony identification and counting system, characterized in that: The application includes a deep learning-based intelligent colony identification and counting method as described in any one of claims 1 to 9, comprising: The data acquisition module is used to acquire the physical semantic feature tensor of the culture dish to be tested, which is acquired synchronously. The feature extraction module is used to input the physical semantic feature tensor into a neural network structure containing multiple convolutions and nonlinear activations for non-negative mapping processing, and generate feature image data and positive output vectors corresponding to each colony category. The probability analysis module is used to use the positive output vector as the parameter vector of the Dirichlet distribution to calculate the predicted probability distribution and concentration of each colony category. The probability assessment module is used to calculate the random uncertainty index characterizing image quality and the cognitive uncertainty index characterizing model cognition based on the predicted probability distribution and its concentration, respectively, to determine the dominant type of the random uncertainty index and the cognitive uncertainty index, and to generate a conflict correction factor. The path analysis module is used to generate image compensation control parameters based on the conflict correction factor when the random uncertainty index exceeds a first preset threshold, acquire a compensated image through the image compensation control parameters, re-input the compensated image into the neural network structure for re-perception, and output a first path recognition result. The path recognition module is used to dynamically correct the neural network structure according to the conflict correction factor and output the second path recognition result when the recognition uncertainty index exceeds the second preset threshold. The output verification module is used to perform cross-verification on the first path identification result and the second path identification result, calculate the prediction bias before and after compensation and the probability drift before and after correction, so as to determine whether the two path identification results converge on the same category distribution characteristics; if so, output the colony category and counting result; otherwise, generate a difficult case label signal.