Method, device, equipment and medium for identifying and locating target objects in microscopic images
Through the multi-channel multi-model method, the deep learning network model is used to identify the target object in the microscopic image, which solves the problem of low accuracy in identifying and positioning the target object in the microscopic image, and achieves the precise identification and positioning of the target object in the microscopic image. , avoid missed detections and wrong detections, and improve work efficiency and recognition accuracy.
Patent Information
- Application Number
- CN202011481033.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-12-15
AI Technical Summary
The accuracy of identification and positioning of targets in microscopic images is low, and it is easy to miss detections and false detections. Especially in microscopic images of fecal eggs, traditional methods are difficult to effectively identify due to the interference of impurities and components with similar characteristics.
A multi-channel multi-model method is adopted to obtain multi-channel image blocks of microscopic image samples, and use deep learning network models for training and recognition. Combined with the annotation of multi-channel spliced image samples and original image samples, multiple deep learning network models are trained to Identify and locate the target object, and combine the results of multiple models for final identification.
It effectively eliminates the interference of impurities and components with similar characteristics, improves the recognition accuracy of target objects in microscopic images, avoids missed detections and false detections, achieves automated and accurate identification, reduces subjective factors, and significantly speeds up the detection rate.
Smart Images

Figure CN114639099B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biological image processing technology, and in particular to a method, device, computer equipment and storage medium for identifying and locating a target object in a microscopic image. Background Art
[0002] With the development of biotechnology, technologies for identifying and locating targets in microscopic images have emerged. The target identification and positioning solutions provided in biological image processing technology include recognition algorithms such as threshold segmentation, multi-class support vector machine, watershed algorithm, morphological segmentation, etc., which mainly perform cell segmentation, feature extraction and cell classification.
[0003] However, there are usually interferences from impurities and other components with similar features to the target in microscopic images, which results in low accuracy in identifying and locating the target in microscopic images, and it is easy to miss or mis-detect the target. Taking fecal worm egg microscopic images as an example, the impurities and other components with similar features in fecal worm egg microscopic images interfere with the traditional solution, which is easily affected by the complex nature of fecal worm egg microscopic images and has a low recognition accuracy. It is easy to miss or mis-detect the fecal worm eggs in the image. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for identifying and locating targets in microscopic images in order to solve the above technical problems.
[0005] A method for identifying and locating a target object in a microscopic image, the method comprising:
[0006] Acquire a microscopic image sample containing a target object sample, and acquire an image corresponding to each channel in a preset color space and the microscopic image sample to obtain a multi-channel microscopic image sample;
[0007] Determine the positioning center of the target object sample in the microscopic image samples of each channel based on the pixel information of the binary image corresponding to the microscopic image samples of each channel;
[0008] For the microscopic image samples of each channel, a plurality of image blocks having a preset size and containing the target object samples are cropped with the positioning center as the cropping center to obtain a plurality of image blocks corresponding to each channel;
[0009] respectively stitching the plurality of image blocks corresponding to the channels to form an image with the same size as the image of the microscopic image sample, to obtain a multi-channel stitched image sample;
[0010] Based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into corresponding deep learning network models for training; wherein the corresponding deep learning network models include a plurality of deep learning network models corresponding to each channel image respectively and a deep learning network model corresponding to the original image;
[0011] Inputting the microscopic image to be identified into each trained deep learning network model, and obtaining a plurality of identification and positioning results for the target object in the microscopic image outputted by each deep learning network model;
[0012] Based on the multiple identification and positioning results, the target object in the microscopic image is identified and positioned.
[0013] A device for identifying and locating a target object in a microscopic image, comprising:
[0014] A sample acquisition module is used to acquire a microscopic image sample containing a target object sample, and acquire an image corresponding to each channel in a preset color space and the microscopic image sample to obtain a multi-channel microscopic image sample;
[0015] A center positioning module, used to determine the positioning center of the target object sample in the microscopic image samples of each channel based on the pixel information of the binary image corresponding to the microscopic image samples of each channel;
[0016] An image cropping module, for cropping a plurality of image blocks having a preset size and containing the target object sample with the positioning center as the cropping center for the microscopic image samples of each channel, to obtain a plurality of image blocks corresponding to each channel;
[0017] An image stitching module, used for stitching the multiple image blocks corresponding to the channels to form an image with the same image size as the microscopic image sample, to obtain a multi-channel stitched image sample;
[0018] A model training module, for inputting the multi-channel stitched image samples and the microscopic image samples into corresponding deep learning network models for training based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples; wherein the corresponding deep learning network model includes a plurality of deep learning network models corresponding to each channel image and a deep learning network model corresponding to the original image;
[0019] A multi-model positioning module, used to input the microscopic image to be identified into each trained deep learning network model, and obtain multiple identification and positioning results for the target object in the microscopic image output by each deep learning network model;
[0020] The comprehensive positioning module is used to identify and locate the target object in the microscopic image based on the multiple identification and positioning results.
[0021] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] Acquire a microscopic image sample containing a target sample, and acquire an image corresponding to each channel in a preset color space and the microscopic image sample to obtain a multi-channel microscopic image sample; determine the positioning center of the target sample in the microscopic image sample of each channel based on the pixel information of the binary image corresponding to the microscopic image sample of each channel; for the microscopic image sample of each channel, crop a plurality of image blocks having a preset size and containing the target sample with the positioning center as the cropping center to obtain a plurality of image blocks corresponding to each channel; respectively splice the plurality of image blocks corresponding to each channel to form an image with the same image size as the microscopic image sample to obtain a multi-channel spliced image sample; based on For labeling the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into corresponding deep learning network models for training; wherein the corresponding deep learning network model includes a plurality of deep learning network models corresponding to each channel image respectively and a deep learning network model corresponding to the original image; the microscopic image to be identified is input into each trained deep learning network model, and a plurality of identification and positioning results for the target object in the microscopic image respectively output by each deep learning network model are obtained; based on the plurality of identification and positioning results, the target object in the microscopic image is identified and positioned.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0024] Acquire a microscopic image sample containing a target sample, and acquire an image corresponding to each channel in a preset color space and the microscopic image sample to obtain a multi-channel microscopic image sample; determine the positioning center of the target sample in the microscopic image sample of each channel based on the pixel information of the binary image corresponding to the microscopic image sample of each channel; for the microscopic image sample of each channel, crop a plurality of image blocks having a preset size and containing the target sample with the positioning center as the cropping center to obtain a plurality of image blocks corresponding to each channel; respectively splice the plurality of image blocks corresponding to each channel to form an image with the same image size as the microscopic image sample to obtain a multi-channel spliced image sample; based on For labeling the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into corresponding deep learning network models for training; wherein the corresponding deep learning network model includes a plurality of deep learning network models corresponding to each channel image respectively and a deep learning network model corresponding to the original image; the microscopic image to be identified is input into each trained deep learning network model, and a plurality of identification and positioning results for the target object in the microscopic image respectively output by each deep learning network model are obtained; based on the plurality of identification and positioning results, the target object in the microscopic image is identified and positioned.
[0025] The above-mentioned method, device, computer equipment and storage medium for identifying and locating targets in microscopic images use multi-channel and multi-models to centrally acquire and learn the characteristic information of target samples in microscopic image samples and focus on identifying target samples in microscopic image samples, and use the trained multi-channel and multi-models to respectively output their respective identification and positioning results for targets in microscopic images, and then identify and locate targets in microscopic images by combining the identification and positioning results of each model, thereby effectively eliminating the interference of impurities and other characteristic-similar components in microscopic images, solving the problem of the complex nature of microscopic images, and realizing accurate identification and positioning of targets in microscopic images, avoiding missed detections and false detections. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a schematic flow chart of a method for identifying and locating a target object in a microscopic image in one embodiment;
[0027] Figure 2 A schematic diagram of the principle of a method for identifying and locating fecal worm eggs in a microscopic image in one embodiment;
[0028] Figure 3 A structural diagram of a deep learning network model in one embodiment;
[0029] Figure 4 is a structural block diagram of a device for identifying and locating a target object in a microscopic image in one embodiment;
[0030] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0032] In one embodiment, Figure 1 As shown, a method for identifying and locating a target in a microscopic image is provided. The method can be executed by a computer device, which can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server can be implemented by an independent server or a server cluster composed of multiple servers. The method can include the following steps:
[0033] Step S101 , obtaining a microscopic image sample containing a target object sample, and obtaining the microscopic image sample and an image corresponding to each channel in a preset color space to obtain a multi-channel microscopic image sample.
[0034] The microscopic image used for deep learning network model training is called a microscopic image sample, and the target object contained in the microscopic image sample is called a target object sample. For example, the microscopic image can be a fecal worm egg microscopic image containing fecal worm eggs, and the fecal worm eggs correspond to the aforementioned target object. The fecal worm egg microscopic image used for deep learning network model training is called a fecal worm egg microscopic image sample, and the fecal worm eggs contained in the image sample are called fecal worm egg samples.
[0035] In this step, after placing the target sample slide under the microscope, the computer device can obtain a microscopic image sample containing the target sample through a microscope imaging device, and the microscopic image sample can have a certain image size, and the image size can be 1024×1024. Among them, the microscopic image sample is a color image, and the computer device can transform the microscopic image sample into a preset color space, separate the image corresponding to each channel in the preset color space, and obtain a multi-channel microscopic image sample. In some embodiments, the preset color space can be an HSV color space, and each channel includes an H channel, an S channel, and a V channel. Based on this, the computer device can transform the microscopic image sample into an HSV color space, and separate the H channel, S channel, and V channel color images to obtain the aforementioned multi-channel microscopic image sample.
[0036] Step S102, determining the positioning center of the target object sample in each channel microscopic image sample based on the pixel information of the binary image corresponding to each channel microscopic image sample;
[0037] In this step, the computer device can grayscale the microscopic image samples of each channel respectively to obtain the grayscale images of the microscopic image samples of each channel, and then binarize the grayscale images of the microscopic image samples of each channel to obtain the binarized images of the microscopic image samples of each channel. Then, the computer device can locate the center of the target object sample in the microscopic image sample of each channel based on the pixel information contained in the binarized image corresponding to the microscopic image sample of each channel, and obtain the positioning center of the target object sample in the microscopic image sample of each channel.
[0038] In some embodiments, step S102 specifically includes: binarizing each channel microscopic image sample to obtain a binarized image corresponding to each channel microscopic image sample; and calculating a positioning center based on the pixel values and pixel coordinates of pixels used to characterize the target object sample in the binarized image corresponding to each channel microscopic image sample.
[0039] In the present embodiment, a multi-channel microscopic image sample including an H channel microscopic image sample, an S channel microscopic image sample and a V channel microscopic image sample is used as an example for explanation. Specifically, the computer device can grayscale the H channel, S channel and V channel microscopic image samples respectively to obtain the grayscale images of the H channel, S channel and V channel microscopic image samples, and then binarize the grayscale images of the H channel, S channel and V channel microscopic image samples respectively to obtain the binarized images of the H channel, S channel and V channel microscopic image samples. Then, the computer device can respectively calculate the positioning center of the target sample in the H channel, S channel and V channel microscopic image samples based on the pixel values and pixel coordinates of the pixel points used to characterize the target sample in the binarized images of the H channel, S channel and V channel microscopic image samples. Specifically, the computer device can use the following center positioning formula for each channel microscopic image sample to locate the center (X, Y) of the target sample contained therein:
[0040]
[0041] Wherein, (xi, yi) represents the pixel coordinates of the pixel point, pi is the pixel value of the pixel point, and n is the number of pixels. The positioning center of the target sample in each channel microscopic image sample can be accurately located by this center positioning formula.
[0042] Step S103, for each channel microscopic image sample, a plurality of image blocks having a preset size and containing the target object sample are cropped with the positioning center as the cropping center, to obtain a plurality of image blocks corresponding to each channel;
[0043] This step is mainly to crop multiple image blocks with preset sizes and containing target samples from the microscopic image samples of each channel. Specifically, for each channel microscopic image sample, the computer device uses the positioning center determined in the above step S102 as the cropping center to crop multiple image blocks with preset sizes and containing target samples, and obtain multiple image blocks corresponding to each channel. Exemplarily, after obtaining the positioning center of the target sample, the computer device crops image blocks (or small images) containing only the target sample from the microscopic image samples of each channel based on the positioning center and using, for example, 64×64 pixels as a preset size. Multiple image blocks can be cropped from each channel, and the size of each image block is 64×64, so that the computer device can obtain multiple image blocks containing only the target sample corresponding to each channel.
[0044] Step S104, stitching together the multiple image blocks corresponding to each channel to form an image with the same size as the image of the microscopic image sample, to obtain a multi-channel stitched image sample;
[0045] This step mainly involves splicing a certain number of image blocks corresponding to each channel to form an image of the same size as the aforementioned microscopic image sample, thereby obtaining a multi-channel spliced image sample. Specifically, assuming that the size of the image blocks corresponding to each channel is 64×64, and the image size of the microscopic image sample is 1024×1024, the computer device can splice 16×16 image blocks in each channel to form an image of the same size as the original image, i.e., the microscopic image sample (i.e., both are 1024×1024), thereby obtaining a multi-channel spliced image sample (or large image). For example, taking the HSV color space and the feces and eggs microscopic image as an example, the computer device can obtain a large image (1024×1024) of the same size as the original image synthesized from the feces and eggs small images (16×16 images) of the H channel, the S channel, and the V channel, i.e., obtain a spliced image sample of the H channel, the S channel, and the V channel.
[0046] Step S105, based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into the corresponding deep learning network model for training.
[0047] In this step, the corresponding deep learning network model may include a plurality of deep learning network models corresponding to each channel image and a deep learning network model corresponding to the original image. Taking the HSV color space as an example, the corresponding deep learning network model may include a deep learning network model A corresponding to the H channel, a deep learning network model B corresponding to the S channel, a deep learning network model C corresponding to the V channel, and a deep learning network model D corresponding to the original image (i.e., a microscopic image sample without channel separation). After obtaining the multi-channel spliced image sample, the computer device may annotate the target object samples contained in the multi-channel spliced image sample and the microscopic image sample by, for example, a LabelImg annotation tool, and based on the annotation, the spliced image sample of the H channel is input into the deep learning network model A, the spliced image sample of the S channel is input into the deep learning network model B, the spliced image sample of the V channel is input into the deep learning network model C, and the microscopic image sample is input into the deep learning network model D for training.
[0048] Step S106, inputting the microscopic image to be identified into each trained deep learning network model, and obtaining a plurality of identification and positioning results for the target object in the microscopic image outputted by each deep learning network model;
[0049] After the training of each deep learning network model is completed, the computer equipment can use a microscope imaging device to photograph the microscopic image to be identified, input the microscopic image into each of the deep learning network models after the aforementioned training, and output multiple identification and positioning results for the target object in the microscopic image through each deep learning network model.
[0050] Step S107: identifying and locating the target object in the microscopic image based on the multiple identification and positioning results.
[0051] This step is mainly that the computer device can integrate the recognition and positioning results output by each deep learning network model to identify and locate the target in the microscopic image to be identified. In one embodiment, step S107 may include: the computer device uses intra-class non-maximum suppression (NMS) on multiple recognition and positioning results to obtain the confidence of each recognition and positioning result; and uses the recognition and positioning result with the highest confidence among the multiple recognition and positioning results as the recognition and positioning result of the target in the microscopic image. That is, the computer device uses intra-class non-maximum suppression (NMS) to screen and compound the recognition and positioning results output by each deep learning network model obtained in the aforementioned step S106, and outputs the one with the highest confidence among these recognition and positioning results as the final recognition and positioning result, thereby improving the accuracy of recognition and positioning.
[0052] In an exemplary embodiment, taking the HSV color space and the feces and eggs microscopic image as an example, Figure 2 Further explanation of the above method:
[0053] The computer device can collect a fecal egg microscopic image through a microscope imaging device, and the image can be called an original image, and its image size is 1024×1024. Then, the computer device performs HSV color space transformation on the fecal egg microscopic image, separates the H channel, S channel and V channel color images, grayscales the H channel, S channel and V channel color images respectively, obtains the H channel, S channel and V channel grayscale images, and binarizes the H channel, S channel and V channel grayscale images respectively to obtain H channel, S channel and V channel binary images, and uses the above-mentioned center positioning formula to locate the center of the fecal egg for each channel binary image. After obtaining the center position of the fecal egg, the fecal egg is extracted based on the center with a size of 64×64, and the image blocks containing only the fecal eggs are cropped from the H channel, S channel and V channel color images respectively ( 64×64), and obtain feces and egg image blocks of H channel, S channel and V channel color images respectively. Then the computer device can use image stitching technology to synthesize feces and egg image blocks (16×16 sheets) of H channel, S channel and V channel respectively. The computer device can then label the feces and egg mosaic images and feces and egg microscopic images of the H channel, S channel and V channel through, for example, LabelImg labeling tools, and based on the labeling, input the feces and egg mosaic images of the H channel, S channel and V channel into deep learning models A to C respectively, and input the feces and egg microscopic images into deep learning model D for training. After the training of the model is completed, the computer equipment can use the trained deep learning models A to D to identify and locate the fecal insect eggs to be identified in the fecal insect egg microscopic images, obtain the identification and positioning results output by the trained deep learning models A to D, and use the intra-class non-maximum suppression screening and compounding to output the identification and positioning results with the highest confidence as the final identification and positioning result, so as to improve the accuracy of identification and positioning.
[0054] In the above-mentioned method for identifying and locating targets in microscopic images, the computer equipment uses multi-channel and multi-models to centrally acquire and learn the characteristic information of target samples in microscopic image samples and focus on identifying target samples in microscopic image samples, and uses the trained multi-channel and multi-models to output the identification and positioning results of the targets in the microscopic images respectively, and then integrates the identification and positioning results of each model to identify and locate the targets in the microscopic images, thereby effectively eliminating the interference of impurities and other similar components with similar characteristics in the microscopic images, solving the problem of the complex nature of microscopic images, and realizing accurate identification and positioning of targets in microscopic images, avoiding missed detection and false detection. In the application of fecal worm egg microscopic images, this method can effectively eliminate the interference of impurities and other similar components with similar characteristics in fecal worm egg microscopic images, solve the problem of the complex nature of fecal worm egg microscopic images, eliminate missed detection and false detection, and realize automatic and accurate identification of fecal worm eggs. The identification process does not require tedious manual identification, reduces the influence of subjective factors, significantly speeds up the detection rate, and achieves high recognition accuracy while improving work efficiency.
[0055] In one embodiment, in step S105, based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into the corresponding deep learning network model for training, which may include:
[0056] Obtain annotations for target object samples in multi-channel stitched image samples and microscopic image samples; use the multi-channel stitched image samples and the first part of microscopic image samples in the microscopic image samples as training sets, and use the second part of microscopic image samples in the microscopic image samples that do not overlap with the first part of microscopic image samples as test sets; based on the annotations, use the training set and the test set to train and test each deep learning network model to obtain each trained deep learning network model.
[0057] This embodiment mainly divides the image samples into training sets and test sets to train and test each deep learning network model, so as to train a deep learning network model with higher recognition. Specifically, the computer device can obtain the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples through the LabelImg annotation tool. On the other hand, the computer device can use all the multi-channel stitched image samples as the training set, and use the first part of the microscopic image samples in the microscopic image samples as the training set, that is, the training set includes all the multi-channel stitched image samples and the first part of the microscopic image samples in the microscopic image samples. In addition, the computer device uses the second part of the microscopic image samples in the microscopic image samples as the test set, and the second part of the microscopic image samples is the part of the microscopic image samples in the microscopic image samples that does not overlap with the first part of the microscopic image samples. Exemplarily, the computer device can use the LabelImg annotation tool to annotate the feces and eggs spliced image samples and feces and eggs microscopic image samples of the H channel, S channel, and V channel, create a data set, and divide the data set into four training sets and one test set, wherein the feces and eggs spliced image samples of the H channel, S channel, and V channel and a part of the feces and eggs microscopic image samples are used as training sets A, training sets B, training sets C, and training sets D, respectively, and another part of the feces and eggs microscopic image samples that do not overlap with the training sets are used as test sets. This embodiment adopts the above-mentioned division method of training sets and test sets, which can make the deep learning network model after training and testing have a higher recognition degree of the target object under the condition of making full use of image sample resources.
[0058] Furthermore, before using the training set and the test set to train and test each deep learning network model in the above embodiment, the training set can also be preprocessed. Among them, the preprocessing may include: pixel value adjustment processing, median blur processing, image translation processing, image rotation processing, image scaling processing, image flipping processing, brightness adjustment processing and / or contrast adjustment processing. Specifically, the pixel value adjustment processing may be to randomly add or subtract 10 to 15 to the pixel value of each pixel in the image, the median blur processing may be a median blur processing with a kernel size of 3 to 5, the image translation processing may be to translate the image left and right between ±30°, the image rotation processing may be to rotate the image between ±45°, the image scaling processing may be to scale the image by 0.8 to 1.2 times, the image flipping processing may be to flip the image up and down, left and right by 180°, the brightness adjustment processing and the contrast adjustment processing may be brightness and contrast changes of 0.8 to 1.2 times, etc. The computer device can further train and test each deep learning network model based on the aforementioned annotations using the training set and test set that have undergone the above preprocessing, so as to train a deep learning network model with higher recognition accuracy and reliability for the target object.
[0059] In some embodiments, the model structures of the aforementioned deep learning network models are the same. Figure 3 , each deep learning network model can include a feature extraction network and a fully convolutional neural network (FCN) connected in sequence. Among them, the feature extraction network can specifically use ResNet to extract the feature map of the input image, and the input image can specifically include a microscopic image sample, a spliced image sample of each channel, and a microscopic image to be identified, etc. Then, the feature extraction network can output the extracted feature map to the fully convolutional neural network for identifying and locating the target object.
[0060] Among them, the fully convolutional neural network can specifically include a classification subnetwork and a regression subnetwork, the classification subnetwork is used to classify the target object, and the regression subnetwork is used to locate the target object. Specifically, the feature map of the fecal worm egg microscopic image extracted by the feature extraction network can be output to the classification subnetwork and the regression subnetwork respectively, and the fecal worm eggs are classified by the classification subnetwork, and the fecal worm eggs are located by the regression subnetwork. That is, the features extracted by the feature extraction network can be shared by the classification subnetwork and the regression subnetwork, and the classification and positioning tasks are completed at the same time, thereby improving the efficiency of identifying and locating the target in the microscopic image. In addition, this embodiment adopts a multi-channel multi-model cascade as a whole, centrally acquires the feature information of the target object such as fecal worm eggs, and focuses on identifying the target object, which can effectively eliminate the interference of impurities and other feature-similar components in the microscopic image, solve the problem of the complex nature of the microscopic image, eliminate missed detection and false detection, and realize automatic and accurate identification and positioning of the target in the microscopic image. There is no need for cumbersome manual identification during the identification and positioning process, which reduces the influence of subjective factors, significantly speeds up the detection rate, improves work efficiency and achieves high recognition accuracy.
[0061] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0062] In one embodiment, Figure 4 As shown, a device for identifying and locating a target in a microscopic image is provided, and the device 400 may include:
[0063] The sample acquisition module 401 is used to acquire a microscopic image sample containing a target object sample, and acquire the microscopic image sample and an image corresponding to each channel in a preset color space to obtain a multi-channel microscopic image sample;
[0064] A center positioning module 402 is used to determine the positioning center of the target object sample in each channel microscopic image sample based on the pixel information of the binary image corresponding to each channel microscopic image sample;
[0065] An image cropping module 403 is used to crop a plurality of image blocks having a preset size and containing the target object sample with the positioning center as the cropping center for the microscopic image samples of each channel, so as to obtain a plurality of image blocks corresponding to each channel;
[0066] An image stitching module 404 is used to stitch the multiple image blocks corresponding to the channels to form an image with the same image size as the microscopic image sample, so as to obtain a multi-channel stitched image sample;
[0067] A model training module 405 is used to input the multi-channel stitched image samples and the microscopic image samples into corresponding deep learning network models for training based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples; wherein the corresponding deep learning network model includes a plurality of deep learning network models corresponding to each channel image and a deep learning network model corresponding to the original image;
[0068] The multi-model positioning module 406 is used to input the microscopic image to be identified into each trained deep learning network model, and obtain multiple identification and positioning results for the target object in the microscopic image output by each deep learning network model;
[0069] The comprehensive positioning module 407 is used to identify and locate the target object in the microscopic image based on the multiple identification and positioning results.
[0070] In one embodiment, the comprehensive positioning module 407 is further used to apply intra-class non-maximum suppression to the multiple recognition and positioning results to obtain the confidence of each recognition and positioning result; and use the recognition and positioning result with the highest confidence among the multiple recognition and positioning results as the recognition and positioning result of the target object in the microscopic image.
[0071] In one embodiment, the model training module 405 is further used to obtain annotations for the target object samples in the multi-channel stitched image samples and the microscopic image samples; use the multi-channel stitched image samples and the first part of the microscopic image samples in the microscopic image samples as training sets, and use the second part of the microscopic image samples in the microscopic image samples that do not overlap with the first part of the microscopic image samples as a test set; based on the annotations, use the training set and the test set to train and test the respective deep learning network models to obtain the trained deep learning network models.
[0072] In one embodiment, the model training module 405 is further used to preprocess the training set; the preprocessing includes: pixel value adjustment processing, median blur processing, image translation processing, image rotation processing, image scaling processing, image flipping processing, brightness adjustment processing and / or contrast adjustment processing; based on the annotation, the preprocessed training set and test set are used to train and test the deep learning network models to obtain the trained deep learning network models.
[0073] In one embodiment, the model structures of the deep learning network models are the same; the deep learning network models include a feature extraction network and a fully convolutional neural network connected in sequence; wherein the feature extraction network is used to obtain feature maps and input them into the fully convolutional neural network; the fully convolutional neural network includes a classification subnetwork for classifying the target object and a regression subnetwork for locating the target object.
[0074] In one embodiment, the center positioning module 402 is further used to binarize the microscopic image samples of each channel to obtain the binarized images corresponding to the microscopic image samples of each channel; and calculate the positioning center according to the pixel values and pixel coordinates of the pixels used to characterize the target object sample in the binarized images corresponding to the microscopic image samples of each channel.
[0075] In one embodiment, the microscopic image is a feces and worm egg microscopic image; the target object is feces and worm eggs; the preset color space is an HSV color space; and the channels include an H channel, an S channel, and a V channel.
[0076] The specific definition of the device for identifying and locating the target in the microscopic image can be found in the definition of the method for identifying and locating the target in the microscopic image above, which will not be repeated here. Each module in the above-mentioned device for identifying and locating the target in the microscopic image can be implemented in whole or in part by software, hardware and a combination thereof. 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 the above modules.
[0077] In one embodiment, a computer device is provided. The computer device may be a terminal or a server. The internal structure diagram thereof may be as follows: Figure 5 As shown. The computer device includes a processor, a memory and a network interface connected through 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 external devices through a network connection. When the computer program is executed by the processor, a method for identifying and locating a target in a microscopic image is implemented.
[0078] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0079] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0080] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0081] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0082] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for identifying and locating a target object in a microscopic image, characterized in that: The method comprises: Acquire a microscopic image sample containing a target object sample, and acquire an image corresponding to each channel in a preset color space and the microscopic image sample to obtain a multi-channel microscopic image sample; Determine the positioning center of the target object sample in the microscopic image samples of each channel based on the pixel information of the binary image corresponding to the microscopic image samples of each channel; For the microscopic image samples of each channel, a plurality of image blocks having a preset size and containing the target object samples are cropped with the positioning center as the cropping center to obtain a plurality of image blocks corresponding to each channel; respectively stitching the plurality of image blocks corresponding to the channels to form an image with the same size as the image of the microscopic image sample, to obtain a multi-channel stitched image sample; Based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into corresponding deep learning network models for training; wherein the corresponding deep learning network models include a plurality of deep learning network models corresponding to each channel image respectively and a deep learning network model corresponding to the original image; Inputting the microscopic image to be identified into each trained deep learning network model, and obtaining a plurality of identification and positioning results for the target object in the microscopic image outputted by each deep learning network model; Based on the multiple identification and positioning results, the target object in the microscopic image is identified and positioned.
2. The method according to claim 1, characterized in that: The identifying and locating the target object in the microscopic image based on the multiple identification and positioning results includes: Applying intra-class non-maximum suppression to the multiple recognition and positioning results to obtain the confidence of each recognition and positioning result; The recognition and positioning result with the highest confidence among the multiple recognition and positioning results is used as the recognition and positioning result of the target object in the microscopic image.
3. The method according to claim 1, characterized in that Based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples, the multi-channel stitched image samples and the microscopic image samples are respectively input into corresponding deep learning network models for training, including: Obtaining annotations for the target object samples in the multi-channel stitched image samples and the microscopic image samples; Using the multi-channel stitched image samples and a first part of the microscopic image samples in the microscopic image samples as a training set, and using a second part of the microscopic image samples in the microscopic image samples that do not overlap with the first part of the microscopic image samples as a test set; Based on the annotations, the deep learning network models are trained and tested using the training set and the test set to obtain the trained deep learning network models.
4. The method according to claim 3, characterized in that The method of training and testing each deep learning network model based on the annotation using the training set and the test set to obtain each trained deep learning network model includes: Preprocessing the training set; the preprocessing includes: pixel value adjustment processing, median blur processing, image translation processing, image rotation processing, image scaling processing, image flipping processing, brightness adjustment processing and / or contrast adjustment processing; Based on the annotations, the deep learning network models are trained and tested using the preprocessed training set and test set to obtain the trained deep learning network models.
5. The method according to claim 3, characterized in that: The model structures of the deep learning network models are the same; the deep learning network models include a feature extraction network and a fully convolutional neural network connected in sequence; wherein the feature extraction network is used to obtain feature maps and input them into the fully convolutional neural network; the fully convolutional neural network includes a classification subnetwork for classifying the target object and a regression subnetwork for locating the target object.
6. The method according to claim 1, characterized in that The determining of the positioning center of the target object sample in each channel microscopic image sample based on the pixel information of the binary image corresponding to each channel microscopic image sample comprises: Binarization is performed on the microscopic image samples of each channel to obtain a binary image corresponding to the microscopic image samples of each channel; The positioning center is calculated according to the pixel values and pixel coordinates of the pixels used to characterize the target object sample in the binary image corresponding to the microscopic image samples of each channel.
7. The method according to any one of claims 1 to 6, characterized in that: The microscopic image is a feces and worm egg microscopic image; the target object is feces and worm eggs; the preset color space is the HSV color space; and the channels include an H channel, an S channel, and a V channel.
8. A device for identifying and locating a target object in a microscopic image, characterized in that: include: A sample acquisition module is used to acquire a microscopic image sample containing a target object sample, and acquire an image corresponding to each channel in a preset color space and the microscopic image sample to obtain a multi-channel microscopic image sample; A center positioning module, used to determine the positioning center of the target object sample in the microscopic image samples of each channel based on the pixel information of the binary image corresponding to the microscopic image samples of each channel; An image cropping module, for cropping a plurality of image blocks having a preset size and containing the target object sample with the positioning center as the cropping center for the microscopic image samples of each channel, to obtain a plurality of image blocks corresponding to each channel; An image stitching module, used for stitching the multiple image blocks corresponding to the channels to form an image with the same image size as the microscopic image sample, to obtain a multi-channel stitched image sample; A model training module, for inputting the multi-channel stitched image samples and the microscopic image samples into corresponding deep learning network models for training based on the annotation of the target object samples in the multi-channel stitched image samples and the microscopic image samples; wherein the corresponding deep learning network model includes a plurality of deep learning network models corresponding to each channel image and a deep learning network model corresponding to the original image; A multi-model positioning module, used to input the microscopic image to be identified into each trained deep learning network model, and obtain multiple identification and positioning results for the target object in the microscopic image output by each deep learning network model; The comprehensive positioning module is used to identify and locate the target object in the microscopic image based on the multiple identification and positioning results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for detecting magnaporthe grisea spore based on microscopic image analysis
CN104651462A
Moving object detection method based on deep full-convolution neural network
CN108492319A
