Method for high-precision measurement of diameter of inhibition zone of culture medium
Through deep learning and image processing technology, combined with autofocus and high-resolution imaging equipment, high-precision and automated measurement of the culture medium inhibition zone diameter is achieved, which solves the measurement accuracy and applicability problems of traditional methods, improves detection efficiency and accuracy, and meets international standards.
Patent Information
- Application Number
- CN202510891417.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-26
AI Technical Summary
The traditional manual method of measuring the diameter of the culture medium inhibition zone has low measurement accuracy and strong subjectivity, making it difficult to meet CLSI and EUCAST standards. In addition, the existing automated system has low recognition accuracy under complex conditions and insufficient applicability, and cannot meet the needs of high-throughput testing.
The system uses autofocus motion components and high-resolution imaging devices for image acquisition. Combined with deep learning networks and image processing technology, it achieves semantic segmentation of inhibition zones and sub-pixel edge detection through edge enhancement, noise filtering, and multimodal normalization. An integrated calibration mechanism ensures measurement accuracy and adaptability.
The measurement accuracy of the inhibition zone diameter has reached ±0.05mm, and the coefficient of variation has been reduced to below 2%. It supports batch testing of various culture medium types and antimicrobial drugs, and the detection efficiency has been increased by more than 5 times, meeting CLSI and EUCAST standards.
Smart Images

