Efficient protozoan identification method and electronic device

Through the chromaticity processing and neural network model training of protozoa maps, the problems of slow recognition speed and low accuracy in the existing technology are solved, efficient and accurate protozoa recognition is achieved, and detection efficiency and accuracy are improved.

CN118962097BActive Publication Date: 2024-12-17RES CENT FOR ECO ENVIRONMENTAL SCI THE CHINESE ACAD OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411420870.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-17
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The existing protozoa recognition methods have slow recognition speed and low accuracy, making it difficult to effectively screen out the target map, resulting in poor recognition results and affecting detection efficiency and accuracy.

Method used

By chromaticity sorting mean processing of pixel points to be recognized, the average extreme difference is calculated and the target map is selected. A neural network model based on ResNet-18 is used for cropping and characteristic map training, and iterative training is combined with the KL divergence function. , improve identification accuracy.

Benefits of technology

It significantly improves the accuracy, recall and F1 value of protozoa recognition, shortens the recognition time, improves detection speed and accuracy, improves the recognition accuracy by 15%, and reduces the recognition time by 65 minutes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118962097B_ABST
    Figure CN118962097B_ABST
Patent Text Reader

Abstract

The present application provides a method and electronic device for efficiently identifying protozoa, the method comprising: obtaining a to-be-identified map under each field of view, each of the to-be-identified maps comprising a plurality of pixels; sorting the chromaticity of the pixels of each to-be-identified map to obtain an average range, and screening out a target map from the to-be-identified map according to the average range; cutting the target map to obtain a standard map; and inputting the standard map into a pre-trained protozoa classification model for detection to obtain an identification result. The method and electronic device for efficiently identifying protozoa provided by the present application are simple and convenient, can greatly improve the detection speed, and effectively improve the identification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of protozoan detection, and in particular to an efficient protozoan identification method and electronic equipment. Background Art

[0002] Cryptosporidium is a tiny coccidian parasite that is widely found in many vertebrates. The main parasite in humans and most mammals is Cryptosporidium parvum. The disease caused by Cryptosporidium parvum is called cryptosporidiosis, which is a zoonotic protozoan disease with diarrhea as the main clinical manifestation. Giardia lamblia, also known as Giardia, parasitizes the small intestine and gallbladder of the human body, mainly in the duodenum, and can cause symptoms such as abdominal pain, diarrhea and malabsorption. Giardia and Cryptosporidium (referred to as "the two worms") are pathogenic protozoa widely found in nature. The two worms mainly parasitize the intestines of humans and animals, causing zoonotic protozoan diseases with diarrhea as the main manifestation, and the pathogenic dose is low, so the detection of protozoa is very important.

[0003] In an era of constantly upgrading scientific and technological levels, scientific and technological achievements based on artificial intelligence technology have emerged. In the field of protozoan detection, people use microscopes to observe and count parasites. Now there are cases in the industry where machine learning automatic recognition replaces traditional morphological manual naked eye recognition, in order to lower the threshold for parasite detection and recognition and improve the speed, accuracy and stability of the microscopic inspection process. However, the existing protozoan recognition method requires a large number of atlases to be recognized, the recognition speed is slow, and the accuracy is low. Therefore, there is an urgent need for an efficient and accurate protozoan recognition method. Summary of the invention

[0004] In view of this, the purpose of this application is to propose an efficient protozoan identification method and electronic equipment for solving the above technical problems.

[0005] In a first aspect of the present application, a method for efficiently identifying protozoa is provided, comprising: obtaining a to-be-identified atlas in each field of view, each of the to-be-identified atlas comprising a plurality of pixels; sorting the chromaticity of the pixels of each of the to-be-identified atlases to obtain an average range, and screening out a target atlas from the to-be-identified atlases according to the average range; cropping the target atlas to obtain a standard atlas; and inputting the standard atlas into a pre-trained protozoa classification model for detection to obtain an identification result.

[0006] Furthermore, the chromaticity of each pixel point of the to-be-identified spectrum is sorted and averaged to obtain the average range, including: sorting the pixel points of each to-be-identified spectrum according to the chromaticity of the pixel points; calculating the average value of the chromaticity of the n largest pixel points corresponding to each to-be-identified spectrum as the maximum value average; calculating the average value of the chromaticity of the m smallest pixel points corresponding to each to-be-identified spectrum as the minimum value average; calculating the difference between the maximum value average and the minimum value average to obtain the average range of the to-be-identified spectrum, wherein m and n are positive integers and m is greater than n.

