Colony ring segmentation counting method and device

By using the multi-task segmentation model and the target detection model, the problem of colony edge reflection affecting the counting results is solved, and a more accurate and efficient strain counting is achieved.

CN119068481BActive Publication Date: 2025-03-21JIEYI TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411562874.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-21
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

In the prior art, it is difficult to effectively deal with the reflection phenomenon at the edge of the colony when counting colonies, resulting in inaccurate counting results.

Method used

The colony annular segmentation counting method based on a pre-trained multi-task segmentation model was used to identify and segment multiple objects of the Petri dish, including the edges of the Petri dish, the annular colony and the internal colonies, and use the object detection model for feature analysis and object detection to eliminate the impact of reflection.

Benefits of technology

It significantly improves the accuracy and reliability of strain counting, can effectively treat the edge area of ​​the Petri dish, eliminates the impact of reflection on the counting results, and improves the processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068481B_ABST
    Figure CN119068481B_ABST
Patent Text Reader

Abstract

The present application discloses a colony ring segmentation and counting method and device, the method comprising: based on a pre-trained multi-task segmentation model, identifying the image to be processed to obtain a first image block and a second image block; performing feature analysis on the first image block to obtain a third image block and a fourth image block; using a pre-trained target detection model, performing target detection on the second image block and the fourth image block respectively to obtain a first strain number; based on the sum of the first strain number and the second strain number, determining the strain counting result of the image to be processed, wherein the second strain number is determined based on the number of the third image block. The method specifically processes the edge area of ​​the culture dish, significantly eliminating the influence of strain reflection on the strain counting result. At the same time, the application of the multi-task segmentation model greatly improves the processing efficiency, and can process multiple segmentation tasks at the same time to obtain more accurate and efficient strain counting results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of biomedical engineering, and in particular to a method and device for counting circular segmentation of colonies. Background Art

[0002] In biomedical experiments, counting colonies in a culture dish is an important part of microbial research. However, when the colonies are close to the edge of the culture dish, obvious reflections will appear in the image (i.e., imaging of the colonies in the culture dish). This reflection will cause the edges of the colonies to be blurred, which in turn affects the accuracy and reliability of colony counting. Existing colony counting solutions often fail to effectively handle these edge reflections, resulting in inaccurate counting results. Summary of the invention

[0003] The present application provides a colony ring segmentation counting method and device, the purpose of which is to eliminate the influence of the reflection of the colony edge on the strain counting result and improve the accuracy of the strain counting.

[0004] In order to achieve the above objectives, this application provides the following technical solutions:

[0005] A colony ring segmentation counting method, comprising:

[0006] Based on the pre-trained multi-task segmentation model, the image to be processed is recognized to obtain a first image block and a second image block; the multi-task segmentation model is used to recognize multiple objects in the image to be processed; the multiple objects include the edge of the culture dish, the annular colony and the internal colony; the image to be processed is a colony image of the culture dish; the first image block is an image block containing the annular colony, and the second image block is an image block containing the internal colony;

[0007] Performing feature analysis on the first image block to obtain a third image block and a fourth image block; the third image block is an image block containing the first feature, and the fourth image block is an image block containing the second feature; the first feature is a large bacterial strain whose pixel area meets the preset conditions; the second feature is other bacterial colony areas whose pixel areas do not meet the preset conditions;

[0008] Using the pre-trained target detection model, target detection is performed on the second image block and the fourth image block respectively to obtain a first number of strains; the first number of colonies represents the number of all strains in the second image block and the fourth image block;

[0009] The strain counting result of the image to be processed is determined based on the sum of the first strain quantity and the second strain quantity; the second strain quantity is determined based on the quantity of the third image block.

[0010] Optionally, performing feature analysis on the first image block to obtain a third image block and a fourth image block includes:

[0011] Performing a connected domain analysis on the first image block to determine a connected region and other regions;

[0012] Determine, based on an image area in the first image block corresponding to the connected area, a third image block;