Figure CN120707616A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cross-application technology of microbial detection and artificial intelligence, and in particular to a method for measuring the diameter of the inhibition zone of a culture medium with high precision. Background Art
[0002] Antimicrobial susceptibility testing is a core technology in clinical microbiology and drug development. It assesses bacterial susceptibility to antimicrobial drugs and provides a scientific basis for clinical treatment. The Kirby-Bauer disc diffusion method, the most widely used, determines bacterial drug susceptibility by measuring the diameter of the inhibition zone on culture medium. Its accuracy directly impacts clinical treatment outcomes.
[0003] Traditional manual measurement methods have significant flaws. In terms of measurement accuracy, results are heavily dependent on operator experience and are easily affected by factors such as lighting conditions, viewing angle, and operator fatigue. The coefficient of variation is typically 5-15%, making it difficult to meet the ±1mm measurement accuracy standards required by CLSI and EUCAST. Measurement results vary significantly between operators, impacting the reliability of test results. In terms of efficiency, manual measurement cannot meet the high-throughput testing needs of modern clinical laboratories and is inefficient in large-scale sample testing, becoming a bottleneck in the testing process.
[0004] While current automated systems based on traditional image processing have reduced the manual burden to a certain extent, they still face key technical bottlenecks. In terms of algorithm robustness, recognition accuracy significantly decreases under complex conditions such as uneven culture medium color, colony interference, or blood culture medium. The ability to recognize complex situations such as double circles, inner circles, and irregular inhibition zone shapes is limited. Traditional edge detection and threshold segmentation algorithms are prone to misjudgment when the inhibition zone boundaries are unclear. In terms of applicability, existing systems are mostly designed for specific culture medium types, lacking versatility and comprehensive adaptability to international standards (CLSI, EUCAST). The equipment investment is large, and the operation is complex, limiting their promotion and application in small and medium-sized laboratories.
[0005] Breakthrough advances in image recognition using deep learning offer a new technological path to addressing these challenges. Deep learning possesses powerful feature extraction capabilities, can automatically learn and recognize complex image features, and is highly adaptable to diverse scenarios and conditions, enabling precise object location and segmentation even in complex backgrounds. However, deep learning-based inhibition zone measurement technology is still in its early stages of development, with limited research and a lack of mature industrial applications. Summary of the Invention
[0006] In order to solve the above technical problems, the present invention provides a high-precision, automated method for measuring the diameter of the culture medium inhibition zone, which overcomes the defects of low measurement accuracy and strong subjectivity in the prior art.
[0007] The technical solution adopted by the present invention to solve its technical problem is: A method for measuring the diameter of the inhibition zone of a culture medium with high precision comprises the following steps: Step S1. Image Acquisition and Preprocessing: Culture medium images are acquired using an autofocus motion module and high-resolution imaging equipment. These images undergo standardized preprocessing, including edge enhancement and contrast adjustment, selective noise filtering, and multimodal image normalization. These preprocessing operations effectively improve image quality, reduce the impact of environmental interference on the accuracy of subsequent recognition algorithms, and provide standardized, high-quality input data for model analysis.
[0008] Furthermore, the selective noise filtering is performed through a fusion algorithm of Gaussian filtering and median filtering to perform differentiated processing on salt and pepper noise and Gaussian noise, and combined with a regional adaptive edge protection mechanism to retain the high-frequency information of the inhibition zone boundary and reduce the interference of noise on model training.
[0009] Furthermore, the multimodal image normalization is to normalize the image to a uniform resolution and convert it to the LAB color space to enhance color consistency; at the same time, according to the characteristics of different imaging devices and the calibration parameters of the application equipment, the standardization of image features across devices is ensured to provide robust input data for the deep learning model.
[0010] Step S2. Semantic segmentation of inhibition zone: Based on the deep learning network, the culture dish image preprocessed in step S1 is trained to accurately identify the inhibition zone area, culture medium background, and drug-sensitive paper area, and generate a high-precision segmentation mask to provide accurate area positioning for subsequent edge detection.
[0011] Furthermore, the deep learning network adopts an improved DeepLabv3+ architecture, integrates the ResNet50 backbone network and the spatial attention mechanism, captures multi-scale features through void convolution, and improves the segmentation accuracy of the inhibition zone in complex background.
[0012] Furthermore, the network training uses a large-scale labeled dataset containing different bacterial species, different antimicrobial drugs, and different culture medium types to ensure the generalization ability and robustness of the model.
[0013] Step S3. Accurate edge detection: Based on the semantic segmentation results of step S2, the precise boundary of the inhibition zone is extracted, and a sub-pixel edge detection algorithm is used to achieve high-precision positioning of the edge of the inhibition zone. It can handle various special forms of complete inhibition zones, irregular inhibition zones, fuzzy inhibition zones, associated bacterial colony inhibition zones, double-ring inhibition zones, and cross-type inhibition zones.
[0014] Furthermore, the sub-pixel edge detection uses an improved Canny operator combined with a Zernike moment edge detection algorithm to achieve an edge positioning accuracy of 0.1 pixel.
[0015] Furthermore, the various special forms are characterized by using a gradient analysis method to identify the boundaries of the inner and outer circles, and using an ellipse fitting algorithm, a circular fitting optimization, and spline curve smoothing to determine the effective boundaries of irregular inhibition circles.
[0016] Step S4. Scale Recognition and Calibration: An intelligent image recognition algorithm is used to automatically detect and locate the measurement scale within the image. By accurately calibrating pixel coordinates to physical dimensions, a high-precision scale conversion model is established. The system integrates a calibration accuracy verification mechanism to enable real-time automatic calibration of measurement data, effectively compensating for factors such as shooting distance variations, optical distortion, and viewing angle shift that can affect measurement accuracy.
[0017] Furthermore, the intelligent image recognition algorithm adopts an improved Hough transform line detection algorithm, combined with multi-scale template matching and edge detection technology, which can accurately locate the geometric center line and direction angle of the ruler and adaptively identify measuring tools with millimeter scale specifications.
[0018] Furthermore, the calibration accuracy verification uses a standard gauge block or precision test card as a reference benchmark, and ensures the reliability of the conversion ratio through multi-point measurement verification and statistical analysis. The system calibration error is controlled within the range of ±0.02mm, meeting the high-precision measurement requirements.
[0019] Step S5. Diameter calculation and result output: Based on the precise edge information from step S3 and the calibration parameters from step S4, a geometric fitting algorithm is used to calculate the equivalent diameter of the inhibition zone, and a standardized measurement report is generated, including the diameter value, measurement accuracy, and quality assessment information.
[0020] Furthermore, the geometric fitting algorithm uses the least squares method to perform circle or ellipse fitting, selects the optimal fitting model according to the actual shape of the inhibition zone, and calculates the equivalent diameter.
[0021] Furthermore, the quality assessment is to establish a measurement confidence assessment mechanism. When the edge quality and goodness of fit are lower than a threshold, the system automatically marks and prompts manual review.
[0022] The beneficial effects of the present invention are The present invention realizes high-precision automated measurement of the diameter of the inhibition zone by integrating deep learning and image processing technology. Using the improved DeepLabv3+ network architecture and sub-pixel edge detection algorithm, the measurement accuracy reaches ±0.05mm, which is significantly better than the ±1mm standard of traditional manual measurement. The system has strong environmental adaptability and can effectively handle complex detection scenarios such as double circle phenomenon, blurred boundaries, and uneven culture medium color, and the coefficient of variation is reduced to below 2%. It supports batch detection of multiple culture medium types and antimicrobial drugs, and the detection efficiency is increased by more than 5 times. A complete quality control mechanism and standardized measurement process have been established, which meets the requirements of CLSI and EUCAST international standards, and provides a reliable and efficient intelligent solution for clinical antimicrobial drug sensitivity testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of the overall implementation process of the present invention.
[0024] Figure 2 This is the structure diagram of the semantic segmentation network.
[0025] Figure 3 It is a flowchart of scale identification and calibration.
[0026] Figure 4 It is a schematic diagram of the structural composition of the culture medium image acquisition device.
[0027] Figure 5 This is a comparison chart of experimental results.
[0028] Figure 6 This is an example diagram of the system interface. DETAILED DESCRIPTION
[0029] The following is combined with Figure 1-6 And specific implementation method further details: like Figure 1 As shown in the flowchart, the complete process of high-precision measurement of the diameter of the inhibition zone of the culture medium is described, which includes five main steps (S1-S5): Step S1: Image acquisition and preprocessing Objective: To establish a high-precision image acquisition system to obtain clear and stable images of culture dishes and perform standardized preprocessing to eliminate hardware differences, environmental interference, and imaging noise, thereby providing high-quality, unified input data for subsequent deep learning models.
[0030] S1.1 Autofocus and image acquisition: The hardware autofocus system is used to obtain images with optimal clarity, ensuring that the edges of the inhibition zone are sharp and discernible.
[0031] Focus evaluation algorithm: Comprehensive clarity evaluation was performed using the Laplace operator variance method (weight 0.4) combined with the Tenengrad gradient function (weight 0.4) and the image variance method (weight 0.2); the evaluation window was set to an 800 × 600 pixel area in the center of the image.
[0032]
[0033] Focus control strategy: The Z-axis motorized stage performs two-stage focusing. The coarse adjustment stage scans the entire range with a step size of 1.0mm. The fine adjustment stage accurately positions the image within the range of ±3mm of the optimal position with a step size of 0.1mm. The stability is verified by continuously acquiring 5 frames, and the standard deviation of the sharpness must be less than 5%.
[0034] S1.2 Image Noise Removal: Effectively eliminates CMOS sensor noise, circuit interference, and random noise, maintaining the integrity of image details.
[0035] Salt and pepper noise removal: Uses a median filter (kernel size 5×5) to remove isolated noise points while preserving edge information. The filter strength is adaptively adjusted based on noise density.
[0036] Gaussian noise smoothing: A Gaussian filter (σ = 1.0, kernel size 7 × 7) is applied to smooth continuous noise. The standard deviation parameter is dynamically adjusted based on the image PSNR value (σ = 0.8 when PSNR > 30 dB, σ = 1.0 when PSNR 20-30 dB, and σ = 1.5 when PSNR < 20 dB).
[0037] S1.3 Multimodal image normalization: Eliminate image inconsistencies caused by different imaging conditions, equipment differences, and lighting changes, and achieve standardized processing of batch images.
[0038] Histogram matching normalization: A reference histogram library of 100 standard culture dish images is established, and histogram matching is performed on the input image to make the grayscale distribution consistent with the standard template; the matching accuracy is controlled at above 95%.
[0039] Z-score normalization: Calculates the image pixel mean μ and standard deviation σ, and performs a normalization transformation (pixel-μ) / σ to return the image mean to zero and the standard deviation to unity; suitable for deep learning model input requirements.
[0040] Brightness consistency correction: Use Retinex theory to correct for uneven lighting, separating reflectance and illumination components; combined with gamma correction (γ=1.2), adjust the nonlinear brightness response and unify the imaging effects in different environments.
[0041] Step S2: Semantic segmentation of inhibition zone Objective: Based on deep learning semantic segmentation technology, accurately identify the zone of inhibition in culture dish images and output pixel-level segmentation masks to provide accurate target area positioning for subsequent geometric measurement.
[0042] S2.1 Input data preprocessing: Convert the preprocessed images into the standard format required by the deep learning model and improve the model generalization ability through data augmentation.
[0043] Size normalization: The input image is resized to 512×512 pixels and bicubic interpolation is used to maintain image quality; at the same time, the original size information is preserved for mapping the result back to the original image.
[0044] Data augmentation strategy: random rotation transformation range of ±15° simulates different placement angles; random scaling of 0.8-1.2 times to adapt to changes in the size of the inhibition zone; brightness adjustment of ±20% to simulate differences in lighting conditions; random horizontal flipping to increase sample diversity.
[0045] Pixel value normalization: RGB pixel values are linearly mapped from the range [0, 255] to [0, 1] to meet the neural network input requirements; the channel order is converted to the format required by the model (RGB → BGR or keep RGB).
[0046] S2.2 Deep learning segmentation model: Build a high-precision semantic segmentation network to achieve accurate pixel-level classification of the inhibition zone area.
[0047] Network architecture configuration: DeepLabv3+ architecture is used, with ResNet-50 as the backbone network for feature extraction; the ASPP module sets the hole rate [6, 12, 18] to capture multi-scale features; the decoder uses low-level feature fusion to recover detailed information.
[0048] Training data construction: 2,000 images of culture dishes under different conditions were collected for pixel-level annotation, with the categories set as background (0), inhibition zone (1), and culture dish edge (2); the dataset was divided into training set, validation set, and test set in a ratio of 7:2:1.
[0049] Loss function design: A weighted combination loss is used, FocalLoss (weight 0.6) is used to solve the category imbalance problem, and DiceLoss (weight 0.4) is used to optimize the segmentation boundary accuracy; the learning rate is set to 0.001 and the cosine annealing scheduling strategy is adopted.
[0050] S2.3 Post-processing of segmentation results: refine the segmentation mask output by the network to remove noise, fill holes, and obtain a complete and accurate inhibition zone area.
[0051] Connected domain analysis: Use connected component analysis to remove noise areas smaller than 100 pixels; retain the largest connected domain as the main inhibition zone area to handle the merging problem of multiple separated areas.
[0052] Morphological optimization: A closing operation (7×7 elliptical structuring element) is performed to fill internal holes and breaks; an opening operation (3×3 circular structuring element) is then performed to remove edge burrs and protrusions; and a dilation and erosion operation is performed to smooth the boundary contours.
[0053] Confidence filtering: Only pixels with a network output confidence level > 0.8 are retained; a secondary judgment is performed on fuzzy boundary areas, and the boundary position is accurately determined by combining gradient information; a quality assessment mechanism is established, including completeness checks (closure > 95%) and shape rationality verification (long-short axis ratio 0.7-1.3).
[0054] Step S3: Accurate edge detection Objective: To perform sub-pixel edge detection based on semantic segmentation results to obtain the precise contour information of the inhibition zone and provide basic data for high-precision diameter measurement.
[0055] S3.1 Edge extraction based on segmentation mask: Extract the initial edge contour from the segmentation mask and establish an edge point set.
[0056] Canny edge detection: The Canny edge operator is applied to the segmentation mask with a low threshold of 50, a high threshold of 150, and a Sobel kernel size of 3×3. The mask is pre-smoothed using a Gaussian filter (σ = 1.0, kernel 5×5) to reduce noise interference.
[0057] Contour extraction algorithm: Use OpenCV's findContours function to extract the outer contour, and set the mode to RETR_EXTERNAL to obtain only the outer boundary; the contour approximation uses CHAIN_APPROX_SIMPLE to reduce redundant points and keep key feature points.
[0058] Edge quality assessment: Check contour continuity, the number of breakpoints must be less than 5; evaluate edge smoothness, the change in tangent angle between adjacent points must be less than 30°; verify contour closure, the distance between the start and end points must be less than 10 pixels.
[0059] S3.2 Sub-pixel edge optimization: Mathematical fitting methods are used to improve pixel-level edges to sub-pixel accuracy, significantly improving measurement accuracy.
[0060] Ellipse fitting algorithm: Use the cv2.fitEllipse() function to fit an ellipse based on the least squares method. The output parameters include the center coordinates (cx, cy), the lengths of the major and minor axes (a, b), and the rotation angle θ. Before fitting, use the RANSAC algorithm to remove 20% outliers.
[0061] Circle fitting optimization: The Levenberg-Marquardt algorithm is used for nonlinear least squares circle fitting, and the center coordinates and radius parameters are iteratively optimized. The fitting error is controlled within 0.2 pixels, and the correlation coefficient R² must be greater than 0.95.
[0062] Spline smoothing: Use cubic B-spline interpolation to smooth the edge points, and set the control point density to 50% of the original number of points; the smoothing parameter λ=0.5 balances the fitting accuracy and smoothness, maintaining the natural shape of the edge.
[0063] S3.3 Edge continuity and smoothing: Deal with issues such as edge breakage and sharp corners to obtain a continuous and smooth inhibition zone contour.
[0064] Breakpoint connection algorithm: Detect edge breakpoints with a distance of less than 5 pixels and automatically connect them using straight line or circular interpolation; the connection method is adaptively selected based on local curvature characteristics to maintain the geometric continuity of the edge.
[0065] Sharp corner smoothing: Identifies sharp corners with an inner angle greater than 135° and smoothes them using rounded corner transitions. The rounded corner radius is adaptively determined based on local edge features and ranges from 1 to 3 pixels.
[0066] Outlier removal: Calculate the distance from each edge point to the fitting curve and remove outliers with a deviation > 2σ; use a sliding window (window size 9 points) to calculate the local average curvature and identify and correct curvature mutation points.
[0067] Step S4: Ruler identification and calibration Objective: Automatically identify scale reference objects in images, calculate the conversion relationship between pixels and actual physical dimensions, and ensure the accuracy and traceability of measurement results.
[0068] S4.1 Automatic Ruler Detection: Automatically locate and identify standard reference objects of known size in the culture dish image.
[0069] S4.2 Pixel-to-Physical Size Calibration: Establishes an accurate pixel-to-millimeter conversion relationship based on the detected scale information.
[0070] Single-point calibration method: Check the ruler scale with a standard length L_real = 10 mm, measure the corresponding pixel length P_pixel, and calculate the conversion ratio Scale = L_real / P_pixel (mm / pixel). Repeat the measurement five times and take the average value. The standard deviation must be less than 1%.
[0071]
[0072] S4.3 Calibration accuracy verification: Verify the accuracy, repeatability and stability of the calibration results to ensure the reliability of the measurement system.
[0073] Accuracy verification: Use precision standards (accuracy ±0.01mm) to verify calibration results, with a measurement error of <±0.5%; compare with national standard length benchmarks to ensure traceability.
[0074] Repeatability test: Repeat the calibration 10 times in a row, and the calculated standard deviation must be less than 1%. Repeat the measurement at different time periods (with an interval of 4 hours) to evaluate the system stability, and the variation must be less than 0.2%.
[0075] Step S5: Diameter calculation and result output Objective: To calculate the actual physical diameter of the inhibition zone based on precise edge information and accurate calibration parameters, and provide complete measurement result output and quality assessment.
[0076] S5.1 Multi-algorithm diameter calculation: Multiple geometric algorithms are used to calculate the diameter of the inhibition zone, and algorithm fusion is used to improve measurement reliability.
[0077] Equivalent circle diameter algorithm: area equivalent diameter D_area = 2√(Area / π), which is suitable for inhibition zones with regular shapes; perimeter equivalent diameter D_perimeter = Perimeter / π, which is more stable for inhibition zones with irregular edges.
[0078]
[0079] Least squares circle fitting: Use the Gauss-Newton algorithm to optimize the center coordinates (x, y) and radius r, with diameter D_fit = 2 × r; fitting weights are assigned based on the gradient strength of edge points, with points with clear edges receiving higher weights.
[0080] Statistical characteristic diameter: the maximum diameter D_max is the distance between the farthest two points on the contour, the minimum diameter D_min is the width at the narrowest point, the average diameter D_mean=(D_max+D_min) / 2; the standard deviation σ_diameter evaluates the shape regularity.
[0081] S5.2 Unit conversion and error analysis: Convert the measurement results in pixel units to standard physical units and perform error analysis and uncertainty assessment.
[0082] Accurate unit conversion: actual diameter D_real = D_pixel × Scale_factor, where Scale_factor is the mm / pixel conversion factor obtained by calibration; considering the effect of temperature expansion coefficient on the scale, the correction factor α = 2 × 10⁻ 5 / °C.
[0083] Error propagation analysis: The total measurement error σ_total = √[(σ_pixel×Scale)² + (D_pixel×σ_scale)²], including the pixel measurement error σ_pixel and the calibration error σ_scale; the uncertainty is assessed using the GUM method with a confidence level of 95%.
[0084] Repeatability assessment: The same inhibition zone was measured 10 times continuously, and the coefficient of variation (CV) = σ / μ was calculated to be less than 2%. The consistency test of measurement results by different operators was conducted, and the difference between groups was required to be less than 3%.
[0085] S5.3 Result Output and Visualization: Output measurement results in multiple formats, providing intuitive visual display and complete quality assessment report.
[0086] Numerical result output: diameter measurement value D=XX.XX±0.XXmm (including uncertainty), area S=XX.XXmm², roundness index R=4πS / P² (ideal circle R=1), measurement confidence C=XX%.
[0087] Visualization display: original image superimposed with detection contour (green), fitted circular boundary (red dashed line), diameter measurement line (blue solid line), and clear and readable numerical annotation; color-coded confidence level (high >90% green, medium 70-90% yellow, low <70% red).
[0088] like Figure 2 As shown in the figure, this is a semantic segmentation model based on the DeepLabV3 framework combined with the ResNet backbone network, which is specially optimized for the task of segmenting medical images of inhibition zones.
[0089] 2.1. Input Processing Input format: 512×512 pixel RGB image (expandable to 1024×1024) Preprocessing: size standardization, numerical normalization (0-1 or ImageNet standard), tensor conversion 2.2.ResNet Backbone Network (Encoder) Architecture: ResNet-50 as feature extractor Key improvement: Use dilated convolution instead of strided convolution to keep the output resolution at 1 / 8 Multi-scale features: extract low-level features from conv2_x and high-level features from conv5_x 2.3.ASPP Module (Multi-Scale Feature Fusion) 1×1 convolution: point-level features 3×3 dilated convolution (rate=6,12,18): receptive fields of different scales Global average pooling: global context information Output: concatenated and reduced to 256 channels 2.4. Encoder-Decoder Fusion Advanced Features: ASPP output upsampled to 1 / 4 resolution Low-level features: conv2_x features are reduced to 48 channels Fusion: Splicing to form a 304-channel feature map 2.5. Decoder Output Processing: 3×3 convolution smoothing fusion features Upsampling: bilinear interpolation to restore to original resolution Classification: 1×1 convolution generates multi-class predictions Final Output Result: Pixel-wise segmentation map, where each pixel is assigned to a specific class Categories: background, inhibition zone, bacterial growth area, drug-sensitive tablets, etc. Post-processing: morphological operations, connected domain analysis, boundary smoothing like Figure 3 As shown in the figure, this is the flowchart of ruler identification and calibration, which is as follows: 3.1 System Initialization Start the system and prepare for the subsequent calibration process.
[0090] 3.2 Image Input and Preprocessing Obtain a clear image with a ruler, ensure uniform lighting and clear focus; perform size standardization, brightness and contrast adjustment, denoising filtering, and numerical normalization, and convert it into a data format that the algorithm can process.
[0091] 3.3 Scale area detection The Hough transform object detection algorithm is applied to locate the ruler position, identify the ruler bounding box and scale lines, detect digital logos, extract the ruler ROI area, calculate the direction angle, and verify the size and shape features to optimize the detection results.
[0092] 3.4 Scale test result judgment Evaluate whether the detection confidence reaches the preset threshold, verify whether the ruler size is within a reasonable range, and confirm whether the ruler position is complete and visible and whether the clarity meets the technical requirements.
[0093] 3.5 Calibration parameter calculation Accurately measure the pixel length of the ruler using sub-pixel edge detection technology; identify scale markings and calculate the pixel distance between adjacent scale marks; calculate calibration coefficients based on the known physical length of the ruler; apply camera calibration parameters to eliminate lens distortion; and generate a calibration matrix containing horizontal and vertical scaling factors.
[0094] 3.6 Calibration Accuracy Verification Verify the accuracy of calibration coefficients by measuring reference objects of known dimensions; calculate absolute and relative errors, and evaluate reproducibility and stability; ensure that more than 95% of measurement results are within ±0.05mm; and verify the uniformity of measurement accuracy at different locations.
[0095] 3.7 Accuracy Satisfaction Judgment Judgment condition: Does the accuracy meet the predetermined requirements? Judgment criteria: measurement error ≤ ±0.05mm, and repeatability and consistency meet technical specifications.
[0096] Branch processing: No: Return to step 5 to recalculate, optimize algorithm parameters or reacquire image data.
[0097] Yes: Complete the calibration process and output the calibration parameters.
[0098] 3.8 End of process Pixel to millimeter conversion factor (horizontal and vertical); calibration accuracy report and error statistics; calibration timestamp, validity period and configuration parameter record; system status: calibration completed, entering ready state.
[0099] like Figure 4 As shown in the figure, this is a schematic diagram of the structure of the culture medium image acquisition device, in which 1-7 respectively represent: mechanical motion controller, industrial camera, shadowless light source, industrial host, stage, scale ruler, and display.
[0100] 2.1 Data Collection Layer Industrial camera: Located above the system, it is responsible for high-precision image acquisition and captures detailed image information of the drug-sensitive paper in the culture dish.
[0101] Shadowless light source: Provides uniform and stable lighting conditions, eliminates shadow interference, and ensures consistent image quality.
[0102] 2.2 Mechanical Control Layer Mechanical motion controller: controls the automated operation of the entire system, including the positioning of the culture dish, movement of the camera, and other mechanical actions.
[0103] Industrial camera bracket system: provides precise positioning and stable support for cameras.
[0104] 2.3 Sample processing layer Petri dish carrying platform: a sample carrying device equipped with a ruler for precise comparison and measurement of the diameter of the inhibition zone.
[0105] 2.4 Data Processing Layer Industrial host: Integrates hybrid model algorithms, including semantic segmentation models, responsible for core processing tasks such as image preprocessing and inhibition zone measurement Display terminal: provides a human-computer interaction interface to display recognition results and system status.
[0106] like Figure 4 As shown, this set of pictures shows two images of culture dishes, labeled " Figure 4 ", used to display the results of inhibition zone identification in antimicrobial susceptibility testing. Multiple antimicrobial tablets (such as SAM20, FOX30, KZ30, etc.) were placed in each culture dish, and inhibition zones of varying sizes formed around them, indicating that bacterial growth was inhibited. The following is a detailed description of the inhibition zone identification results: 4.1 Image Features 4.1.1 Each image shows a circular culture dish with multiple circular inhibition zones distributed inside.
[0107] 4.1.2 The diameter size (unit: mm) is marked around the inhibition zone, such as D-11mm, D-15mm, D-18mm, etc., reflecting the inhibitory effect of different tablets on bacteria.
[0108] 4.1.3 The tablet name and number (e.g. SAM20, CRO30, ETP10) should be clearly visible and located in the center of the inhibition zone.
[0109] 4.2 Inhibition zone size distribution: 4.2.1 The diameter ranges from 11mm to 31mm, including 11mm, 15mm, 18mm, 21mm, 22mm, 28mm, 30mm and 31mm.
[0110] 4.2.2 The diameter of each inhibition zone is marked starting with “D-”, for example, “D-11mm” means an inhibition zone with a diameter of 11 mm.
[0111] 4.2.3 The number and distribution of inhibition zones in the two images are slightly different, but the overall pattern is consistent, covering most areas of the culture dish.
[0112] 4.3 Identification results: 4.3.1 The boundaries of the inhibition zones are clear and the dimensions are accurately marked, indicating that the recognition algorithm (such as Hough transform) has successfully detected and measured each inhibition zone.
[0113] 4.3.2 The diameters of the inhibition zones corresponding to different tablets were significantly different. For example, SAM20 corresponded to D-15 mm, while CRO30 corresponded to D-28 mm, reflecting the diversity of antibacterial effects.
[0114] No obvious overlapping or incomplete inhibition zones were observed in the 4.3.3 images, indicating that the detection process was effective in locating the boundaries.
[0115] like Figure 5 As shown, the system interface example diagram 5.1 Functional Module AI image interpretation: Real-time acquisition of culture dish images, providing AI automatic image analysis function.
[0116] AI report: AI inhibition zone analysis results, presenting the test results in detail.
[0117] Basic Settings: Allows users to adjust parameters such as image processing options or detection thresholds.
[0118] Quality control: scale quality control records and setting allowable error range 5.2 AI Report Image of a petri dish: In the center is a round petri dish in light yellow with multiple circular inhibition zones distributed inside. The background lighting is even and the focus is clear.
[0119] Inhibition zone marking: Each inhibition zone is highlighted with a red circle and marked with text (such as "SAM20", "TGC16") to indicate drug sensitivity at different concentrations.
[0120] Data association: Each marked inhibition zone corresponds to the data in the table on the right, which lists the name, MID (such as "18", "17"), breakpoint range and result value.
[0121] This system intelligently combines image recognition and data analysis, automatically identifying the location of inhibition zones, measuring their diameters, and generating standardized reports, significantly improving the efficiency and accuracy of microbial susceptibility testing. Its intuitive interface allows researchers to quickly review and analyze test results.
[0122] In summary, the present invention aims to develop a high-precision inhibition zone diameter measurement method that combines deep learning and image processing technology. In terms of technological innovation, it can achieve high-precision measurements that meet international standards, significantly reduce measurement errors, effectively handle various complex detection scenarios and special inhibition zone morphologies, and support high-throughput, batch automatic detection. In terms of application value, it can promote the standardization and internationalization of antimicrobial drug sensitivity tests, develop a moderately cost-effective and easy-to-operate intelligent detection system, and provide reliable technical support for clinical microbiological detection and antimicrobial drug research and development. Through the introduction of deep learning technology, the present invention is expected to break through the technical bottleneck of traditional methods and provide important technical support for the automation and intelligent development of antimicrobial drug sensitivity tests.
Claims
1. A method for measuring the diameter of the inhibition zone of a culture medium with high precision, characterized in that: The steps include: Step S1. Image acquisition and preprocessing: Culture medium images are acquired using an autofocus motion component and high-resolution imaging equipment. These images are then subjected to standardized preprocessing, specifically edge enhancement and contrast adjustment, selective noise filtering, and multimodal image normalization. These preprocessing operations effectively improve image quality, reduce the impact of environmental interference on the accuracy of subsequent recognition algorithms, and provide standardized, high-quality input data for model analysis. Step S2. Semantic segmentation of the inhibition zone: Based on the deep learning network, the culture dish image preprocessed in step S1 is trained to accurately identify the inhibition zone area, culture medium background, and drug-sensitive paper area, and generate a high-precision segmentation mask to provide accurate region positioning for subsequent edge detection; Step S3. Accurate edge detection: Based on the semantic segmentation results of step S2, the precise boundary of the inhibition zone is extracted. A sub-pixel edge detection algorithm is used to achieve high-precision positioning of the inhibition zone edge. The algorithm can handle various special forms of inhibition zones, including complete inhibition zones, irregular inhibition zones, fuzzy inhibition zones, inhibition zones with associated bacterial colonies, double-ring inhibition zones, and cross-type inhibition zones. Step S4. Scale Recognition and Calibration: An intelligent image recognition algorithm is used to automatically detect and locate the measurement scale in the image. A high-precision scale conversion model is established through precise calibration of pixel coordinates and physical dimensions. The system integrates an integrated calibration accuracy verification mechanism to achieve real-time automatic calibration of measurement data, effectively compensating for the effects of shooting distance changes, optical distortion, and viewing angle offset on measurement accuracy. Step S5. Diameter calculation and result output: Based on the precise edge information from step S3 and the calibration parameters from step S4, a geometric fitting algorithm is used to calculate the equivalent diameter of the inhibition zone, and a standardized measurement report is generated, including the diameter value, measurement accuracy, and quality assessment information.
2. The method for measuring the diameter of the inhibition zone of a culture medium with high precision according to claim 1, wherein: In step S1, further, the selective noise filtering is performed through a fusion algorithm of Gaussian filtering and median filtering to perform differential processing on salt and pepper noise and Gaussian noise, and combined with a regional adaptive edge protection mechanism to retain the high-frequency information of the inhibition zone boundary and reduce the interference of noise on model training.
3. The method for high-precision measurement of the diameter of the inhibition zone of a culture medium according to claim 1, characterized in that: In step S1, the multimodal image normalization is to normalize the image to a uniform resolution and convert it to the LAB color space to enhance color consistency; at the same time, according to the characteristics of different imaging devices and the calibration parameters of the application equipment, the standardization of image features across devices is ensured to provide robust input data for the deep learning model.
4. The method for high-precision measurement of the diameter of the inhibition zone of a culture medium according to claim 1, characterized in that: In step S2, the deep learning network adopts an improved DeepLabv3+ architecture, integrates the ResNet50 backbone network and the spatial attention mechanism, captures multi-scale features through void convolution, and improves the segmentation accuracy of the inhibition zone under complex background.
5. The method for measuring the diameter of the inhibition zone of a culture medium with high precision according to claim 1, characterized in that: In step S2, the network training uses a large-scale labeled dataset containing different bacterial species, different antimicrobial drugs, and different culture medium types to ensure the generalization ability and robustness of the model.
6. The method for high-precision measurement of the diameter of the inhibition zone of a culture medium according to claim 1, characterized in that: In step S3, the sub-pixel edge detection uses an improved Canny operator combined with a Zernike moment edge detection algorithm to achieve an edge positioning accuracy of 0.1 pixel.
7. The method for measuring the diameter of the inhibition zone of a culture medium with high precision according to claim 1, characterized in that: In step S3, the various special forms are identified by using a gradient analysis method to identify the inner and outer circle boundaries, and the effective boundaries of irregular inhibition circles are determined by using an ellipse fitting algorithm, a circular fitting optimization, and a spline curve smoothing algorithm.
8. The method for measuring the diameter of the inhibition zone of a culture medium with high precision according to claim 1, characterized in that: In step S4, the intelligent image recognition algorithm uses an improved Hough transform line detection algorithm, combined with multi-scale template matching and edge detection technology, to accurately locate the geometric center line and direction angle of the ruler and adaptively identify measuring tools with millimeter scale specifications.
9. The method for high-precision measurement of the diameter of the inhibition zone of a culture medium according to claim 1, characterized in that: In step S4, the calibration accuracy verification uses a standard gauge block or precision test card as a reference benchmark, and the reliability of the conversion ratio is ensured through multi-point measurement verification and statistical analysis. The system calibration error is controlled within the range of ±0.02mm, meeting the high-precision measurement requirements.
10. The method for high-precision measurement of the diameter of the inhibition zone of a culture medium according to claim 1, characterized in that: In step S5, the geometric fitting algorithm uses the least squares method to perform circle or ellipse fitting, selects the optimal fitting model according to the actual shape of the inhibition zone, and calculates the equivalent diameter.
11. The method for measuring the diameter of the inhibition zone of a culture medium with high precision according to claim 1, characterized in that: In step S5, the quality assessment is to establish a measurement confidence assessment mechanism. When the edge quality and goodness of fit are lower than a threshold, the system automatically marks and prompts manual review.
Citation Information
Cited By
Calibrated scale use normalization detection method and system for teaching examination
CN121352628A
A standardized testing method and system for rulers used in teaching and examinations
CN121352628B
Image data management method and system for high-precision size visual inspection
CN121366152A
An image data management method and system for high-precision dimensional visual inspection
CN121366152B