[0007] Furthermore, the method of selecting a target map from the maps to be identified based on the average range includes: when the minimum average value is greater than a first preset value, and the average range is greater than a second preset value, the map to be identified corresponding to the average range is the target map.

[0008] Furthermore, n is 12, m is 100, the first preset value is 50, and the second preset value is 50.

[0009] Furthermore, the cutting of the target map to obtain a standard map includes: selecting a target point on the target map and extending it in all directions to form a first cutting pattern, and cutting the target map according to the first cutting pattern to obtain a standard map; when the first cutting pattern overlaps with an edge portion of the target map, extending from the overlapping edge to the inner side of the target map to form a second cutting pattern, and cutting the target map according to the second cutting pattern to obtain a standard map, wherein the first cutting pattern and the second cutting pattern have the same shape and size.

[0010] Furthermore, the protozoan classification model is a neural network model built based on ResNet-18, including 1 input layer, 4 convolutional layers, 1 pooling layer, 1 fully connected layer and 1 output layer.

[0011] Furthermore, the protozoan classification model is trained using characteristic maps as standard maps, and the characteristic maps include maps with dark backgrounds and containing protozoa, maps with irregular protozoan morphology, dark protozoan maps, incomplete protozoan maps, or maps with blurred images and containing protozoa.

[0012] Furthermore, the background grayscale of the atlas with a dark background and containing protozoa is 70 to 120, and the grayscale of the protozoa is 80 to 150; the shape of the protozoa in the atlas with irregular protozoan morphology is not circular or elliptical; the background grayscale of the atlas with a dim protozoan is 20 to 30, and the grayscale of the protozoa is 25 to 50; the pixel density of the atlas with a blurred image and containing protozoa is less than 400ppi.

[0013] Furthermore, the protozoan classification model is iteratively trained using a KL divergence function.

[0014] In a second aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the efficient protozoan identification method as described in the first aspect above is implemented.

[0015] According to a third aspect of the present application, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to enable the computer to execute the efficient protozoan identification method as described in the first aspect above.

[0016] In a fourth aspect of the present application, a computer program product is provided, comprising computer program instructions, characterized in that when the computer program instructions are executed on a computer, the computer is enabled to execute the efficient protozoan identification method as described in the first aspect above.

[0017] As can be seen from the above, the present application provides an efficient protozoan identification method and electronic device, the efficient protozoan identification method comprising: obtaining a to-be-identified spectrum under each field of view, each to-be-identified spectrum comprising a plurality of pixels; sorting the chromaticity of the pixels of each to-be-identified spectrum respectively and performing mean processing to obtain an average range, and screening out a target spectrum from the to-be-identified spectrum according to the average range; compensating and cropping the target spectrum to obtain a standard spectrum; inputting the standard spectrum into a pre-trained protozoan classification model for detection to obtain an identification result, and by pre-processing the to-be-identified spectrum, most of the impurity spectra can be screened out, Retain effective target maps; optimize the overall algorithm, increase process speed, shorten recognition time, and significantly improve core indicators such as precision, recall rate, and F1 value of recognition results, making the recognition results far superior to existing automatic recognition effects. This provides technical support for the field of protozoan detection and is of great significance to the development and application of automatic recognition technology in the field of intelligent microbial detection. Tests have shown that this method can increase the accuracy of protozoan recognition by up to 15% and reduce the recognition time by up to 65 minutes. This efficient protozoan recognition method and electronic equipment are simple and convenient, can greatly increase the detection speed, and effectively improve the recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 This is a schematic diagram of a process for efficiently identifying protozoa in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the process of screening out the target spectrum in the embodiment of the present application;

[0021] Figure 3 This is a schematic diagram of the process of cutting and obtaining a standard spectrum in the embodiment of the present application;

[0022] Figure 4 A schematic diagram of a dark background containing protozoa;

[0023] Figure 5 This is a schematic diagram of the irregular morphology of the protozoa;

[0024] Figure 6 It is a schematic diagram of the dim map of protozoa;

[0025] Figure 7 This is a schematic diagram of the incomplete atlas of the deep protozoa;

[0026] Figure 8 A schematic diagram of a map showing a blurred image containing protozoa;

[0027] Fig. 9 A schematic diagram of the recognition effect of using existing protozoan recognition methods to detect Giardia lamblia;

[0028] Fig.10 A schematic diagram of the identification effect of using the efficient protozoan identification method of the present application to detect Giardia lamblia;