[0013] Performing morphological feature analysis on the other regions to determine large regions and small regions; the large regions are regions whose pixel areas are greater than a first threshold and whose area ratio is less than a second threshold; the small regions are regions whose pixel areas are not greater than the first threshold and / or whose area ratio is not less than the second threshold; the area ratio is a ratio of a pixel area to a target area; the target area is the area of ​​a minimum circumscribed circle of the other regions;

[0014] Determine, based on an image area in the first image block corresponding to the large area, as the third image block;

[0015] Based on the image area in the first image block corresponding to the small block area, it is determined as the fourth image block.

[0016] Optionally, using a pre-trained target detection model to perform target detection on the second image block and the fourth image block respectively to obtain the first number of strains, including:

[0017] Inputting the second image block and the fourth image block into a pre-trained target detection model respectively to obtain a plurality of predicted bounding boxes output by the target detection model; the predicted bounding boxes are image regions containing a single strain;

[0018] Deduplication processing is performed on the plurality of predicted bounding boxes to obtain a valid predicted bounding box;

[0019] Based on the total number of the valid prediction bounding boxes, the first strain number is determined.

[0020] Optionally, the method further includes:

[0021] Determining strain location information of the image to be processed based on the effective prediction bounding box and the third image block;

[0022] Based on the strain location information and the strain counting result, a visual strain statistical report is generated.

[0023] Optionally, the training process of the multi-task segmentation model includes:

[0024] An initial segmentation network model and a training data set are predetermined; the initial segmentation network model includes an encoder and three decoders; the encoder is used to extract image features, and the three decoders are used to segment image blocks matching the three objects respectively; the training data set includes a first sample, a second sample, and a third sample, the first sample is a colony imaging with a pre-marked edge of a culture dish; the second sample is a colony imaging with a pre-marked annular colony; the third sample is a colony imaging with a pre-marked internal colony;

[0025] The initial segmentation network model is trained using the training data set to obtain the multi-task segmentation model.

[0026] Optionally, the target detection model includes an improved YOLO network model based on a deformable large kernel attention mechanism combined with deformable convolution.

[0027] Optionally, the training process of the target detection model includes:

[0028] Predetermining the YOLO network model and the training sample set; the training sample set includes colony imaging samples pre-annotated with bounding boxes for the strains;

[0029] The YOLO network model is trained using the training sample set to obtain the target detection model.

[0030] A colony annular segmentation and counting device, comprising:

[0031] An image segmentation unit is used to identify the image to be processed based on a pre-trained multi-task segmentation model to obtain a first image block and a second image block; the multi-task segmentation model is used to identify multiple objects in the image to be processed; the multiple objects include the edge of a culture dish, an annular colony, and an internal colony; the image to be processed is a colony image of a culture dish; the first image block is an image block containing the annular colony, and the second image block is an image block containing the internal colony;

[0032] A feature analysis unit is used to perform feature analysis on the first image block to obtain a third image block and a fourth image block; the third image block is an image block containing the first feature, and the fourth image block is an image block containing the second feature; the first feature is a large bacterial strain whose pixel area meets the preset conditions; the second feature is other bacterial colony areas whose pixel areas do not meet the preset conditions;

[0033] a strain detection unit, configured to perform target detection on the second image block and the fourth image block respectively using a pre-trained target detection model to obtain a first number of strains; the first number of colonies represents the number of all strains in the second image block and the fourth image block;

[0034] The strain counting unit is used to determine the strain counting result of the image to be processed based on the sum of the first strain quantity and the second strain quantity; the second strain quantity is determined based on the quantity of the third image block.

[0035] A storage medium includes a stored program, wherein the program executes the colony ring segmentation and counting method when executed by a processor.

[0036] An electronic device, comprising: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0037] The memory is used to store programs, and the processor is used to run programs, wherein the program executes the colony ring segmentation and counting method when the processor runs the program.

