Colony identification methods and related equipment
By combining dynamic threshold determination and multiple rules for colony identification, the problem of misjudgment caused by light spot crosstalk on high-well plates is solved, thus improving the accuracy and reliability of colony identification.
Patent Information
- Application Number
- CN202611237094.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional colony identification methods are prone to misjudgment and inaccurate colony identification on high-well plates due to optical system limitations, which can lead to crosstalk and overlap of light spots.
A dynamic threshold determination method is adopted, which optimizes the colony identification process by extracting light spot distribution features and generating adaptive thresholds, combined with various image fragment detection rules and machine learning classifiers.
It effectively suppresses the false positive rate in high-density scenarios, improving the accuracy of colony counting and the reliability of drug sensitivity results.
Smart Images

Figure CN123072011A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and pathogen microbial drug susceptibility testing, and in particular to a colony identification method and related equipment. Background Technology
[0002] The following technical problems exist in identifying FISH (fluorescence in situ hybridization) colony spots during rapid drug sensitivity testing: Traditional detection systems use plates with a low number of wells (such as 16 and 32). However, as the number of wells in the plate increases (such as 192 and 384), when the optical sensor takes a picture of the entire plate, the diffraction limit of the optical system, lens distortion, or light scattering can cause light spots to be generated between nearby wells. This leads to the superposition or aggregation of normal colony light spots and crosstalk light spots, resulting in crosstalk between wells, light spot overlap, high brightness saturation, and class imbalance. This causes the reading of the spot area ratio and total light intensity to be too high, affecting the image fragment detection logic. At the same time, the probability of overlap and mutual occlusion between light spot particles increases, and the single threshold classification method is prone to misjudgment and cannot make accurate interpretations. Summary of the Invention
[0003] In order to at least solve one of the technical problems existing in the prior art, the present invention provides a colony identification method and related equipment.
[0004] One aspect of the present invention provides a FISH colony identification method, comprising: Acquire a well image of each well on a well plate used to hold bacterial suspension, and perform feature extraction on the well image to obtain the light spot distribution characteristics; If the light spot distribution features meet the image fragment detection conditions, a dynamic threshold for image fragment detection is determined based on the light spot distribution features. The image of the well location is subjected to image fragment detection using the dynamic threshold to obtain an image fragment detection result, which is used to indicate whether to perform colony identification. Based on the image fragment detection results, colony identification is performed on the well site images to obtain the colony identification results.
[0005] According to the colony identification method, the light spot distribution features are used to characterize the light intensity features, area distribution features, and morphological distribution features of the light spot particles in the well site image.
[0006] According to the colony identification method, the image fragment detection conditions include a first preset threshold range and a second preset threshold range. The first preset threshold range is determined by the well plate type and the optical system parameters used for FISH, and the second preset threshold range is determined by the fluorescence signal intensity reference of FISH. If the area ratio of the patch region of the area distribution feature exceeds the first preset threshold range or the total light intensity of the light intensity feature exceeds the second preset threshold range, then the image fragment detection condition is met.
[0007] According to the colony identification method, determining the dynamic threshold for image fragment detection based on the light spot distribution characteristics includes: Each feature of the light spot distribution characteristics is sorted, and the value at a preset proportion position is used as the statistical benchmark value of the light spot distribution characteristics; The statistical benchmark value is amplified by a preset scaling factor and compared with the base threshold, with the larger value being used as the dynamic threshold.
[0008] According to the colony identification method described above, the method further includes: Each time the spot distribution feature statistics are performed on the hole position, the hole position number is used as an identifier for cache traversal. If the same identifier exists, the spot distribution feature of the hole position number is read directly. Otherwise, the statistical calculation is performed, and the statistical calculation result is associated with the hole position identifier for storage.
[0009] According to the colony identification method, image fragment detection is performed on the pore image using a dynamic threshold to obtain the image fragment detection result, including: Each light spot particle in the aperture image is selected from the dynamic threshold for joint determination using at least two determination parameters to obtain the image fragment detection result of whether the light spot particle is an image fragment or a valid colony signal. The determination parameters include area determination parameters, morphology determination parameters, and light intensity determination parameters.
[0010] According to the colony identification method described above, the method further includes: The light spot particles are detected by cascading multiple image fragment detection rules to obtain cascaded detection results. The image fragment detection rules include image fragment rules based on size and shape, image fragment rules based on defocus features, and image fragment rules based on density analysis.
[0011] According to the colony identification method, the colony identification result is obtained by detecting the well site image based on the image fragment detection result, including: Image fragments in the well site image are detected using a colony classification model to obtain colony identification results. The training steps of the colony classification model include: Obtain a dataset, which includes image fragment samples; Cost-sensitive random forest is used as the classifier for training image fragment samples, and the ROC optimal threshold method is used for training optimization. Furthermore, the predicted probabilities obtained when classifying image fragment samples are constrained by probability difference judgment and confidence judgment.
[0012] According to the colony identification method described above, the predicted classification probability of samples in the dataset during training is constrained by probability difference determination and confidence determination, including: The probability difference determination includes obtaining the highest predicted probability of the highest category and the second highest predicted probability of the sample in the dataset. If the difference between the highest predicted probability of the highest category and the second highest predicted probability exceeds a preset difference threshold, the sample is added to the difficult sample library. The confidence determination includes obtaining the predicted probability of the highest category of the sample in the dataset. If the predicted probability of the highest category is lower than the preset confidence threshold, the sample is added to the difficult sample library. The colony classification model was iteratively optimized using a database of challenging samples.
[0013] Another aspect of the present invention discloses a colony identification device, comprising: The first module is used to acquire a well image of each well on a well plate used to carry bacterial suspension, and to perform feature extraction on the well image to obtain the light spot distribution features; The second module is used to determine a dynamic threshold for image fragment detection based on the light spot distribution characteristics when the light spot distribution characteristics meet the image fragment detection conditions. The third module is used to perform image fragment detection on the well image through the dynamic threshold to obtain the image fragment detection result, which is used to indicate whether to perform colony identification. The fourth module is used to identify colonies in the well site image based on the image fragment detection results, and obtain the colony identification results.
[0014] Another aspect of the present invention provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described above.
[0015] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.
[0016] The beneficial effects of this invention are as follows: by generating a dynamic threshold for determining light spot particles, the light spot particles in the aperture image under high-density scenes are determined under adaptive conditions, which effectively suppresses the false judgment rate under high-density scenes and improves the accuracy of colony counting and the reliability of drug sensitivity result identification in high-throughput environments. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart of the colony identification method according to an embodiment of the present invention.
[0018] Figure 2 This is a flowchart of the large-area bright fragment detection process based on dynamic threshold according to an embodiment of the present invention.
[0019] Figure 3 These are before and after images of a high-concentration sample signal from an embodiment of the present invention, where (a) is the actual signal image of the high-concentration drug-resistant bacterial sample after algorithm correction, and (b) is the actual signal image of the high-concentration drug-resistant bacterial sample before repair (the red area is the detected signal).
[0020] Figure 4 This is a schematic diagram of a colony identification device according to an embodiment of the present invention. Detailed Implementation
[0021] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no inherent meaning. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In this subsequent description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0022] refer to Figure 1 , Figure 1 This is a schematic flowchart of the colony identification method according to an embodiment of the present invention, which includes, but is not limited to, steps S100-S400: S100: Obtain a well image of each well on the well plate used to hold the bacterial suspension, and perform feature extraction on the well image to obtain the light spot distribution features.
[0023] In some embodiments, when colony identification is used for the identification of colony spots in FISH (fluorescence in situ hybridization), its optical system includes at least an excitation light source, a fluorescence excitation block, an objective lens, and a detector, wherein the detector is a high-sensitivity sCMOS or CCD camera used to acquire well images of each well on the well plate carrying the bacterial suspension.
[0024] In some embodiments, the method further includes preprocessing and feature extraction of the aperture image, wherein the preprocessing includes field flattening and connectivity component marking.
[0025] For example, the flat-field illumination process is used to eliminate uneven illumination in the image and provide a uniform reference for background subtraction. This includes image segmentation, dividing the image into grid blocks; control point generation, calculating background values for each block to generate grid control points; outlier handling, calculating the median of control points in the central region as a reference, removing control points that deviate too much from the reference value, removing isolated control points, and filling in missing values using interpolation; background image generation, stretching the control point grid to the original image size using bicubic interpolation, and processing the remaining pixels at the lower right edge; and field flattening: subtracting the background image from the original image, truncating negative values to 0. Field flattening can eliminate background differences caused by uneven illumination, improve the accuracy of subsequent threshold segmentation, and enhance the detection capability of weak signals.
[0026] For example, connected component labeling is used to label connected components in a binary image to identify individual grains / blobs, which includes initialization, creating a list of blobs (binary large objects), initializing the label mapping to -1; and pixel-by-pixel scanning, as shown below: If the first pixel is non-zero, create a new Blob; First row: Check the left-hand pixels; if they are already marked, add them to the corresponding Blob. First column: Check the pixels above; if they are already marked, add them to the corresponding Blob. Other pixels: Check the pixels above and to the left; Only marked at the top: Add the blob above; Marked only on the left: Add to left-side Blob; All are marked and identical: Add to this Blob; Both are marked but different: merge two blobs (left merging to top); No markers: Create a new Blob; List cleanup: Remove duplicate Blob references and retain only unique Blob lists.
[0027] This embodiment achieves a memory-friendly single scan with efficient O(N) time complexity and correctly handles various connectivity conditions by using connected component marking.
[0028] For example, feature extraction includes extracting the geometric and intensity features of each particle from the aperture image, using a single-scan algorithm to simultaneously compute all pixel features in one traversal: accumulating centroid coordinates (centerX, centerY), counting area (area), accumulating intensity (totalIntensity), updating extrema (min, max), updating bounding boxes (left, right, top, bottom), and calculating perimeter contribution (4 - number of neighboring labeled pixels).
[0029] Furthermore, calculate all shape features: compactness = perimeter² / (4×π×area), circularity = 4×π×area / perimeter², eccentricity = √(1-1 / aspectRatio²) (aspectRatio≥1), symmetry = 1 / (1+|aspectRatio-1|), texture = (max-min) / (mean+1), edge sharpness = √(compactness×circularity) / 100, solidity = min(1, 1 / (compactness / 50)).
[0030] Furthermore, based on the above morphological features, the light intensity, area distribution, and morphological distribution of the light spot particles in the image are further determined. For example, the light intensity feature is calculated as follows:
[0031]
[0032] in, Represents pixels The light intensity value, The total pixel area of the ROI. This represents the sum of the pixel areas of all connected light spots within the current ROI region. Indicates the percentage of the light spot area. This represents the total light intensity of the connected light spots. Meanwhile, the area distribution and morphological distribution can be calculated based on the above shape characteristics, which will not be elaborated here.
[0033] S200, if the light spot distribution characteristics meet the image fragment detection conditions, determine the dynamic threshold for image fragment detection based on the light spot distribution characteristics.
[0034] In some embodiments, the image fragment detection conditions include a first preset threshold range and a second preset threshold range. The first preset threshold range is characterized by being determined by the orifice plate type and the optical system parameters used for FISH, and the second preset threshold range is characterized by being determined by the fluorescence signal intensity benchmark of FISH.
[0035] It should be noted that the optical system parameters used for FISH can include the type and wavelength of the excitation source, the magnification and numerical aperture of the objective lens, etc. The fluorescence signal intensity benchmark for FISH can be the average fluorescence intensity of the negative control sample, the equivalent reference number of fluorescent molecules, and the standard interpretation threshold, etc.
[0036] For example, the first preset threshold range is dynamically configured according to the aperture plate type and optical system parameters, and the second preset threshold range is dynamically configured according to the fluorescence signal intensity benchmark. When the area ratio of the region in the light spot distribution feature is within the first preset threshold range and the total light intensity is within the second preset threshold range, the subsequent dynamic threshold generation and image fragment detection are performed; otherwise, they are not performed.
[0037] For example, when using 192-well and 384-well plates, the 384-well plate, with its smaller pores and denser cells, may produce a more fragmented light spot. Therefore, the lower or upper limit of the threshold range needs adjustment. The lower limit prevents missed detection of small light spots, while the upper limit avoids over-detection noise. For optical system parameters used in FISH, these can be objective magnification or numerical aperture. With a 20× objective magnification, the field of view is large but the resolution is low, and the light spot occupies a small proportion of the image. When replaced with a 60× oil immersion lens, the field of view shrinks but the resolution improves, and the light spot details become clearer. In this case, the width of the threshold range needs to be adjusted according to the magnification to make the light spot size change more sensitive under high magnification, requiring a narrower range. Similarly, different numerical aperture optical systems have different light-collecting capabilities. For example, a higher numerical aperture results in a more concentrated light spot brightness distribution. Systems with higher numerical apertures can lower the lower limit of the threshold range, making the (light spot) signal easier to capture.
[0038] For fluorescence signal intensity, for example, when it is the difference compared to a negative control sample: If the average fluorescence intensity of the negative control (sample without target sequence) in a certain batch of experiments is I1, and the average intensity of the negative control in another batch rises to I2 (I2>I1) due to reagent aging, environmental interference, etc., then the lower limit of the second preset threshold interval needs to be adjusted upward to avoid misjudging background noise as light spots. The above fluorescence signal intensity can also be due to differences in the number of equivalent reference fluorescent molecules, etc.
[0039] S300 performs image fragment detection on the well site image using a dynamic threshold, and obtains the image fragment detection result, which is used to indicate whether to perform colony identification.
[0040] In some embodiments, each feature information of the light spot distribution feature is sorted, and the value at a preset ratio position is used as the statistical benchmark value of the light spot distribution feature; the statistical benchmark value is amplified by a preset ratio coefficient and compared with a basic threshold, and the larger value is used as the dynamic threshold.
[0041] For example, for all light spot particles extracted from the current aperture image, their area distribution characteristics, light intensity characteristics, and morphological distribution characteristics are statistically analyzed. For each type of feature, the values are arranged in ascending order, and the value located at a preset distribution ratio position is selected as the statistical benchmark value of that type of feature. For example, the preset ratio position includes, but is not limited to: the 90% quantile of the area feature, the 90% quantile of the light intensity feature, and the 85% quantile of the compactness (morphological distribution) feature. The statistical benchmark value reflects the typical high value level of the particle group in the current aperture. This embodiment provides a data basis for the subsequent dynamic threshold generation.
[0042] The percentiles in the above example The calculation formula is: ;in, The sorted feature value array, The total number of particles, For percentile parameters (e.g., 0.90 represents the 90th percentile).
[0043] In some other embodiments, to address the situation where the same well location may trigger multiple determination requests in high-throughput scenarios, a statistical calculation result caching mechanism is set up, including: In the cache query phase, before each particle statistical feature calculation, the unique identifier of the current hole position (for a 12*16 orifice plate, the unique identifier is board-005-A7-B12, including the orifice plate identifier Board_ID: board-005, and the hole position identifier in the orifice plate, where A7-B12 is the hole position in the 7th row and 12th column) is used as the search key to query whether the statistical result for that hole position already exists in the cache storage area. In the cache hit phase, if a matching record exists in the cache, the statistical result in the cache is read directly, skipping duplicate calculations. In the cache update phase, if no matching record exists in the cache, the statistical calculation is performed, and the calculation result is associated with the hole position identifier and stored in the cache storage area. In the cache invalidation policy, when the hole position image data is updated or the cache capacity reaches the preset limit, historical cache entries are evicted according to the least recently used principle.
[0044] Through the above caching mechanism, the amount of repetitive statistical calculations can be reduced by about 40% in the scenario of full-board scanning of 192-well plate.
[0045] In some embodiments, the method further includes jointly determining each light spot particle in the aperture image with multiple determination parameters of a dynamic threshold to obtain an image fragment detection result in which the light spot particle is an image fragment or an effective colony signal, wherein the determination parameters include area determination parameters, morphology determination parameters and light intensity determination parameters.
[0046] For example, the area determination parameter generation includes comparing a preset basic area threshold with an area statistical benchmark value amplified by a first preset scaling factor, and taking the larger of the two values as the dynamic area determination parameter.
[0047] For example, the generation of light intensity determination parameters includes comparing a preset basic light intensity threshold with a light intensity statistical benchmark value adjusted by a second preset scaling factor, and taking the larger of the two values as the dynamic light intensity determination parameter. For example, the generation of morphology determination parameters includes comparing a preset basic compactness threshold with a compactness statistical benchmark value amplified by a third preset scaling factor, and taking the larger of the two values as the dynamic morphology determination parameter.
[0048] Through the aforementioned dynamic generation mechanism, the image fragment recognition standard can be automatically adjusted according to the actual distribution of light spot particles in the current image. In high-throughput and high-density scenarios, the judgment threshold will be automatically raised according to the actual particle distribution, thereby reducing misjudgments caused by crosstalk.
[0049] In some embodiments, the joint determination includes performing image fragment classification determination on each light spot particle to be tested within the current aperture position. The determination adopts a multi-condition joint judgment strategy for each light spot particle. The following first decision branch, second decision branch, and catch-all branch are used to obtain image fragment detection results where the light spot particles are image fragments or effective colony signals: The first determination branch occurs when the particle area exceeds the dynamic area determination parameter, the compactness exceeds the dynamic morphology determination parameter, and the light intensity exceeds the first minimum absolute light intensity threshold. When the particle is in the first stage, it is determined to be a fragment; the second determination branch is when the particle's area exceeds the dynamic area determination parameter, the light intensity exceeds the dynamic light intensity determination parameter, and the compactness exceeds the first minimum compactness threshold. If the particle is not satisfied, it is considered a fragment; in the catch-all branch, particles that do not meet any of the above criteria are considered valid colony signals.
[0050] In some embodiments, to address the specific needs of high-concentration sample detection, multiple fragmentation detection rules are sequentially combined to form a multi-layered fragmentation filtering system. This includes cascading detection of image fragments identified as light spot particles using multiple image fragmentation detection rules to obtain cascaded detection results. The image fragmentation detection rules include image fragmentation rules based on size and shape, image fragmentation rules based on defocus features, and image fragmentation rules based on density analysis.
[0051] For example, cascaded rules include an ordered list of rules, each of which can be one of the following types: fragmentation rules based on size and shape, fragmentation rules based on defocus features, and fragmentation rules based on density analysis.
[0052] For example, in the detection of out-of-focus debris, a thick aperture plate (such as an imaging aperture with a thickness of 1.2 mm) is used. Debris outside the aperture will form a large-scale blur artifact on the imaging surface. The characteristics of this type of artifact are: the pixel values are close but do not reach the binarization threshold; the formed "false spots" are not connected to each other and will not be rejected by traditional rules based on connected components. This embodiment of the invention proposes a debris rule based on size and shape, uses a lower pixel threshold (0.5 to 0.8 times the normal threshold) to generate an out-of-focus debris mask, and then determines any particle whose center falls within the mask area as a debris.
[0053] For example, in the fragmentation rule of density analysis, in a high-density colony scenario, some areas are too densely populated with colonies, forming continuous areas that resemble fragments. In this embodiment, the ROI region is divided into several sub-blocks, the spot density in each sub-block is calculated, and the spot particles in the sub-block with a density significantly higher than the median are identified as fragments.
[0054] In a specific embodiment, for large-area high-brightness fragment detection, under the condition of over-fragment detection (considered as high input signal), a technical solution is adopted to adaptively adjust the skip threshold considering the influence of other factors (such as environment, error, etc.). The specific process is described in the following reference. Figure 2 The flowchart for large-area high-brightness debris detection shown includes, but is not limited to, steps S310 to S330: S310, Calculate the key features by performing statistical analysis on all light spot particles in the image of the same aperture position; Key features include the area P90, light intensity P90, compactness P85, average area, and average light intensity of the light spot particles. This involves obtaining a list of all particles at the current aperture location; extracting the area, light intensity, and compactness values of each particle and storing them in arrays; sorting the arrays in ascending order; and calculating the values of specified percentiles.
[0055] S320 uses a combination of fixed skip threshold and adaptive adjustment threshold to determine the skip condition for key features.
[0056] The adaptive skip condition determination involves fusing a fixed skip threshold with an adaptively adjusted threshold to generate a comprehensive skip determination threshold. The fusion strategy is as follows: for each type of skip condition (area percentage type)... Total light intensity category The preset fixed threshold and the adaptive threshold generated based on the current image particle distribution statistics are compared respectively, and the larger of the two values is taken as the comprehensive judgment threshold for this type of condition.
[0057]
[0058] in, , For adjustment coefficients, An adaptive threshold for area proportion. The total light intensity adaptive threshold, This serves as a comprehensive threshold for determining the area ratio. The comprehensive judgment threshold is used to balance the contributions of the fixed threshold and the statistical threshold. They are obtained by scaling the statistical benchmark value of the corresponding feature in the current image with a preset adjustment coefficient, which is configured according to the detection scene.
[0059] The adaptive skip condition in this embodiment is that when the area ratio exceeds the comprehensive judgment threshold of the area ratio, or when the total light intensity exceeds the comprehensive judgment threshold of the total light intensity, the system will perform a skip judgment.
[0060] The S330 employs a multi-layered safety mechanism for high-signal skipping determination.
[0061] To avoid the failure of a single statistical feature in extreme cases, a multiple absolute minimum insurance strategy is set up, as follows (1)~(3): (1) When the pixel area of the particle is smaller than the first safety threshold, the high signal skip judgment is not triggered; (2) When the particle light intensity value is less than the second insurance threshold, the high signal skip judgment is not triggered; (3) When the particle compactness value is less than the third insurance threshold, the high signal skip judgment is not triggered.
[0062] S400 performs colony identification on the well site image based on the image fragment detection results, and obtains the colony identification results.
[0063] In some embodiments, a dataset is obtained, which includes image fragment samples; the image fragment samples are trained using a cost-sensitive random forest as a classifier, and the training is optimized using the ROC optimal threshold method; and the predicted probabilities obtained when classifying the image fragment samples are constrained by probability difference determination and confidence determination.
[0064] In some embodiments, probability difference determination includes obtaining the predicted probability of the highest class and the second highest predicted probability of the sample in the dataset. If the difference between the predicted probability of the highest class and the second highest predicted probability exceeds a preset difference threshold, the sample is added to the difficult sample library. Confidence determination includes obtaining the predicted probability of the highest class of the sample in the dataset. If the predicted probability of the highest class is lower than a preset confidence threshold, the sample is added to the difficult sample library. The colony classification model is iteratively optimized using difficult samples from the difficult sample library.
[0065] like Figure 3 As shown, (a) is the real signal image of the high-concentration drug-resistant bacterial sample after algorithm correction, and (b) is the real signal image of the high-concentration drug-resistant bacterial sample before repair (the red area is the detected signal). It can be determined that the imaging of the high-concentration sample signal will be removed, thus affecting the interpretation effect. At the same time, in colony image analysis, spot misjudgment refers to the incorrect identification of the real colony signal as debris, or vice versa. This misjudgment is particularly prominent in the following extreme scenarios: large-sized colony edges are blurred. When the colony grows to a certain size, the edges may become blurred, and its shape features are similar to certain types of debris; high-density colony overlap. When multiple colonies are close to each other, they may be incorrectly segmented into a large particle. The shape features of this particle are similar to those of debris, which will lead to uneven distribution of positive and negative samples; uneven background. The background light intensity at the edge of the image is uneven, causing the extracted features of some real colonies to deviate from the normal range.
[0066] To address the aforementioned issues, traditional single-rule classification methods (such as threshold determination based on area and compactness) are difficult to effectively handle these extreme scenarios. In this embodiment of the invention, a cost-sensitive random forest is used as a machine learning classifier, and the input features (14 dimensions) of the model samples are shown in Table 1.
[0067] Table 1 Input features of image fragment samples
[0068] Unlike conventional random forest training, this embodiment of the invention introduces a cost-sensitive matrix during the model training phase. To reduce the risk of misjudging light spots in extreme scenarios:
[0069] in The cost of being a true case (TP) (correctly identifying a colony as a colony has no penalty); The cost of a false positive (FP) (misclassifying a fragment as a colony) is set as the value of the first non-zero generation. The cost of false negatives (FN) (misclassifying colonies as fragments is more costly) is set as the value of the second non-zero generation; The cost of a true negative (TN) (correctly identifying a fragment as a fragment has no penalty).
[0070] In this model, the value of the second non-zero generation is greater than that of the first non-zero generation. This prioritizes reducing the probability of misclassifying real colonies as fragments during model training, adapting to the lower tolerance for false negatives in clinical diagnosis. The values of the first and second non-zero generations are configured based on clinical validation results, and the possibility of further increasing the value of the second non-zero generation in extremely drug-resistant bacteria cannot be ruled out. Subsequently, a random forest configuration is performed, including constructing 200 decision trees without limiting tree depth (fully grown) and using all available features. While conventional random forests use 0.5 as the classification threshold, this embodiment employs the ROC curve optimal threshold method to optimize the misclassification of spotlights in biased samples under high throughput. The search formula is:
[0071] in, This represents the true positive rate (sensitivity). This represents the true negative rate (specificity).
[0072] The specific implementation steps include: using the trained model to predict the validation set and obtain the probability distribution of each sample belonging to each category; constructing an ROC curve and iterating through all possible thresholds. τ ; calculate each τ corresponding Score; select the highest score. τ As the optimal classification threshold.
[0073] In addition to the model optimizations described above, this embodiment of the invention also designs a dual-judgment mechanism for boundary cases to handle difficult samples with low model confidence. The judgment strategy consists of two parts: Judgment condition 1, probability difference judgment for:
[0074] in, P (top) represents the probability that the model predicts the highest-ranking class. P (sec) represents the probability of the second-highest category. When the difference between the highest and second-highest predicted results is less than a preset difference threshold ( When the threshold value is less than 0.35, it is considered a sample on the classification boundary, indicating that the model's judgment on that sample is not sufficiently certain. In practice, the preferred threshold range is [0.1, 0.35].
[0075] Judgment condition 2, confidence level determination for:
[0076] When the maximum predicted probability of the model for all categories of the current sample is lower than the confidence threshold ( When ), it is determined to be a boundary case.
[0077] Boundary Case in this Embodiment Handling strategy: .
[0078] When a boundary case passes, the following processing flow is triggered: a second judgment is made using a rule-based alternative classification method; the feature data of the sample is stored in a difficult sample library for continuous iterative optimization of the model; and a warning mark is added to the boundary case when the final result is output to prompt the user to perform manual review.
[0079] After preprocessing, this invention begins model training, collecting high-throughput detection images from a 192-well plate. Domain experts manually annotate each particle (signal or debris) to construct the training dataset. The distribution of each category in the dataset is as follows: Signal (colony / spot), 37,011 samples (96.9%); Debris, 1,198 samples (3.1%).
[0080] Because the data exhibits class imbalance (positive samples far outnumber negative samples), this embodiment of the invention employs a cost-sensitive method for balancing, rather than traditional oversampling or undersampling, thereby preserving the original distribution characteristics of the data. Model training is then performed after feature standardization.
[0081] 70% of the data was used for training, and 30% for testing. After training, the model performance was evaluated on the test set using the following metrics: overall accuracy, balanced accuracy, colony recognition accuracy, fragmentation recognition accuracy, colony prediction accuracy, fragmentation prediction accuracy, and AUC value > 0.98.
[0082] The trained model is serialized into a model file, and the dataset structure is saved as a model data structure file so that the colony classification model object can be quickly reconstructed during deployment.
[0083] Figure 4 This is a schematic diagram of a colony identification device according to an embodiment of the present invention. The device includes a first module 410, a second module 420, a third module 430, and a fourth module 440.
[0084] The system comprises four modules: a first module for acquiring images of each well on a plate used to hold bacterial suspension, and performing feature extraction on the images to obtain light spot distribution features; a second module for determining a dynamic threshold for image fragment detection based on the light spot distribution features when they meet the image fragment detection criteria; a third module for performing image fragment detection on the well images using the dynamic threshold, and obtaining image fragment detection results, which indicate whether to perform colony identification; and a fourth module for performing colony identification on the well images based on the image fragment detection results, and obtaining colony identification results.
[0085] Exemplarily, with the cooperation of the first, second, third, and fourth modules in the device, the embodiment device can implement any of the aforementioned colony identification methods. That is, this invention belongs to the field of image processing and pathogen microbial drug sensitivity detection technology. This invention provides a colony identification method and related equipment, wherein the method includes: acquiring a well image of each well on a well plate used to carry a bacterial suspension; performing feature extraction on the well image to obtain a light spot distribution feature; if the light spot distribution feature meets the image fragment detection condition, determining a dynamic threshold for image fragment detection based on the light spot distribution feature; performing image fragment detection on the well image using the dynamic threshold to obtain an image fragment detection result, the image fragment detection result being used to indicate whether to perform colony identification; performing colony identification on the well image based on the image fragment detection result to obtain a colony identification result. This invention, by generating a dynamic threshold for light spot particle determination, adaptively determines light spot particles in well images under high-density scenarios, effectively suppressing the false judgment rate under high-density scenarios and improving the accuracy of colony counting and the reliability of drug sensitivity result identification in high-throughput environments.
[0086] This invention also provides an electronic device, which includes a processor and a memory; The memory stores the program; The processor executes a program to perform the aforementioned colony identification method; the electronic device has the function of carrying and running the colony identification software system provided in the embodiments of the present invention, such as a personal computer, minicomputer, mainframe, workstation, network or distributed computing environment, standalone or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.
[0087] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the colony identification method described above.
[0088] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented in the embodiments of this invention. Alternative embodiments are contemplated, in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0089] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned colony identification method.
[0090] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, considering the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed in the embodiments of the invention, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0091] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can include, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0093] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0094] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0095] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0096] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0097] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A FISH colony identification method, characterized in that, include: Acquire a well image of each well on a well plate used to hold bacterial suspension, and perform feature extraction on the well image to obtain the light spot distribution characteristics; If the light spot distribution features meet the image fragment detection conditions, a dynamic threshold for image fragment detection is determined based on the light spot distribution features. The image of the well location is subjected to image fragment detection using the dynamic threshold to obtain an image fragment detection result, which is used to indicate whether to perform colony identification. Based on the image fragment detection results, colony identification is performed on the well site images to obtain the colony identification results.
2. The colony identification method according to claim 1, characterized in that, The light spot distribution characteristics are used to characterize the light intensity characteristics, area distribution characteristics, and morphological distribution characteristics of the light spot particles in the aperture image.
3. The colony identification method according to claim 2, characterized in that, The image fragment detection conditions include a first preset threshold range and a second preset threshold range. The first preset threshold range is determined by the aperture plate type and the optical system parameters used for FISH, and the second preset threshold range is determined by the fluorescence signal intensity benchmark of FISH. If the area ratio of the patch region of the area distribution feature exceeds the first preset threshold range or the total light intensity of the light intensity feature exceeds the second preset threshold range, then the image fragment detection condition is met.
4. The colony identification method according to claim 2, characterized in that, The step of determining the dynamic threshold for image fragment detection based on the light spot distribution characteristics includes: Each feature of the light spot distribution characteristics is sorted, and the value at a preset proportion position is used as the statistical benchmark value of the light spot distribution characteristics; The statistical benchmark value is amplified by a preset scaling factor and compared with the base threshold, with the larger value being used as the dynamic threshold.
5. The colony identification method according to claim 4, characterized in that, The method further includes: Each time the spot distribution feature statistics are performed on the hole position, the hole position number is used as an identifier for cache traversal. If the same identifier exists, the spot distribution feature of the hole position number is read directly. Otherwise, the statistical calculation is performed, and the statistical calculation result is associated with the hole position identifier for storage.
6. The colony identification method according to claim 2, characterized in that, The image fragment detection of the aperture image using a dynamic threshold to obtain the image fragment detection result includes: Each light spot particle in the aperture image is selected from the dynamic threshold for joint determination using at least two determination parameters to obtain the image fragment detection result of whether the light spot particle is an image fragment or a valid colony signal. The determination parameters include area determination parameters, morphology determination parameters, and light intensity determination parameters.
7. The colony identification method according to claim 5, characterized in that, The method further includes: The light spot particles are detected by cascading multiple image fragment detection rules to obtain cascaded detection results. The image fragment detection rules include image fragment rules based on size and shape, image fragment rules based on defocus features, and image fragment rules based on density analysis.
8. The colony identification method according to claim 1, characterized in that, The step of detecting the pore image based on the image fragment detection results to obtain the colony identification results includes: Image fragments in the well site image are detected using a colony classification model to obtain colony identification results. The training steps of the colony classification model include: Obtain a dataset, which includes image fragment samples; Cost-sensitive random forest is used as the classifier for training image fragment samples, and the ROC optimal threshold method is used for training optimization. Furthermore, the predicted probabilities obtained when classifying image fragment samples are constrained by probability difference judgment and confidence judgment.
9. The colony identification method according to claim 8, characterized in that, The method of constraining the predicted classification probability of samples in the dataset during training using probability difference determination and confidence determination includes: The probability difference determination includes obtaining the highest predicted probability of the highest category and the second highest predicted probability of the sample in the dataset. If the difference between the highest predicted probability of the highest category and the second highest predicted probability exceeds a preset difference threshold, the sample is added to the difficult sample library. The confidence determination includes obtaining the predicted probability of the highest category of the sample in the dataset. If the predicted probability of the highest category is lower than the preset confidence threshold, the sample is added to the difficult sample library. The colony classification model was iteratively optimized using a database of challenging samples.
10. A colony identification device, characterized in that, include: The first module is used to acquire a well image of each well on a well plate used to carry bacterial suspension, and to perform feature extraction on the well image to obtain the light spot distribution features; The second module is used to determine a dynamic threshold for image fragment detection based on the light spot distribution characteristics when the light spot distribution characteristics meet the image fragment detection conditions. The third module is used to perform image fragment detection on the well image through the dynamic threshold to obtain the image fragment detection result, which is used to indicate whether to perform colony identification. The fourth module is used to identify colonies in the well site image based on the image fragment detection results, and obtain the colony identification results.
11. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the colony identification method as described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the colony identification method as described in any one of claims 1-9.
