A slice detection method, medium, device and apparatus
By using a two-layer slice category recognition model, abnormal field-of-view images are first filtered out, and then clear and blurry images are identified, which solves the problem of high false judgment rate in digital slice detection and achieves efficient and automated detection.
Patent Information
- Application Number
- CN202310676960.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-06-08
AI Technical Summary
In existing technologies, digital slice detection is easily affected by invalid content on the slice, resulting in a high false positive rate, and manual detection is inefficient.
A two-layer slice category recognition model is adopted. First, abnormal field images are screened through a residual neural network model. Then, clear and motion-blurred images are identified through a support vector machine. Combined with statistical results, the slice clip status is judged and alarm information is generated.
It achieves automated detection, avoids misjudgments caused by invalid content, and improves the accuracy and efficiency of slice detection.
Smart Images

Figure CN116863202B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of slide inspection technology, and in particular to a slide inspection method, medium, equipment and apparatus. Background Technology
[0002] With the development of digital technology, digital slide technology is being used more and more widely. Every day, a large number of specimens need to be scanned into digital slides. For these massive amounts of digital slides, if the quality inspection of the slides is all done manually, this inspection process will consume a lot of human resources and be inefficient.
[0003] In related technologies, the quality inspection of digital slices often relies on a combination of feature analysis and support vector machines to determine whether a digital slice is blurry. However, this method is prone to errors when the digital slice contains a large amount of invalid content, easily leading to invalid slices being classified as sharp. For example, when the field of view is blank but contains a lot of dust, feature analysis will extract the feature information corresponding to the dust, thus classifying the digital slice as sharp. In other words, this method of detecting digital slices using feature analysis combined with support vector machines is easily affected by invalid content in the slice, resulting in a high false positive rate. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, one objective of this invention is to propose a slice detection method that can automatically detect slices, avoid misjudgments caused by invalid content on the slices, and improve the accuracy of slice detection results.
[0005] In a first aspect, embodiments of the present invention propose a slice detection method, comprising the following steps: acquiring a field-of-view image of a slice in a slice holder to be detected, and inputting the field-of-view image into a pre-trained first slice category recognition model to perform image recognition on the field-of-view image through the first slice category recognition model to obtain a first slice type corresponding to the field-of-view image, wherein the first slice type includes abnormal field-of-view images and non-abnormal field-of-view images; if the first slice type is a non-abnormal field-of-view image, then inputting the field-of-view image into a second slice category recognition model to output a second slice type corresponding to the field-of-view image through the second slice category recognition model, wherein the second slice type includes clear images and motion-blurred images.
[0006] According to the slice detection method of the present invention, firstly, a field-of-view image of a slice in a slice folder to be detected is acquired, and the field-of-view image is input into a pre-trained first slice category recognition model to perform image recognition on the field-of-view image through the first slice category recognition model to obtain a first slice type corresponding to the field-of-view image, wherein the first slice type includes abnormal field-of-view images and non-abnormal field-of-view images; then, if the first slice type is a non-abnormal field-of-view image, the field-of-view image is input into a second slice category recognition model to output a second slice type corresponding to the field-of-view image through the second slice category recognition model, wherein the second slice type includes clear images and motion-blurred images; thereby realizing automatic slice detection, avoiding misjudgment caused by invalid content on the slice, and improving the accuracy of slice detection results.
[0007] In some embodiments, the abnormal field-of-view images include blank field-of-view images, dust field-of-view images, glass field-of-view images, and slices rotated in reverse.
[0008] In some embodiments, the first slice category recognition model is a residual neural network model, which includes convolutional layers, pooling layers, fully connected layers, softmax layers, and residual modules; the second slice category recognition model is a support vector machine.
[0009] In some embodiments, the detection method further includes: counting the number of slices corresponding to each first slice type in the slice holder to be detected to obtain a first statistical result; counting the number of slices corresponding to each second slice type in the slice holder to be detected to obtain a second statistical result; and determining the state type of the slice holder to be detected based on the first statistical result and the second statistical result.
[0010] In some embodiments, determining the state type of the slice clip to be detected based on the first statistical result and the second statistical result includes: calculating the sum of the number of slices in the dusty field-of-view image, the number of slices in the glass field-of-view image, the number of slices in the reversed slice image, the number of slices in the clear image, and the number of slices in the motion-blurred image, and taking the sum of the numbers as the total number of effective field-of-view images; calculating the proportion of the number of slices in the dusty field-of-view image, the proportion of the number of slices in the glass field-of-view image, the proportion of the number of slices in the reversed slice image, the proportion of the number of slices in the clear image, and the proportion of the number of slices in the motion-blurred image based on the total number of effective field-of-view images; and determining the state type of the slice clip to be detected based on the proportion of the number of slices in the dusty field-of-view image, the proportion of the number of slices in the glass field-of-view image, the proportion of the number of slices in the reversed slice image, the proportion of the number of slices in the clear image, and the proportion of the number of slices in the motion-blurred image.
[0011] In some embodiments, determining the state type of the slice clip to be detected based on the proportion of slices in the dusty field-of-view image, the proportion of slices in the glass field-of-view image, the proportion of slices in the inverted slice image, the proportion of slices in the clear image, and the proportion of slices in the motion-blurred image includes: determining whether the proportion of slices in the clear image is greater than a first quantity threshold; if so, the state type of the slice clip to be detected is considered to be clear; if not, the state type of the slice clip to be detected is considered to be blurred, and determining the blur category based on the proportion of slices in the dusty field-of-view image, the proportion of slices in the glass field-of-view image, the proportion of slices in the inverted slice image, and the proportion of slices in the motion-blurred image.
[0012] In some embodiments, the detection method further includes: generating alarm information based on the fuzzy category, and sending the alarm information to relevant personnel so that the relevant personnel can process the slice clip to be detected based on the alarm information.
[0013] Secondly, embodiments of the present invention provide a computer-readable storage medium storing a slice detection program thereon, which, when executed by a processor, implements the slice detection method as described above.
[0014] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the slice detection method described above.
[0015] Fourthly, embodiments of the present invention propose a slice detection device, comprising: a first recognition module, the first recognition module being used to acquire a field-of-view image of a slice in a slice holder to be detected, and input the field-of-view image into a pre-trained first slice category recognition model, so as to perform image recognition on the field-of-view image through the first slice category recognition model to obtain a first slice type corresponding to the field-of-view image, wherein the first slice type includes abnormal field-of-view images and non-abnormal field-of-view images; and a second recognition module, the second recognition module being used to input the field-of-view image into a second slice category recognition model when the first slice type is a non-abnormal field-of-view image, so as to output a second slice type corresponding to the field-of-view image through the second slice category recognition model, wherein the second slice type includes clear images and motion-blurred images.
[0016] According to an embodiment of the present invention, a slice detection device includes a first recognition module for acquiring a field-of-view image of a slice in a slice holder to be detected, and inputting the field-of-view image into a pre-trained first slice category recognition model to perform image recognition on the field-of-view image through the first slice category recognition model to obtain a first slice type corresponding to the field-of-view image, wherein the first slice type includes abnormal field-of-view images and non-abnormal field-of-view images; and a second recognition module for inputting the field-of-view image into a second slice category recognition model when the first slice type is a non-abnormal field-of-view image, and outputting a second slice type corresponding to the field-of-view image through the second slice category recognition model, wherein the second slice type includes clear images and motion-blurred images; thereby achieving automatic slice detection, avoiding misjudgments caused by invalid content on the slice, and improving the accuracy of slice detection results.
[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0018] Figure 1 This is a schematic flowchart of a slice detection method according to an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of a small network framework according to an embodiment of the present invention;
[0020] Figure 3 This is a schematic flowchart of a slice detection method according to another embodiment of the present invention;
[0021] Figure 4 This is a block diagram of a computer device according to an embodiment of the present invention;
[0022] Figure 5 This is a block diagram of a slice detection device according to an embodiment of the present invention. Detailed Implementation
[0023] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0024] The slice detection method of the present invention is described below with reference to the accompanying drawings.
[0025] Please see Figure 1 , Figure 1 This is a schematic flowchart of a slice detection method according to an embodiment of the present invention; as shown Figure 1 As shown, the slice detection method includes the following steps:
[0026] S101, acquire the field-view image of the slice in the slice clip to be detected, and input the field-view image into the pre-trained first slice category recognition model, so as to perform image recognition on the field-view image through the first slice category recognition model to obtain the first slice type corresponding to the field-view image, wherein the first slice type includes abnormal field-view images and non-abnormal field-view images.
[0027] In other words, firstly, a first slice category recognition model is trained. This model can perform image recognition on the input field image to obtain the first slice type corresponding to the field image. Then, based on the first slice type output by the first slice category recognition model, it can be determined whether the field image is an abnormal field image. In this way, by performing a screening through the first slice category recognition model, the influence of abnormal field images on the judgment of subsequent models can be effectively eliminated, thereby improving the overall accuracy of slice detection.
[0028] In some embodiments, abnormal field-of-view images include blank field-of-view images, dust field-of-view images, glass field-of-view images, and slices in reverse.
[0029] Among them, blank field of view image indicates a field of view image without effective feature content, dusty field of view image indicates a field of view image with a large amount of dust, glass field of view image indicates a field of view image in which the user selected a coverslip or other edge impurities, and reversed slide image indicates a field of view image in which the pathological slide is reversed, resulting in a blurred field of view image.
[0030] In some embodiments, the first slice category recognition model is a residual neural network model, which includes convolutional layers, pooling layers, fully connected layers, softmax layers, and residual modules; the second slice category recognition model is a support vector machine.
[0031] As an example, firstly, historical field-of-view images of the slice are acquired (these images can be captured by a camera or scanned by a scanner; the method of acquisition is not limited here); next, the historical field-of-view images are labeled (i.e., according to their category, such as blank historical field-of-view images, dusty historical field-of-view images, glass historical field-of-view images, etc.); then, training data is generated based on the labeled historical field-of-view images, and this training data is used to train the model to obtain a residual neural network model. Preferably, a small network framework, such as ResNet, can be selected to ensure inference speed. Specifically, this small network framework is as follows: Figure 2As shown. Simultaneously, the number of residual modules in the residual neural network is tuned to better adapt to the data. Preferably, the network architecture of the residual neural network is as follows: the first layer is a convolutional layer, which is used for dimensionality reduction and feature extraction of the input image; the second layer consists of two residual modules, which facilitate model training convergence, solve the degradation (accuracy reduction) problem, and improve the accuracy of the final model; it should be noted that the first convolutional layer and the second layer are connected through a max pooling layer; the third and fourth layers each have 6 residual modules; the fifth layer is a downsampling residual module, including two residual modules; the sixth layer is a fully connected layer, which is connected to the fifth layer through an average pooling layer, and is used to combine the features discovered during the convolution process to obtain the final classification result; the seventh layer is a softmax layer, which is used to perform a transformation on the final classification result output by the fully connected layer to output the corresponding probability result.
[0032] As an example, the preparation for a support vector machine mainly includes: First, acquiring images; specifically, acquiring a large number of blurry images, dusty images, misplaced images (non-horizontal or reversed images), and clear images using a scanner; these images will serve as samples for feature extraction and recognition verification. Next, feature extraction is performed on the acquired images.
[0033] Specifically, the feature extraction process includes: first, calculating the mean values of the R, G, and B channels of the image respectively, and normalizing them to avoid sudden peaks.
[0034] The above process is expressed by the following formula:
[0035]
[0036]
[0037]
[0038] Next, the image is processed to obtain a grayscale image; then, the corresponding Sobel operator and Gaussian filter operator are extracted based on the grayscale image.
[0039] The Sobel operator extraction process specifically includes extracting the horizontal and vertical edge information of the images separately, and then merging the two images with weights. Next, feature extraction is performed on the merged image. This includes finding the global maximum value (peak value) in the image and extracting the standard deviation of the image pixels.
[0040] The aforementioned lateral edge information is calculated using the following formula:
[0041] d x=[f(i-1,j-1)+2f(i-1,j)+f(i-1,j+1)]-[f(i+1,j)+f(i+1,j+1)]
[0042] The above vertical edge information is calculated using the following formula:
[0043] d y =[f(i-1,j+1)+2f(i,j+1)+f(i+1,j+1)]-[f(i-1,j-1)+2f(i,j-1)+f(i+1,j-1)]
[0044] Where (i,j) represents the coordinates of a pixel. During the calculation process, horizontal edge information is retrieved horizontally using a 3*3 window, and vertical edge information is retrieved vertically using a 3*3 window.
[0045] The above standard deviation is calculated using the following formula:
[0046]
[0047] The aforementioned peak value is calculated using the following formula:
[0048] I max =max(I)
[0049] It should be noted that Gaussian filtering extracts noise information from an image and uses Gaussian filtering to smooth the image. If the image was originally blurry, it will remain blurry after smoothing. If the image was originally sharp, it will retain certain contours after smoothing.
[0050] Specifically, the image is processed using a Gaussian filter according to the following formula:
[0051]
[0052] Where (x,y) represents the coordinates of a pixel, σ represents the variance, and e is the exponent.
[0053] Next, a support vector machine is used to train the image based on the above features (mean values of R, G, and B channels), the maximum and variance values of the image based on the Sobel operator, and the mean and variance values of the image based on the Gaussian filter, for a total of 7 feature values.
[0054] S102, if the first slice type is a non-abnormal field of view image, then the field of view image is input into the second slice category recognition model so as to output the second slice type corresponding to the field of view image through the second slice category recognition model, wherein the second slice type includes clear image and motion blurred image.
[0055] In some embodiments, the detection method further includes: counting the number of slices corresponding to each first slice type in the slice holder to be detected to obtain a first statistical result; counting the number of slices corresponding to each second slice type in the slice holder to be detected to obtain a second statistical result; and determining the state type of the slice holder to be detected based on the first statistical result and the second statistical result.
[0056] In other words, the slice types of multiple slices in the slice holder to be tested are statistically analyzed. Specifically, the number of slices corresponding to each first slice type is statistically analyzed, that is, the number of blank field images, dust field images, glass field images, slice inverted images, and non-abnormal slice images are counted. Preferably, the number of non-abnormal slice images can be omitted, because the sum of the second statistical results is the value of the number of non-abnormal slice images, and the second statistical result is more refined. Next, the number of slices corresponding to the second slice type is statistically analyzed, that is, the number of clear images and motion-blurred images are counted. Then, the state type of the slice holder to be tested is determined based on the statistical results. That is, the validity of the slice holder to be tested and whether the clarity requirements are met are judged based on the statistical results.
[0057] In some embodiments, determining the state type of the slice clip to be detected based on the first statistical result and the second statistical result includes: calculating the sum of the number of slices in the dusty field-of-view image, the number of slices in the glass field-of-view image, the number of slices in the reversed slice image, the number of slices in the clear image, and the number of slices in the motion-blurred image, and taking the sum of the numbers as the total number of effective field-of-view images; calculating the proportion of the number of slices in the dusty field-of-view image, the proportion of the number of slices in the glass field-of-view image, the proportion of the number of slices in the reversed slice image, the proportion of the number of slices in the clear image, and the proportion of the number of slices in the motion-blurred image based on the total number of effective field-of-view images; and determining the state type of the slice clip to be detected based on the proportion of the number of slices in the dusty field-of-view image, the proportion of the number of slices in the glass field-of-view image, the proportion of the number of slices in the reversed slice image, the proportion of the number of slices in the clear image, and the proportion of the number of slices in the motion-blurred image.
[0058] In some embodiments, determining the state type of the slice clip to be detected based on the proportion of slices in the dusty field-of-view image, the proportion of slices in the glass field-of-view image, the proportion of slices in the inverted slice image, the proportion of slices in the clear image, and the proportion of slices in the motion-blurred image includes: determining whether the proportion of slices in the clear image is greater than a first quantity threshold; if so, the state type of the slice clip to be detected is considered to be a clear state; if not, the state type of the slice clip to be detected is considered to be a blurred state, and determining the blur category based on the proportion of slices in the dusty field-of-view image, the proportion of slices in the glass field-of-view image, the proportion of slices in the inverted slice image, and the proportion of slices in the motion-blurred image.
[0059] In other words, the corresponding proportion is calculated based on the number of slices corresponding to each slice type; further, the slice clip state type is determined based on the proportion.
[0060] As an example, after calculating the proportion of slices corresponding to the slice type, firstly, it is determined whether the proportion of slices in the clear image is greater than a preset first quantity threshold (for example, assuming the first quantity threshold is 30%). If so, the current slice to be detected is considered to be in a clear state. If not, the blur category is further determined based on the proportion of slices.
[0061] There are several ways to determine the fuzzy category based on the proportion of slices.
[0062] For example, the percentage of slices in the dusty field-of-view image, the percentage of slices in the glass field-of-view image, the percentage of slices in the reversed image, the percentage of slices in the clear image, and the percentage of slices in the motion-blurred image are determined one by one to see if they are greater than a second quantity threshold (for example, the second quantity threshold is set to 50%). Then, the blur category is determined based on the determination results. Specifically, if the percentage of slices in the dusty field-of-view image is greater than the second quantity threshold, the blur category is dusty field-of-view image; if the percentage of slices in the glass field-of-view image is greater than the second quantity threshold, the blur category is glass field-of-view image; and so on.
[0063] Alternatively, the proportions of slices in the dusty field of view image, the glass field of view image, the inverted slice image, the clear image, and the motion-blurred image can be sorted from largest to smallest; then the category ranked first can be used as the blur category of the slice clip.
[0064] In some embodiments, the detection method further includes: generating alarm information based on a fuzzy category and sending the alarm information to relevant personnel so that the relevant personnel can process the slice folder to be detected based on the alarm information.
[0065] In other words, corresponding alarm information is generated based on fuzzy categories so that relevant humans can take appropriate actions based on the alarm information.
[0066] As an example, if the blur category is motion blur image, the user is prompted that the current blur category is motion blur image and the slice to be detected should be re-scanned and modeled; if the blur category is dust field image or glass field image, the user is prompted that the current blur category is dust field image or glass field image and the modeling points should be increased, and attention should be paid to the slice thickness.
[0067] As a specific embodiment of the present invention, such as Figure 3 As shown, the slice detection method includes the following steps:
[0068] S301, Obtain the field-of-view image of the slice in the slice holder to be detected.
[0069] S302, determine whether there is an unanalyzed field-of-view image in the slice clip to be detected; if so, proceed to step S303; if not, proceed to step S308.
[0070] S303, acquire unanalyzed field-of-view image.
[0071] S304, input the unanalyzed field of view image into the first slice category recognition model to obtain the corresponding first slice type; if the first slice type is an abnormal field of view image, then execute step S305; if the first slice type is a non-abnormal field of view image, then execute step S306.
[0072] S305, perform statistics on the abnormal field of view images to obtain the first statistical result, and then jump to step S301.
[0073] As an example, if the current abnormal field of view image is a blank field of view, the statistical value corresponding to the blank field of view is incremented by 1; if it is a dusty field of view image, the statistical value of the dusty field of view image is incremented by 1.
[0074] S306, Input the non-abnormal field-of-view image into the second slice category recognition model to obtain the corresponding second slice type.
[0075] S307, Perform statistics based on the second slice type to obtain the second statistical result; jump to step S301.
[0076] S308, calculate the sum of the number of slices in the dusty field-of-view image, the number of slices in the glass field-of-view image, the number of slices in the inverted image, the number of slices in the clear image, and the number of slices in the motion-blurred image, and use the sum of the numbers as the total number of effective field-of-view images.
[0077] S309, based on the total number of effective field-of-view images, calculate the percentage of slices in the dust field-of-view image, the percentage of slices in the glass field-of-view image, the percentage of slices in the reversed image, the percentage of slices in the clear image, and the percentage of slices in the motion-blurred image.
[0078] S310, determine the state type of the slice clip to be detected based on the proportion of slices in the dust field image, the proportion of slices in the glass field image, the proportion of slices in the reversed image, the proportion of slices in the clear image, and the proportion of slices in the motion-blurred image.
[0079] S311, generate alarm information based on fuzzy category and send the alarm information to relevant personnel so that they can process the slice clip to be tested according to the alarm information.
[0080] In summary, the slice detection method according to embodiments of the present invention firstly acquires a field-of-view image of a slice in a slice folder to be detected, and inputs the field-of-view image into a pre-trained first slice category recognition model to perform image recognition on the field-of-view image through the first slice category recognition model to obtain a first slice type corresponding to the field-of-view image, wherein the first slice type includes abnormal field-of-view images and non-abnormal field-of-view images; then, if the first slice type is a non-abnormal field-of-view image, the field-of-view image is input into a second slice category recognition model to output a second slice type corresponding to the field-of-view image through the second slice category recognition model, wherein the second slice type includes clear images and motion-blurred images; thereby achieving automatic slice detection, avoiding misjudgments caused by invalid content on the slice, and improving the accuracy of slice detection results.
[0081] To implement the above embodiments, this invention provides a computer-readable storage medium storing a slice detection program thereon, which, when executed by a processor, implements the slice detection method as described above.
[0082] To achieve the above embodiments, such as Figure 4 As shown, an embodiment of the present invention proposes a computer device 400, which includes a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402. When the processor 402 executes the program, it implements the slice detection method as described above.
[0083] To implement the above embodiments, this invention proposes a slice detection device, such as... Figure 5 As shown, the slice detection device includes: a first identification module 10 and a second identification module 20.
[0084] The first recognition module 10 is used to acquire the field-view image of the slice in the slice clip to be detected, and input the field-view image into the pre-trained first slice category recognition model, so as to perform image recognition on the field-view image through the first slice category recognition model to obtain the first slice type corresponding to the field-view image. The first slice type includes abnormal field-view images and non-abnormal field-view images.
[0085] The second recognition module 20 is used to input the field of view image into the second slice category recognition model when the first slice type is a non-abnormal field of view image, so as to output the second slice type corresponding to the field of view image through the second slice category recognition model. The second slice type includes clear image and motion-blurred image.
[0086] In some embodiments, abnormal field-of-view images include blank field-of-view images, dust field-of-view images, glass field-of-view images, and slices in reverse.
[0087] In some embodiments, the first slice category recognition model is a residual neural network model, which includes convolutional layers, pooling layers, fully connected layers, softmax layers, and residual modules; the second slice category recognition model is a support vector machine.
[0088] In some embodiments, a statistics module is further included, which is used to count the number of slices corresponding to each second slice type in the slice holder to be detected, so as to obtain a second statistical result; and to determine the state type of the slice holder to be detected based on the first statistical result and the second statistical result.
[0089] In some embodiments, the statistics module is further configured to calculate the sum of the number of slices in the dusty field-of-view image, the number of slices in the glass field-of-view image, the number of slices in the inverted slice image, the number of slices in the clear image, and the number of slices in the motion-blurred image, and use the sum of the numbers as the total number of effective field-of-view images; calculate the proportion of the number of slices in the dusty field-of-view image, the proportion of the number of slices in the glass field-of-view image, the proportion of the number of slices in the inverted slice image, the proportion of the number of slices in the clear image, and the proportion of the number of slices in the motion-blurred image based on the total number of effective field-of-view images; and determine the state type of the slice clip to be detected based on the proportion of the number of slices in the dusty field-of-view image, the proportion of the number of slices in the glass field-of-view image, the proportion of the number of slices in the inverted slice image, the proportion of the number of slices in the clear image, and the proportion of the number of slices in the motion-blurred image.
[0090] In some embodiments, the statistics module is further used to determine whether the proportion of the number of slices in the clear image is greater than a first quantity threshold; if so, the state type of the slice clip to be detected is considered to be clear; if not, the state type of the slice clip to be detected is considered to be blurred, and the blur category is determined according to the proportion of the number of slices in the dust field image, the proportion of the number of slices in the glass field image, the proportion of the number of slices in the slice-inverted image, and the proportion of the number of slices in the motion-blurred image.
[0091] In some embodiments, an alarm module is also included, which is used to generate alarm information based on fuzzy categories and send the alarm information to relevant personnel so that the relevant personnel can process the slice clip to be tested according to the alarm information.
[0092] It should also be noted that the above description of the slice detection method also applies to this slice detection device, and will not be repeated here.
[0093] In summary, the slice detection device according to embodiments of the present invention, by setting a first recognition module for acquiring a field-of-view image of a slice in a slice holder to be detected, and inputting the field-of-view image into a pre-trained first slice category recognition model, performs image recognition on the field-of-view image through the first slice category recognition model to obtain a first slice type corresponding to the field-of-view image, wherein the first slice type includes abnormal field-of-view images and non-abnormal field-of-view images; and a second recognition module, which is used to input the field-of-view image into a second slice category recognition model when the first slice type is a non-abnormal field-of-view image, outputs a second slice type corresponding to the field-of-view image through the second slice category recognition model, wherein the second slice type includes clear images and motion-blurred images; thereby achieving automatic slice detection, avoiding misjudgments caused by invalid content on the slice, and improving the accuracy of slice detection results.
[0094] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0095] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0096] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0097] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0098] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0099] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0100] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0101] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A slice detection method, characterized by, The method comprises the following steps: obtaining a field image of a slice in a slice holder to be detected, and inputting the field image into a pre-trained first slice type recognition model to perform image recognition on the field image by the first slice type recognition model, and obtaining a first slice type corresponding to the field image, wherein the first slice type comprises an abnormal field image and a non-abnormal field image, and the abnormal field image comprises a blank field image, a dust field image, a glass field image and a slice placement reverse image; if the first slice type is a non-abnormal field image, inputting the field image into a second slice type recognition model to output a second slice type corresponding to the field image by the second slice type recognition model, wherein the second slice type comprises a clear image and a motion blur image; counting the number of slices corresponding to each first slice type in the slice holder to be detected to obtain a first statistical result, counting the number of slices corresponding to each second slice type in the slice holder to be detected to obtain a second statistical result, calculating the number of slices of the dust field image, the number of slices of the glass field image, the number of slices of the slice placement reverse image, the number of slices of the clear image and the sum of the number of slices of the motion blur image according to the first statistical result and the second statistical result, and taking the sum as the total number of effective field images; calculating the slice number proportion of the dust field image, the slice number proportion of the glass field image, the slice number proportion of the slice placement reverse image, the slice number proportion of the clear image and the slice number proportion of the motion blur image based on the total number of effective field images; and determining the state type of the slice holder to be detected according to the slice number proportion of the dust field image, the slice number proportion of the glass field image, the slice number proportion of the slice placement reverse image, the slice number proportion of the clear image and the slice number proportion of the motion blur image.
2. The slice detection method of claim 1, wherein, The first slice type recognition model is a residual neural network model, and the residual neural network model comprises a convolution layer, a pooling layer, a full connection layer, a softmax layer and a residual module. The second slice type recognition model is a support vector machine.
3. The slice detection method of claim 1, wherein, Determining the state type of the slice holder to be detected according to the slice number proportion of the dust field image, the slice number proportion of the glass field image, the slice number proportion of the slice placement reverse image, the slice number proportion of the clear image and the slice number proportion of the motion blur image comprises: determining whether the slice number proportion of the clear image is greater than a first number threshold; if yes, considering that the state type of the slice holder to be detected is a clear state; if no, considering that the state type of the slice holder to be detected is a blur state, and determining a blur category according to the slice number proportion of the dust field image, the slice number proportion of the glass field image, the slice number proportion of the slice placement reverse image and the slice number proportion of the motion blur image.
4. The slice detection method of claim 3, wherein, Further comprising: According to the blur category, alarm information is generated and sent to relevant personnel, so that the relevant personnel can process the slice clamp according to the alarm information.
5. A computer readable storage medium, characterized in that, A slice detection program is stored on the computer readable storage medium, and the slice detection program is executed by the processor to implement the slice detection method according to any one of claims 1-4.
6. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the slice detection method according to any one of claims 1-4.
7. A slice detection device for implementing the method according to any one of claims 1 to 4, characterized in that, Comprise: The first identification module is configured to obtain a field of view image of a slice in a slice clamp to be detected, and input the field of view image into a pre-trained first slice category identification model to perform image recognition on the field of view image by the first slice category identification model to obtain a first slice type corresponding to the field of view image, wherein the first slice type includes an abnormal field of view image and a non-abnormal field of view image; The second identification module is configured to input the field of view image into a second slice category identification model when the first slice type is a non-abnormal field of view image, so as to output a second slice type corresponding to the field of view image by the second slice category identification model, wherein the second slice type includes a clear image and a motion blur image.
Citation Information
Patent Citations
Real-time monitoring method and system for quality of digital pathological section and computer equipment
CN112200793A
Slice fuzzy detection method based on support vector machine and digital slice scanning device
CN115035038A