[0038] The technical solution provided by the present application is based on a pre-trained multi-task segmentation model to identify the image to be processed to obtain a first image block and a second image block. Feature analysis is performed on the first image block to obtain a third image block and a fourth image block. Using the pre-trained target detection model, target detection is performed on the second image block and the fourth image block respectively to obtain the first number of strains. Based on the sum of the first number of strains and the second number of strains, the strain counting result of the image to be processed is determined. The present application specifically processes the edge area of ​​the culture dish, significantly eliminating the influence of the strain reflection on the strain counting result. At the same time, the application of the multi-task segmentation model greatly improves the processing efficiency, and can process multiple segmentation tasks at the same time to obtain more accurate and efficient strain counting results. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A schematic diagram of a process for colony ring segmentation and counting provided in an embodiment of the present application;

[0041] Figure 2 A schematic flow chart of another colony ring segmentation and counting method provided in an embodiment of the present application;

[0042] Figure 3 A schematic flow chart of another colony ring segmentation and counting method provided in an embodiment of the present application;

[0043] Figure 4 A schematic flow chart of another colony ring segmentation and counting method provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of the architecture of a colony ring segmentation and counting device provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of bacterial colony imaging of a culture dish provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of culture dish edge segmentation provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of the architecture of a multi-task segmentation model provided in an embodiment of the present application;

[0048] Fig. 9 A schematic diagram of the architecture of a target detection model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0051] like Figure 1 As shown, it is a flow chart of a colony ring segmentation and counting method provided in an embodiment of the present application, which includes the following steps.

[0052] S101: Based on the pre-trained multi-task segmentation model, the image to be processed is recognized to obtain a first image block and a second image block.

[0053] Among them, the multi-task segmentation model is used to identify multiple objects in the image to be processed, including the edge of the culture dish, the annular colony and the internal colony. The image to be processed is the colony imaging of the culture dish. The first image block is the image block containing the annular colony, and the second image block is the image block containing the internal colony.

[0054] Optionally, the training process of the multi-task segmentation model includes: predetermining an initial segmentation network model and a training data set; and using the training data set to train the initial segmentation network model to obtain the multi-task segmentation model.

[0055] In some examples, the initial segmentation network model includes an encoder and three decoders, the encoder is used to extract image features (Feature Map), and the three decoders are used to segment image blocks matching the three objects respectively.

[0056] In some examples, the training data set includes a first sample, a second sample, and a third sample, the first sample is a colony image of a pre-labeled culture dish edge, the second sample is a colony image of a pre-labeled circular colony, and the third sample is a colony image of a pre-labeled internal colony.

[0057] In some examples, after obtaining the training data set, the training data set needs to be preprocessed. Specifically, data enhancement technology can be used to improve the diversity of the training data set.

[0058] In some examples, the encoder may use a convolutional neural network (such as EfficientNet) to extract image features. The three decoders each contain a corresponding convolutional neural network, which can be used to implement culture dish edge segmentation, circular colony segmentation, and internal colony segmentation, respectively.

[0059] In some examples, the shape of the petri dish is Figure 6 The disc shown, for which the segmentation effect of the edge of the culture dish can be seen Figure 7 As shown, in addition, the annular colony can be understood as the colony close to the edge of the culture dish, and the inner colony can be understood as the colony away from the edge of the culture dish.

[0060] Generally speaking, in the process of training the initial segmentation network model, it is also necessary to monitor various performance indicators (such as loss function, accuracy, etc.) in the model training structure. In a possible implementation, the loss function L can be a weighted combination form, and its expression is shown in formula (1).

[0061] (1)

[0062] In formula (1), represents the loss function for the segmentation of the petri dish edge, represents the loss function for circular colony segmentation, Represents the loss function for internal colony segmentation. , and Each represents the weight of the corresponding loss, which is used to balance the impact between multiple segmentation tasks. Specifically, Can be set to 0.4, Can be set to 0.3, Can be set to 0.3.

[0063] In some examples, the loss function calculation process of each segmentation task can be shown in formula (2).

[0064] (2)

[0065] In formula (2), represents the total number of samples, represents the true label, Represents the value predicted by the model.

[0066] In some examples, it is also necessary to use a pre-prepared validation dataset to evaluate the multi-task segmentation model, record the performance indicators of each segmentation task during training, and adjust the multi-task segmentation model through cross-validation. Specifically, the learning rate, batch size and other hyperparameters of the multi-task segmentation model can be dynamically adjusted according to the training and cross-validation results to improve the performance of the multi-task segmentation model.