[0029] Fig.11 A schematic diagram of the recognition effect of detecting Cryptosporidium using the existing protozoan recognition method;

[0030] Fig.12 A schematic diagram of the recognition effect of detecting Cryptosporidium using the efficient protozoan recognition method of the present application;

[0031] Fig.13 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0033] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood by people with ordinary skills in the field to which the present application belongs. "Include" or "comprising" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0034] Cryptosporidium is a tiny coccidian parasite that is widely found in many vertebrates. The main parasite in humans and most mammals is Cryptosporidium parvum. The disease caused by Cryptosporidium parvum is called cryptosporidiosis, which is a zoonotic protozoan disease with diarrhea as the main clinical manifestation. Giardia lamblia, also known as Giardia, parasitizes the small intestine and gallbladder of the human body, mainly in the duodenum, and can cause symptoms such as abdominal pain, diarrhea, and malabsorption. Giardia and Cryptosporidium are pathogenic protozoa widely found in nature. Both parasites mainly parasitize the intestines of humans and animals, causing zoonotic protozoan diseases with diarrhea as the main manifestation, and the pathogenic dose is low, so the detection of protozoa is very important.

[0035] In an era of constantly upgrading scientific and technological levels, scientific and technological achievements based on artificial intelligence technology have emerged. In the field of protozoan detection, people use microscopes to observe and count parasites. Now there are cases in the industry where machine learning automatic recognition replaces traditional morphological manual naked eye recognition, in order to lower the threshold for parasite detection and recognition and improve the speed, accuracy and stability of the microscopic inspection process. However, the existing protozoan recognition method requires the recognition of a large number of atlases, with a slow recognition speed and low accuracy. Therefore, an efficient and accurate protozoan recognition method is urgently needed.

[0036] In the process of implementing the present application, it was found that in the pre-processing stage of acquiring the atlas, the chromaticity difference between the parasite and the surrounding environment in some protozoan atlases was small, and it was very difficult to distinguish the parasite from the surrounding environment. Therefore, in order to obtain as many parasites as possible, the existing protozoan identification method has to identify a large number of atlases. This stage will waste a lot of time and greatly affect the efficiency of the entire automatic identification process.

[0037] In the sample maps obtained after preprocessing, the protozoa are mostly distributed in the center of the field of view, but in a few cases, the protozoa are located in the edge corners of the overall sample map. The conventional slice processing algorithm will crop the standard map of the insect body, and then output it as a standard square map after stretching, and then perform subsequent identification. During the stretching process, the insect body image in the original rectangular map is deformed, resulting in a large morphological error. In this case, the sample cannot be identified or is identified as impurity when compared with the standard protozoa map in the database, resulting in a lower overall recognition rate.

[0038] Furthermore, after the convolutional artificial neural network is combined with a multi-dimensional identification algorithm, most protozoan atlases can obtain identification results. However, if the sample also contains specific samples of some worms, such as dark background color of the atlas, irregular worm shape, low color and dull luster of the worm itself, incomplete individuals due to cutting, and blurred individuals in the scanning results of the imaging system. These characteristic samples are difficult to identify because their morphological features are quite different from the basic atlas. Based on the existing automatic recognition technology, some lack supplementary training for characteristic atlases, and some add characteristic atlases to the data set and select empirical loss functions for training, resulting in poor recognition results after training. Screening the best loss function for model training has become a top priority.

[0039] Due to the problems of sample redundancy in the preprocessing stage, deformation of the parasite body in slice identification, and poor feature map training, the current automatic protozoan identification technology is difficult to ensure the speed, accuracy and stability during the identification process. The low recognition effect and recognition rate are even lower than the traditional morphological recognition effect, which seriously restricts the development of automatic protozoan identification and detection.

[0040] Below, through specific embodiments and combined Figures 1 to 13 To describe the technical solution of this application in detail.

[0041] In some embodiments of the present application, a method for efficiently identifying protozoa is provided, such as Figure 1 As shown, the following steps are included:

[0042] S1. Obtain a to-be-recognized map in each field of view, each of the to-be-recognized maps including a plurality of pixels.

[0043] The to-be-recognized graph in each field of view can be obtained from the image recognition system of the microscope. The size is, for example, 60*60, but is not specifically limited. The to-be-recognized graph is composed of a plurality of pixel points.

