Method for constructing a plankton identification model and method for identifying plankton categories

By performing contour extraction and clustering of plankton images, the problem of low recognition accuracy in plankton recognition model is solved, the recognition accuracy is improved, and it is suitable for the rapid detection requirements in water quality detection.

CN118736330BActive Publication Date: 2024-12-03CHINA NAT ENVIRONMENTAL MONITORING CENT
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411204831.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-03
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

The recognition accuracy of traditional plankton recognition models is poor and cannot meet the demand for rapid detection of large numbers of samples in water quality detection. It is mainly because plankton has different shapes and different types of plankton at different stages.

Method used

By performing contour extraction and clustering of plankton images in sample data, sample data containing different plankton contour features are divided into different clustering sets, and sample data corresponding to each cluster set is used for model training, reducing the number of samples that are not allowed to be used for model training. The impact of plankton contour on model parameters improves recognition accuracy.

Benefits of technology

The recognition accuracy of the plankton recognition model is improved, the negative impact of model training due to the similarity of plankton contours is reduced, the importance of other features other than contour features in model training is enhanced, and the recognition effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736330B_ABST
    Figure CN118736330B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a method for constructing a plankton identification model and a method for identifying plankton categories. The method for constructing a plankton identification model includes: extracting the contour of a plankton sample image in a sample data pair to obtain contour features of the plankton; clustering the contour features to obtain multiple contour feature cluster sets, and obtaining sample data pairs corresponding to each contour feature cluster set; and using the sample data corresponding to the contour feature cluster sets to perform model training to obtain a corresponding plankton identification model. Because the similarity of the plankton contours in the sample data pairs used for training a single type of plankton identification model is very high, the influence of the plankton contour on the model parameters is reduced when training a single plankton identification model, and more parameters are adjusted for features other than the contour features, thereby improving the accuracy of each plankton identification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of deep learning technology, and in particular to a method for constructing a plankton identification model and a method for identifying plankton categories. Background Art

[0002] The traditional method of manually identifying plankton in water bodies by microscopic examination is time-consuming and labor-intensive, and cannot meet the needs of rapid detection of a large number of samples in water quality testing. To solve this problem, the industry has introduced machine vision and deep learning technologies, using deep learning models to identify automatically collected microscopic photos and automatically determine the types and quantities of plankton in water bodies. However, since plankton has different appearances at different stages and the appearances of different types of plankton are very similar, the recognition accuracy of the plankton recognition model trained using a large number of plankton samples is poor. Summary of the invention

[0003] In order to solve the problem of poor recognition accuracy of existing plankton recognition models, the embodiments of the present disclosure provide a plankton recognition model construction method and a plankton category recognition method.

[0004] In a first aspect, the present disclosure provides a method for constructing a plankton identification model, comprising:

[0005] Performing contour extraction on the plankton sample image in the sample data pair to obtain contour features of the plankton contained in the plankton sample image; wherein each plankton sample image includes a type of plankton, and the sample data pair includes, in addition to the plankton sample image, plankton type labels associated one by one with the plankton sample image;

[0006] Performing clustering processing on the contour features to obtain a plurality of contour feature cluster sets, and dividing the sample data pairs based on the contour feature clusters corresponding to each of the plankton sample images to obtain sample data pairs corresponding to each of the contour feature cluster sets;

[0007] The sample data corresponding to the profile feature cluster sets are respectively used for model training to obtain the plankton recognition models corresponding to the respective profile feature cluster sets.

[0008] Optionally, before performing contour extraction on the plankton sample image in the sample data pair, the method further includes:

[0009] Editing the plankton sample image to obtain an edited plankton sample image, and constructing a new sample data pair based on the edited plankton sample image and a corresponding plankton type label;

[0010] The editing process includes at least one of the following: flipping, rotation, scaling within a set ratio range, random cropping, random shifting, and pixel occlusion, and the edited plankton sample image still includes pixel content that characterizes the plankton.

[0011] Optionally, the extracting contours of the plankton sample image in the sample data pair to obtain contour features of the plankton contained in the plankton sample image includes:

[0012] Performing fuzzy processing on the plankton sample image to obtain a fuzzy sample image, wherein the fuzzy processing is used to eliminate high-frequency noise in the plankton sample image;

[0013] Using a preset edge detection convolution kernel to perform convolution processing on the blurred sample image to obtain the gradient characteristics of each pixel point of the plankton sample image;

