Deep learning-based tablet antibacterial effect analysis method and system
By automatically identifying and fitting the diameter of the drug sensitivity zone using a deep learning model, the problem of low efficiency in drug sensitivity zone identification and measurement in existing technologies is solved, thereby improving the efficiency and accuracy of swine disease prevention and control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MUYUAN FOOD GROUP CO LTD
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies cannot efficiently identify and measure drug sensitivity zones, leading to delays in disease control in pigs and increasing sunk costs.
A deep learning-based method for analyzing the antibacterial effect of tablets was adopted. The contour of the drug sensitivity zone was automatically identified through target detection and image segmentation models, and the diameter of the drug sensitivity zone was calculated by fitting.
It improves the work efficiency of operators, reduces the time for manual comparison, enables rapid analysis of the antibacterial effect of tablets, and reduces silent costs.
Smart Images

Figure CN121982004A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method and system for analyzing the antibacterial effect of tablets based on deep learning. Background Technology
[0002] Analyzing the drug resistance levels of microorganisms inside and outside the pig's body is a crucial step in the pig's growth process. Understanding and analyzing this resistance not only allows for the treatment of various diseases caused by these microorganisms but also helps confirm the existence and strength of dynamic drug resistance within the pig herd during growth. This enables timely adjustments to the types and proportions of medications used to ensure the pigs grow healthily and at the fastest possible rate. Currently, most laboratories simply photograph and archive the results of microbial drug resistance analysis and are unable to identify and measure the drug sensitivity zones in the images. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method and system for analyzing the antibacterial effect of tablets based on deep learning, which can automatically identify the diameter of the drug sensitivity zone in the image, improve the work efficiency of operators, and reduce the time for manual comparison.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a method for analyzing the antibacterial effect of tablets based on deep learning, comprising: placing the tablets on a petri dish and culturing them for a preset time, and then acquiring an image of the petri dish; identifying the image of the petri dish based on a pre-trained deep learning model to obtain the contour of the drug sensitivity zone; and fitting the contour of the drug sensitivity zone to obtain the diameter of the contour of the drug sensitivity zone.
[0005] Optionally, the deep learning model includes: an object detection model and an image segmentation model; the identification of the petri dish image based on the pre-trained deep learning model to obtain the drug sensitivity zone contour includes: inputting the petri dish image into the object detection model to obtain the petri dish information and drug information in the petri dish image; inputting the petri dish image into the image segmentation model to obtain the drug sensitivity zone contour in the petri dish image.
[0006] Optionally, the contour of the drug sensitivity zone is fitted to obtain the diameter of the drug sensitivity zone contour, including: fitting the drug sensitivity zone contour based on the information of the culture dish and the drug tablet, and calculating the diameter of the drug sensitivity zone contour based on the fitting result.
[0007] Optionally, after fitting the contour of the drug sensitivity zone to obtain its diameter, the method further includes: obtaining the tablet antibacterial results based on the diameter of the drug sensitivity zone contour, and sorting the tablets based on the tablet antibacterial results.
[0008] Optionally, after sorting the tablets based on their antibacterial results, the method further includes: drawing the outline of the drug sensitivity zone in the petri dish image and labeling the tablet name and the corresponding sorting of the antibacterial results.
[0009] Optionally, the object detection model includes: a first convolutional neural network, a region generation network, and a fully connected layer; training the object detection model includes: acquiring petri dish sample images, and based on pre-acquired petri dish features and tablet features, labeling the petri dishes and tablets in the petri dish sample images using detection boxes to obtain labeled data; extracting features from the labeled data using the first convolutional neural network to obtain a feature map; generating target boxes using the region generation network; fusing the target boxes and feature maps using the fully connected layer to obtain the detection results of petri dishes and tablets; calculating a first loss value based on the detection results of petri dishes and tablets and a pre-set first loss function, and optimizing the object detection model based on the first loss value until the first loss value meets a first preset condition, thereby obtaining a trained object detection model.
[0010] Optionally, the image segmentation model includes a second convolutional neural network and a mask branch. The training process of the image segmentation model includes: acquiring petri dish sample images, and based on pre-acquired drug sensitivity zone features, annotating the drug sensitivity zone regions in the petri dish sample images using contour masks to obtain labeled data; extracting features from the labeled data using the second convolutional neural network, and fusing the extracted features to obtain a feature map; generating a drug sensitivity zone region mask using the mask branch based on the feature map; calculating a second loss value based on the drug sensitivity zone region mask and a pre-set second loss function, and optimizing the image segmentation model based on the second loss value until the second loss value meets a second preset condition, thus obtaining a trained image segmentation model.
[0011] Secondly, the present invention provides a deep learning-based tablet antibacterial effect analysis system, comprising: an image acquisition module for acquiring a culture dish image after placing the tablet on a culture dish and culturing it for a preset time; a drug sensitivity zone recognition module for recognizing the culture dish image based on a pre-trained deep learning model to obtain the drug sensitivity zone outline; and a drug sensitivity zone fitting module for fitting the drug sensitivity zone outline to obtain the diameter of the drug sensitivity zone outline.
[0012] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the steps of the method provided in any of the first aspects above.
[0013] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the steps of the method provided in any of the first aspects above.
[0014] This invention brings the following beneficial effects: The method and system for analyzing the antibacterial effect of tablets based on deep learning provided by this invention first involves placing the tablet on a petri dish and culturing it for a preset time to obtain an image of the petri dish. Then, a pre-trained deep learning model is used to identify the outline of the drug sensitivity zone in the petri dish image. Finally, the outline of the drug sensitivity zone is fitted to obtain its diameter. This method automatically identifies the outline of the drug sensitivity zone in the petri dish image using a deep learning model and fits it to obtain the diameter, thereby improving the operator's work efficiency and reducing the time required for manual comparison.
[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a method for analyzing the antibacterial effect of tablets based on deep learning, provided as an embodiment of the present invention; Figure 2 A flowchart for analyzing the antibacterial effect of a tablet provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a deep learning-based tablet antibacterial effect analysis system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Currently, most laboratories simply photograph and archive the results of microbial resistance, without being able to identify and measure the drug sensitivity zones in the images. This makes it impossible to analyze the antibacterial effect of the tablets and the degree of microbial resistance more efficiently and quickly, delaying treatment opportunities in the prevention and control of diseases in pigs and increasing sunk costs.
[0021] Based on this, the present invention provides a method and system for analyzing the antibacterial effect of tablets based on deep learning, which can automatically identify the diameter of the drug sensitivity zone in the image, improve the work efficiency of operators, and reduce the time for manual comparison.
[0022] To facilitate understanding of this embodiment, a method for analyzing the antibacterial effect of tablets based on deep learning, as disclosed in this embodiment of the invention, will be described in detail first. This method can be executed by electronic devices, such as smartphones, computers, and tablets. See also... Figure 1 The flowchart shown is a method for analyzing the antibacterial effect of tablets based on deep learning, illustrating that the method mainly includes the following steps S101 to S103: Step S101: Place the tablet on a petri dish and incubate for a preset time, then obtain an image of the petri dish.
[0023] In one embodiment, after processing the in vitro and in vivo extracts from pigs, the bacterial colony is purified and expanded. The expanded bacterial solution is then spread onto a specific culture medium, and a tablet is placed at a designated position on the medium. After a period of incubation, the appearance of a transparent ring around the tablet indicates that the microorganisms have high sensitivity to the tablet and low drug resistance. In this embodiment of the invention, the culture dish can be photographed using a mobile phone or camera after a preset incubation time to obtain an image of the culture dish.
[0024] Step S102: Based on a pre-trained deep learning model, the petri dish image is identified to obtain the contour of the drug sensitivity zone.
[0025] In one implementation, the deep learning model includes an object detection model and an image segmentation model. First, the petri dish image is input into the object detection model to obtain petri dish information and tablet information from the petri dish image; wherein, the petri dish information includes the outer contour of the petri dish, its pixel coordinate center, and pixel diameter; the tablet information includes the outer contour of the tablet, its pixel coordinate center, and pixel diameter. Then, the petri dish image is input into the image segmentation model to obtain the drug sensitivity zone contour from the petri dish image.
[0026] Step S103: Fit the contour of the drug sensitivity zone to obtain the diameter of the drug sensitivity zone contour.
[0027] In one implementation, the contour of the drug sensitivity zone can be fitted based on the petri dish information and the tablet information, and the diameter of the drug sensitivity zone contour can be calculated based on the fitting result.
[0028] In practice, the actual physical diameter of the culture dish is obtained, and the conversion factor from pixel coordinates to physical coordinates is calculated based on the detected pixel diameter of the culture dish, i.e., the conversion factor = actual physical diameter / pixel diameter; then, the contour of the drug sensitivity zone is fitted with the minimum circumcircle to obtain the fitted circle, and the pixel center and pixel diameter of the fitted circle are calculated; finally, the fitted pixel diameter is multiplied by the conversion factor to obtain the actual physical diameter of the drug sensitivity zone.
[0029] The above-mentioned method for analyzing the antibacterial effect of tablets based on deep learning provided in this embodiment of the invention can automatically identify the contour of the drug sensitivity zone in the petri dish image through a deep learning model, and fit it to obtain the diameter of the drug sensitivity zone contour, thereby improving the work efficiency of operators and reducing the time for manual comparison.
[0030] In one embodiment, after fitting the contour of the drug sensitivity zone to obtain its diameter, the method further includes: obtaining the antibacterial effect of the tablets based on the diameter of the drug sensitivity zone contour, and sorting the tablets based on the antibacterial effect; drawing the drug sensitivity zone contour in the petri dish image, and labeling the tablet name and the corresponding sorting of the antibacterial effect of the tablets.
[0031] In practice, firstly, the drug sensitivity zones are sorted in descending order of diameter; a larger diameter indicates a stronger inhibitory effect of the drug on the bacteria. Then, based on the original images, a fitted circle for each drug sensitivity zone is drawn, labeled with the corresponding drug name (if location information is available), the calculated diameter, and the ranking of the drug's antibacterial results. Color can also be used to differentiate the levels of antibacterial effect. Additionally, the outer contour of the petri dish can be drawn and a scale bar can be added to enhance the reliability of the results.
[0032] In one embodiment, the object detection model used in this invention includes: a first convolutional neural network, a region generation network, and a fully connected layer. Training the object detection model includes: First, a petri dish sample image is acquired. Based on the pre-acquired petri dish and tablet features, the petri dish and tablet in the petri dish sample image are labeled using detection boxes to obtain labeled data. Then, a feature map is obtained by extracting features from the labeled data using a first convolutional neural network. A target box is generated using a region generation network. Next, the target box and the feature map are fused using a fully connected layer to obtain the detection results of the petri dish and tablet. After that, a first loss value is calculated based on the detection results of the petri dish and tablet and a pre-set first loss function. The target detection model is then optimized based on the first loss value until the first loss value meets a first preset condition, resulting in a trained target detection model.
[0033] In practical implementation, firstly, combining the features of the petri dish and the tablet, detection boxes are used to annotate the petri dishes and tablets in the sample images, marking the category label and bounding box coordinates of each target. Then, the overall model architecture is constructed: the first convolutional neural network (CNN) acts as the backbone feature extractor (e.g., ResNet, VGG), extracting multi-scale deep feature maps from the input image; the region generation network (RPN) slides a small window on the feature map output by the CNN, predicting multiple candidate regions (i.e., target boxes, bounding boxes in the image, usually represented by rectangles, with the long side parallel to the x and y axes of the image. The minimum and maximum values of the x and y axes (specified by the coordinates of the rectangle corners) are used to specify the size and position of the target of interest), including whether the target is contained (foreground / background) and the coarse offset of the bounding box; the candidate regions proposed by the RPN are mapped back to the feature map, and after being unified in size through RoI Pooling, they are fed into a fully connected layer to complete fine classification (specific category) and bounding box regression (fine-tuning coordinates).
[0034] During the model training phase, model optimization is performed using a multi-task loss function, mainly including: (1) Pre-train the CNN backbone network using a large image classification dataset.
[0035] (2) RPN training: With fixed CNN parameters, positive and negative sample labels corresponding to anchor points are generated through the labeled bounding boxes. Anchor points with high IoU with the ground truth boxes are positive samples, and those with low IoU are negative samples. The RPN loss = classification loss (foreground / background) + regression loss (coordinate offset of anchor point to ground truth box). The RPN parameters are updated through this loss.
[0036] (3) Training the detection head: Using the candidate regions generated by RPN, combined with the ground truth annotations, a label is assigned to each RoI. RoIs with an IoU exceeding a threshold with the ground truth bounding box are considered positive samples of the corresponding class. The loss of the detection head = classification loss (multi-class) + bounding box regression loss (fine-tuning).
[0037] In this embodiment of the invention, the total loss is a weighted sum of the RPN loss and the detector head loss. The total loss is minimized by an optimizer, and all trainable parameters are updated through backpropagation.
[0038] In one implementation, the image segmentation model used above includes: a second convolutional neural network and a mask branch; the training process of the image segmentation model includes: First, images of petri dish samples are acquired, and based on pre-acquired drug sensitivity zone features, the drug sensitivity zone regions in the petri dish sample images are labeled using contour masks to obtain labeled data. Then, features are extracted from the labeled data using a second convolutional neural network, and the extracted features are fused to obtain a feature map. Next, based on the feature map, a mask for the drug sensitivity zone region is generated through a mask branch. A second loss value is calculated based on the drug sensitivity zone region mask and a pre-set second loss function, and the image segmentation model is optimized based on the second loss value until the second loss value meets a second preset condition, thus obtaining a trained image segmentation model.
[0039] In practical implementation, firstly, combining the drug sensitivity zone features, contour masks are used to annotate the transparent area (drug sensitivity zone) around the drug tablet on the culture dish, obtaining labeled data; then, the overall model architecture is constructed: the second convolutional neural network (Backbone CNN) uses a pre-trained deep network (such as ResNet, EfficientNet) as the backbone to extract multi-scale, high-dimensional feature maps from the input image; candidate target regions (RoIs) are generated on the feature maps through a region proposal mechanism, and each RoI is mapped back to the feature map; the mask branch runs a small fully convolutional network (FCN) in parallel for each RoI, outputting a binary mask representing the shape of the target within the local region.
[0040] In this embodiment of the invention, model training optimization consists of the joint loss of three sub-tasks: (1) Classification loss: Determine which category each RoI belongs to; (2) Bounding box regression loss: fine-tune the position and size of the RoI to make it more closely match the real target.
[0041] (3) Mask loss: For positive sample RoI, calculate the pixel-wise binary cross-entropy loss between its predicted mask and the real mask, and supervise only the real class channel corresponding to the RoI.
[0042] Based on this, the total loss = classification loss + bounding box regression loss + mask loss (weighted by weight).
[0043] Furthermore, during training, labeled data is input into the image segmentation model. The model forward propagates to generate candidate regions, category predictions, bounding boxes, and masks, and calculates the loss values of these three parts based on the labeled data. All trainable parameters are then updated through backpropagation.
[0044] For ease of understanding, this invention also provides a flowchart for analyzing the antibacterial effect of tablets, see [link / reference]. Figure 2 As shown, it mainly includes the following steps 1 to 4: Step 1: Capture sample image data and upload it.
[0045] Specifically, the images are sample image data taken from the front of the mobile phone.
[0046] Step 2: Label the target detection data, construct feature models for petri dishes and tablets, and use the target detection models to identify the locations of petri dishes and tablets.
[0047] In specific implementation, firstly, based on the sample image data obtained in step 1, and combined with the features of the petri dish and the tablet, detection boxes are used to annotate the petri dish and the tablet. Then, a YOLOv8 target detection network is trained based on the annotated data, including: constructing feature models of the petri dish and the tablet to distinguish between the petri dish, the tablet, and the background features; inputting the normalized 2D image into the first convolutional neural network for feature extraction to obtain a feature map, generating target boxes through a region generation network, and then performing feature fusion based on the target boxes and the feature map, outputting the positions of the petri dish and the tablet through a fully connected layer, thereby obtaining the target detection model of the petri dish and the tablet; after that, the captured sample image is sent into the target detection model to identify the target positions (petri dish and tablet).
[0048] Step 3: Label the image segmentation data, construct a drug sensitivity zone region segmentation feature model, and use the image segmentation model to identify the contour of the drug sensitivity zone.
[0049] In practice, firstly, based on the drug sensitivity zone features, contour masks are used to annotate the transparent area (drug sensitivity zone) around the drug tablet on the culture dish. Then, the labeled data is used to train a YOLOv8 target detection network, including: constructing a drug sensitivity zone region segmentation feature model to distinguish between the drug sensitivity zone region and background features; inputting a normalized 2D image into a second convolutional neural network for feature extraction and feature fusion; generating a target region mask through a mask branch, thereby obtaining an image segmentation network model for segmenting the drug sensitivity zone; finally, the captured sample images are fed into the segmentation network model to identify the drug sensitivity zone region.
[0050] Step 4: Based on the output results of Step 2 and Step 3, use the OpenCV-Python algorithm, combined with the diameter of the input culture dish, to fit and calculate the diameter of the drug sensitivity zone, and sort and draw the sizes of the drug sensitivity zones.
[0051] In practice, the identification results of the petri dishes and tablets in step 2 and the drug sensitivity zone contour detection results in step 3 are combined. The diameter of the drug sensitivity zone is calculated using the OpenCV-Python algorithm, and the antibacterial effect of the drug sensitivity zone is ranked according to the diameter of the drug sensitivity zone. Then, the inference results are plotted on the original image to construct a rendering image, and the results are used for data statistics and evaluation.
[0052] The deep learning-based method for analyzing the antibacterial effect of tablets provided in this invention first involves collecting sample data by laboratory personnel, labeling petri dishes and tablets in images using prior laboratory knowledge, identifying the positions of petri dishes and tablets using a target detection model, labeling the transparent zone outlines in the images, and identifying the transparent zone outlines using an image segmentation model. Then, combined with the input diameter of the petri dish, post-processing logic accurately calculates the diameter of the drug sensitivity zone and plots it on the original image, pushing the detection results to the backend for statistical analysis. This method automatically identifies the petri dishes, tablets, and drug sensitivity zone outlines in images using a target detection model and an image segmentation model, calculates and saves the drug sensitivity zone diameter, and generates evaluation results for microbial resistance and tablet antibacterial activity, improving evaluation efficiency and accuracy. Simultaneously, it can analyze the antibacterial effect of tablets based on the identification results, and can be used to analyze the drug resistance levels of microorganisms in and outside pigs under climatic and seasonal conditions. This allows for a more scientific and rapid identification of the underlying logic of pig diseases, timely and accurate medication, reducing the risk of pig mortality, and minimizing the hidden costs in pig farming.
[0053] In addition to the deep learning-based method for analyzing the antibacterial effect of tablets provided in the foregoing embodiments, this invention also provides a deep learning-based system for analyzing the antibacterial effect of tablets. (See [link to relevant documentation]). Figure 3 The diagram shown illustrates the structure of a deep learning-based tablet antibacterial effect analysis system, showing that the system mainly includes the following components: The image acquisition module 301 is used to acquire an image of the culture dish after placing the tablet on the culture dish and culturing it for a preset time.
[0054] The drug sensitivity zone recognition module 302 is used to recognize the petri dish image based on a pre-trained deep learning model to obtain the drug sensitivity zone outline.
[0055] The drug sensitivity zone fitting module 303 is used to fit the contour of the drug sensitivity zone to obtain the diameter of the drug sensitivity zone contour.
[0056] The antibacterial effect analysis system for tablets based on deep learning provided in this embodiment of the invention can automatically identify the contour of the drug sensitivity zone in the petri dish image through a deep learning model, and fit it to obtain the diameter of the drug sensitivity zone contour, thereby improving the work efficiency of operators and reducing the time for manual comparison.
[0057] In one implementation, the deep learning model includes: an object detection model and an image segmentation model; the drug sensitivity zone recognition module 302 is specifically used to: input the petri dish image into the object detection model to obtain petri dish information and drug information in the petri dish image; input the petri dish image into the image segmentation model to obtain the drug sensitivity zone outline in the petri dish image.
[0058] In one embodiment, the drug sensitivity zone fitting module 303 is specifically used to: fit the contour of the drug sensitivity zone based on the petri dish information and the tablet information, and calculate the diameter of the drug sensitivity zone contour based on the fitting result.
[0059] In one embodiment, the system further includes a sorting module for obtaining the antibacterial result of the tablets based on the diameter of the drug sensitivity circle contour, and sorting the tablets based on the antibacterial result.
[0060] In one embodiment, the system further includes a drawing module for drawing the outline of the drug sensitivity zone in the petri dish image and labeling the name of the tablet and the corresponding order of the tablet antibacterial results.
[0061] In one embodiment, the target detection model includes: a first convolutional neural network, a region generation network, and a fully connected layer; the system further includes a model training module, used for: acquiring petri dish sample images, and based on pre-acquired petri dish features and tablet features, labeling the petri dishes and tablets in the petri dish sample images using detection boxes to obtain labeled data; extracting features from the labeled data using the first convolutional neural network to obtain a feature map; generating target boxes using the region generation network; fusing the target boxes and feature maps using the fully connected layer to obtain petri dish and tablet detection results; calculating a first loss value based on the petri dish and tablet detection results and a pre-set first loss function, and optimizing the target detection model based on the first loss value until the first loss value meets a first preset condition, thereby obtaining a trained target detection model.
[0062] In one embodiment, the image segmentation model includes a second convolutional neural network and a mask branch. The model training module is further configured to: acquire a petri dish sample image, and based on pre-acquired drug sensitivity zone features, annotate the drug sensitivity zone region in the petri dish sample image using a contour mask to obtain labeled data; extract features from the labeled data using the second convolutional neural network, and fuse the extracted features to obtain a feature map; generate a drug sensitivity zone region mask using the mask branch based on the feature map; calculate a second loss value based on the drug sensitivity zone region mask and a pre-set second loss function, and optimize the image segmentation model based on the second loss value until the second loss value meets a second preset condition, thereby obtaining a trained image segmentation model.
[0063] It should be noted that the system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment. The specific numerical values provided in the implementation of this invention are merely exemplary and are not intended to limit the scope of the invention.
[0064] This invention also provides an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method described in any of the above embodiments.
[0065] Figure 4 The present invention provides a schematic diagram of the structure of an electronic device 100, which includes a processor 40, a memory 41, a bus 42 and a communication interface 43. The processor 40, the communication interface 43 and the memory 41 are connected through the bus 42. The processor 40 is used to execute executable modules, such as computer programs, stored in the memory 41.
[0066] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0067] Bus 42 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0068] The memory 41 is used to store programs. After receiving an execution instruction, the processor 40 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0069] Processor 40 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 40 or by instructions in software form. Processor 40 can be a general-purpose processor, including a Central Processing Unit (CPU), 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 gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 41. The processor 40 reads the information in memory 41 and, in conjunction with its hardware, completes the steps of the above method.
[0070] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, please refer to the foregoing method embodiments, which will not be repeated here.
[0071] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for analyzing the antibacterial effect of tablets based on deep learning, characterized in that, include: After placing the tablets on a petri dish and culturing them for a preset time, an image of the petri dish is obtained. The contour of the drug sensitivity zone is obtained by recognizing the image of the culture dish based on a pre-trained deep learning model. The diameter of the drug sensitivity circle contour is obtained by fitting the contour of the drug sensitivity circle.
2. The method according to claim 1, characterized in that, The deep learning model includes: an object detection model and an image segmentation model; based on the pre-trained deep learning model, the petri dish image is identified to obtain the drug sensitivity zone outline, including: The petri dish image is input into the target detection model to obtain the petri dish information and tablet information in the petri dish image; The image of the culture dish is input into the image segmentation model to obtain the contour of the drug sensitivity zone in the image of the culture dish.
3. The method according to claim 2, characterized in that, Fitting the contour of the drug sensitivity zone to obtain the diameter of the drug sensitivity zone contour includes: The contour of the drug sensitivity zone is fitted based on the information of the culture dish and the information of the drug tablet, and the diameter of the drug sensitivity zone contour is calculated based on the fitting result.
4. The method according to claim 1, characterized in that, After fitting the contour of the drug sensitivity zone to obtain its diameter, the method further includes: The antibacterial effect of the tablets is obtained based on the diameter of the drug sensitivity circle contour, and the tablets are sorted based on the antibacterial effect of the tablets.
5. The method according to claim 4, characterized in that, After sorting the tablets based on their antibacterial results, the process further includes: Draw the outline of the drug sensitivity zone in the petri dish image, and label the name of the tablet and the order of the corresponding tablet antibacterial results.
6. The method according to claim 2, characterized in that, The object detection model includes: a first convolutional neural network, a region generation network, and a fully connected layer; the training of the object detection model includes: Acquire petri dish sample images, and based on pre-acquired petri dish features and tablet features, annotate the petri dishes and tablets in the petri dish sample images using detection boxes to obtain annotation data; The first convolutional neural network is used to extract features from the labeled data to obtain a feature map. The target bounding box is generated using the region generation network; The target bounding box and the feature map are fused through the fully connected layer to obtain the detection results of the petri dish and the tablet. Based on the detection results of the petri dish and the tablet and a pre-set first loss function, a first loss value is calculated, and the target detection model is optimized based on the first loss value until the first loss value meets the first preset condition, thus obtaining a trained target detection model.
7. The method according to claim 2, characterized in that, The image segmentation model includes: a second convolutional neural network and a mask branch; the training process of the image segmentation model includes: Acquire images of culture dish samples, and based on pre-acquired drug sensitivity zone features, annotate the drug sensitivity zone regions in the culture dish sample images using contour masks to obtain annotation data; The labeled data is processed by the second convolutional neural network to extract features, and the extracted features are then fused to obtain a feature map. Based on the feature map, a drug sensitivity zone mask is generated through the mask branch; The second loss value is calculated based on the drug sensitivity zone mask and the pre-set second loss function, and the image segmentation model is optimized based on the second loss value until the second loss value meets the second preset condition, thus obtaining a trained image segmentation model.
8. A deep learning-based system for analyzing the antibacterial effect of tablets, characterized in that, include: The image acquisition module is used to acquire an image of the culture dish after the tablet has been placed on the culture dish and cultured for a preset time. The drug sensitivity zone recognition module is used to recognize the petri dish image based on a pre-trained deep learning model to obtain the drug sensitivity zone outline; The drug sensitivity circle fitting module is used to fit the contour of the drug sensitivity circle to obtain the diameter of the contour.
9. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program, when run by a processor, performs the steps of the method described in any one of claims 1 to 7.