[0044] S2. Sort and average the chromaticity of each pixel point of the to-be-identified graph to obtain an average range, and select a target graph from the to-be-identified graph according to the average range.

[0045] By preprocessing the to-be-identified spectra, most impurity spectra can be screened out and valid target spectra can be retained, such as Figure 2 As shown, the left side is the spectrum without screening, and the right side is the spectrum after screening. It can be seen that the impurity spectrum has been screened out, which greatly reduces the spectrum of subsequent identification and detection, and because the impurities have been screened out, the accuracy of subsequent identification can also be improved.

[0046] S3, cutting the target atlas to obtain a standard atlas.

[0047] like Figure 3 As shown, the target atlas is cropped by a cropping algorithm to obtain a standard atlas, and the size of the standard atlas is, for example, 30*30, which is not specifically limited.

[0048] S4, inputting the standard atlas into a pre-trained protozoan classification model for detection to obtain a recognition result.

[0049] The standard atlas is input into a pre-trained protozoan classification model for detection to obtain the recognition result. The protozoan classification model can adopt the recognition model in the relevant technology, or the convolutional neural network recognition model in the subsequent examples. The recognition result is, for example, the probability of Giardia lamblia, the probability of Cryptosporidium, or the probability of non-two-parasites. This method optimizes the overall algorithm, improves the process speed, shortens the recognition time, and greatly improves the core indicators of the recognition results such as the accuracy, recall rate and F value, making the recognition result far superior to the existing automatic recognition effect, providing technical support for the protozoan detection field, and is of great significance to the development and application of automatic recognition technology in the field of microbial intelligent detection. After testing, this method can increase the accuracy of protozoan recognition by up to 15%, and reduce the recognition time by up to 65 minutes.

[0050] This efficient protozoan identification method is simple and convenient, and the evaluation of sample output results is intelligent and standardized, which can greatly improve the detection speed and effectively improve the identification accuracy.

[0051] In some embodiments, the step of performing sorting and mean processing on the chromaticity of each pixel of the to-be-identified graph to obtain an average range includes:

[0052] S201, sorting the pixel points of each to-be-identified graph by size according to the chromaticity of the pixel points.

[0053] The chromaticity of each pixel can be expressed as f(x, y), and the four classic sorting algorithms ROW_NUMBER(), rank(), Dense_rank(), and Ntile() in the MySQL database can be used to sort the pixels. In view of the continuous and repetitive characteristics of the Dense_rank() sorting algorithm, pixels of the same chromaticity will be grouped together and the sorting numbers of each group will be the same. It is the most reasonable to select this algorithm. The sorting can be sorted from large to small according to chromaticity, or from small to large, without specific restrictions.

[0054] S202, calculating an average value of the chromaticity of the n largest pixels corresponding to each of the to-be-identified graphs as the maximum value average value.

[0055] For example, n is 10 to 14, and is not specifically limited. For example, if n is 12, then 12 pixel points with the largest chromaticity are selected from the sorted pixel points to calculate the chromaticity average value to obtain the maximum value average value max_aver(12).

[0056] S203, calculating an average value according to the chromaticity of the m smallest pixel points corresponding to each of the to-be-identified graphs as the minimum average value.

[0057] m is greater than n, and m is, for example, 80 to 120, and is not specifically limited. For example, if m is 100, then 100 pixels with the smallest chromaticity are selected from the sorted pixels to calculate the chromaticity average value to obtain the minimum average value min_aver(100).

[0058] S204, calculating a difference between the maximum value average and the minimum value average to obtain an average range of the to-be-identified spectrum.

[0059] The average range is max_aver (12) - min_aver (100). Calculating the average range facilitates subsequent screening of target maps.

[0060] In some embodiments, the step of selecting a target atlas from the atlas to be identified according to the average range includes:

[0061] S205. When the minimum average value is greater than a first preset value, and the average range is greater than a second preset value, the to-be-identified spectrum corresponding to the average range is a target spectrum.

[0062] The first preset value is, for example, 40 to 60, and the minimum average value is set to be greater than the first preset value to ensure that the spectrum has a certain chromaticity and displays a normal spectrum; the second preset value is, for example, 30 to 70, and the average range is set to be greater than the second preset value, which means that the spectrum chromaticity has a high degree of discrimination. The spectrum is retained as the target spectrum, and the impurity spectrum with low chromaticity discrimination is screened out, thereby greatly reducing the recognition load, reducing the spectrum flux that needs to be detected and identified, and speeding up the overall automatic recognition speed.