[0014] The plankton contour feature is determined based on the gradient feature.

[0015] Optionally, the extracted features obtained by performing convolution processing on the blurred sample image include gradient magnitude and gradient direction;

[0016] Determining the image contour of the plankton sample image based on the gradient feature comprises:

[0017] Perform non-maximum suppression based on the gradient magnitude and the gradient direction to determine a local gradient maximum;

[0018] Processing the local gradient maximum value by using a preset double threshold value to determine a confirmed maximum value and a candidate maximum value among the local gradient maximum values;

[0019] Based on the proximity relationship between the candidate maximum values ​​and the pixels corresponding to the confident maximum values, the candidate maximum values ​​are screened to obtain the retained candidate maximum values;

[0020] The pixel points corresponding to the confident maximum value and the retained candidate maximum value are used as the image contour of the plankton sample image.

[0021] Optionally, clustering the contour features to obtain a plurality of contour feature cluster sets includes:

[0022] Performing feature analysis on the contour feature to determine a feature vector corresponding to the contour feature;

[0023] The feature vectors are clustered according to a preset number of clusters to determine the cluster sets corresponding to the feature vectors, and the cluster sets corresponding to the feature vectors are used as the contour feature cluster sets where the contour features are located.

[0024] In a second aspect, the present disclosure provides a method for identifying a type of plankton, including:

[0025] Perform contour extraction on the plankton image to be identified to obtain the contour features of the plankton;

[0026] Based on the profile features of the plankton, determining a target feature cluster set from a plurality of profile feature cluster sets;

[0027] The plankton recognition model associated with the target feature cluster set is used to process the plankton image to be identified to determine the type of the plankton.

[0028] Optionally, the step of extracting the contour of the plankton image to be identified to obtain contour features of the plankton includes:

[0029] Determining the number of plankton included in the plankton image to be identified;

[0030] When the number of the plankton is one, performing contour extraction on the image of the plankton to be identified to obtain contour features of the plankton;

[0031] In the case that the number of the plankton is plural, the plankton image to be identified is segmented to obtain a segmented image, wherein the segmented image is an image including a single plankton; and

[0032] Contour extraction is performed on the segmented image to obtain contour features of plankton.

[0033] Optionally, the determining a target feature cluster set from a plurality of profile feature cluster sets based on the profile features of the plankton includes:

[0034] Performing feature analysis on the contour feature to determine a feature vector corresponding to the contour feature;

[0035] The distance between the feature vector and the center points of a plurality of predetermined feature cluster sets is calculated, and the feature distance set with the shortest distance is selected as the target feature cluster set.

[0036] In a third aspect, an embodiment of the present disclosure provides a computing device, comprising a processor and a memory, wherein the memory is used to store a computer program; when the computer program is loaded by the processor, the processor executes the method for constructing a zooplankton identification model as described above or the method for identifying a zooplankton category as described above.

[0037] In a fourth aspect, the present disclosure implements a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the method for constructing a zooplankton identification model as described above or the method for identifying a zooplankton category as described above.

[0038] The disclosed implementation scheme is based on the problem that different types of plankton may have the same external contour features, the same type of plankton has different external contour features at different growth stages, and the external contour features of plankton in the sample image itself will have a negative impact on the training of the plankton recognition model. First, the plankton image in the sample data pair is subjected to contour extraction and cluster analysis, and the sample data pairs containing different plankton contour features are divided into different cluster sets, and then the sample data corresponding to each cluster set is used for model training to obtain the corresponding plankton recognition model. Because the similarity of the plankton contours in the plankton sample images used for the training of the plankton recognition model is very high, the influence of the plankton contour on the model parameters is reduced when a single plankton recognition model is trained, and the parameters are adjusted more by other features other than the contour features, which improves the accuracy of each plankton recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor, including

[0041] Figure 1 is a flow chart of a method for constructing a plankton identification model provided by an embodiment of the present disclosure;

[0042] Figure 2 is a flow chart of a method for identifying plankton categories provided by an embodiment of the present disclosure;

[0043] Figure 3 It is a structural schematic diagram of a device for constructing a plankton identification model provided by an embodiment of the present disclosure;

[0044] Figure 4 It is a structural schematic diagram of a device for constructing a plankton identification model provided by an embodiment of the present disclosure;

