Colony region image segmentation method, device and equipment based on cascaded segmentation network
The colony area image is automatically segmented through a cascade segmentation network, which solves the problem of cumbersome segmentation process and susceptibility to manual intervention in the existing technology, and realizes efficient and reliable colony area image segmentation.
Patent Information
- Application Number
- CN202411842770.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-13
AI Technical Summary
The existing colony area image segmentation process is cumbersome, difficult to improve segmentation efficiency and easily affected by manual intervention.
A cascade segmentation network-based method is used to process the original image, background image and rough semantic segmentation image through the initial segmentation network and the target segmentation network to generate the initial and target segmentation result images, thereby automatically segmenting the colony area image.
The segmentation time of colony area images is reduced, the segmentation efficiency is improved, the reliability of the segmentation results is enhanced, and the influence of manual intervention is avoided.
Smart Images

Figure CN119810436B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and the field of microorganisms, and in particular to a colony area image segmentation method, device and equipment based on a cascade segmentation network. BACKGROUND
[0002] The colony area image provides intuitive visual information, enabling users to clearly observe key indicators such as the morphology, size, color and edge features of the colony, which is crucial for quickly identifying and classifying microorganisms. In addition, the colony area image can also be used for subsequent digital processing and data analysis, such as automatically counting the number of colonies, improving the accuracy and efficiency of research.
[0003] However, the current segmentation process of the colony area image is tedious, which is not conducive to improving the segmentation efficiency of the colony area image. The reason is that the original image has a complex background, which increases the difficulty of segmenting the colony area image from the original image, making it difficult for traditional image segmentation algorithms to segment the colony area image in the original image. In order to obtain accurate segmentation results, users can only adopt manual segmentation, which not only consumes time and effort, but is also easily affected by human intervention, thus not conducive to improving the segmentation efficiency of the colony area image. SUMMARY
[0004] The present application provides a colony area image segmentation method, device, computer equipment and storage medium based on a cascade segmentation network to solve the technical problem that the current segmentation process of the colony area image is tedious and not conducive to improving the segmentation efficiency of the colony area image.
[0005] In a first aspect, a colony area image segmentation method based on a cascade segmentation network is provided, comprising:
[0006] obtaining an original image of a colony in a current petri dish taken by a camera;
[0007] preprocessing the original image to obtain a processed original image;
[0008] obtaining a preset rough semantic segmentation map and a preset background map, and inputting the processed original image, the background map and the rough semantic segmentation map into a cascade segmentation network;
[0009] processing the original image, the background map and the rough semantic segmentation map through an initial segmentation network in the cascade segmentation network to generate an initial segmentation result map;
[0010] inputting the processed original image, the background map and the initial segmentation result map into a target segmentation network, which is the next segmentation network of the initial segmentation network;
[0011] The target segmentation network is used to process the processed original image, the background image and the initial segmentation result image, to generate a target segmentation result image, and to segment an image region where the bacterial colony is located from the processed original image according to the target segmentation result image, and to select the image region where the bacterial colony is located as a bacterial colony region image.
[0012] Further, the preprocessing of the original image to obtain the processed original image comprises:
[0013] The original image is separated by channels to obtain a single-channel image, a preset square structural element 1 is used to perform bottom-hat transformation processing on the single-channel image to obtain a first result image, and a preset square structural element 2 is used to perform bottom-hat transformation processing on the single-channel image to obtain a second result image.
[0014] The first result image and the second result are respectively subjected to morphological processing, and a plurality of initial bacterial colony regions are selected.
[0015] The initial bacterial colony regions are subjected to AND operation to synthesize a joint region, the joint region is subjected to boundary operation to obtain a final target bacterial colony region, and the target bacterial colony region is marked on the original image.
[0016] Further, the obtaining of the preset rough semantic segmentation image and the preset background image, and the inputting of the processed original image, the background image and the rough semantic segmentation image into the cascade segmentation network comprise:
[0017] A model file is obtained, a loading operation is performed on the cascade segmentation network in the model file to obtain a loading result.
[0018] When the loading result is loading success, a preset rough semantic segmentation image and a preset background image are obtained, and the processed original image, the background image and the rough semantic segmentation image are input into the cascade segmentation network.
[0019] Further, the processing of the original image, the background image and the rough semantic segmentation image by the initial segmentation network in the cascade segmentation network to generate an initial segmentation result image comprises:
[0020] The feature vectors of the original image, the feature vectors of the background image and the feature vectors of the rough semantic segmentation image are spliced to obtain an initial feature vector.
[0021] The initial segmentation network is used to process the initial feature vector to generate an initial segmentation result image.
[0022] Further, the inputting the processed original image, the background image and the initial segmentation result image into the target segmentation network comprises:
[0023] In the cascade segmentation network, the next segmentation network of the initial segmentation network is selected as the target segmentation network.
[0024] An input instruction is obtained, and the input instruction is executed to input the processed original image, the background image and the initial segmentation result image into the target segmentation network.
[0025] Further, the processing of the processed original image, the background image and the initial segmentation result image by the target segmentation network to generate a target segmentation result image, and the segmentation of the image region where the bacterial colony is located from the processed original image according to the target segmentation result image to select the image region where the bacterial colony is located as a bacterial colony region image comprises:
[0026] The feature vectors of the original image, the background image and the initial segmentation result image are spliced to obtain a target feature vector, and the target feature vector is processed by the target segmentation network to generate a target segmentation result image.
[0027] When the target segmentation network is the last segmentation network, the image region where the bacterial colony is located is segmented from the processed original image according to the target segmentation result image, and the image region where the bacterial colony is located is selected as a bacterial colony region image.
[0028] Further, after the processing of the processed original image, the background image and the initial segmentation result image by the target segmentation network to generate a target segmentation result image, and the segmentation of the image region where the bacterial colony is located from the processed original image according to the target segmentation result image to select the image region where the bacterial colony is located as a bacterial colony region image, the bacterial colony region image segmentation method comprises:
[0029] A push instruction is obtained, and the push instruction is executed to push the bacterial colony region image to a target system.
[0030] Further, before the original image obtained by the camera shooting the bacterial colony in the current culture dish is obtained, the bacterial colony region image segmentation method comprises:
[0031] A sample image obtained by a camera shooting a bacterial colony in a preset culture dish is obtained.
[0032] A predicted segmentation result image generated by a cascade segmentation network based on the sample image is obtained, and a loss value between the predicted segmentation result image and a true segmentation result image is calculated by a loss function.
[0033] adjust the loss value by the first weight value and the second weight value to obtain an adjusted loss value;
[0034] save the cascade segmentation network when the adjusted loss value converges.
[0035] In a second aspect, a colony region image segmentation device based on a cascade segmentation network is provided, and the device includes:
[0036] a first acquisition module configured to acquire an original image obtained by a camera capturing a colony in a current culture dish;
[0037] a processing module configured to pre-process the original image to obtain a processed original image;
[0038] a second acquisition module configured to acquire a preset coarse semantic segmentation map and a preset background map, and input the processed original image, the background map, and the coarse semantic segmentation map into a cascade segmentation network;
[0039] a generation module configured to process the original image, the background map, and the coarse semantic segmentation map by an initial segmentation network in the cascade segmentation network to generate an initial segmentation result map;
[0040] an input module configured to input the processed original image, the background map, and the initial segmentation result map into a target segmentation network, which is a next segmentation network of the initial segmentation network;
[0041] a segmentation module configured to process the processed original image, the background map, and the initial segmentation result map by the target segmentation network to generate a target segmentation result map, segment an image region where the colony is located from the processed original image according to the target segmentation result map, and select the image region where the colony is located as a colony region image.
[0042] In a third aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above colony region image segmentation method when executing the computer program.
[0043] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the above colony region image segmentation method when executed by a processor.
[0044] The application provides a colony area image segmentation method and device based on a cascade segmentation network, computer equipment and a storage medium. An original image of a colony in a current culture dish is obtained by a camera; the original image is preprocessed to obtain a processed original image; a preset rough semantic segmentation image and a preset background image are obtained, and the processed original image, the background image and the rough semantic segmentation image are input into a cascade segmentation network; the original image, the background image and the rough semantic segmentation image are processed by an initial segmentation network in the cascade segmentation network to generate an initial segmentation result image; the processed original image, the background image and the initial segmentation result image are input into a target segmentation network which is a next segmentation network of the initial segmentation network; the processed original image, the background image and the initial segmentation result image are processed by the target segmentation network to generate a target segmentation result image, and an image area where the colony is located is segmented from the processed original image according to the target segmentation result image, and the image area where the colony is located is selected as a colony area image. The beneficial effects are as follows. On the one hand, the processed original image, the background image and the initial segmentation result image are processed by the target segmentation network to generate a target segmentation result image, and an image area where the colony is located is segmented from the processed original image according to the target segmentation result image, and the image area where the colony is located is selected as a colony area image. Since manual segmentation is not required, the segmentation time of the colony area image is reduced, and the segmentation efficiency of the colony area image is improved. On the other hand, since the cascade segmentation network is not affected by manual intervention, the reliability of the colony area image is improved. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the application. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0046] Figure 1 is an application environment schematic diagram of a colony area image segmentation method in an embodiment of the application;
[0047] Figure 2 is a flow schematic diagram of a colony area image segmentation method provided by an embodiment of the application;
[0048] Figure 3 is Figure 2 is a specific implementation process schematic diagram of step S23 in the embodiment;
[0049] Figure 4 is Figure 2 a specific implementation flowchart of step S25 in
[0050] Figure 5 is Figure 2 a specific implementation flowchart of step S26 in
[0051] Figure 6 is a structural schematic diagram of a colony area image segmentation device in an embodiment of the present application;
[0052] Figure 7 is a structural schematic diagram of a computer device in an embodiment of the present application;
[0053] Figure 8 is an example provided by an embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0055] Please refer to Figure 1 , Figure 1 is a schematic diagram of an application environment of a colony area image segmentation method in an embodiment of the present application. The colony area image segmentation method provided by the embodiment of the present application can be applied in an application environment as shown in Figure 1 , wherein a client communicates with a server through a network.
[0056] The server obtains an original image of a colony in a current culture dish captured by a camera through the client;
[0057] The original image is preprocessed to obtain a processed original image;
[0058] A preset rough semantic segmentation map and a preset background map are obtained, and the processed original image, the background map and the rough semantic segmentation map are input into a cascaded segmentation network;
[0059] The original image, the background map and the rough semantic segmentation map are processed by an initial segmentation network in the cascaded segmentation network to generate an initial segmentation result map;
[0060] The processed original image, the background map and the initial segmentation result map are input into a target segmentation network, which is a next segmentation network of the initial segmentation network;
[0061] The target segmentation network is used to process the processed original image, the background image and the initial segmentation result image to generate a target segmentation result image, and the image region where the colonies are located is segmented from the processed original image according to the target segmentation result image, and the image region where the colonies are located is selected as the colony region image.
[0062] In the scheme implemented by the colony region image segmentation method, device, equipment and medium, the beneficial effects are as follows: on the one hand, the target segmentation network is used to process the processed original image, the background image and the initial segmentation result image to generate a target segmentation result image, and the image region where the colonies are located is segmented from the processed original image according to the target segmentation result image, and the image region where the colonies are located is selected as the colony region image, so that the segmentation time of the colony region image is reduced, and the segmentation efficiency of the colony region image is improved; on the other hand, the cascade segmentation network is not affected by manual intervention, so that the reliability of the colony region image is improved.
[0063] The device running the client is referred to as a client device for short.
[0064] The device running the server is referred to as a server device for short.
[0065] The client device includes but is not limited to a smart phone, a personal computer, a vehicle Internet terminal, a tablet computer and a portable wearable device.
[0066] The server device can be implemented by an independent server or a server cluster composed of multiple servers. The application will be described in detail through specific embodiments.
[0067] Please refer to Figure 2 , Figure 2 A flowchart of a colony region image segmentation method provided by an embodiment of the application includes the following steps:
[0068] S21, obtaining an original image of colonies in a current petri dish taken by a camera;
[0069] The original image of the colonies in the current petri dish taken by the camera includes:
[0070] Connecting the camera, accessing the storage file of the camera;
[0071] In the storage file of the camera, the original image of the colonies in the current petri dish taken by the camera is read.
[0072] Wherein, through the camera shooting, the growth morphology, color change and distribution characteristics of the colony can be intuitively recorded and observed, which is crucial for microbiology research and quality control.
[0073] Wherein, before the camera shoots the original image of the colony in the current culture dish, the colony area image segmentation method comprises:
[0074] Obtaining a sample image of the colony in the preset culture dish shot by the camera;
[0075] Obtaining a predicted segmentation result image generated by the cascade segmentation network based on the sample image, and calculating the loss value between the predicted segmentation result image and the real segmentation result image through a loss function;
[0076] Adjusting the loss value through the first weight value and the second weight value to obtain the adjusted loss value;
[0077] When the adjusted loss value converges, saving the cascade segmentation network.
[0078] Wherein, adjusting the loss value through the first weight value and the second weight value to obtain the adjusted loss value comprises:
[0079] Obtaining foreground points and background points in the predicted image, selecting the weight value corresponding to the Euclidean distance of the foreground points to the segmentation edge as the first weight value, and selecting the weight value corresponding to the Euclidean distance of the background points to the segmentation edge as the second weight value;
[0080] Multiplying the loss value by the first weight value to obtain a first target value, multiplying the loss value by the second weight value to obtain a second target value, and adding the first target value and the second target value to obtain the adjusted loss value.
[0081] Wherein, the background points refer to the pixel points in the predicted image that are considered not to belong to the colony.
[0082] Wherein, the segmentation edge refers to the boundary between the colony and the background in the predicted image.
[0083] Wherein, the Euclidean distance, also known as the Euclidean distance, reflects the actual distance between two points in space, which is convenient for understanding and application.
[0084] S22, preprocessing the original image to obtain the processed original image;
[0085] Wherein, the preprocessing of the original image to obtain the processed original image comprises:
[0086] The original image is channel-separated to obtain a single-channel image, a preset square structural element 1 is used to perform bottom-hat transformation processing on the single-channel image to obtain a first result image, and a preset square structural element 2 is used to perform bottom-hat transformation processing on the single-channel image to obtain a second result image.
[0087] The first result image and the second result are respectively subjected to morphological processing, and a plurality of initial colony regions are selected;
[0088] The initial colony regions are subjected to parallel operation to synthesize a joint region, and the joint region is subjected to boundary operation to obtain a final target colony region, and the target colony region is labeled on the original image.
[0089] Among them, the original image labeled with the target colony region is the processed original image.
[0090] Among them, the preset square structural element 1 includes one of a 55x55 square structural element and a 155x155 square structural element.
[0091] Among them, the preset square structural element 2 includes one of a 55x55 square structural element and a 155x155 square structural element.
[0092] Among them, the size of the square structural element will affect the processing effect.
[0093] In the first top-hat transformation or bottom-hat transformation, a 55x55 square structural element is used to perform top-hat transformation on the original image. After the first top-hat transformation or bottom-hat transformation, if there are larger colonies that have not been processed, a 155x155 square structural element is used to perform top-hat transformation or bottom-hat transformation on the original image again.
[0094] Under the action of top-hat transformation or bottom-hat transformation, the contrast between the background and the colonies in the processed original image is significantly improved, the morphology and boundary of the colonies are more clear, and the problem of uneven illumination is also effectively improved, thereby reducing the interference of the background. Therefore, the processed original image is conducive to identifying and segmenting different colony region images.
[0095] S23, a preset rough semantic segmentation image and a preset background image are obtained, and the processed original image, the background image and the rough semantic segmentation image are input into a cascaded segmentation network;
[0096] Among them, the cascaded segmentation network can gradually refine the segmentation result. Each cascaded segmentation network further extracts features based on the previous network, thereby gradually optimizing the segmentation result. This gradual refinement process helps to capture the microstructure and details in the image and improves the accuracy of segmentation.
[0097] Optionally, the network model of the cascaded segmentation network adopts MobileNetV2, which is a lightweight convolutional neural network model.
[0098] S24, processing the original image, the background image and the rough semantic segmentation image through an initial segmentation network in the cascaded segmentation network to generate an initial segmentation result image;
[0099] The rough semantic segmentation image refers to a segmentation image obtained in an image semantic segmentation task due to limitations of algorithm performance, training data quality or model complexity, etc., and the segmentation result presents edge discontinuity, inaccurate class division or a large number of misclassified pixels. The rough semantic segmentation image can provide approximate distribution information about main objects or regions in the image, and using the rough semantic segmentation image is beneficial to reducing the calculation amount and improving the processing speed.
[0100] The cascaded segmentation network includes an initial segmentation network and a target segmentation network.
[0101] The initial segmentation network processes the original image, the background image and the rough semantic segmentation image to generate an initial segmentation result image, including:
[0102] The feature vectors of the original image, the background image and the rough semantic segmentation image are spliced to obtain an initial feature vector;
[0103] The initial segmentation network processes the initial feature vector to generate an initial segmentation result image.
[0104] The initial segmentation result image shows the preliminary division of different regions in the original image.
[0105] S25, inputting the processed original image, the background image and the initial segmentation result image into the target segmentation network, the target segmentation network being a next segmentation network of the initial segmentation network;
[0106] The next segmentation network can further extract features in the processed original image on the basis of the initial segmentation network. By gradually refining these features, the next segmentation network can generate more accurate and detailed segmentation results, thereby improving the accuracy of the overall segmentation.
[0107] S26, processing the processed original image, the background image and the initial segmentation result image through the target segmentation network to generate a target segmentation result image, segmenting an image region where the colonies are located from the processed original image according to the target segmentation result image, and selecting the image region where the colonies are located as a colony region image.
[0108] Wherein, since the target segmentation result image provides the boundary and shape information of each colony, the image region where the colonies are located can be segmented from the processed original image according to the target segmentation result image, and the image region where the colonies are located is selected as a colony region image.
[0109] Wherein, different colonies have different morphologies, colors and growth characteristics. By determining the different colony region images in the processed original image, these characteristics can be observed and analyzed in more detail, thereby facilitating the classification and identification of the colonies.
[0110] For ease of illustration, the following examples are given:
[0111] For example: the original image has colony 1, colony 2, and colony 3;
[0112] The target segmentation result image provides the boundary of colony 1, the boundary of colony 2, and the boundary of colony 3;
[0113] The image region where colony 1 is located is segmented from the processed original image, and the image region where colony 1 is located is selected as colony region image 1;
[0114] The image region where colony 2 is located is segmented from the processed original image, and the image region where colony 2 is located is selected as colony region image 2;
[0115] The image region where colony 3 is located is segmented from the processed original image, and the image region where colony 3 is located is selected as colony region image 3.
[0116] Wherein, colony 1, colony 2 and colony 3 have different morphologies, colors and growth characteristics. By determining the colony region image 1, the colony region image 2 and the colony region image 3 in the processed original image, the characteristics of colony 1, colony 2 and colony 3 can be observed and analyzed in more detail, thereby facilitating the classification and identification of colony 1, colony 2 and colony 3.
[0117] For ease of illustration, reference is made to Figure 8 , Figure 8 is an example provided by an embodiment of the present application.
[0118] From Figure 8It can be seen that the example diagram shows the image effect of the target segmentation result diagram. The target segmentation result diagram provides boundary and shape information of each colony.
[0119] The colony region image segmentation method comprises the following steps of:
[0120] Obtaining a pushing instruction, and executing the pushing instruction to push the colony region image to a target system.
[0121] In the embodiment of the present application, the beneficial effects are in two aspects. On the one hand, the target segmentation network is used to process the processed original image, the background image and the initial segmentation result image to generate a target segmentation result image, and the image region where the colony is located is segmented from the processed original image according to the target segmentation result image, and the image region where the colony is located is selected as the colony region image. Since manual segmentation is not required, the segmentation time of the colony region image is reduced, and the segmentation efficiency of the colony region image is improved. On the other hand, since the cascade segmentation network is not affected by manual intervention, the reliability of the colony region image is improved.
[0122] Please refer to Figure 3 , Figure 3 is Figure 2 a specific implementation process schematic diagram of step S23 in
[0123] S31, obtaining a model file, loading the cascade segmentation network in the model file to obtain a loading result;
[0124] S32, when the loading result is loading success, obtaining a preset rough semantic segmentation image and a preset background image, and inputting the processed original image, the background image and the rough semantic segmentation image into the cascade segmentation network.
[0125] In the embodiment of the present application, the processed original image, the background image and the rough semantic segmentation image are input into the cascade segmentation network, and the image segmentation is performed by the cascade segmentation network, which can significantly improve the accuracy and efficiency of the processed original image.
[0126] Please refer to Figure 4 , Figure 4 is Figure 2 a specific implementation process schematic diagram of step S25 in
[0127] S41, in the cascade segmentation network, selecting a next segmentation network of the initial segmentation network as a target segmentation network;
[0128] S42, obtaining an input instruction, executing the input instruction, and inputting the processed original image, the background image, and the initial segmentation result image into the target segmentation network.
[0129] In the embodiment of the present application, the processed original image, the background image, and the initial segmentation result image are input into the target segmentation network, and the initial segmentation result image is output as preliminary processing. The target segmentation network can provide valuable context information and approximate target contour, which is beneficial to the target segmentation network focusing on the image area where the colony is located faster, reducing unnecessary computing overhead, and improving segmentation efficiency.
[0130] Please refer to Figure 5 , Figure 5 is Figure 2 a specific implementation flowchart of step S26 in the embodiment, which is described in detail as follows:
[0131] S51, splicing the feature vector of the original image, the feature vector of the background image, and the feature vector of the initial segmentation result image to obtain a target feature vector, processing the target feature vector through the target segmentation network to generate a target segmentation result image;
[0132] S52, when the target segmentation network is the last segmentation network, segmenting the image area where the colony is located from the processed original image according to the target segmentation result image, and selecting the image area where the colony is located as a colony area image.
[0133] Obtaining the serial number of the target segmentation network, and when the serial number of the target segmentation network is the serial number of the last segmentation network, indicating that the target segmentation network is the last segmentation network.
[0134] In the embodiment of the present application, when the target segmentation network is the last segmentation network, the image area where the colony is located is segmented from the processed original image according to the target segmentation result image, and the image area where the colony is located is selected as a colony area image. Since manual segmentation is not required, the segmentation time of the colony area image is reduced, which is beneficial to improve the segmentation efficiency of the colony area image.
[0135] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of a colony area image segmentation device in an embodiment of the present application, as Figure 6As shown, the colony area image segmentation device comprises a first acquisition module 101, a processing module 102, a second acquisition module 103, a generation module 104, an input module 105, and a segmentation module 106. The detailed description of each functional module is as follows:
[0136] The first acquisition module 101 is configured to acquire an original image obtained by a camera shooting a colony in a current culture dish.
[0137] The processing module 102 is configured to pre-process the original image to obtain a processed original image.
[0138] The second acquisition module 103 is configured to acquire a preset rough semantic segmentation image and a preset background image, and input the processed original image, the background image, and the rough semantic segmentation image into a cascaded segmentation network.
[0139] The generation module 104 is configured to process the original image, the background image, and the rough semantic segmentation image through an initial segmentation network in the cascaded segmentation network to generate an initial segmentation result image.
[0140] The input module 105 is configured to input the processed original image, the background image, and the initial segmentation result image into a target segmentation network, which is a next segmentation network of the initial segmentation network.
[0141] The segmentation module 106 is configured to process the processed original image, the background image, and the initial segmentation result image through the target segmentation network to generate a target segmentation result image, segment an image area where the colony is located from the processed original image according to the target segmentation result image, and select the image area where the colony is located as a colony area image.
[0142] In the embodiment of the present application, the beneficial effects are in two aspects. On the one hand, the processed original image, the background image, and the initial segmentation result image are processed through the target segmentation network to generate a target segmentation result image, the image area where the colony is located is segmented from the processed original image according to the target segmentation result image, and the image area where the colony is located is selected as a colony area image. Since manual segmentation is not required, the segmentation time of the colony area image is reduced, and the segmentation efficiency of the colony area image is improved. On the other hand, since the cascaded segmentation network is not affected by manual intervention, the reliability of the colony area image is improved.
[0143] The specific limitations of the colony area image segmentation device can be referred to the limitations of the colony area image segmentation method in the above, which will not be repeated here.
[0144] Each module in the colony area image segmentation device can be realized by software, hardware, and a combination thereof, in whole or in part. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.
[0145] Please refer to Figure 7 , Figure 7 is another structural schematic diagram of a computer device in an embodiment of the present application. In an embodiment, a computer device is provided, which is a server device or a client device, and an internal structure diagram of the computer device can be as shown in Figure 7 The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external database. The computer program, when executed by the processor, can implement functions or steps of a colony area image segmentation method based on a cascaded segmentation network.
[0146] In an embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0147] It should be noted that the functions or steps that can be achieved by the computer readable storage medium or the computer device described above can be referred to the related description of the method embodiments, and will not be described again here to avoid repetition.
[0148] The processor described above can be a general processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc. It can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0149] The above description and drawings are illustrative of embodiments of the present disclosure and are not intended to be limiting. Other embodiments can include structural, logical, electrical, process, and other changes. Embodiments are merely representative of possible variations. Individual components and functions are optional and the order of operations can vary. Portions and sub-combinations of some embodiments can be included or replaced in or by other embodiments. Also, the phraseology and terminology used herein is for the purpose of description and should not be regarded as limiting. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and / or" as used herein refers to any and all possible combinations of one or more of the associated listed items. Additionally, as used in this application, the term "comprises" and variations thereof do not intend to preclude the presence or addition of one or more other items to those stated in the compositions, integers, steps, operations, elements, and / or components. Without more limitations, an element defined by the phrase "comprises a..." does not exclude the presence of additional identical elements in the process, method, or apparatus including the element. In this document, each embodiment focuses on the differences from other embodiments, and the same or similar parts between embodiments can be referred to each other. For the method, product, etc. disclosed by the embodiments, if it corresponds to the method part disclosed by the embodiments, the relevant part can be referred to the description of the method part.
[0150] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present disclosure. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0151] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A colony region image segmentation method based on a cascade segmentation network, characterized in that: include: Get the original image of the bacterial colony in the current culture dish captured by the camera; Perform channel separation on the original image to obtain a single-channel image, perform bottom-hat transformation on the single-channel image using a preset square structuring element 1 to obtain a first result image, perform bottom-hat transformation on the single-channel image using a preset square structuring element 2 to obtain a second result image, perform morphological processing on the first result image and the second result image respectively, select multiple initial colony regions, perform a union operation on the initial colony regions to synthesize a joint region, perform a boundary operation on the joint region to obtain a final target colony region, and mark the target colony region on the original image; Obtaining a preset coarse semantic segmentation map and a preset background map, and inputting the processed original image, the background map, and the coarse semantic segmentation map into a cascade segmentation network; The feature vector of the original image, the feature vector of the background image, and the feature vector of the rough semantic segmentation image are concatenated to obtain an initial feature vector, and the initial feature vector is processed by an initial segmentation network to generate an initial segmentation result image; Inputting the processed original image, the background image and the initial segmentation result image into a target segmentation network, wherein the target segmentation network is a next segmentation network of the initial segmentation network; The feature vector of the original image, the feature vector of the background image and the feature vector of the initial segmentation result image are spliced to obtain a target feature vector. The target feature vector is processed by the target segmentation network to generate a target segmentation result image. When the target segmentation network is the last segmentation network, the image area where the colony is located is segmented from the processed original image according to the target segmentation result image, and the image area where the colony is located is selected as the colony area image.
2. The colony region image segmentation method according to claim 1, characterized in that: The step of obtaining a preset coarse semantic segmentation map and a preset background map, and inputting the processed original image, the background map, and the coarse semantic segmentation map into a cascade segmentation network comprises: Obtaining a model file, loading the cascade segmentation network in the model file, and obtaining a loading result; When the loading result is successful, a preset coarse semantic segmentation map and a preset background map are obtained, and the processed original image, the background map and the coarse semantic segmentation map are input into a cascade segmentation network.
3. The colony region image segmentation method according to claim 1, characterized in that: The step of inputting the processed original image, the background image, and the initial segmentation result image into the target segmentation network comprises: In the cascade segmentation network, selecting the next segmentation network of the initial segmentation network as the target segmentation network; An input instruction is obtained, the input instruction is executed, and the processed original image, the background image, and the initial segmentation result image are input into a target segmentation network.
4. The colony region image segmentation method according to claim 1, characterized in that: After the target segmentation network is used to process the processed original image, the background image, and the initial segmentation result image to generate a target segmentation result image, the image region where the colony is located is segmented from the processed original image based on the target segmentation result image, and the image region where the colony is located is selected as the colony region image, the colony region image segmentation method includes: A push instruction is obtained, the push instruction is executed, and the colony area image is pushed to a target system.
5. The colony region image segmentation method according to claim 1, characterized in that: Before the camera is used to capture the original image of the colonies in the current culture dish, the colony region image segmentation method includes: Obtain a sample image obtained by photographing a colony in a preset culture dish with a camera; Obtain the predicted segmentation result map generated by the cascade segmentation network based on the sample image, and calculate the loss value between the predicted segmentation result map and the true segmentation result map through the loss function; Adjusting the loss value by using the first weight value and the second weight value to obtain the adjusted loss value; When the adjusted loss value converges, the cascade segmentation network is saved.
6. A colony region image segmentation device based on a cascade segmentation network, characterized in that: include: The first acquisition module is used to obtain the original image of the bacterial colonies in the current culture dish captured by the camera; a processing module for performing channel separation on the original image to obtain a single-channel image, performing a bottom-hat transformation on the single-channel image using a preset square structuring element 1 to obtain a first result image, performing a bottom-hat transformation on the single-channel image using a preset square structuring element 2 to obtain a second result image, performing morphological processing on the first result image and the second result image, selecting multiple initial colony regions, performing a union operation on the initial colony regions to synthesize a joint region, performing a boundary operation on the joint region to obtain a final target colony region, and marking the target colony region on the original image; A second acquisition module is used to obtain a preset coarse semantic segmentation map and a preset background map, and input the processed original image, the background map and the coarse semantic segmentation map into a cascade segmentation network; A generation module is used to splice the feature vector of the original image, the feature vector of the background image, and the feature vector of the rough semantic segmentation map to obtain an initial feature vector, and process the initial feature vector through an initial segmentation network to generate an initial segmentation result map; An input module, configured to input the processed original image, the background image, and the initial segmentation result image into a target segmentation network, where the target segmentation network is a next segmentation network of the initial segmentation network; A segmentation module is used to splice the feature vector of the original image, the feature vector of the background image and the feature vector of the initial segmentation result image to obtain a target feature vector, process the target feature vector through the target segmentation network to generate a target segmentation result image, and when the target segmentation network is the last segmentation network, segment the image area where the colony is located from the processed original image according to the target segmentation result image, and select the image area where the colony is located as the colony area image.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the colony area image segmentation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Optic disc segmentation method with combination of fundus image edge information and brightness information
CN106530316A
Bacterial colony segmentation counting method and system based on deep convolutional neural network
CN114202547A