[0067] In a possible implementation, the structure of the multi-task segmentation model can be found in Figure 8 As shown, specifically, the encoder includes 7 basic building blocks (Block), Block includes multiple convolutional layers and SE (Squeeze-and-Excitation) modules, and the three decoders include upsampling layer (Unsample), convolution layer (Conv3*3), normalization layer (Batch Norm), activation layer (ReLU), convolution layer (Conv3*3) and output layer (Output).

[0068] S102: Perform feature analysis on the first image block to obtain a third image block and a fourth image block.

[0069] Among them, the third image block is an image block containing the first feature, and the fourth image block is an image block containing the second feature. The first feature is a large strain whose pixel area meets the preset conditions, and the second feature is other colony areas whose pixel area does not meet the preset conditions.

[0070] It should be noted that the colonies cultured in the same culture dish are of the same bacterial species, and multiple strains of the same bacterial species have great differences in body shape, some strains are larger and some are smaller. In order to avoid identifying a larger strain as a colony composed of multiple smaller strains, it is necessary to perform feature analysis on the first image block to distinguish between large strains and other colony areas.

[0071] In some examples, the large-block strains are strains with larger bodies, and other colony regions contain multiple small-block strains, and the small-block strains are strains with smaller bodies.

[0072] Optionally, the implementation process of performing feature analysis on the first image block to obtain the third image block and the fourth image block can be found in Figure 2 Steps shown and explanations of the steps.

[0073] S103: Using the pre-trained target detection model, perform target detection on the second image block and the fourth image block respectively to obtain the first strain quantity.

[0074] The first colony quantity represents the quantity of all strains in the second image block and the fourth image block.

[0075] Optionally, the target detection model includes an improved YOLO network model based on a deformable large kernel attention mechanism combined with deformable convolution.

[0076] It should be noted that the basic principle of the Deformable Large Kernel Attention (DLKA) mechanism is to combine the attention mechanism of large convolution kernels and deformable convolutions. It uses large convolution kernels to simulate a receptive field similar to self-attention while avoiding the high computational cost of the traditional self-attention mechanism. In addition, DLKA flexibly adjusts the sampling grid through deformable convolutions, so that the target detection model can better adapt to different data patterns. Specifically, DLKA uses large convolution kernels to capture the extensive contextual information of the image (i.e., the second image block and the fourth image block), imitating the receptive field of the self-attention mechanism.

[0077] Large Kernel is a mechanism for capturing extensive contextual information in an image. It mimics the receptive field of the self-attention mechanism, but uses fewer parameters and computation. Large Kernel can be constructed efficiently by using depth-wise convolution and depth-wise dilated convolution. This allows the network to learn features within a larger receptive field while reducing the computational complexity by reducing the number of parameters. In DLKA, large convolution kernels are used in combination with deformable convolutions to further increase the adaptability of the target detection model to complex image patterns.

[0078] The so-called deformable convolutional network (DCN) is a convolutional neural network module for target detection and image segmentation. Standard convolution (regular sampling) samples according to regular grid positions during convolution operations, while deformable convolution introduces an offset to achieve irregular sampling, which has stronger generalization ability in shape transformation (scale, aspect ratio, rotation, etc.). By introducing deformable convolution operations, the target detection model's ability to model target deformation can be improved. Large convolution kernels combined with deformable convolution technology allow the sampling grid of the target detection model to flexibly deform according to image features and adapt to different data patterns.

[0079] Optionally, the training process of the target detection model includes: predetermining a YOLO network model and a training sample set, the training sample set including colony imaging samples pre-labeled with bounding boxes for strains; and training the YOLO network model using the training sample set to obtain the target detection model.

[0080] In some examples, it is also necessary to use a pre-prepared validation sample set to evaluate the target detection model, record the performance indicators of the target detection model, and adjust the target detection model through cross-validation. Specifically, the learning rate, batch size and other hyperparameters of the target detection model can be dynamically adjusted according to the training and cross-validation results to improve the performance of the target detection model.