[0045] Figure 5 It is a schematic diagram of the structure of a computing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0046] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0047] The term "including" and its variations used in this document are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. In this document, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0048] In order to solve the problem that different types of plankton have similar appearances, and a single type of plankton has different appearances at different growth stages, resulting in poor recognition accuracy of the trained plankton recognition model, the present disclosure provides a new plankton recognition model construction method. The plankton recognition model construction method provided by the present disclosure is executed by a computing device.

[0049] Figure 1 : is a flow chart of the method for constructing a plankton identification model provided by the embodiment of the present disclosure. Figure 1 As shown, the method for constructing a plankton identification model provided in the embodiment of the present disclosure includes S110-S130.

[0050] S110: performing contour extraction on the plankton sample image in the sample data pair to obtain contour features of the plankton contained in the plankton sample image.

[0051] The plankton sample image is an image obtained by photographing a water sample containing plankton using a microscope camera. In practical applications, because the size of plankton itself is very small, a single microscopic image obtained by photographing a water sample may contain multiple types of plankton samples, which makes it difficult to label and subsequently classify the plankton samples. The plankton sample image can be segmented to obtain a smaller sample image containing only one type of plankton.

[0052] In addition to the plankton sample image, the sample data pair also includes a plankton type label associated with the plankton sample image. The plankton type label is a label obtained by manually identifying the plankton sample image, which is used to mark the type of plankton contained in the plankton sample image. In a specific embodiment, the plankton type label may include the name of the plankton, and may also include the family, genus and species to which the plankton belongs.

[0053] After obtaining the plankton sample image, the computing device can extract the contour of the plankton sample image to obtain the contour features of the plankton. The contour features of the plankton are features that characterize the size and shape of the plankton, and the contour features of the plankton can be represented by lines.

[0054] In some embodiments, the computing device may use the following S111-S113 to obtain the plankton contour features contained in the plankton sample image.

[0055] S111: performing fuzzy processing on the plankton sample image to obtain a fuzzy processed sample image.

[0056] In a specific implementation, the computing device may use a Gaussian blur algorithm to blur the plankton sample image to obtain a blurred sample image. The aforementioned blurring process is to eliminate high-frequency noise in the plankton sample image to avoid the high frequency from affecting subsequent image contour recognition, that is, to avoid unnecessary (or erroneous) contour edges being recognized due to image noise.

[0057] S112: performing convolution processing on the blurred sample image using a preset edge detection convolution kernel to obtain the gradient features of each pixel point of the plankton sample image.

[0058] The preset edge detection convolution kernel is a convolution kernel used to identify edge pixels in the blurred sample image. According to the principle of edge recognition, the edge of an image is a high-frequency variation component in the image, and the corresponding preset edge detection convolution kernel is a convolution kernel used to realize high-frequency feature recognition.

[0059] In a specific implementation, the preset edge detection convolution kernel may be a Roberts operator convolution kernel, a Canny operator convolution kernel, a Prewitt operator convolution kernel, a Sobel operator convolution kernel, etc., which is not limited in the embodiments of the present disclosure.

[0060] In one embodiment, the preset edge detection convolution kernel uses the Canny operator convolution kernel, and the horizontal direction of the plankton sample image is used As the operator convolution kernel, the vertical direction of the plankton sample image is adopted As the operator convolution kernel. Correspondingly, the lateral gradient determined for the plankton sample image can be used The longitudinal gradient determined for the plankton sample image can be determined using Sure.

[0061] In some embodiments, after obtaining the aforementioned horizontal gradient features and vertical gradient features, the computing device calculates the gradient features of each pixel point to determine the absolute value and gradient direction of each pixel point, and uses the gradient magnitude and attitude direction as the gradient features for determining the contour of the plankton, where the gradient magnitude is , the gradient direction is .

[0062] Of course, in other embodiments, after convolution processing is performed on the sample image using other types of operator convolution kernels, the obtained gradient features may be represented by other data and are not limited to the gradient magnitude and gradient direction.

[0063] S113: Determine the outline features of the plankton based on the gradient features.

[0064] After determining the gradient features corresponding to the blurred sample image, the contour features of the plankton can then be determined based on the gradient features.

