Culture dish colony identification method, device, equipment and storage medium
The Petri dish images were preprocessed through Hough circle detection and line segment detection methods, and combined with the neural network model, the problem of low colony recognition efficiency and accuracy was solved, and more accurate colony recognition was achieved.
Patent Information
- Application Number
- CN202411276538.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-12
AI Technical Summary
In the prior art, colony recognition efficiency and low accuracy are inefficient, especially for beginners, it is difficult to accurately identify the colony morphology in the Petri dish.
The Hough circle detection method and line segment detection method are used to filter edges and line segments to detect the Petri dish images to generate identification images, and the pre-trained neural network model is used for colony recognition to enhance the colony position and morphological characteristics.
The efficiency and accuracy of colony recognition are improved, so that the petri dish colony recognition model can more accurately identify the location and morphology of the colony.
Smart Images

Figure CN118781595B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a culture dish colony recognition method, device, equipment and storage medium. Background Art
[0002] Colony identification is a basic and important task for food, biological, medical and scientific research institutions to carry out the required colony culture. In the biological field, for example, the transplantation and cultivation of new colonies, as well as the selection of independent or large individual colonies, is an indispensable basic work.
[0003] In the related art, colony identification is performed by staff, who need to have sufficient professional knowledge of colony morphology, which is difficult for beginners and has the defects of low identification efficiency and low identification accuracy. Summary of the invention
[0004] The purpose of this application is to provide a culture dish colony identification method, device, equipment and storage medium, aiming to improve the recognition efficiency and recognition accuracy of culture dish colony identification.
[0005] The present application embodiment provides a culture dish colony identification method, comprising:
[0006] Acquire a culture dish image to be identified;
[0007] Using a Hough circle detection method, identifying a target area in the culture dish image and performing edge filtering on the target area in the culture dish image to obtain an edge filtered image;
[0008] When the culture dish in the culture dish image is a lined culture dish, a line segment detection method is used to perform line segment detection processing on the target area in the edge filtering image and line segment identification processing on the line segment detection processing result to obtain an identification image;
[0009] The identification image is input into the culture dish colony recognition model, and the identification image is processed for colony recognition to obtain a colony recognition result; the culture dish colony recognition model is obtained by training a preset neural network model using a sample image, and the sample image is a sample culture dish image obtained by identification processing based on colony morphology.
[0010] In some embodiments, the Hough circle detection method is used to identify the target area in the culture dish image and edge filtering is performed on the target area in the culture dish image to obtain an edge filtered image, including:
[0011] Performing edge detection processing on the culture dish image to obtain a first edge detection point; the first edge detection point is a pixel point in the culture dish image that potentially constitutes an edge of the culture dish;
[0012] Mapping the first edge detection point to a parameter space to obtain a corresponding mapping representation;
[0013] According to the mapping representation, a cumulative voting method is used to perform a circle center search process on each of the first edge detection points to obtain a circle center search result;
[0014] According to the circle center search result, a target area in the culture dish image is determined, and areas other than the target area in the culture dish image are filtered out to obtain the edge filtered image.
[0015] In some embodiments, performing edge detection processing on the culture dish image to obtain a first edge detection point includes:
[0016] Performing grayscale processing on the culture dish image to obtain a first grayscale image;
[0017] Using a Gaussian smoothing method, denoising the first grayscale image to obtain a denoised image;
[0018] Determining the regional size information of the culture dish according to the denoised image;
[0019] According to the area size information of the culture dish, setting the edge detection threshold parameter;
[0020] According to the edge detection threshold parameter, edge detection processing is performed on the denoised image to detect the first edge detection point.
[0021] In some embodiments, the line segment detection method is used to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain the identification image, including:
[0022] Performing edge detection processing on the edge filtered image to obtain a second edge detection point; the second edge detection point is a pixel point constituting a bacterial colony edge in the edge filtered image;
[0023] In the gradient direction of the second edge detection point, performing line segment fitting and matching processing on each of the second edge detection points to obtain a plurality of target line segments;
[0024] According to the length of the target line segment, a mark of a corresponding size is generated on the target line segment.
[0025] In some embodiments, the line segment fitting and matching process is performed on each of the second edge detection points in the gradient direction of the second edge detection points to obtain a plurality of target line segments, including:
[0026] Preprocessing the edge filtered image to obtain a preprocessed image;
[0027] Performing region division processing on the pre-processed image to obtain a plurality of image division regions;
[0028] The second edge detection points are traversed in the image division area, and in the gradient direction of one of the second edge detection points, another second edge detection point that can form a straight line with the second edge detection point is searched to fit the target line segment, and other second edge detection points that fall within the target line segment are eliminated until all the image division areas are traversed.
[0029] In some embodiments, generating a mark of a corresponding size on the target line segment according to the length of the target line segment includes:
[0030] Calculating the midpoint and length of the target line segment according to the position information of the second edge detection point;
[0031] The circular marker having a radius positively correlated with the length of the target line segment is generated on the target line segment with the midpoint of the target line segment as the center of the circle.
[0032] In some embodiments, the sample image identification processing method includes:
[0033] Performing grayscale processing on the sample culture dish image to obtain a second grayscale image;
[0034] performing image segmentation processing on the second grayscale image to obtain a plurality of segmented images;
[0035] A preset identification component is called to perform colony morphology identification processing on the segmented image according to the colony morphology in the segmented image to obtain the sample image.
[0036] The present application also provides a culture dish colony identification device, comprising:
[0037] The first module is used to obtain the culture dish image to be identified;
[0038] The second module is used to use the Hough circle detection method to identify the target area in the culture dish image and perform edge filtering on the target area in the culture dish image to obtain an edge filtered image;
[0039] A third module is used for, when the culture dish in the culture dish image is a lined culture dish, using a line segment detection method to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain an identification image;
[0040] The fourth module is used to input the identification image into the culture dish colony recognition model, perform colony recognition processing on the identification image, and obtain a colony recognition result; the culture dish colony recognition model is obtained by training a preset neural network model using a sample image, and the sample image is a sample culture dish image obtained by identification processing based on colony morphology.
[0041] An embodiment of the present application further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned culture dish colony identification method when executing the computer program.
[0042] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned culture dish colony identification method is implemented.
[0043] The beneficial effects of the present application are as follows: the target area in the culture dish image is identified by the Hough circle detection method and the edge filtering process is performed on the target area in the culture dish image to obtain the edge filtering image of the area outside the filtered culture dish; when the culture dish in the culture dish image is a lined culture dish, the line segment detection method is used to perform line segment detection process on the target area in the edge filtering image and line segment identification process on the line segment detection process result to obtain an identification image that identifies the colony outline and the local area of the colony in the culture dish; the edge filtering image or the identification image is subjected to colony identification process by using the pre-trained culture dish colony recognition model to obtain the colony identification result. Since the culture dish colony recognition model is used to perform colony identification process, before the colony identification process is performed, the original culture dish image is processed by the Hough circle detection method or the Hough circle detection method and the line segment detection method are processed successively to filter out the invalid area in the image, and strengthen the positional features and morphological features of the colonies in the culture dish, so that the culture dish colony recognition model can more easily identify the position and morphology of the colonies in the culture dish, realize more accurate colony identification process, and improve the recognition efficiency and recognition accuracy of culture dish colony recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of the culture dish colony identification method provided in the embodiment of the present application.
[0045] Figure 2 It is a flowchart of the specific method of step S102 provided in an embodiment of the present application.
[0046] Figure 3 It is a flowchart of the specific method of step S103 provided in an embodiment of the present application.
[0047] Figure 4 It is a schematic diagram of the structure of the culture dish colony identification device provided in the embodiment of the present application.
[0048] Figure 5 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application.
[0049] Figure 6 It is a partial schematic diagram of the logo image provided in the embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown can be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second" and the like in the specification, claims and drawings are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0053] See also Figure 1 , Figure 1 : is a flow chart of the culture dish colony identification method provided in the embodiments of the present application. In some embodiments of the present application, Figure 1 The method may specifically include but is not limited to steps S101 to S104. Figure 1 These four steps are introduced in detail.
[0054] Step S101, obtaining a culture dish image to be identified.
[0055] In step S101, an image of a culture dish to be identified is obtained by photographing the culture dish to be identified so that the colonies in the culture dish fall clearly into the image frame, thereby obtaining the image of the culture dish to be identified. The culture dish to be identified is photographed by using an image acquisition device to photograph the bottom direction of the culture dish to be identified.
[0056] Step S102: using the Hough circle detection method to identify the target area in the culture dish image and performing edge filtering processing on the target area in the culture dish image to obtain an edge filtered image.
[0057] In step S102, a target area in the culture dish image is identified and edge filtering is performed on the target area in the culture dish image. Specifically, circle detection is performed on the culture dish image based on the Hough circle detection principle to identify the outline of the culture dish in the culture dish image. The range within the outline of the culture dish in the culture dish image is the target area. After determining the target area in the culture dish image, filtering is performed on invalid areas outside the edge of the target area to obtain an edge filtered image.
[0058] It should be noted that when performing circle detection on the culture dish image based on the Hough circle detection principle, firstly, the corresponding edge detection threshold parameter is set according to the size parameter of the culture dish in the culture dish image, and then the circle detection is performed on the culture dish image according to the edge detection threshold parameter to ensure that the outline of the culture dish can be accurately identified and prevent the circular colonies in the culture dish from being identified.
[0059] Step S103, when the culture dish in the culture dish image is a lined culture dish, a line segment detection method is used to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain an identification image.
[0060] Before step S103, the culture dish may be roughly identified by image recognition technology or manual recognition to determine the type of the culture dish in the culture dish image, wherein the types of culture dishes include streaked culture dishes and single-bacteria culture dishes.
[0061] In step S103, when the culture dish in the culture dish image is a lined culture dish, line segment detection processing is performed on the target area in the edge filtered image, and line segment identification processing is performed on the line segment detection processing result. Specifically, based on the line segment detection principle, line segment detection is performed within the range of the target area in the edge filtered image to identify the outline of the colony formed by marking in the culture dish, and the identified outline is marked by fitting line segments. After traversing the target area in the edge filtered image, each fitted line segment is identified to obtain an identified image.
[0062] It can be understood that based on the principle of line segment detection, marking the colony contour with line segments can improve the identification effect of the colony contour, and marking processing on the line segments can improve the identification effect of the local area of the colony, which can make it easier for the culture dish colony recognition model to identify the position of the colony in the image.
[0063] Step S104, inputting the identification image into the culture dish colony recognition model, performing colony recognition processing on the identification image, and obtaining a colony recognition result.
[0064] In step S104, when the culture dish in the culture dish image is a ruled culture dish, the identification image obtained by line segment identification processing is input into the pre-trained culture dish colony recognition model; when the culture dish in the culture dish image is a single-bacteria culture dish, the edge filtered image obtained by edge filtering processing is input into the pre-trained culture dish colony recognition model, and the edge filtered image or the identification image is used to extract colony morphological features, and the colony morphological information and colony position information corresponding to the colony are output as the colony recognition result, or the extracted colony morphological features are classified, and the probability that the colonies in each area of the culture dish belong to the corresponding colony type is calculated according to the classification result, and the colony type information with the highest probability and the colony position information corresponding to the colony are output as the colony recognition result.
[0065] Output the colony morphology information and colony location information corresponding to the colony as the colony recognition result, which can be performed by using the culture dish colony recognition model to extract colony morphology features and colony location features from the edge filter image or the identification image, converting the extracted colony morphology features and colony location features into corresponding colony morphology information and colony location information, outputting the colony morphology information and colony location information as the colony recognition result, and the user can find the colony through the bacteria picker according to the colony recognition result, thereby identifying the type of the colony. Output the colony type information and colony location information corresponding to the colony, as the colony recognition result, which can be performed by using the culture dish colony recognition model to extract colony morphology features and colony location features from the edge filter image or the identification image, classifying the extracted colony morphology features, calculating the probability that the colonies in each area of the culture dish belong to the corresponding colony type according to the classification result, outputting the colony type information (such as the genus name of the colony) with the highest probability and the colony location information corresponding to the colony, as the colony recognition result, the user can directly determine the type of the colony according to the colony recognition result.
[0066] Among them, the culture dish colony recognition model is obtained by training a preset neural network model using sample images, and the sample images are sample culture dish images obtained by marking the colony morphology.
[0067] In a specific embodiment, the culture dish colony recognition model can be obtained by training a neural network model including a YOLO network (You Only Look Once) using sample images.
[0068] In steps S101 to S104 of the embodiment of the present application, a Hough circle detection method is used to identify the target area in the culture dish image and edge filtering is performed on the target area in the culture dish image to obtain an edge filtered image of the area outside the filtered culture dish. When the culture dish in the culture dish image is a ruled culture dish, a line segment detection method is used to perform line segment detection on the target area in the edge filtered image and line segment identification on the line segment detection result to obtain an identification image that identifies the colony outline and the local area of the colony in the culture dish. A pre-trained culture dish colony recognition model is used to perform colony recognition processing on the edge filtered image or the identification image to obtain a colony recognition result. Since the culture dish colony recognition model is used for colony recognition processing, before the colony recognition processing is performed, the original culture dish image is processed by the Hough circle detection method or is processed by the Hough circle detection method and the line segment detection method in sequence, the invalid area in the image is filtered out, and the position characteristics and morphological characteristics of the colonies in the culture dish are enhanced, so that the culture dish colony recognition model can more easily identify the position and morphology of the colonies in the culture dish, achieve more accurate colony recognition processing, and improve the recognition efficiency and recognition accuracy of the culture dish colony recognition.
[0069] See also Figure 2 In a specific embodiment, step S102 may specifically include but is not limited to steps S201 to S204. Figure 2 These four steps are introduced in detail.
[0070] Step S201, performing edge detection processing on the culture dish image to obtain a first edge detection point.
[0071] The first edge detection point is a pixel point in the culture dish image that potentially constitutes the edge of the culture dish.
[0072] In step S201, edge detection processing is performed on the culture dish image, which may be to use the Canny edge detection method to perform edge detection on the culture dish image for the edge of the culture dish to detect the pixel points that potentially constitute the edge of the culture dish, that is, the first edge detection point, record the position information of the first edge detection point in the culture dish image, and mark the first edge detection point.
[0073] In a specific embodiment, step S201 specifically includes the following steps: gray-scaling the culture dish image to obtain a first gray-scale image; denoising the first gray-scale image using a Gaussian smoothing method to obtain a denoised image; determining the area size information of the culture dish based on the denoised image; setting an edge detection threshold parameter based on the area size information of the culture dish; and performing edge detection on the denoised image based on the edge detection threshold parameter to detect a first edge detection point.
[0074] Specifically, the culture dish image is successively subjected to grayscale processing and denoising processing to remove noise information in the culture dish image to obtain a denoised image, and the outline of the culture dish in the denoised image is printed, and the printed outline of the culture dish is input into a preset edge detection function to perform edge detection on the area where the culture dish is located to determine the area size information of the culture dish, and then the area size information of the culture dish is reduced, and the area size information of the culture dish after the reduction is set as an edge detection threshold parameter (for example, reduced by 100 times), and then the denoised image is subjected to edge detection processing on the culture dish with the edge detection threshold parameter as a limit, and a first edge detection point that potentially constitutes a circular edge of the culture dish in the area where the culture dish is located is detected, and the position information of the first edge detection point in the culture dish image is recorded, and the first edge detection point is marked.
[0075] It can be understood that the edge detection threshold parameter is used as one of the boundaries of edge detection, and the regional size information of the culture dish is used as another boundary. When the denoised image is subjected to edge detection processing for the culture dish, the circular edges within the size range between the two boundaries are eliminated to avoid identifying the circle formed by the colonies in the culture dish, thereby improving the accuracy of edge detection.
[0076] Step S202: Map the first edge detection point to the parameter space to obtain a corresponding mapping representation.
[0077] In step S202, the first edge detection point is mapped to the parameter space, which may be based on the position information of the first edge detection point in the first edge detection image, and the first edge detection point is mapped to the parameter space for representation, so as to obtain a mapping representation of the first edge detection point. The parameter space is defined based on the image size information of the first edge detection image and the size information of the culture dish, and there is a position mapping relationship between the parameter space and the first edge detection image, and the mapping representation is the mapping result of the position information of the first edge detection point in the first edge detection image.
[0078] Step S203: According to the mapping representation, a cumulative voting method is used to perform a circle center search process on each first edge detection point to obtain a circle center search result.
[0079] In step S203, a cumulative voting method is used to perform a circle center search process on each first edge detection point, which may be to calculate the circle and radius corresponding to each first edge detection point to obtain multiple candidate circle centers, and to use a preset accumulator array to accumulate the number of occurrences of each candidate circle center, and after traversing all first edge detection points, the candidate circle center with the largest number of occurrences is determined as the circle center of the culture dish to obtain a circle center search result. The size of the accumulator array matches the parameter space, and the initial value is zero.
[0080] Step S204, determining the target area in the culture dish image according to the circle center search result, filtering out the area other than the target area in the culture dish image, and obtaining an edge filtered image.
[0081] In step S204, after determining the center of the culture dish, the first edge detection points are screened to determine the pixel points constituting the edge of the culture dish, and the first edge detection points that do not belong to the pixel points constituting the edge of the culture dish are eliminated, thereby determining the target area in the culture dish image, and filtering out areas outside the target area in the culture dish image to obtain an edge filtered image.
[0082] See also Figure 3 In a specific embodiment, step S103 may specifically include but is not limited to steps S301 to S303. Figure 3 These three steps are introduced in detail.
[0083] Step S301, performing edge detection processing on the edge filtered image to obtain a second edge detection point.
[0084] The second edge detection point is a pixel point constituting the edge of the colony in the edge filtering image.
[0085] In step S301, edge detection processing is performed on the edge filtered image, which may be to use the Canny edge detection method to perform edge detection on the edge filtered image for the edge of the colony to detect the pixel points that constitute the edge of the colony, that is, the second edge detection point, record the position information of the second edge detection point in the edge filtered image, and mark the second edge detection point.
[0086] Step S302 , performing line segment fitting and matching processing on each second edge detection point in the gradient direction of the second edge detection point to obtain a plurality of target line segments.
[0087] In step S302, a line segment fitting and matching process is performed on each second edge detection point, which may be to determine the gradient direction of each second edge detection point, propose a current second edge detection point as one of the endpoints of the target line segment, and search for the other endpoint of the corresponding target line segment along the gradient direction of the second edge detection point. If found, the two second edge detection points are fit-matched to obtain a target line segment. If not found, the next second edge detection point is searched until all the second edge detection points are traversed to obtain a number of target line segments.
[0088] It can be understood that the target line segment is used to identify the local edge contour of the colony. After traversing each second edge detection point, multiple groups of target line segments are obtained, which can roughly identify the edge contour of the colony in the culture dish to improve the accuracy of contour recognition.
[0089] In a specific embodiment, step S302 specifically includes the following steps: preprocessing the edge filtered image to obtain a preprocessed image; performing region division processing on the preprocessed image to obtain multiple image division regions; traversing each second edge detection point in the image division region, and searching for another second edge detection point that can form a straight line with the second edge detection point in the gradient direction of one of the second edge detection points to fit the target line segment, and eliminating other second edge detection points that fall within the target line segment range until all image division regions are traversed.
[0090] Specifically, firstly, the edge-filtered image is subjected to grayscale processing, denoising processing, and binarization processing based on a preset adaptive threshold function in sequence to obtain a preprocessed image, and then the preprocessed image is divided into a plurality of image division regions (the size of the image division region is usually 4 pixels×4 pixels), a histogram is constructed in each image division region to record the gradient direction and amplitude of each second edge detection point in the image division region, each second edge detection point is traversed in each image division region, and another second edge detection point that can form a straight line with the current second edge detection point in the gradient direction of the current second edge detection point is searched to fit a target line segment, and each time the target line segment is fitted, the shortest distance between the second edge detection point that is not searched and the target line segment is calculated, if the shortest distance is less than a preset distance threshold, it is considered that the second edge detection point that is not searched falls on the target line segment, otherwise, it is considered that the second edge detection point that is not searched does not fall on the target line segment, and for the second edge detection point that falls on the target line segment, the second edge detection point search is no longer performed in terms of its gradient direction until each image division region is traversed to obtain a plurality of target line segments.
[0091] Step S303: generating a mark of a corresponding size on the target line segment according to the length of the target line segment.
[0092] In step S303, a corresponding marker is inserted into each target line segment, and the size of the marker is positively correlated with the length of the target line segment, that is, the longer the length of the target line segment, the larger the size of the marker, and the shorter the length of the target line segment, the smaller the size of the marker.
[0093] In a specific embodiment, step S303 specifically includes the following steps: calculating the midpoint and length of the target line segment based on the position information of the second edge detection point; generating a circular mark on the target line segment with the midpoint of the target line segment as the center of the circle and the radius of the circle being positively correlated with the length of the target line segment.
[0094] Specifically, the position information of the second edge detection point constituting the target line segment is used to calculate the midpoint and length of the target line segment, and a circular marker of a corresponding size is generated according to the length of the target line segment. The marker is inserted into the target line segment so that the center of the marker coincides with the midpoint of the target line segment. Figure 6 shown.
[0095] It can be understood that, by inserting a marker whose size is positively correlated with the length of the target line segment on the target line segment, the length information of the target line segment can be identified, thereby further improving the accuracy of contour recognition.
[0096] In a specific embodiment, the identification processing method of the sample image in step S104 specifically includes the following steps: graying the sample culture dish image to obtain a second grayscale image; performing image segmentation processing on the second grayscale image to obtain multiple segmented images; calling a preset identification component, and performing colony morphology identification processing on the segmented image according to the colony morphology in the segmented image to obtain a sample image.
[0097] See also Figure 4 The present application also provides a culture dish colony identification device, which can implement the above-mentioned culture dish colony identification method, and the device includes:
[0098] The first module 401 is used to obtain a culture dish image to be identified;
[0099] The second module 402 is used to use the Hough circle detection method to identify the target area in the culture dish image and perform edge filtering on the target area in the culture dish image to obtain an edge filtered image;
[0100] The third module 403 is used to use a line segment detection method to perform line segment detection processing on the target area in the edge filtering image and line segment identification processing on the line segment detection processing result to obtain an identification image when the culture dish in the culture dish image is a lined culture dish;
[0101] The fourth module 404 is used to input the identification image into the culture dish colony recognition model, perform colony recognition processing on the identification image, and obtain the colony recognition result; the culture dish colony recognition model is obtained by training a preset neural network model using a sample image, and the sample image is a sample culture dish image obtained by identification processing based on the colony morphology.
[0102] The specific implementation of the culture dish colony identification device is basically the same as the specific embodiment of the above-mentioned culture dish colony identification method, and will not be repeated here.
[0103] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment.
[0104] Refer to the following Figure 5 The electronic device 500 according to this embodiment of the present disclosure is described. Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0105] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), a display unit 540, etc.
[0106] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present disclosure described in the above culture dish colony identification method section of this specification.
[0107] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .
[0108] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0109] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0110] The electronic device 500 may also communicate with one or more external devices 500' (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0111] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned culture dish colony identification method is implemented.
[0112] The culture dish colony recognition method, device, equipment and storage medium provided in the embodiments of the present application use a Hough circle detection method to identify the target area in the culture dish image and perform edge filtering processing on the target area in the culture dish image to obtain an edge filtered image of the area outside the filtered culture dish. When the culture dish in the culture dish image is a ruled culture dish, a line segment detection method is used to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain an identification image that identifies the colony outline and the local area of the colony in the culture dish. A pre-trained culture dish colony recognition model is used to perform colony recognition processing on the edge filtered image or the identification image to obtain a colony recognition result. Since the culture dish colony recognition model is used for colony recognition processing, before the colony recognition processing is performed, the original culture dish image is processed by the Hough circle detection method or is processed by the Hough circle detection method and the line segment detection method in sequence, the invalid area in the image is filtered out, and the position characteristics and morphological characteristics of the colonies in the culture dish are enhanced, so that the culture dish colony recognition model can more easily identify the position and morphology of the colonies in the culture dish, achieve more accurate colony recognition processing, and improve the recognition efficiency and recognition accuracy of the culture dish colony recognition.
[0113] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0114] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0115] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0116] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0117] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0118] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A method for identifying culture dish colonies, characterized in that: include: Acquire a culture dish image to be identified; Using a Hough circle detection method, identifying a target area in the culture dish image and performing edge filtering on the target area in the culture dish image to obtain an edge filtered image; When the culture dish in the culture dish image is a lined culture dish, a line segment detection method is used to perform line segment detection processing on the target area in the edge filtering image and line segment identification processing on the line segment detection processing result to obtain an identification image; The identification image is input into the culture dish colony recognition model, and the identification image is processed for colony recognition to obtain a colony recognition result; the culture dish colony recognition model is obtained by training a preset neural network model using a sample image, and the sample image is a sample culture dish image obtained by performing identification processing on the colony morphology; The method of using a line segment detection method to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain an identification image includes: Performing edge detection processing on the edge filtered image to obtain a second edge detection point; the second edge detection point is a pixel point constituting a bacterial colony edge in the edge filtered image; In the gradient direction of the second edge detection point, performing line segment fitting and matching processing on each of the second edge detection points to obtain a plurality of target line segments; Generating a mark of a corresponding size on the target line segment according to the length of the target line segment; The step of performing line segment fitting and matching processing on each of the second edge detection points in the gradient direction of the second edge detection points to obtain a plurality of target line segments includes: Preprocessing the edge filtered image to obtain a preprocessed image; Performing region division processing on the pre-processed image to obtain a plurality of image division regions; The second edge detection points are traversed in the image division area, and in the gradient direction of one of the second edge detection points, another second edge detection point that can form a straight line with the second edge detection point is searched to fit the target line segment, and other second edge detection points that fall within the target line segment are eliminated until all the image division areas are traversed.
2. The method for identifying culture dish colonies according to claim 1, characterized in that: The method of using the Hough circle detection method to identify the target area in the culture dish image and performing edge filtering processing on the target area in the culture dish image to obtain an edge filtered image includes: Performing edge detection processing on the culture dish image to obtain a first edge detection point; the first edge detection point is a pixel point in the culture dish image that potentially constitutes an edge of the culture dish; Mapping the first edge detection point to a parameter space to obtain a corresponding mapping representation; According to the mapping representation, a cumulative voting method is used to perform a circle center search process on each of the first edge detection points to obtain a circle center search result; According to the circle center search result, a target area in the culture dish image is determined, and areas other than the target area in the culture dish image are filtered out to obtain the edge filtered image.
3. The method for identifying culture dish colonies according to claim 2, characterized in that: The performing edge detection processing on the culture dish image to obtain a first edge detection point includes: Performing grayscale processing on the culture dish image to obtain a first grayscale image; Using a Gaussian smoothing method, denoising the first grayscale image to obtain a denoised image; Determining the regional size information of the culture dish according to the denoised image; According to the area size information of the culture dish, setting the edge detection threshold parameter; According to the edge detection threshold parameter, edge detection processing is performed on the denoised image to detect the first edge detection point.
4. The method for identifying culture dish colonies according to claim 1, characterized in that: Generating a mark of a corresponding size on the target line segment according to the length of the target line segment includes: Calculating the midpoint and length of the target line segment according to the position information of the second edge detection point; The circular marker having a radius positively correlated with the length of the target line segment is generated on the target line segment with the midpoint of the target line segment as the center of the circle.
5. The method for identifying culture dish colonies according to claim 1, characterized in that: The sample image identification processing method comprises: Performing grayscale processing on the sample culture dish image to obtain a second grayscale image; performing image segmentation processing on the second grayscale image to obtain a plurality of segmented images; A preset identification component is called to perform colony morphology identification processing on the segmented image according to the colony morphology in the segmented image to obtain the sample image.
6. A culture dish colony identification device, characterized in that: include: The first module is used to obtain the culture dish image to be identified; The second module is used to use the Hough circle detection method to identify the target area in the culture dish image and perform edge filtering on the target area in the culture dish image to obtain an edge filtered image; A third module is used for, when the culture dish in the culture dish image is a lined culture dish, using a line segment detection method to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain an identification image; The fourth module is used to input the identification image into the culture dish colony recognition model, perform colony recognition processing on the identification image, and obtain a colony recognition result; the culture dish colony recognition model is obtained by training a preset neural network model using a sample image, and the sample image is a sample culture dish image obtained by performing identification processing on the colony morphology; The method of using a line segment detection method to perform line segment detection processing on the target area in the edge filtered image and line segment identification processing on the line segment detection processing result to obtain an identification image includes: Performing edge detection processing on the edge filtered image to obtain a second edge detection point; the second edge detection point is a pixel point constituting a bacterial colony edge in the edge filtered image; In the gradient direction of the second edge detection point, performing line segment fitting and matching processing on each of the second edge detection points to obtain a plurality of target line segments; Generating a mark of a corresponding size on the target line segment according to the length of the target line segment; The step of performing line segment fitting and matching processing on each of the second edge detection points in the gradient direction of the second edge detection points to obtain a plurality of target line segments includes: Preprocessing the edge filtered image to obtain a preprocessed image; Performing region division processing on the pre-processed image to obtain a plurality of image division regions; The second edge detection points are traversed in the image division area, and in the gradient direction of one of the second edge detection points, another second edge detection point that can form a straight line with the second edge detection point is searched to fit the target line segment, and other second edge detection points that fall within the target line segment are eliminated until all the image division areas are traversed.
7. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the culture dish colony identification method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the culture dish colony identification method according to any one of claims 1 to 5 is implemented.