[0081] In a possible implementation, the architecture of the target detection model can be found in Fig. 9 As shown in the figure, specifically, Conv represents the convolution module, C2f_DCNv3_DLKA represents the deformable large core attention mechanism module, SPPF represents the spatial pyramid pooling module, C2f represents the neural network module, Concat represents the feature fusion module, Unsample represents the upsampling module, Detect represents the detection module, and Loss represents the loss function.

[0082] Optionally, the target detection model obtained by pre-training is used to perform target detection on the second image block and the fourth image block respectively to obtain the first number of strains. For example, Figure 3 Steps shown and explanations of the steps.

[0083] S104: Determine a strain counting result of the image to be processed based on the sum of the first strain number and the second strain number.

[0084] The second strain number is determined based on the number of the third image blocks. It is understandable that the number of the third image blocks is the same as the second strain number, and the strain counting result is the sum of the first strain number and the second strain number.

[0085] In some examples, the strain counting result = the first strain number + the second strain number.

[0086] Optionally, in order to intuitively obtain the strain counting results of the image to be processed, the strain statistical report of the image to be processed can also be visualized. The visualization process can be seen in Figure 4 Steps shown and explanations of the steps.

[0087] The process shown in S103-S104 above specifically processes the edge area of ​​the culture dish, significantly eliminating the influence of strain reflection on the strain counting results. At the same time, the application of the multi-task segmentation model greatly improves the processing efficiency, and can process multiple segmentation tasks at the same time to obtain more accurate and efficient strain counting results.

[0088] like Figure 2 As shown, it is a flow chart of another colony ring segmentation and counting method provided in an embodiment of the present application, which includes the following steps.

[0089] S201: Performing a connected domain analysis on a first image block to determine connected regions and other regions.

[0090] Among them, the connected domain refers to the area composed of adjacent pixels with the same pixel value in the image, and the connected domain analysis refers to finding independent connected domains in the image and marking them out.

[0091] In some examples, the first image block may include one or more connected regions, or may not include a connected region, each of which may be considered as a corresponding large block of strains, and other regions may be considered as regions where small blocks of strains are combined with large blocks of strains.

[0092] S202: Determine, based on an image area in the first image block corresponding to the connected area, a third image block.

[0093] The image area corresponding to the connected area in the first image block is determined as the third image block, and the third image block is actually the image of the bulk strain. Generally speaking, each connected area corresponds to the image of a bulk strain.

[0094] S203: Analyze the morphological characteristics of other regions to determine large and small regions.

[0095] The large block area is an area whose pixel area is greater than the first threshold and whose area ratio is less than the second threshold. The small block area is an area whose pixel area is not greater than the first threshold and / or whose area ratio is not less than the second threshold. The area ratio is the ratio of the pixel area to the target area, and the target area is the area of ​​the minimum circumscribed circle of other areas.

[0096] In some examples, the large area can be considered as the area occupied by the large strain, and the small area can be considered as the area occupied by the small strain.

[0097] Generally speaking, the minimum circumscribed circle of other regions can be regarded as the minimum circle that completely surrounds the contour of other regions. Specifically, the target area can be understood as the pixel area occupied by the minimum circumscribed circle of other regions in the first image.

[0098] In some examples, a region with a pixel area greater than 500 and an area ratio less than 0.5 may be identified as a large region, and a region with a pixel area not greater than 500 and / or an area ratio not less than 0.5 may be identified as a small region.

[0099] S204: Determine, based on an image area in the first image block corresponding to the large block area, a third image block.

[0100] Among them, it can be determined that the large block area is the imaging of the large block strain. Generally speaking, each large block area corresponds to the imaging of a large block strain.

[0101] S205: Determine, based on the image area in the first image block corresponding to the small block area, the fourth image block.

[0102] Among them, it can be determined that the small area is the image of the cluster formed by multiple small strains. Generally speaking, each small area corresponds to the image of a cluster.

[0103] In the above process shown in S201 to S205 , the third image block and the fourth image block in the first image block can be further identified by performing connected domain analysis and morphological feature analysis on the first image block.