[0065] In some embodiments, the computing device performs non-maximum suppression based on the gradient magnitude and gradient direction to determine the local gradient maximum. The specific computing device performs a proximity maximization process based on the magnitude of the gradient direction, determines the proximity preset value of each gradient direction, and uses the direction of the proximity preset value as the standardized gradient direction.

[0066] Subsequently, the computing device can perform non-maximum suppression based on the gradient size and gradient direction to determine the local gradient maximum. In a specific implementation, the computing device compares the magnitude of the gradient strength of a certain pixel point with the positive and negative directions of its gradient. If the gradient of this pixel point is greater than the gradient of the adjacent pixel point, the gradient value of this pixel point is retained; and if the gradient of this pixel point is less than the gradient of the adjacent pixel point, the gradient value of this pixel point is suppressed (that is, deleted). Through the above method, the local gradient maximum can be determined, and the gradient values ​​of the remaining pixel points can be deleted.

[0067] Then, the computing device processes the local gradient maximum using a preset double threshold value to determine the confirmed maximum value and the candidate maximum value in the local gradient maximum value. The preset double threshold value is determined based on factors such as light characteristics of edge recognition of the actual image, and is an empirical value determined through experiments.

[0068] Finally, based on the proximity relationship between the corresponding pixels of the candidate maximum value and the confirmed maximum value, the candidate maximum value is screened to obtain the retained candidate maximum value. If a candidate maximum value is close to the confirmed maximum value, the candidate maximum value is retained as the retained candidate maximum value. If a candidate maximum value is not close to the confirmed maximum value or the retained preferred maximum value, the candidate maximum value is deleted.

[0069] After obtaining the confident maximum value and the retained candidate maximum value, the pixel points corresponding to the confident maximum value and the retained candidate maximum value can be used as the image contour of the plankton sample image.

[0070] As analyzed above, by reasonably setting the size of the preset double threshold, the image contour of the obtained plankton sample image can be made as closed as possible.

[0071] S120: clustering the profile features to obtain a plurality of profile feature cluster sets, and dividing the sample data set based on the profile feature clusters corresponding to each plankton to obtain sub-sample data sets corresponding to each profile feature cluster set.

[0072] In the disclosed embodiment, the purpose of clustering the contour features is to group the plankton sample images with the same contour features into one data set. For example, if the contour features include circular features, elliptical features, and needle-shaped features, the goal of S120 is to group the circular features, elliptical features, and needle-shaped features into one contour feature cluster set.

[0073] In a specific implementation, the computing device may perform clustering processing on the contour features using the following S121 - 122 to obtain a plurality of contour feature cluster sets.

[0074] S121: Perform feature analysis on the contour feature to determine a feature vector corresponding to the contour feature.

[0075] The computing device may perform feature analysis on the contour feature using a principal component analysis direction or a line segment type matching method to determine a feature vector corresponding to the contour feature. In a specific implementation, because contours of different shapes have different shape features, and different shape features correspond to elements at different positions of the feature vector, feature vectors corresponding to different types of contour features may differ greatly.

[0076] S122: performing cluster analysis on the feature vectors according to a preset number of clusters, determining a cluster set corresponding to each feature vector, and using the cluster set corresponding to the feature vector as the profile feature cluster set where the profile feature is located.

[0077] The preset number of clusters may be a number of clusters determined manually based on experience, or may be a number of clusters determined by a previous cluster analysis, which is not limited in the embodiments of the present disclosure. If the number of clusters is determined by a previous cluster analysis, the computing device may determine the number of clusters using statistical methods such as the elbow rule and the silhouette coefficient. In the embodiments of the present disclosure, the number of clusters is represented by K.

[0078] After determining the number of clusters K, K sample points can be randomly determined as the initial cluster centers, the distances from each feature vector to the initial cluster center are calculated, and each feature vector is assigned to the temporary cluster set where the nearest initial cluster center is located according to the distance. Subsequently, the new cluster center is determined using the feature vectors in the aforementioned temporary cluster set, and the aforementioned method is re-executed until the positions of the cluster centers are stable or the number of iterations reaches the set number.

[0079] After determining multiple profile cluster sets and determining the profile cluster set to which each feature vector belongs, the sample data set can then be divided based on the profile cluster set to which the feature vector belongs, and each sample data pair can be divided into a corresponding profile feature cluster set.

[0080] S130: Using the sample data corresponding to the contour feature clustering sets to perform model training respectively, to obtain a plankton recognition model corresponding to each contour feature clustering set.