[0063] In some embodiments, n is 12, m is 100, the first preset value is 50, and the second preset value is 50.

[0064] After testing, by setting n to 12, m to 100, and retaining the to-be-recognized graphs with min_aver(100)>50 and max_aver(12)-min_aver(100)<50 as the target graphs, the subsequent recognition effect is the best, with not only high recognition accuracy but also short recognition time.

[0065] In some embodiments, step S3 includes:

[0066] S301, selecting a target point on the target atlas and extending it in all directions to form a first cutting pattern, and cutting the target atlas according to the first cutting pattern to obtain a standard atlas.

[0067] The target point on the target map can be determined by the conventional DBSCAN clustering algorithm. The target point is the center coordinate of the suspicious point after clustering. The first cutting figure is, for example, a 30*30 square. The target point is selected and extended in all directions, that is, the first cutting figure is extended outward with the target point as the center. The target map is cut according to the first cutting figure to obtain a standard map. This step is the operation of the conventional cutting algorithm.

[0068] S302. When the first cutting pattern partially overlaps with an edge of the target atlas, a second cutting pattern is extended from the overlapping edge toward the inner side of the target atlas, and the target atlas is cut according to the second cutting pattern to obtain a standard atlas, wherein the first cutting pattern and the second cutting pattern have the same shape and size.

[0069] When the first cutting pattern overlaps with the edge of the target atlas, that is, the first cutting pattern is located at the edge of the field of view, and the complete standard atlas cannot be obtained, it is necessary to extend from the overlapping edge to the inside to form a second cutting pattern. The second cutting pattern is also a 30*30 square. The formation process is as follows: Figure 3As shown, the first cutting figure on the left side of the first row overlaps with the upper edge portion of the target figure, and can be extended downward to form a second cutting figure; the first cutting figure on the left side of the second row overlaps with the lower edge portion of the target figure, and can be extended upward to form a second cutting figure; the first cutting figure on the left side of the third row overlaps with the left edge portion of the target figure, and can be extended to the right to form a second cutting figure; in this way, the target map is cut according to the second cutting figure to obtain a standard map, which is a real map that has not been stretched or processed, and will not cause deformation to the image, thereby ensuring the accuracy of subsequent recognition.

[0070] In some embodiments, the protozoan classification model is a neural network model built based on ResNet-18, including 1 input layer, 4 convolutional layers, 1 pooling layer, 1 fully connected layer and 1 output layer.

[0071] The structure of the protozoan classification model is shown in Table 1. The convolution layer and the pooling layer perform convolution calculations on the input graph. The convolution calculation is a convolution operation used to extract the feature information of the "two worms" in the graph, and then obtain the "two worms" features in the graph. The fully connected layer is used to perform regression analysis on the extracted feature information. The fully connected layer, for example, contains three classifiers, namely Giardia, Cryptosporidium, and non-two worms. The output layer outputs a one-dimensional array to obtain the probability distribution of the three categories of results.

[0072] Table 1 Protozoa classification model structure

[0073]

[0074] In some embodiments, the protozoan classification model is trained using characteristic maps as standard maps, wherein the characteristic maps include maps with dark backgrounds and containing protozoa, maps with irregular protozoan morphology, dark protozoan maps, incomplete protozoan maps, or maps with blurred images and containing protozoa.

[0075] The existing recognition algorithms can only complete the recognition process of conventional samples. For samples of some characteristic types, ordinary automatic recognition methods do not have the ability to continue learning and therefore cannot identify them. During the model training process, special types of characteristic graphs can be added for recognition learning to improve the accuracy of model detection.

[0076] Characteristic images include images with dark backgrounds and containing protozoa, images with irregular protozoa morphology, dim protozoa images, incomplete protozoa images, or images with blurred images and containing protozoa. Figure 4 As shown, it can be a map with a background grayscale of 70 to 120, a protozoan grayscale of 80 to 150, and a map with irregular protozoan morphology such as Figure 5 As shown, it can be a map where the shape of the protozoa is not round or oval; the dark map of the protozoa is as follows Figure 6 As shown, it can be a map with a background grayscale of 20 to 30 and a protozoan grayscale of 25 to 50; a protozoan incomplete map such as Figure 7 As shown in the figure, it may be a map with incomplete protozoan shapes due to cropping; the map with blurred images and containing protozoa is shown in Figure 8 As shown, the image may have a pixel density of less than 400ppi. By adding five types of image samples for training, after testing, the recognition accuracy can be increased by up to 24%.