[0104] like Figure 3 As shown, it is a flow chart of another colony ring segmentation and counting method provided in an embodiment of the present application, which includes the following steps.

[0105] S301: Inputting the second image block and the fourth image block into a pre-trained target detection model respectively to obtain a plurality of predicted bounding boxes output by the target detection model.

[0106] Among them, the predicted bounding box is the image area containing a single strain.

[0107] It should be noted that the improved YOLO model is used for colony detection to obtain the location information and number of strains for other colony areas (i.e., the fourth image block) and internal colonies (the second image block), respectively. These two areas share the YOLO detection network to improve detection efficiency.

[0108] S302: De-duplicate the multiple predicted bounding boxes to obtain a valid predicted bounding box.

[0109] Among them, a non-maximum suppression method can be used to deduplicate multiple prediction bounding boxes to obtain valid prediction bounding boxes, ensuring that the same prediction bounding box will not be counted repeatedly, thereby obtaining an accurate total number of valid prediction bounding boxes.

[0110] S303: Determine the first strain number based on the total number of valid prediction bounding boxes.

[0111] The total number of valid prediction bounding boxes is counted and can be determined as the first strain number.

[0112] The process shown in S301-S303 above can perform deduplication processing on multiple predicted bounding boxes output by the target detection model to improve the accuracy of the first strain quantity.

[0113] like Figure 4 As shown, it is a flow chart of another colony ring segmentation and counting method provided in an embodiment of the present application, which includes the following steps.

[0114] S401: Determine strain location information of the image to be processed based on the effective predicted bounding box and the third image block.

[0115] Among them, the effective prediction boundary box can be used to determine the position of the small strain, and the third image block can be used to determine the position of the large strain, so as to identify the positions of all strains in the image to be processed and generate the strain position information of the image to be processed.

[0116] S402: Generate a visualized strain statistics report based on the strain location information and the strain counting results.

[0117] Among them, the preset graphic software can be used to draw the strain location information and strain counting results to generate a visual strain statistical report.

[0118] The process shown in S401-S402 above can use the effective prediction bounding box and the third image block, combined with the strain counting result, to generate a visual strain statistical report.

[0119] like Figure 5 The figure is a schematic diagram of the architecture of a colony ring segmentation and counting device provided in an embodiment of the present application, including the units shown below.

[0120] The image segmentation unit 100 is used to identify the image to be processed based on a pre-trained multi-task segmentation model to obtain a first image block and a second image block; the multi-task segmentation model is used to identify multiple objects in the image to be processed; the multiple objects include the edge of a culture dish, an annular colony, and an internal colony; the image to be processed is a colony imaging of a culture dish; the first image block is an image block containing an annular colony, and the second image block is an image block containing an internal colony.

[0121] Optionally, the process of the image segmentation unit 100 training a multi-task segmentation model includes: predetermining an initial segmentation network model and a training data set; the initial segmentation network model includes an encoder and three decoders; the encoder is used to extract image features, and the three decoders are used to segment image blocks matching three objects respectively; the training data set includes a first sample, a second sample and a third sample, the first sample is a colony image with a pre-labeled edge of a culture dish; the second sample is a colony image with a pre-labeled circular colony; the third sample is a colony image with a pre-labeled internal colony; using the training data set, the initial segmentation network model is trained to obtain a multi-task segmentation model.

[0122] The feature analysis unit 200 is used to perform feature analysis on the first image block to obtain a third image block and a fourth image block; the third image block is an image block containing the first feature, and the fourth image block is an image block containing the second feature; the first feature is a large strain whose pixel area meets the preset conditions; the second feature is other colony areas whose pixel area does not meet the preset conditions.

[0123] Optionally, the feature analysis unit 200 is specifically used to: perform a connected domain analysis on the first image block to determine the connected area and other areas; determine the third image block based on the image area corresponding to the connected area in the first image block; perform morphological feature analysis on other areas to determine large blocks and small blocks; the large block area is an area with a pixel area greater than a first threshold and an area ratio less than a second threshold; the small block area is an area with a pixel area not greater than the first threshold and / or an area ratio not less than the second threshold; the area ratio is the ratio of the pixel area to the target area; the target area is the area of ​​the minimum circumscribed circle of other areas; determine the third image block based on the image area corresponding to the large block area in the first image block; determine the fourth image block based on the image area corresponding to the small block area in the first image block.