[0081] After obtaining the sample data pairs corresponding to each profile feature cluster set, the initial models designed for each profile feature cluster set can be trained to obtain the corresponding plankton recognition model.

[0082] In a specific implementation, the initial model can be a convolutional neural network model, for example, a neural network model such as an AlexNet architecture, a VGG architecture, or a ResNet architecture. The initial model includes at least a convolutional layer and a fully connected layer, and may include a pooling layer. The convolution kernels used in each convolutional layer can be empirically set according to the characteristics of the plankton sample image, and the output layer can use a softmax function, a ReLUctant function, or a Tanh function as an activation function, wherein the softmax function is preferably used as the activation function.

[0083] During the model training process, it is necessary to pre-set hyperparameters such as learning rate, batch sample size, model iteration number, and select a suitable loss function. Considering that the plankton recognition model is essentially a multi-classification model, the cross entropy function can be used as the loss function. In specific implementation, during the model training process, some sample data pairs in each contour feature cluster can be used as test data to evaluate the model accuracy of the trained plankton recognition model. Specifically, the recall rate, accuracy rate and other indicators can be calculated to evaluate the accuracy of the plankton recognition model.

[0084] The disclosed embodiment scheme is based on the fact that different types of plankton may have the same external contour features, the same type of plankton has different external contour features at different growth stages, and the external contour features of plankton in the sample image itself will have a negative impact on the training of the plankton recognition model. First, the plankton image in the sample data pair is subjected to contour extraction and cluster analysis, and the sample data pairs containing different plankton contour features are divided into different cluster sets, and then the sample data corresponding to each cluster set is used for model training to obtain the corresponding plankton recognition model. Because the similarity of the plankton contours in the plankton sample images used for the training of the plankton recognition model is very high, the influence of the plankton contour on the model parameters is reduced when a single plankton recognition model is trained, and the parameters are adjusted more by other features other than the contour features, thereby improving the accuracy of each plankton recognition model.

[0085] In practical applications, since the sample data pairs belonging to different profile clustering feature clustering data sets are trained without considering the profile features of plankton, the load of a single model may also be reduced.

[0086] Considering from another perspective, the embodiment scheme of the present disclosure is based on the outline of plankton as the classification basis, rather than the conventional classification basis of plankton family, genus and species as the classification basis of sample data pairs. That is, the sample data pairs are classified and divided beyond the taxonomic level, which provides a new idea for model training and subsequent plankton identification model use.

[0087] As analyzed above, in order to realize model training, image acquisition and sample data pair construction are required, and in order to ensure the quality of the model, the number of sample data pairs should be sufficient. If image acquisition and sample data pair construction are only performed manually, the initial cost will be too high and the problem of incomplete sample feature coverage may occur. To solve the aforementioned problem, in some embodiments of the present disclosure, before executing the aforementioned S110, the computing device may also execute the following S140.

[0088] S140: Editing the plankton sample image to obtain an edited plankton sample image, and constructing a new sample data pair based on the edited plankton sample image and the corresponding plankton type label.

[0089] In a specific implementation, the editing process of the plankton sample image includes at least one of the following: flipping, rotation, scaling within a set ratio, random cropping, random shifting, and pixel occlusion. In a specific implementation, for a plankton sample image, it can be rotated by 90°, 180°, and 270° to obtain three rotated images, and then flipped to obtain a flipped image; then the rotated image and the flipped image are randomly cropped, plankton shifted, pixel occluded, and scaled within a set ratio to obtain an edited plankton sample image.

[0090] After obtaining the edited plankton sample image, the label corresponding to the plankton sample image before editing can be used as the label corresponding to the plankton sample image after editing to construct a new sample data pair.

[0091] When the aforementioned S140 is executed, the aforementioned S110 is to extract the contours of the plankton sample images in the original sample data pair and the new sample data pair.

[0092] In addition to providing the aforementioned plankton identification model construction method, the embodiment of the present disclosure also provides a plankton type identification method based on the model constructed by the aforementioned method. Figure 2 : is a flow chart of the plankton category identification method provided by the embodiment of the present disclosure. Figure 2 As shown, the plankton category identification method includes S210-S230.

[0093] S210: Extract the contour of the plankton image to be identified to obtain contour features of the plankton.

[0094] Similar to the previous analysis, the image of the plankton to be identified is obtained by photographing the sample water body with a microscope camera.

