Deep learning model-based bacterial colony image recognition method, device and equipment
Through the colony image recognition method based on deep learning model, automatic colony recognition and inoculation are achieved, solving the problems of complex manual operations and high time consumption in the microbial purification process, and improving experimental efficiency.
Patent Information
- Application Number
- CN202411842772.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, manual operation of plate marking is required during the microbial purification process, resulting in large time consumption and complex operation, which limits experimental efficiency and large-scale application.
The colony image recognition method based on the deep learning model is adopted. By obtaining the RGB images of the colonies in the Petri dish, greyscale processing and edge detection are performed, the center of mass position, area and external rectangular coordinates of the colony are extracted, the colony images are cropped, and the colony category is identified through the training model. When identified as the target category, the colony height is obtained and passed to the control system for automatic inoculation.
Automatic identification and inoculation of colonies is realized, the time of manual identification and inoculation operation is reduced, the experimental efficiency is improved, and the complexity of manual operation and physical exhaustion problems during microbial purification is solved.
Smart Images

Figure CN119810807A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and microbial separation, and in particular to a method, device and equipment for recognizing colony images based on a deep learning model. Background Art
[0002] Colonies are microbial aggregates visible to the naked eye formed by the growth and reproduction of single or multiple microbial cells on solid culture media. The formation of colonies allows microbiologists to intuitively observe the growth of microorganisms, including their morphology, color, size and other characteristics, which is of great significance for the classification, identification and research of microorganisms. The current colony inoculation process relies on manual operation, and manual plate streaking is a delicate and crucial microbiological technique. Users need to go through systematic learning and practice to master this technology to ensure that each plate streaking can achieve the expected microbial separation and purification effect. However, microbial purification often requires repeated plate streaking, which not only greatly occupies the user's precious time, but also increases the complexity and physical exertion of the operation. However, its time-consuming and labor-intensive characteristics limit the demand for large-scale or high-efficiency experiments and are not conducive to improving the inoculation efficiency. Therefore, how to identify the current colony and how to automatically inoculate the current colony is an urgent problem to be solved. Summary of the invention
[0003] The present invention provides a colony image recognition method, device, computer equipment and storage medium based on a deep learning model to solve the technical problems of how to identify the current colony and how to automatically inoculate the current colony.
[0004] In a first aspect, a method for bacterial colony image recognition based on a deep learning model is provided, comprising:
[0005] Acquire a current image, where the current image is an RGB image obtained by photographing a current bacterial colony in a current culture dish;
[0006] Performing grayscale processing on the current image to obtain a current grayscale image, and performing edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony;
[0007] In the closed area corresponding to the current colony, the centroid position and colony area of the current colony are obtained, the centroid position of the current colony is used as the center point position, a circumscribed rectangle corresponding to the current colony is drawn, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates;
[0008] According to the current coordinates, the image area where the current colony is located is cropped in the current grayscale image, and the image area where the current colony is located is selected as the current colony image;
[0009] Recognize the current colony image through the trained deep learning model to obtain the current colony category corresponding to the current colony image;
[0010] When the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system.
[0011] Further, the grayscale processing of the current image to obtain the current grayscale image, and the edge detection of the current grayscale image to obtain the closed area corresponding to the current bacterial colony include:
[0012] Reading a preset grayscale function, and performing grayscale processing on the current image using the grayscale function to obtain the processed current image;
[0013] The processed current image is selected as the current grayscale image, and edge detection is performed on the current grayscale image to obtain a closed area corresponding to the current colony.
[0014] Furthermore, in the closed area corresponding to the current colony, the centroid position and the colony area of the current colony are obtained, the centroid position of the current colony is used as the center point position, the circumscribed rectangle corresponding to the current colony is drawn, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates, including:
[0015] In the closed area corresponding to the current colony, the position of the centroid of the closed area is obtained, and the position of the centroid of the closed area is selected as the position of the centroid of the current colony;
[0016] The area of the closed area is obtained, and the area of the closed area is selected as the colony area of the current colony. The centroid position of the current colony is used as the center point position to draw the circumscribed rectangle corresponding to the current colony, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates.
[0017] Furthermore, the step of cropping the image region where the current colony is located in the current grayscale image by using the current coordinates, and selecting the image region where the current colony is located as the current colony image, includes:
[0018] According to the current coordinates, determining an image region where the current bacterial colony is located in the current grayscale image;
[0019] The image region where the current colony is located is cropped from the current grayscale image, and the image region where the current colony is located is selected as the current colony image.
[0020] Furthermore, the current colony image is identified by the trained deep learning model to obtain the current colony category corresponding to the current colony image, including:
[0021] Perform feature extraction on the current bacterial colony image through a feature extractor in a trained deep learning model to obtain a feature vector of the current bacterial colony image, and input the feature vector of the current bacterial colony image into a classifier in the trained deep learning model;
[0022] The feature vector of the current colony image is identified by the classifier in the trained deep learning model to obtain the current colony category corresponding to the current colony image.
[0023] Furthermore, when the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system, including:
[0024] When the current colony category is the target colony category, obtaining the distance from the probe to the current colony, and selecting the distance as the colony height;
[0025] The centroid position, the colony area, the current colony category and the colony height are packaged to generate a control message, which is transmitted to a preset control system, and an inoculation operation is performed on the current colony through the control system.
[0026] Furthermore, when the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and after the control system performs an inoculation operation on the current colony, the colony image recognition method includes:
[0027] The execution result returned by the control system is obtained, a storage area for the execution result is created, and the execution result is stored in the storage area.
[0028] Furthermore, after obtaining the execution result returned by the control system, creating a storage area for the execution result, and storing the execution result in the storage area, the colony image recognition method includes:
[0029] A display window is created, and the execution result is displayed in the display window.
[0030] In a second aspect, a bacterial colony image recognition device based on a deep learning model is provided, comprising:
[0031] A first acquisition module is used to acquire a current image, where the current image is an RGB image obtained by photographing a current bacterial colony in a current culture dish;
[0032] A detection module, used to perform grayscale processing on the current image to obtain a current grayscale image, and perform edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony;
[0033] A second acquisition module is used to obtain the centroid position and colony area of the current colony in the closed area corresponding to the current colony, draw a circumscribed rectangle corresponding to the current colony with the centroid position of the current colony as the center point position, and select the coordinates of the circumscribed rectangle corresponding to the current colony as the current coordinates;
[0034] A third acquisition module is used to crop the image area where the current colony is located in the current grayscale image according to the current coordinates, and select the image area where the current colony is located as the current colony image;
[0035] An identification module, used to identify the current colony image through a trained deep learning model to obtain a current colony category corresponding to the current colony image;
[0036] An execution module is used to obtain the colony height when the current colony category is the target colony category, transmit the centroid position, the colony area, the current colony category and the colony height to a preset control system, and perform an inoculation operation on the current colony through the control system.
[0037] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned colony image recognition method when executing the computer program.
[0038] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned colony image recognition method are implemented.
[0039] The present application provides a colony image recognition method, device, computer equipment and storage medium based on a deep learning model, which obtains a current image, wherein the current image is an RGB image obtained by photographing the current colony in the current culture dish; grayscale processing is performed on the current image to obtain a current grayscale image, and edge detection is performed on the current grayscale image to obtain a closed area corresponding to the current colony; in the closed area corresponding to the current colony, the centroid position and colony area of the current colony are obtained, and the circumscribed rectangle corresponding to the current colony is drawn with the centroid position of the current colony as the center point position, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates; the image area where the current colony is located is cropped in the current grayscale image according to the current coordinates, and the image area where the current colony is located is selected as the current colony image; the current colony image is recognized by the trained deep learning model to obtain the current colony category corresponding to the current colony image; when the current When the previous colony category is the target colony category, the colony height is obtained, and the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system. The beneficial effects are in two aspects. On the one hand, the current colony image is recognized by the trained deep learning model to obtain the current colony category corresponding to the current colony image. Since no manual recognition is required, the recognition time of the current colony image is reduced, which is beneficial to improving the recognition efficiency of the current colony image and can solve the problem of how to identify the current colony; on the other hand, when the current colony category is the target colony category, the colony height is identified, and the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system, thereby reducing the inoculation time of the current colony and solving the problem of how to automatically inoculate the current colony. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0041] Figure 1 is a schematic diagram of an application environment of a bacterial colony image recognition method in one embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a process flow of a bacterial colony image recognition method provided by an embodiment of the present invention;
[0043] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S23;
[0044] Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S25;
[0045] Figure 5 yes Figure 2 A schematic flow chart of a specific implementation of step S26;
[0046] Figure 6 is a structural schematic diagram of a bacterial colony image recognition device in one embodiment of the present invention;
[0047] Figure 7 It is a structural diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application environment of a method for recognizing bacterial colonies in an embodiment of the present invention. The method for recognizing bacterial colonies provided in an embodiment of the present invention can be applied in the following embodiments: Figure 1 In an application environment, a client communicates with a server through a network.
[0050] The server obtains the current image through the client, where the current image is an RGB image obtained by photographing the current bacterial colony in the current culture dish;
[0051] Performing grayscale processing on the current image to obtain a current grayscale image, and performing edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony;
[0052] In the closed area corresponding to the current colony, the centroid position and colony area of the current colony are obtained, the centroid position of the current colony is used as the center point position, a circumscribed rectangle corresponding to the current colony is drawn, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates;
[0053] According to the current coordinates, the image area where the current colony is located is cropped in the current grayscale image, and the image area where the current colony is located is selected as the current colony image;
[0054] Recognize the current colony image through the trained deep learning model to obtain the current colony category corresponding to the current colony image;
[0055] When the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system.
[0056] In the scheme implemented by the above-mentioned colony image recognition method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, the current colony image is recognized by the trained deep learning model to obtain the current colony category corresponding to the current colony image. Since no manual recognition is required, the recognition time of the current colony image is reduced, which is beneficial to improving the recognition efficiency of the current colony image and can solve the problem of how to identify the current colony; on the other hand, when the current colony category is the target colony category, the colony height is identified, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system, thereby reducing the inoculation time of the current colony and solving the problem of how to automatically inoculate the current colony.
[0057] The device running the client is referred to as a client device.
[0058] The device running the server is referred to as the server device.
[0059] Among them, client devices include but are not limited to vaccination instruments, smart phones, personal computers, Internet of Vehicles terminals, tablet computers and portable wearable devices.
[0060] Among them, the inoculator is an automated or semi-automated device specifically used for microbial inoculation. The inoculator can quickly and accurately inoculate microorganisms into a culture dish or culture medium.
[0061] The server device can be implemented by an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0062] See also Figure 2 , Figure 2 A schematic flow chart of a bacterial colony image recognition method provided in an embodiment of the present invention includes the following steps:
[0063] S21, obtaining a current image, wherein the current image is an RGB image obtained by photographing a current bacterial colony in a current culture dish;
[0064] Exemplarily, before acquiring the current image, where the current image is an RGB image obtained by photographing the current bacterial colony in the current culture dish, the bacterial colony image recognition method further includes:
[0065] Acquire a preset image, where the preset image is an RGB image obtained by photographing a preset bacterial colony in a preset culture dish;
[0066] Performing grayscale processing on the preset image to obtain a preset grayscale image, and performing edge detection on the processed preset grayscale image to obtain a closed area corresponding to the preset colony;
[0067] In the closed area corresponding to the preset colony, taking the centroid position of the preset colony as the center point position, drawing a circumscribed rectangle corresponding to the preset colony, and selecting the coordinates of the circumscribed rectangle corresponding to the preset colony as preset coordinates;
[0068] By using the preset coordinates, in the preset image, the image area where the preset colony is located is cropped, the image area where the preset colony is located is selected as the preset colony image, and the colony category corresponding to the preset colony is selected as the actual colony category;
[0069] Identify the preset colony image through a deep learning model to obtain a predicted colony category corresponding to the preset colony image;
[0070] A cross entropy loss function is used to calculate the loss value between the predicted colony category and the actual colony category, and a deep learning model is trained based on the loss value. When the loss value is less than a preset value, the trained deep learning model is saved.
[0071] Among them, the predicted colony category is the predicted colony category.
[0072] Among them, the actual colony category is the actual colony category.
[0073] Among them, the deep learning model is trained, and the deep learning model can learn rich features from the preset colony images. These features can capture the subtle differences in these features, thereby significantly improving the accuracy of identifying the preset colony images.
[0074] Exemplarily, grayscale processing is performed on the preset image to obtain a preset grayscale image, and edge detection is performed on the processed preset grayscale image to obtain a closed area corresponding to the preset colony, including:
[0075] Reading a preset grayscale function, and performing grayscale processing on the preset image using the grayscale function to obtain the processed preset image;
[0076] The processed preset image is selected as a preset grayscale image, and edge detection is performed on the preset grayscale image to obtain a closed area corresponding to the preset colony.
[0077] Among them, the preset image is grayscale processed to obtain the processed preset image, and the processed preset image is selected as the preset grayscale image. The grayscale processing converts the preset image into a preset grayscale image containing only brightness information, which reduces the image information of the preset image and is conducive to improving the processing efficiency of the preset image.
[0078] Exemplarily, the preset colony image is identified by a deep learning model to obtain a predicted colony category corresponding to the preset colony image, including:
[0079] Performing feature extraction on the preset colony image through a feature extractor in a deep learning model to obtain a feature vector of the preset colony image, and inputting the feature vector of the preset colony image into a classifier in the deep learning model;
[0080] The feature vector of the preset colony image is identified by the classifier in the deep learning model to obtain the predicted colony category corresponding to the preset colony image.
[0081] During the training process, the classifier in the deep learning model will output the predicted colony category, which can improve the performance of the deep learning model by reducing the difference between the predicted colony category and the actual colony category.
[0082] S22, performing grayscale processing on the current image to obtain a current grayscale image, and performing edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony;
[0083] The grayscale processing of the current image to obtain the current grayscale image and the edge detection of the current grayscale image to obtain the closed area corresponding to the current colony include:
[0084] Reading a preset grayscale function, and performing grayscale processing on the current image using the grayscale function to obtain the processed current image;
[0085] The processed current image is selected as the current grayscale image, and edge detection is performed on the current grayscale image to obtain a closed area corresponding to the current colony.
[0086] Among them, grayscale processing is performed on the current image to obtain the processed current image, and the processed current image is selected as the current grayscale image. The grayscale processing converts the current image into a current grayscale image containing only brightness information, which reduces the image information of the current image and is conducive to improving the processing efficiency of the current image.
[0087] S23, in the closed area corresponding to the current colony, obtaining the centroid position and colony area of the current colony, drawing a circumscribed rectangle corresponding to the current colony with the centroid position of the current colony as the center point position, and selecting the coordinates of the circumscribed rectangle corresponding to the current colony as the current coordinates;
[0088] Among them, the centroid position is the position of the centroid, and the center point position is the position of the center point.
[0089] The centroid of the current colony is used as the center point to draw a circumscribed rectangle corresponding to the current colony, and a circumscribed rectangle that completely contains the current colony can be found. The construction of this circumscribed rectangle uses the centroid as the reference point, thereby ensuring that the circumscribed rectangle can fit the current colony tightly.
[0090] S24, cropping the image region where the current colony is located in the current grayscale image according to the current coordinates, and selecting the image region where the current colony is located as the current colony image;
[0091] The method of cutting out the image region where the current colony is located in the current grayscale image according to the current coordinates and selecting the image region where the current colony is located as the current colony image includes:
[0092] According to the current coordinates, determining an image region where the current bacterial colony is located in the current grayscale image;
[0093] The image region where the current colony is located is cropped from the current grayscale image, and the image region where the current colony is located is selected as the current colony image.
[0094] Among them, cropping the image area where the current colony is located from the current grayscale image can remove unnecessary background or interference elements in the current grayscale image, simplify the complexity of the current grayscale image, reduce the consumption of computing resources, and thus speed up the processing speed.
[0095] S25, identifying the current colony image through the trained deep learning model to obtain a current colony category corresponding to the current colony image;
[0096] Among them, the current colony category is the category of the current colony.
[0097] S26, when the current colony category is the target colony category, obtain the colony height, transmit the centroid position, the colony area, the current colony category and the colony height to a preset control system, and perform an inoculation operation on the current colony through the control system.
[0098] If the probe is lowered too deep, the needle may directly touch the bottom of the current culture dish and cause the current culture dish to break or the needle to bend. However, if the probe is lowered too shallowly, the colony may be missed because it cannot touch the surface of the current colony.
[0099] Therefore, it is necessary to collect the colony height through 3D vision acquisition equipment. 3D vision acquisition equipment is a type of hardware equipment that can capture the spatial form and depth information of objects. They use advanced technical means to achieve high-precision and high-efficiency three-dimensional data acquisition.
[0100] The process of performing the inoculation operation on the current colony by the control system is described in detail as follows:
[0101] The control system locates the current colony according to the centroid position, the colony area, and the current colony category. After the positioning is completed, the telescopic length of the probe is adjusted according to the measured colony height to ensure that the end of the probe can accurately contact the surface of the current colony. The end of the probe can carry a culture medium or an adsorbent to contact and extract the current colony and inoculate the current colony onto the culture medium.
[0102] Among them, the control system is the control system of the inoculation instrument.
[0103] Among them, the inoculation operation refers to the operation of inoculating the current bacterial colony into the culture medium under sterile conditions.
[0104] For the sake of illustration, an example is given below:
[0105] The multiple current colonies in the current culture dish are colony 1, colony 2, and colony 3. According to the characteristics and growth requirements of colony 1, colony 2, and colony 3, three corresponding culture media are prepared. The three culture media are culture media 1, culture media 2, and culture media 3.
[0106] When the categories of colony 1 and colony 2 are the target colony categories, each colony 1 is placed in an independent culture medium 1 and colony 2 is placed in an independent culture medium 2 through a control system, thus ensuring that colony 1 and colony 2 are separated and purified.
[0107] When the categories of colony 1, colony 2, and colony 3 are all target colony categories, each colony 1 is placed in an independent culture medium 1, colony 2 is placed in an independent culture medium 2, and colony 3 is placed in an independent culture medium 3 through a control system, thereby ensuring that colony 1, colony 2, and colony 3 are separated and purified.
[0108] Among them, the whole process reduces the errors and contamination risks that may be caused by human operation, which is conducive to ensuring the accuracy and reliability of the experiment.
[0109] Wherein, when the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and after the control system performs an inoculation operation on the current colony, the colony image recognition method includes:
[0110] The execution result returned by the control system is obtained, a storage area for the execution result is created, and the execution result is stored in the storage area.
[0111] Furthermore, after obtaining the execution result returned by the control system, creating a storage area for the execution result, and storing the execution result in the storage area, the colony image recognition method includes:
[0112] A display window is created, and the execution result is displayed in the display window.
[0113] In the embodiments of the present invention, the beneficial effects lie in two aspects. On the one hand, the current colony image is identified by the trained deep learning model to obtain the current colony category corresponding to the current colony image. Since no manual identification is required, the recognition time of the current colony image is reduced, which is beneficial to improving the recognition efficiency of the current colony image and can solve the problem of how to identify the current colony. On the other hand, when the current colony category is the target colony category, the colony height is identified, and the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system. The control system performs an inoculation operation on the current colony, thereby reducing the inoculation time of the current colony and solving the problem of how to automatically inoculate the current colony.
[0114] See also Figure 3 , Figure 3 yes Figure 2 A specific implementation flow diagram of step S23 is described in detail as follows:
[0115] S31, in the closed area corresponding to the current colony, obtaining the position of the centroid of the closed area, and selecting the position of the centroid of the closed area as the position of the centroid of the current colony;
[0116] S32, obtaining the area of the closed area, selecting the area of the closed area as the colony area of the current colony, drawing the circumscribed rectangle corresponding to the current colony with the centroid position of the current colony as the center point position, and selecting the coordinates of the circumscribed rectangle corresponding to the current colony as the current coordinates.
[0117] In an embodiment of the present invention, the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates. The current coordinates can represent the position and range of the current colony in the image. The image area where the current colony is located can be quickly located through the current coordinates, which is beneficial to improving the positioning efficiency of the current colony.
[0118] See also Figure 4 , Figure 4 yes Figure 2 A specific implementation flow diagram of step S25 is described in detail as follows:
[0119] S41, extracting features of the current colony image through a feature extractor in a trained deep learning model to obtain a feature vector of the current colony image, and inputting the feature vector of the current colony image into a classifier in the trained deep learning model;
[0120] S42, identifying the feature vector of the current colony image through the classifier in the trained deep learning model to obtain the current colony category corresponding to the current colony image.
[0121] Among them, the recognition result of the current colony image is the current colony category.
[0122] In an embodiment of the present invention, the feature vector of the current colony image is identified by the classifier in the trained deep learning model to obtain the current colony category corresponding to the current colony image. This method can quickly identify the current colony category corresponding to the current colony image, which not only improves the recognition accuracy of the current colony image, but also reduces the dependence on manual recognition, making the recognition process of the current colony image more intelligent and automated.
[0123] See also Figure 5 , Figure 5 yes Figure 2 A specific implementation flow diagram of step S26 is described in detail as follows:
[0124] S51, when the current colony category is the target colony category, obtaining the distance from the probe to the current colony, and selecting the distance as the colony height;
[0125] S52, packing the centroid position, the colony area, the current colony type and the colony height, generating a control message, transmitting the control message to a preset control system, and performing an inoculation operation on the current colony through the control system.
[0126] In an embodiment of the present invention, the control message is transmitted to a preset control system, and an inoculation operation is performed on the current colony through the control system. When the current colony category is a target colony category, the colony height is identified, and the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and an inoculation operation is performed on the current colony through the control system, thereby reducing the inoculation time of the current colony and solving the problem of how to automatically inoculate the current colony.
[0127] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a bacterial colony image recognition device according to an embodiment of the present invention. Figure 6 As shown, the bacterial colony image recognition device includes a first acquisition module 101, a detection module 102, a second acquisition module 103, a third acquisition module 104, a recognition module 105, and an execution module 106. The functional modules are described in detail as follows:
[0128] A first acquisition module 101 is used to acquire a current image, where the current image is an RGB image obtained by photographing a current bacterial colony in a current culture dish;
[0129] The detection module 102 is used to perform grayscale processing on the current image to obtain a current grayscale image, and perform edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony;
[0130] The second acquisition module 103 is used to obtain the centroid position and the colony area of the current colony in the closed area corresponding to the current colony, draw a circumscribed rectangle corresponding to the current colony with the centroid position of the current colony as the center point position, and select the coordinates of the circumscribed rectangle corresponding to the current colony as the current coordinates;
[0131] A third acquisition module 104 is used to crop the image area where the current colony is located in the current grayscale image according to the current coordinates, and select the image area where the current colony is located as the current colony image;
[0132] The recognition module 105 is used to recognize the current colony image through the trained deep learning model to obtain the current colony category corresponding to the current colony image;
[0133] The execution module 106 is used to obtain the colony height when the current colony category is the target colony category, transmit the centroid position, the colony area, the current colony category and the colony height to a preset control system, and perform an inoculation operation on the current colony through the control system.
[0134] In the embodiments of the present invention, the beneficial effects lie in two aspects. On the one hand, the current colony image is identified by the trained deep learning model to obtain the current colony category corresponding to the current colony image. Since no manual identification is required, the recognition time of the current colony image is reduced, which is beneficial to improving the recognition efficiency of the current colony image and can solve the problem of how to identify the current colony. On the other hand, when the current colony category is the target colony category, the colony height is identified, and the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system. The control system performs an inoculation operation on the current colony, thereby reducing the inoculation time of the current colony and solving the problem of how to automatically inoculate the current colony.
[0135] The specific limitations of the colony image recognition device can be found in the above limitations of the colony image recognition method, which will not be repeated here.
[0136] Each module in the above-mentioned bacterial colony image recognition device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0137] See also Figure 7 , Figure 7 1 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device is a server device or a client device. The internal structure diagram thereof can be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used 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 the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external database. When the computer program is executed by the processor, the functions or steps of a colony image recognition method based on a deep learning model can be implemented.
[0138] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.
[0139] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant description of the aforementioned method embodiment. In order to avoid repetition, they will not be described one by one here.
[0140] The above-mentioned processor can be a general-purpose 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 devices, discrete gates or transistor logic devices, discrete hardware components.
[0141] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
Claims
1. A method for bacterial colony image recognition based on a deep learning model, characterized in that: include: Acquire a current image, where the current image is an RGB image obtained by photographing a current bacterial colony in a current culture dish; Performing grayscale processing on the current image to obtain a current grayscale image, and performing edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony; In the closed area corresponding to the current colony, the centroid position and colony area of the current colony are obtained, the centroid position of the current colony is used as the center point position, a circumscribed rectangle corresponding to the current colony is drawn, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates; According to the current coordinates, the image area where the current colony is located is cropped in the current grayscale image, and the image area where the current colony is located is selected as the current colony image; Recognize the current colony image through the trained deep learning model to obtain the current colony category corresponding to the current colony image; When the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and the inoculation operation is performed on the current colony through the control system.
2. The method for bacterial colony image recognition according to claim 1, characterized in that: The grayscale processing of the current image to obtain the current grayscale image, and the edge detection of the current grayscale image to obtain the closed area corresponding to the current bacterial colony include: Reading a preset grayscale function, and performing grayscale processing on the current image using the grayscale function to obtain the processed current image; The processed current image is selected as the current grayscale image, and edge detection is performed on the current grayscale image to obtain a closed area corresponding to the current colony.
3. The method for bacterial colony image recognition according to claim 1, characterized in that: The method of obtaining the centroid position and the colony area of the current colony in the closed area corresponding to the current colony, drawing a circumscribed rectangle corresponding to the current colony with the centroid position of the current colony as the center point, and selecting the coordinates of the circumscribed rectangle corresponding to the current colony as the current coordinates includes: In the closed area corresponding to the current colony, the position of the centroid of the closed area is obtained, and the position of the centroid of the closed area is selected as the position of the centroid of the current colony; The area of the closed area is obtained, and the area of the closed area is selected as the colony area of the current colony. The centroid position of the current colony is used as the center point position to draw the circumscribed rectangle corresponding to the current colony, and the coordinates of the circumscribed rectangle corresponding to the current colony are selected as the current coordinates.
4. The method for recognizing bacterial colonies according to claim 1, characterized in that: The method of cutting out the image region where the current colony is located in the current grayscale image according to the current coordinates and selecting the image region where the current colony is located as the current colony image includes: According to the current coordinates, determining an image region where the current bacterial colony is located in the current grayscale image; The image region where the current colony is located is cropped from the current grayscale image, and the image region where the current colony is located is selected as the current colony image.
5. The method for bacterial colony image recognition according to claim 1, characterized in that: The current colony image is identified by the trained deep learning model to obtain the current colony category corresponding to the current colony image, including: Perform feature extraction on the current bacterial colony image through a feature extractor in a trained deep learning model to obtain a feature vector of the current bacterial colony image, and input the feature vector of the current bacterial colony image into a classifier in the trained deep learning model; The feature vector of the current colony image is identified by the classifier in the trained deep learning model to obtain the current colony category corresponding to the current colony image.
6. The method for bacterial colony image recognition according to claim 1, characterized in that: When the current colony category is the target colony category, obtaining the colony height, transmitting the centroid position, the colony area, the current colony category and the colony height to a preset control system, and performing an inoculation operation on the current colony through the control system, including: When the current colony category is the target colony category, obtaining the distance from the probe to the current colony, and selecting the distance as the colony height; The centroid position, the colony area, the current colony category and the colony height are packaged to generate a control message, which is transmitted to a preset control system, and an inoculation operation is performed on the current colony through the control system.
7. The method for recognizing bacterial colonies according to claim 1, characterized in that: When the current colony category is the target colony category, the colony height is obtained, the centroid position, the colony area, the current colony category and the colony height are transmitted to a preset control system, and after the control system performs an inoculation operation on the current colony, the colony image recognition method includes: The execution result returned by the control system is obtained, a storage area for the execution result is created, and the execution result is stored in the storage area.
8. The method for bacterial colony image recognition according to claim 1, characterized in that: After obtaining the execution result returned by the control system, creating a storage area for the execution result, and storing the execution result in the storage area, the colony image recognition method includes: A display window is created, and the execution result is displayed in the display window.
9. A bacterial colony image recognition device based on a deep learning model, characterized in that: include: A first acquisition module is used to acquire a current image, where the current image is an RGB image obtained by photographing a current bacterial colony in a current culture dish; A detection module, used to perform grayscale processing on the current image to obtain a current grayscale image, and perform edge detection on the current grayscale image to obtain a closed area corresponding to the current bacterial colony; A second acquisition module is used to obtain the centroid position and colony area of the current colony in the closed area corresponding to the current colony, draw a circumscribed rectangle corresponding to the current colony with the centroid position of the current colony as the center point position, and select the coordinates of the circumscribed rectangle corresponding to the current colony as the current coordinates; A third acquisition module is used to crop the image area where the current colony is located in the current grayscale image according to the current coordinates, and select the image area where the current colony is located as the current colony image; An identification module, used to identify the current colony image through a trained deep learning model to obtain a current colony category corresponding to the current colony image; An execution module is used to obtain the colony height when the current colony category is the target colony category, transmit the centroid position, the colony area, the current colony category and the colony height to a preset control system, and perform an inoculation operation on the current colony through the control system.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the colony image recognition method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Multi-colony classification extraction method based on deep learning model
CN115393637A
Bacterial colony picking device and bacterial colony picking method
CN116904302A
Bacteria identifying and positioning system
CN117853781A
Automatic bacterial colony selecting device
CN218059015U
Method and apparatus for collection of colony
JP2000162098A
Cited By
Fruit fungus culture medium pollution identification method and system based on hyperspectral imaging
CN121415397A