[0124] The strain detection unit 300 is used to use a pre-trained target detection model to perform target detection on the second image block and the fourth image block respectively to obtain a first strain quantity; the first colony quantity represents the quantity of all strains in the second image block and the fourth image block.

[0125] Optionally, the strain detection unit 300 is specifically used to: input the second image block and the fourth image block into a pre-trained target detection model, respectively, to obtain multiple prediction bounding boxes output by the target detection model; the prediction bounding box is an image area containing a single strain; deduplicate the multiple prediction bounding boxes to obtain valid prediction bounding boxes; and determine the first strain number based on the total number of valid prediction bounding boxes.

[0126] Optionally, the target detection model adopted by the strain detection unit 300 includes a YOLO network model improved by a deformable large kernel attention mechanism combined with deformable convolution.

[0127] Optionally, the process of training the target detection model by the strain detection unit 300 includes: predetermining a YOLO network model and a training sample set; the training sample set includes colony imaging samples pre-labeled with bounding boxes for strains; and using the training sample set to train the YOLO network model to obtain a target detection model.

[0128] The strain counting unit 400 is used to determine the strain counting result of the image to be processed based on the sum of the first strain number and the second strain number; the second strain number is determined based on the number of the third image block.

[0129] The report visualization unit 500 is used to: determine the strain location information of the image to be processed based on the effective prediction boundary box and the third image block; and generate a visualized strain statistical report based on the strain location information and the strain counting result.

[0130] Each unit shown above specifically processes the edge area of ​​the culture dish, significantly eliminating the influence of strain reflection on the strain counting results. At the same time, the application of the multi-task segmentation model greatly improves the processing efficiency, and can process multiple segmentation tasks at the same time to obtain more accurate and efficient strain counting results.

[0131] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the colony ring segmentation and counting method provided by the present application.

[0132] The present application also provides an electronic device, including: a processor, a memory and a bus. The processor and the memory are connected via the bus, the memory is used to store programs, and the processor is used to run the programs, wherein the colony ring segmentation and counting method provided by the present application is executed when the programs are run.

[0133] In addition, the functions described above in the embodiments of the present application may be at least partially performed by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0134] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0135] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A colony ring segmentation counting method, characterized in that: include: Based on the pre-trained multi-task segmentation model, the image to be processed is recognized to obtain a first image block and a second image block; the multi-task segmentation model is used to recognize multiple objects in the image to be processed; the multiple objects include the edge of the culture dish, the annular colony and the internal colony; the image to be processed is a colony image of the culture dish; the first image block is an image block containing the annular colony, and the second image block is an image block containing the internal colony; Performing feature analysis on the first image block to obtain a third image block and a fourth image block; the third image block is an image block containing the first feature, and the fourth image block is an image block containing the second feature; the first feature is a large bacterial strain whose pixel area meets the preset conditions; the second feature is other bacterial colony areas whose pixel areas do not meet the preset conditions; Using the pre-trained target detection model, target detection is performed on the second image block and the fourth image block respectively to obtain a first strain number; the first strain number represents the number of all strains in the second image block and the fourth image block; Determining a strain counting result of the image to be processed based on the sum of the first strain number and the second strain number; The second number of strains is determined based on the number of the third image blocks, and the number of the third image blocks is the same as the second number of strains; The training process of the multi-task segmentation model includes: An initial segmentation network model and a training data set are predetermined; the initial segmentation network model includes an encoder and three decoders; the encoder is used to extract image features, and the three decoders are used to segment image blocks matching the three objects respectively; the training data set includes a first sample, a second sample, and a third sample, the first sample is a colony imaging with a pre-marked edge of a culture dish; the second sample is a colony imaging with a pre-marked annular colony; the third sample is a colony imaging with a pre-marked internal colony; The initial segmentation network model is trained using the training data set to obtain the multi-task segmentation model.