[0095] In a specific embodiment, the number of plankton contained in the plankton image to be identified may be one or more. If the number of plankton is more than one, subsequent identification problems may occur. To solve this problem, S210 may include the following S211-S214.

[0096] S211: Determine whether the number of plankton contained in the plankton image to be identified is one; if so, execute S212; if not, execute S213.

[0097] S212: Extract the contour of the plankton image to be identified to obtain the contour features of the plankton.

[0098] S213: The plankton image to be identified is segmented to obtain a segmented image.

[0099] S214: Perform contour extraction on the segmented image to obtain contour features of plankton.

[0100] The aforementioned segmented image is an image including a single plankton. In a specific implementation, an existing method such as a convolutional neural network can be used to identify the number of plankton contained in the plankton image to be identified, and determine the selection box of each plankton (that is, determine the pixel range including each plankton). After obtaining the aforementioned selection box, the plankton image to be identified can be segmented based on the aforementioned selection box to obtain a segmented image.

[0101] After the segmented image is obtained, the contour of the segmented image is then selected to obtain the contour features of the plankton.

[0102] In the embodiment of the present disclosure, the method for selecting contours of the plankton image or the segmented image to be identified and obtaining the contour features of the plankton is the same as the process of contour extraction in the previous model building method, which will not be repeated here. For details, please refer to the previous description.

[0103] S220: Based on the contour features of the plankton, determine a target feature cluster set from multiple contour feature cluster sets.

[0104] After obtaining the contour features of the plankton, the computing device may transform the contour features of the plankton according to the above processing method to determine the feature vector corresponding to the contour features.

[0105] After obtaining the feature vector, the computing device can calculate the distance from the feature vector to the center point of multiple feature cluster sets, and select the feature cluster set with the closest distance as the target cluster set. The aforementioned multiple feature cluster sets are the feature cluster sets determined in the model building process above, and each feature cluster set is associated with a plankton recognition model.

[0106] S230: Using the plankton recognition model associated with the target feature cluster set to process the plankton image to be identified, and determine the category of the plankton image.

[0107] After obtaining the target feature cluster set, the plankton recognition processing model associated with the target feature cluster set can be used to process the plankton image to be identified (of course, it may also be used to process the segmented image) to determine the category of the plankton.

[0108] The disclosed embodiment also provides a device for constructing a plankton identification model. Figure 3 Schematic diagram of the structure of the device for constructing the plankton identification model provided by the embodiment of the present disclosure. Figure 3 As shown, the plankton identification model building device 300 provided in the embodiment of the present disclosure includes a contour extraction unit 301, a data pair classification unit 302 and a model training unit 303.

[0109] The contour extraction unit 301 is used to perform contour extraction on the plankton sample image in the sample data pair to obtain the contour features of the plankton contained in the plankton sample image; wherein each plankton sample image includes a type of plankton, and the sample data pair includes not only the plankton sample image but also the plankton type labels associated one by one with the plankton sample image.

[0110] The data pair classification unit 302 is used to perform clustering processing on the contour features to obtain multiple contour feature cluster sets, and to divide the sample data pairs based on the contour feature clusters corresponding to each plankton sample image to obtain sample data pairs corresponding to each contour feature cluster set.

[0111] The model training unit 303 is used to perform model training using sample data corresponding to the profile feature cluster sets, respectively, to obtain a plankton recognition model corresponding to each profile feature cluster set.

[0112] In some embodiments, the plankton identification model construction device 300 further includes a preprocessing unit. The preprocessing unit is used to edit the plankton sample image to obtain the edited plankton sample image, and to construct a new sample data pair based on the edited plankton sample image and the corresponding plankton type label; wherein the editing process includes at least one of the following: flipping, rotation, scaling within a set ratio range, random cropping, random shifting, and pixel occlusion, and the edited plankton sample image still includes pixel content representing plankton.

[0113] In some embodiments, the contour extraction unit 301 performs blur processing on the plankton sample image to obtain a blurred sample image, and the blur processing is used to eliminate high-frequency noise in the plankton sample image; a preset edge detection convolution kernel is used to perform convolution processing on the blurred sample image to obtain the gradient characteristics of each pixel point of the plankton sample image; and the plankton contour characteristics are determined based on the gradient characteristics.