[0077] In some embodiments, the protozoan classification model is iteratively trained using a KL divergence function (Kullback-Leibler Divergence).

[0078] In order to improve the recognition effect of the model, the error function can be used to estimate the difference between the true value and the predicted value to optimize the model parameters. The error function includes the mean square error function, the cross entropy loss function or the KL divergence function. After a long period of neural network testing, it is found that the KL divergence function is more accurate in measuring the difference between the network output and the true distribution in this model. Its calculation formula is KL = ∑ ylog(y / y'), where y is the probability distribution of the true number of protozoa, and y' is the probability distribution of the predicted number of protozoa. The smaller the value of KL divergence, the closer the predicted result is to the true value.

[0079] Comparative Example 1

[0080] The initial protozoan classification model shown in Table 1 was trained using conventional protozoan atlas samples (without characteristic atlases). The initial learning rate was 0.001, the batch size range was 4-10, and the iteration was 200 cycles. The cross entropy loss function was used to estimate the difference between the true value and the predicted value, and the Adam optimization algorithm was selected to update the weights and biases of the convolutional neural network.

[0081] 12 groups of atlases to be identified were obtained, of which 6 groups were used to detect Giardia lamblia and the other 6 groups were used to detect Cryptosporidium. The atlases to be identified were not preprocessed, but directly cut to obtain standard atlases. The cutting method was conventional clustering cutting method. When cutting to the edge of the atlas, no compensation was performed, and only stretching was performed. The standard atlases were input into the trained protozoan classification model to obtain the recognition results, which were compared with the true results and the precision, recall and F1 values ​​were calculated. The precision P represented the probability that all samples predicted to be positive were actually positive samples, the recall R represented the probability that the samples actually positive were predicted to be positive samples, and the F1 value represented the weighted reconciliation of P and R by 50%, respectively. The F1 value was used as the core indicator for judging the recognition effect. The higher the F1 value, the better the recognition effect. Fig. 9 The results of Giardia detection are shown in Figure 2. Fig.11 Shown is the detection effect of Cryptosporidium.

[0082] Example 1

[0083] The initial protozoan classification model shown in Table 1 was trained using the protozoan atlas samples doped with five types of characteristic atlases. The initial learning rate was 0.001, the batch size range was 4-10, and the iteration was 200 cycles. The KL divergence function was used to estimate the difference between the true value and the predicted value, and the Adam optimization algorithm was selected to update the weights and bias of the convolutional neural network.

[0084] Obtain 12 groups of to-be-identified atlases in comparative example 1, pre-process the to-be-identified atlases, and retain the to-be-identified atlases with min_aver(100)>50 and max_aver(12)-min_aver(100)<50 as target atlases; crop the target atlases by a compensation cropping method to obtain a standard atlas, and when cropping to the edge of the atlas, extend the atlas inward for compensation and crop without performing a stretching operation; input the standard atlas into a trained protozoan classification model to obtain a recognition result, compare it with the actual result, and calculate the precision, recall, and F1 value, as shown in FIG. Fig.10 The results of Giardia detection are shown in Figure 2. Fig.12 The results show the detection effect of Cryptosporidium, and the recognition effect is significantly improved compared with Comparative Example 1.

[0085] As shown in Table 2, it is a comparison of the time taken by the model to recognize Giardia in Example 1 and Comparative Example 1. It can be seen that the recognition time without preprocessing operation is much longer than the recognition time after preprocessing.

[0086] Table 2 Recognition time comparison table

[0087]

[0088] Example 2

[0089] The initial protozoan classification model shown in Table 1 was trained using the protozoan atlas samples doped with five types of characteristic atlases. The initial learning rate was 0.001, the batch size range was 4-10, and the iteration was 200 cycles. The KL divergence function was used to estimate the difference between the true value and the predicted value, and the Adam optimization algorithm was selected to update the weights and bias of the convolutional neural network.

[0090] A group of to-be-identified atlases for detecting Giardia and a group of to-be-identified atlases for detecting Cryptosporidium were obtained, and the to-be-identified atlases were preprocessed, and the to-be-identified atlases with max_aver (12) - min_aver (100) < 50 were retained as target atlases; the target atlases were cropped by the compensatory cropping method to obtain the standard atlases, and when the atlas edge was cropped, the cropping was extended inwards for compensation without stretching; the standard atlases were input into the trained protozoan classification model to obtain the recognition results, which were compared with the true results and the precision, recall and F1 value were calculated.

[0091] Example 3

[0092] The method of Example 2 is used for recognition, except that during preprocessing, the to-be-recognized spectra with max_aver (10) - min_aver (100) < 50 are retained as target spectra, and finally the precision, recall and F1 value are calculated.

[0093] Example 4

[0094] The method of Example 2 is used for recognition, except that during preprocessing, the to-be-recognized spectra with max_aver (12) - min_aver (120) < 50 are retained as target spectra, and finally the precision, recall and F1 value are calculated.

[0095] The test results of Example 2 to Example 4 are shown in Table 3. It can be seen that the recognition effect is best when n is 12 and m is 100.

[0096] Table 3 Comparison of recognition effects of different n and m

[0097]

[0098] Example 5

[0099] The initial protozoan classification model shown in Table 1 was trained using the protozoan atlas samples doped with five types of characteristic atlases. The initial learning rate was 0.001, the batch size range was 4-10, and the iteration was 200 cycles. The KL divergence function was used to estimate the difference between the true value and the predicted value, and the Adam optimization algorithm was selected to update the weights and bias of the convolutional neural network.

[0100] A group of to-be-identified atlases for detecting Giardia and a group of to-be-identified atlases for detecting Cryptosporidium were obtained. The to-be-identified atlases were preprocessed, and the to-be-identified atlases with min_aver(100)>50 and max_aver(12)-min_aver(100)<50 were retained as target atlases. The target atlases were cropped by the compensatory cropping method to obtain the standard atlases. When the atlas edge was cropped, the cropping was extended inwards for compensation without stretching. The standard atlases were input into the trained protozoan classification model to obtain the recognition results, which were compared with the true results and the precision, recall and F1 value were calculated.

[0101] Example 6

[0102] The method of Example 5 is used for recognition, except that during preprocessing, the to-be-recognized spectra with max_aver (10) - min_aver (100) < 30 are retained as target spectra, and finally the precision, recall and F1 value are calculated.

[0103] Example 7

[0104] The method of Example 5 is used for recognition, except that during preprocessing, the to-be-recognized spectra with max_aver (10) - min_aver (100) < 70 are retained as target spectra, and finally the precision, recall and F1 value are calculated.

[0105] The test results of Examples 5 to 7 are shown in Table 4. It can be seen that when the second preset value is 50, the comprehensive recognition effect is the best, the time consumption is short, and the accuracy is high.

[0106] Table 4 Comparison of recognition effects of different second preset values

[0107]

[0108] Comparative Example 2

[0109] The method of comparison 1 is used for recognition. The difference is that the target map is cropped by the compensatory cropping method to obtain the standard map. When the edge of the map is cropped, it is cropped inward for compensation without stretching. Finally, the precision, recall and F1 value are calculated. The test results are shown in Table 5. The recognition effect after compensatory cropping is significantly improved compared with that of comparison example 1.

[0110] Table 5 Comparison of recognition effects of comparative example 2

[0111]

[0112] Comparative Example 3

[0113] The method of comparison 1 was used for identification, except that the protozoan atlas samples doped with five types of characteristic atlases were input into the initial protozoan classification model shown in Table 1 for training, and the precision, recall rate and F1 value were finally calculated. The test results are shown in Table 6. The recognition effect after characteristic atlas training was significantly improved compared with that of comparison example 1.

[0114] Table 6 Comparison of recognition effects of comparative example 3

[0115]

[0116] Example 8

[0117] The initial protozoan classification model shown in Table 1 was trained by inputting the protozoan atlas samples doped with five types of characteristic atlases. The initial learning rate was 0.001, the batch size range was 4-10, and the iteration was 200 cycles. The mean square error function was used to estimate the difference between the true value and the predicted value, and the Adam optimization algorithm was selected to update the weights and biases of the convolutional neural network.

[0118] A group of to-be-identified atlases for detecting Giardia and a group of to-be-identified atlases for detecting Cryptosporidium were obtained. The to-be-identified atlases were preprocessed, and the to-be-identified atlases with min_aver(100)>50 and max_aver(12)-min_aver(100)<50 were retained as target atlases. The target atlases were cropped by the compensatory cropping method to obtain the standard atlases. When the atlas edge was cropped, the cropping was extended inwards for compensation without stretching. The standard atlases were input into the trained protozoan classification model to obtain the recognition results, which were compared with the true results and the precision, recall and F1 value were calculated.

[0119] Example 9

[0120] The method of Example 8 is used for recognition, except that the cross entropy loss function is used to estimate the difference between the true value and the predicted value, and finally the precision, recall and F1 value are calculated.

[0121] Example 10

[0122] The method of Example 8 is used for recognition, except that the KL divergence function is used to estimate the difference between the true value and the predicted value, and finally the precision, recall and F1 value are calculated.

[0123] The test results of Example 8 to Example 10 are shown in Table 7. It can be seen that the recognition effect is best when the KL divergence function is used for iterative training.

[0124] Table 7 Comparison of recognition effects of different error functions

[0125]

[0126] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0127] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0128] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0129] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0130] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the efficient protozoan identification method described in any of the above embodiments is implemented.