2. The method according to claim 1, characterized in that Performing feature analysis on the first image block to obtain a third image block and a fourth image block includes: Performing a connected domain analysis on the first image block to determine a connected region and other regions; Determine, based on an image area in the first image block corresponding to the connected area, a third image block; Performing morphological feature analysis on the other regions to determine large regions and small regions; the large regions are regions whose pixel areas are greater than a first threshold and whose area ratio is less than a second threshold; the small regions are regions whose pixel areas are not greater than the first threshold and / or whose area ratio is not less than the second threshold; the area ratio is a ratio of a pixel area to a target area; the target area is the area of ​​a minimum circumscribed circle of the other regions; Determine, based on an image area in the first image block corresponding to the large area, as the third image block; Based on the image area in the first image block corresponding to the small block area, it is determined as the fourth image block.

3. The method according to claim 1, characterized in that Using the pre-trained target detection model, performing target detection on the second image block and the fourth image block respectively to obtain the first strain number, including: Inputting the second image block and the fourth image block into a pre-trained target detection model respectively to obtain a plurality of predicted bounding boxes output by the target detection model; the predicted bounding boxes are image regions containing a single strain; Deduplication processing is performed on the plurality of predicted bounding boxes to obtain a valid predicted bounding box; Based on the total number of the valid prediction bounding boxes, the first strain number is determined.

4. The method according to claim 3, characterized in that The method further comprises: Determining strain location information of the image to be processed based on the effective prediction bounding box and the third image block; Based on the strain location information and the strain counting result, a visual strain statistical report is generated.

5. The method according to claim 1, characterized in that The target detection model includes an improved YOLO network model based on a deformable large kernel attention mechanism combined with deformable convolution.

6. The method according to claim 5, characterized in that The training process of the target detection model includes: Predetermining the YOLO network model and the training sample set; the training sample set includes colony imaging samples pre-annotated with bounding boxes for the strains; The YOLO network model is trained using the training sample set to obtain the target detection model.

7. A colony ring segmentation and counting device, characterized in that: include: An image segmentation unit is used to identify the image to be processed based on a pre-trained multi-task segmentation model to obtain a first image block and a second image block; the multi-task segmentation model is used to identify multiple objects in the image to be processed; the multiple objects include the edge of a culture dish, an annular colony, and an internal colony; the image to be processed is a colony image of a culture dish; the first image block is an image block containing the annular colony, and the second image block is an image block containing the internal colony; A feature analysis unit is used to perform feature analysis on the first image block to obtain a third image block and a fourth image block; the third image block is an image block containing the first feature, and the fourth image block is an image block containing the second feature; the first feature is a large bacterial strain whose pixel area meets the preset conditions; the second feature is other bacterial colony areas whose pixel areas do not meet the preset conditions; a strain detection unit, configured to perform target detection on the second image block and the fourth image block respectively using a pre-trained target detection model to obtain a first strain quantity; the first strain quantity represents the quantity of all strains in the second image block and the fourth image block; a strain counting unit, configured to determine a strain counting result of the image to be processed based on the sum of the first strain number and the second strain number; The second number of strains is determined based on the number of the third image blocks, and the number of the third image blocks is the same as the second number of strains; The process of training a multi-task segmentation model by an image segmentation unit includes: predetermining an initial segmentation network model and a training data set; the initial segmentation network model includes an encoder and three decoders; the encoder is used to extract image features, and the three decoders are used to segment image blocks matching three objects respectively; the training data set includes a first sample, a second sample and a third sample, the first sample is a colony imaging of a pre-marked culture dish edge; the second sample is a colony imaging of a pre-marked annular colony; the third sample is a colony imaging of a pre-marked internal colony; and the training data set is used to train the initial segmentation network model to obtain a multi-task segmentation model.

8. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program, when executed by a processor, executes the colony ring segmentation and counting method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program, when run by the processor, executes the colony ring segmentation and counting method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Bacterial colony counting method and device based on adaptive window

    CN118037694A

  • Bacterial colony counting method and device

    CN118840367A