[0114] In some embodiments, the extracted features obtained by convolution processing the blurred sample image include gradient magnitude and gradient direction. The corresponding contour extraction unit 301 first performs non-maximum suppression based on gradient magnitude and gradient direction to determine the local gradient maximum; then uses a preset double threshold to process the local gradient maximum to determine the confident maximum and candidate maximum in the local gradient maximum; based on the proximity relationship between the pixels corresponding to the candidate maximum and the confident maximum, the candidate maximum is screened to obtain the retained candidate maximum; and then the pixel points corresponding to the confident maximum and the retained candidate maximum are used as the image contour of the plankton sample image.

[0115] In some embodiments, the data pair classification unit 302 performs feature analysis on the contour feature to determine the feature vector corresponding to the contour feature; performs cluster analysis on the feature vector according to a pre-set number of clusters to determine the cluster set corresponding to each feature vector, and uses the cluster set corresponding to the feature vector as the contour feature cluster set where the contour feature is located.

[0116] The disclosed embodiment also provides a device for identifying the type of plankton. Figure 4 Schematic diagram of the structure of the plankton identification device provided by the embodiment of the present disclosure. Figure 4 As shown, the plankton identification device 400 provided in the embodiment of the present disclosure includes a contour extraction unit 401, a cluster set determination unit 402 and a model processing unit 403.

[0117] The contour extraction unit 401 is used to extract the contour of the plankton image to be identified to obtain the contour features of the plankton. The cluster set determination unit 402 is used to determine the target feature cluster set from multiple contour feature cluster sets based on the contour features of the plankton. The model processing unit 403 is used to process the plankton image to be identified using the plankton identification model associated with the target feature cluster set to determine the type of the plankton.

[0118] In some embodiments, the contour extraction unit 401 first determines the number of plankton included in the plankton image to be identified. When the number of plankton is one, the contour extraction unit 401 performs contour extraction on the plankton image to be identified to obtain contour features of the plankton. When the number of plankton is multiple, the contour extraction unit 401 performs segmentation processing on the plankton image to be identified to obtain a segmented image, where the segmented image is an image including a single plankton; and, performs contour extraction on the segmented image to obtain contour features of the plankton.

[0119] In some embodiments, the cluster set determination unit 402 performs feature analysis on the contour feature to determine a feature vector corresponding to the contour feature; obtains the distance between the feature vector and the center points of a plurality of predetermined feature cluster sets, and selects the feature distance set with the shortest distance as the target feature cluster set.

[0120] The embodiment of the present disclosure also provides a computing device for implementing the aforementioned method. Figure 5 Schematic diagram of the structure of the computing device provided by the embodiment of the present disclosure. Figure 5 , which shows a schematic diagram of the structure of a computing device 500 suitable for implementing the embodiments of the present disclosure. Figure 5 The computing device shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present disclosure.

[0121] like Figure 5As shown, the computing device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 502 or a program loaded from a storage device 508 to a random access memory RAM 503. Various programs and data required for the operation of the computing device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output I / O interface 505 is also connected to the bus 504.

[0122] Typically, the following devices may be connected to the I / O interface 505: input devices 505 including, for example, a touch screen, a touch pad, a camera, a microphone, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the computing device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The computing device 500 is shown with various devices, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.

[0123] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0124] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable storage medium, a computer-readable signal medium, or any combination of the above two.

[0125] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0126] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0127] In some embodiments, the client and computing devices may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0128] The computer-readable medium may be included in the computing device, or may exist independently without being incorporated into the computing device.

[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the tester's computer, partially on the tester's computer, as a separate software package, partially on the tester's computer and partially on a remote computer, or entirely on a remote computer or computing device. In cases involving a remote computer, the remote computer may be connected to the tester's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0130] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system based on hardware that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The name of the unit does not constitute a limitation on the unit itself in some cases. The functions described above in this article may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: field programmable gate array (FPGA), application specific integrated circuit (ASIC), application specific standard product (ASSP), system on chip (SOC), complex programmable logic device (CPLD), etc.