[0131] Fig.13 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. It is characterized in that the processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 realize communication connection with each other inside the device through the bus 1050.

[0132] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0133] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0134] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. It is characterized in that the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0135] The communication interface 1040 is used to connect the communication module (not shown in the figure) to realize the communication interaction between the device and other devices. It is characterized in that the communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0136] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0137] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0138] The electronic device of the above embodiment is used to implement the corresponding protozoan efficient identification method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0139] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the efficient protozoan identification method as described in any of the above embodiments.

[0140] The non-transitory computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of storage media for computers include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0141] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the efficient protozoan identification method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0142] Based on the same concept, corresponding to any of the above-mentioned embodiments, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the efficient protozoan identification method as described in any of the above embodiments, which has the beneficial effects of the corresponding efficient protozoan identification method embodiments, which will not be repeated here.

[0143] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0144] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the device can be shown in the form of a block diagram, so as to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details are set forth to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0145] Although the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art in light of the foregoing description.

[0146] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A protozoan identification method, characterized in that: include: Acquire a to-be-recognized map in each field of view, each of the to-be-recognized maps comprising a plurality of pixel points; The chromaticity of each pixel of the to-be-identified map is sorted and averaged to obtain an average range, and a target map is selected from the to-be-identified map according to the average range, including: sorting the pixel of each to-be-identified map according to the chromaticity of the pixel; calculating the average value of the chromaticity of the n largest pixel points corresponding to each to-be-identified map as the maximum average value; calculating the average value of the chromaticity of the m smallest pixel points corresponding to each to-be-identified map as the minimum average value; calculating the difference between the maximum average value and the minimum average value to obtain the average range of the to-be-identified map, wherein m and n are positive integers and m is greater than n; when the minimum average value is greater than a first preset value, and the average range is greater than a second preset value, the to-be-identified map corresponding to the average range is the target map, wherein n is 12, m is 100, the first preset value is 50, and the second preset value is 50; Cutting the target map to obtain a standard map includes: selecting a target point on the target map and extending it to all sides to form a first cutting pattern, cutting the target map according to the first cutting pattern to obtain a standard map; when the first cutting pattern overlaps with an edge portion of the target map, extending from the overlapping edge to the inner side of the target map to form a second cutting pattern, cutting the target map according to the second cutting pattern to obtain a standard map, wherein the first cutting pattern and the second cutting pattern have the same shape and size; The standard atlas is input into a pre-trained protozoan classification model for detection to obtain a recognition result.

2. The protozoan identification method according to claim 1, characterized in that: The protozoan classification model is trained using characteristic maps as standard maps, wherein the characteristic maps include maps with dark backgrounds and containing protozoa, maps with irregular protozoan morphology, dark protozoan maps, incomplete protozoan maps, or maps with blurred images and containing protozoa.

3. The protozoan identification method according to claim 2, characterized in that: The background grayscale of the atlas containing protozoa with a dark background is 70 to 120, and the grayscale of the protozoa is 80 to 150; the shape of the protozoa in the atlas with irregular protozoa morphology is not circular or elliptical; The background grayscale of the dim protozoan map is 20 to 30, and the protozoan grayscale is 25 to 50; the image is blurred and the pixel density of the map containing protozoa is less than 400ppi.

4. The protozoan identification method according to claim 1, characterized in that: The protozoan classification model is iteratively trained using a KL divergence function.

5. The protozoan identification method according to claim 1, characterized in that: The protozoan classification model is a neural network model built based on ResNet-18, including 1 input layer, 4 convolutional layers, 1 pooling layer, 1 fully connected layer and 1 output layer.

6. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the protozoan identification method as described in any one of claims 1 to 5 when executing the computer program.