[0132] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a plankton identification model, It is characterized in that include: Performing contour extraction on the plankton sample image in the sample data pair to obtain contour features of the plankton contained in the plankton sample image; wherein each plankton sample image includes a type of plankton, and the sample data pair includes, in addition to the plankton sample image, plankton type labels associated one by one with the plankton sample image; The contour features are clustered to obtain a plurality of contour feature cluster sets, including: performing feature analysis on the contour features to determine feature vectors corresponding to the contour features; performing cluster analysis on the feature vectors according to a preset number of clusters to determine cluster sets corresponding to each of the feature vectors, and using the cluster sets corresponding to the feature vectors as the contour feature cluster sets where the contour features are located; and dividing the sample data pairs based on the contour feature clusters corresponding to each of the plankton sample images to obtain sample data pairs corresponding to each of the contour feature cluster sets; The sample data corresponding to the profile feature cluster sets are respectively used for model training to obtain the plankton recognition models corresponding to the respective profile feature cluster sets.

2. The construction method according to claim 1, It is characterized in that Before extracting the contour of the plankton sample image in the sample data pair, the method further comprises: Editing the plankton sample image to obtain an edited plankton sample image, and constructing a new sample data pair based on the edited plankton sample image and a corresponding plankton type label; The editing process includes at least one of the following: flipping, rotation, scaling within a set ratio range, random cropping, random shifting, and pixel occlusion, and the edited plankton sample image still includes pixel content that characterizes the plankton.

3. The construction method according to claim 1, It is characterized in that The step of extracting the contour of the plankton sample image in the sample data pair to obtain contour features of the plankton contained in the plankton sample image includes: Performing fuzzy processing on the plankton sample image to obtain a fuzzy sample image, wherein the fuzzy processing is used to eliminate high-frequency noise in the plankton sample image; Using a preset edge detection convolution kernel to perform convolution processing on the blurred sample image to obtain the gradient characteristics of each pixel point of the plankton sample image; The plankton contour feature is determined based on the gradient feature.

4. The construction method according to claim 3, It is characterized in that The extracted features obtained by performing convolution processing on the blurred sample image include gradient magnitude and gradient direction; Determining the image contour of the plankton sample image based on the gradient feature comprises: Perform non-maximum suppression based on the gradient magnitude and the gradient direction to determine a local gradient maximum; Processing the local gradient maximum value by using a preset double threshold value to determine a confirmed maximum value and a candidate maximum value among the local gradient maximum values; Based on the proximity relationship between the candidate maximum values ​​and the pixels corresponding to the confident maximum values, the candidate maximum values ​​are screened to obtain the retained candidate maximum values; The pixel points corresponding to the confident maximum value and the retained candidate maximum value are used as the image contour of the plankton sample image.

5. A method for identifying plankton categories, It is characterized in that include: Perform contour extraction on the plankton image to be identified to obtain the contour features of the plankton; Based on the outline features of the plankton, a target feature cluster set is determined from multiple outline feature cluster sets: the method includes performing feature analysis on the outline features to determine a feature vector corresponding to the outline features; calculating the distance between the feature vector and the center points of multiple feature cluster sets determined in advance, and selecting the feature distance set with the closest distance as the target feature cluster set; The plankton recognition model associated with the target feature cluster set is used to process the plankton image to be identified to determine the type of the plankton.

6. The identification method according to claim 5, It is characterized in that The step of extracting the contour of the plankton image to be identified to obtain the contour features of the plankton includes: Determining the number of plankton included in the plankton image to be identified; When the number of the plankton is one, performing contour extraction on the image of the plankton to be identified to obtain contour features of the plankton; In the case that the number of the plankton is plural, the plankton image to be identified is segmented to obtain a segmented image, wherein the segmented image is an image including a single plankton; and Contour extraction is performed on the segmented image to obtain contour features of plankton.

7. A computing device, It is characterized in that It comprises a processor and a memory, wherein the memory is used to store a computer program; when the computer program is loaded by the processor, the processor executes the method for constructing a plankton identification model as described in any one of claims 1 to 4 or the method for identifying a plankton category as described in any one of claims 5 to 6.

8. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the method for constructing a plankton identification model as described in any one of claims 1-4 or the method for identifying a plankton category as described in any one of claims 5-6.

Citation Information

Patent Citations

  • Automatic chaetoceros and non-chaetoceros sorting method based on microscopic images

    CN102663406A

  • Microalgae image classification method, system and device and storage medium

    CN110287990A

  • Toxic algae monitoring and early warning method and system

    CN113128385A

  • Plankton detection method, device and equipment and storage medium

    CN116311009A

  • Marine plankton image in-situ classification system and method

    CN116883824A