River crab gender identification method and system based on artificial intelligence

Through artificial intelligence-based methods, data processing and model training are used for river crab abdomen and crab umbilical images, the accuracy and efficiency of traditional river crab gender recognition methods are solved, and the rapid and accurate identification of river crab gender is achieved, which reduces costs and provides technical support for the aquaculture industry.

CN119540620AInactive Publication Date: 2025-02-28TARIM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411598209.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional method of gender identification of river crabs relies on manual observation, which is time-consuming and labor-intensive, and is limited by the observer's experience and subjective judgment, making it difficult to guarantee the accuracy and consistency of the identification results, affecting breeding management and growth performance.

Method used

Using an artificial intelligence-based method, we use the collection of crab belly images of river crab abdomen for preprocessing and data enhancement, and construct a gender classification data set of river crabs, generate gender characteristic point maps and trait position difference curve maps, and build and train an artificial intelligence model to achieve fast and accurate gender recognition.

Benefits of technology

It realizes rapid and accurate identification of river crab gender, improves the accuracy and efficiency of identification, reduces labor and time costs, and provides technical support for the aquaculture industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540620A_ABST
    Figure CN119540620A_ABST
Patent Text Reader

Abstract

The invention discloses a river crab gender identification method and system based on artificial intelligence, and the method comprises the steps: firstly collecting an abdomen crab umbilical image of a river crab, carrying out the preprocessing and data enhancement, and constructing a river crab gender classification data set; based on the river crab gender classification data set, generating gender feature point diagrams and character position difference curve diagrams for identifying different genders of river crabs; then constructing an initial river crab gender recognition model based on artificial intelligence, and training the initial river crab gender recognition model according to the gender feature point diagram and the character position difference curve graph to obtain a trained river crab gender recognition target model; and finally, obtaining view image data of a to-be-identified river crab, and determining a gender identification result of the to-be-identified river crab according to the river crab gender identification target model. According to the method, the artificial intelligence technology and the deep learning model are introduced, so that rapid and high-throughput accurate identification of the river crab sex is realized, the identification precision and efficiency are improved, and the labor cost and the time cost are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular to an artificial intelligence-based crab gender recognition method and system. Background Art

[0002] In the aquaculture industry, river crabs are an important economic species, and their gender identification is extremely important for aquaculture management, the development of single-sex aquaculture models, market positioning, and genetic breeding. Traditional methods of river crab gender identification mainly rely on a large number of manual observations and selections. This method is not only time-consuming and labor-intensive, but also limited by the experience and subjective judgment of the observers, making it difficult to ensure the accuracy and consistency of the identification results. At the same time, the long manual identification operation process can easily cause river crab stress, resulting in a decrease in survival rate, reduced growth performance, or affect taste and flavor. Especially in large-scale aquaculture environments, manual identification methods are obviously far from meeting the needs of fast, accurate, and efficient gender identification, which has become a technical bottleneck that needs to be solved urgently. Summary of the invention

[0003] The purpose of the present invention is to provide a method and system for identifying the sex of river crabs based on artificial intelligence to solve the deficiencies in the prior art. By introducing artificial intelligence technology and deep learning models, it realizes the rapid and accurate identification of the sex of river crabs, which not only improves the accuracy and efficiency of identification, but also reduces labor costs and time costs, providing strong technical support for the development of aquaculture.

[0004] An embodiment of the present application provides a method for identifying sex of river crabs based on artificial intelligence, the method comprising:

[0005] Collect crab abdomen and navel images for preprocessing and data enhancement to build a crab gender classification dataset;

[0006] Based on the crab sex classification data set, a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes are generated;

[0007] Constructing an initial model for sex identification of river crabs based on artificial intelligence, and training the initial model for sex identification of river crabs according to the sex feature point diagram and the trait position difference curve diagram to obtain a trained target model for sex identification of river crabs;

[0008] The visual image data of the river crab to be identified is obtained, and the gender identification result of the river crab to be identified is determined according to the river crab gender identification target model.

[0009] Optionally, after collecting the crab abdomen and navel images for preprocessing and data enhancement to construct a crab gender classification dataset, the method further includes:

[0010] Performing sample partitioning on the sex classification data set of river crabs to obtain training samples and test samples of the sex classification data set of river crabs;

[0011] Clustering processing is performed on the training samples and the test samples to determine the clustering results of the sex classification of river crabs.

[0012] Optionally, generating a sex feature point diagram and a trait position difference curve diagram for identifying different sexes of crabs based on the sex classification data set of crabs includes:

[0013] Determine the characteristic data of river crabs according to the clustering results of the sex classification of river crabs; the characteristic data includes a key point diagram of the shape of the navel of the river crab abdomen and a diagram of the hairs of the river crab claws;

[0014] Performing labeling on the crab feature data to generate a gender feature point map for identifying crabs of different genders;

[0015] According to the grayscale values ​​corresponding to the pixel points in the gender feature point map, the trait positions used to identify the genders of river crabs of different genders are located and the trait position curve is fitted to determine the trait position difference curve map.

[0016] Optionally, the construction of an initial model for identifying sex of river crabs based on artificial intelligence includes:

[0017] An initial model for identifying the sex of river crabs is generated by building a dynamic convolutional depth extraction feature module with a preset number of layers and fusing a feature classification module between specified layers of the dynamic convolutional depth extraction feature module.

[0018] Optionally, the initial model for identifying sex of river crabs comprises at least three layers of dynamic convolution depth feature extraction modules; the feature classification module fused between designated layers of the dynamic convolution depth feature extraction modules comprises:

[0019] A fusion feature classification module is introduced between the second layer and the third layer of the dynamic convolution depth extraction feature module.

[0020] Optionally, the dynamic convolution deep extraction feature module is based on a recurrent neural network architecture, and is generated by building a deep fusion feature extraction unit and a dynamic convolution, and extracts features for distinguishing the sex of river crabs from an input sex feature point map of river crabs and a trait position difference curve map;

[0021] The fusion feature classification module is used to fuse the features extracted by the deep extraction feature module, and classify the sex of river crabs based on these fused features.

[0022] Optionally, the fusion feature classification module includes:

[0023] Attention mechanism unit, feature weight confirmation unit and fully connected layer, where:

[0024] The attention mechanism unit is used to perform weighted processing on different gender features of river crabs during the process of river crab feature fusion;

[0025] The feature weight confirmation unit is used to form the attention weight of each gender feature after the output of the attention mechanism unit passes through the Softmax function;

[0026] The fully connected layer is used to perform a product operation on the attention weights of each gender feature, map the operation result to the classification label space, and output the probability distribution result of river crab gender classification.

[0027] Another embodiment of the present application provides a crab gender recognition system based on artificial intelligence, the system comprising:

[0028] The acquisition module is used to collect images of the crab abdomen and navel for preprocessing and data enhancement to build a crab gender classification dataset;

[0029] A generation module, for generating a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes based on the sex classification data set of crabs;

[0030] A construction module is used to construct an initial model for sex identification of river crabs based on artificial intelligence, and train the initial model for sex identification of river crabs according to the sex feature point map and the trait position difference curve map to obtain a trained target model for sex identification of river crabs;

[0031] The determination module is used to obtain the view image data of the river crab to be identified, and determine the gender recognition result of the river crab to be identified based on the river crab gender recognition target model.

[0032] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to implement any of the above methods when executed.

[0033] Another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement any of the above methods.

[0034] Compared with the prior art, the present invention first collects crab abdomen and navel images for preprocessing and data enhancement to construct a crab sex classification data set; based on the crab sex classification data set, generates a sex feature point map and a trait position difference curve map for identifying crabs of different sexes; then constructs an initial model for crab sex recognition based on artificial intelligence, and trains the initial model for crab sex recognition according to the sex feature point map and the trait position difference curve map to obtain a trained crab sex recognition target model; finally, obtains the view image data of the crab to be identified, and determines the sex recognition result of the crab to be identified according to the crab sex recognition target model. It realizes the rapid and accurate identification of crab sex by introducing artificial intelligence technology and deep learning models, which not only improves the accuracy and efficiency of identification, but also reduces the labor cost and time cost, and provides strong technical support for the development of aquaculture. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A hardware structure block diagram of a computer terminal for a crab gender identification method based on artificial intelligence provided by an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of a flow chart of a crab gender recognition method based on artificial intelligence provided by an embodiment of the present invention;

[0037] Figure 3 A schematic diagram of the structure of a crab gender recognition system based on artificial intelligence provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0039] The embodiment of the present invention first provides a crab gender recognition method based on artificial intelligence, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0040] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a crab gender recognition method based on artificial intelligence provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0041] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the crab gender identification method based on artificial intelligence in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0042] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0043] With the rapid development of artificial intelligence technology, especially the widespread application of computer vision and deep learning technology, new solutions have been provided for the automation and intelligence of river crab gender recognition. In recent years, some studies have attempted to use image processing technology and machine learning algorithms to identify the gender of river crabs, but these methods often have problems such as insufficient feature extraction, weak model generalization ability, and low recognition accuracy.

[0044] Specifically, existing methods for identifying the sex of river crabs usually rely only on simple image feature extraction, such as shape and color, which have limited ability to represent gender differences and are difficult to effectively distinguish between river crabs of different sexes. In addition, due to the diverse morphology of river crabs and the complex growth environment, the collected image data has problems such as high noise and uneven quality, which further increases the difficulty of gender identification.

[0045] Therefore, there is an urgent need for a method that can accurately and efficiently identify the sex of river crabs, so as to fully extract and utilize the sex characteristics of river crabs, and at the same time have good generalization ability and robustness to meet the needs of river crab sex identification under different growth stages and environmental conditions. Based on the above background, the present invention proposes a river crab sex identification method based on artificial intelligence, which aims to achieve rapid and accurate identification of river crab sex by constructing a river crab sex classification data set, generating a sex feature point map and a trait position difference curve map, and training a river crab sex identification model.

[0046] See also Figure 2 , Figure 2 A flow chart of a crab gender recognition method based on artificial intelligence provided by an embodiment of the present invention may include the following steps:

[0047] S201: Collect images of river crab abdomen and navel for preprocessing and data enhancement to construct a river crab gender classification dataset.

[0048] Specifically, river crabs, whose scientific name is Chinese mitten crab (Eriocheir sinensis), collect river crab images, especially collect river crab abdomen and navel images, which is the basis for constructing river crab gender classification datasets. In order to ensure the diversity and representativeness of river crab gender classification datasets, river crab images at different growth stages (such as crab seedling stage, crab seed stage, adult crab stage), different genders and different environmental conditions can be collected.

[0049] Since the collected crab images may be affected by factors such as light, turbidity, noise, surface cleanliness, etc., resulting in a decrease in image quality, image preprocessing is required. The main purpose of preprocessing is to improve the brightness and contrast of the image, eliminate blur and noise, and restore the characteristic information of the crab in the area of ​​interest.

[0050] Common image preprocessing techniques include: image enhancement, which is to improve the overall quality of the image by adjusting image parameters such as brightness and contrast; image denoising, which is to use filtering algorithms (such as median filtering, Gaussian filtering, etc.) to eliminate noise in the image; and image sharpening, which is to make the morphological features of river crabs clearer by enhancing the edge information of the image.

[0051] Data augmentation is to generate new image data through a series of transformation operations based on the original dataset to increase the diversity and scale of the dataset. This helps to improve the generalization ability and robustness of the model.

[0052] Common data enhancement techniques include: image rotation, image scaling, image flipping, image cropping, and image color transformation. Image rotation is used to rotate an image by a certain angle to generate new image data. Image scaling is used to change the size of an image to generate image data of different sizes. Image flipping is used to flip an image horizontally or vertically to generate new image data. Image cropping is used to crop different areas from the original image to generate new image data. Image color transformation is used to adjust the color space or brightness, contrast and other parameters of an image to generate new image data.

[0053] Exemplarily, the image color conversion process can be calculated as follows:

[0054]

[0055] Among them, Y s It represents the new crab image data after the crab image color transformation processing. r represents the grayscale value of the crab image, satisfying r=0.299*R+0.587*G+0.116*B, R, G, B represent the red, green, and blue channel values ​​of the crab image data, ω represents the integral variable, n represents the total number of crab image pixels, n k represents the number of k-th grayscale pixels, Represents gray level r j The probability of occurrence, L represents the number of gray levels of the river crab image.

[0056] Finally, after preprocessing and data enhancement, the obtained image data is classified according to gender to construct a crab gender classification dataset. The crab gender classification dataset can contain a sufficient number of male crab images and female crab images to ensure the training effect of the subsequent model.

[0057] In summary, collecting crab abdomen and navel images for preprocessing and data enhancement, and constructing a crab gender classification dataset are key steps to achieve crab gender recognition based on artificial intelligence. High-quality image acquisition, effective preprocessing and data enhancement techniques, and a reasonable dataset construction method can provide strong support for subsequent model training.

[0058] In an optional implementation, after collecting crab abdomen and navel images for preprocessing and data enhancement to construct a crab sex classification dataset, the method may further include:

[0059] Sample partitioning is performed on the sex classification data set of river crabs to obtain training samples and test samples of the sex classification data set of river crabs; clustering processing is performed on the training samples and the test samples to determine the clustering results of sex classification of river crabs.

[0060] Specifically, first, the complete river crab gender classification dataset is divided into training samples and test samples. The purpose of this step is to ensure that the model can perform performance evaluation on unseen data, thereby more accurately reflecting the generalization ability of the model. The most commonly used method is to randomly divide the dataset into two parts, usually with the training set accounting for a larger proportion, such as 70%; and the test set accounting for a smaller proportion, such as 30%, to ensure the randomness and representativeness of the data. Considering the particularity of gender classification, a hierarchical division method can also be used, that is, to ensure that the ratio of male and female river crabs in the training set and the test set is consistent with the entire dataset, so as to avoid the impact of data imbalance on subsequent model performance.

[0061] After obtaining the training samples and test samples, they can be clustered. Clustering is an unsupervised learning method used to discover natural groups or categories in data. Although the clustering results are not directly used for the training of gender recognition models, they can help understand the distribution and characteristics of the data, as well as verify the rationality and effectiveness of the data set. By selecting a suitable clustering algorithm, such as commonly used clustering algorithms including K-means, hierarchical clustering, DBSCAN, etc., the training samples or test samples are input into the clustering algorithm to obtain the clustering results. The clustering results are usually presented in the form of clusters, each cluster containing a group of similar data points. By observing the clustering results, you can understand the distribution of the data and verify whether there is a clear category division in the data set. At the same time, you can also check whether there are outliers or noise data, which may have a negative impact on the training of the model. If the clustering results show that there are imbalances or outliers in the data set, you can consider further cleaning and adjusting the data to improve the quality of the data set and the performance of the model.

[0062] For example, in order to obtain a better crab sex recognition effect, the distance between each training sample and the feature center of the test sample can be calculated according to the clustering result, and the weight of each sample can be adaptively adjusted.

[0063] Suppose the number of samples with cluster category m in the test sample is t,x i is the feature vector of the i-th sample in the test sample of this category, then the feature center C of the test sample of cluster category m is m As shown below:

[0064]

[0065] The weight of the jth training sample of cluster category m is ω m,j , the corresponding eigenvector is x j ′ , then the weight of the sample is as follows:

[0066]

[0067] Therefore, in the same cluster, by calculating the distance between the feature centers of the training sample and the test sample, the inverse of the distance is used as the adaptive weight, so that the training sample that is more similar to the test sample is given a higher weight.

[0068] In summary, performing sample partitioning and clustering on the crab sex classification dataset is an important preparation before model training. Reasonable sample partitioning and clustering can provide strong support for subsequent model training and ensure the performance and generalization ability of the model.

[0069] S202: Based on the crab sex classification data set, a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes are generated.

[0070] Specifically, generating a gender feature point diagram and a trait position difference curve diagram for identifying different genders of river crabs based on the river crab gender classification data set may include:

[0071] Step 1: Determine the characteristic data of river crabs according to the clustering results of the sex classification of river crabs; the characteristic data includes a key point map of the shape of the navel of the river crab abdomen and a map of the hair on the river crab claws.

[0072] Step 2: perform labeling on the crab feature data to generate a gender feature point map for identifying crabs of different genders.

[0073] Step 3: According to the grayscale values ​​corresponding to the pixel points in the gender feature point map, the trait position used to identify the gender of river crabs of different genders is located and the trait position curve is fitted to determine the trait position difference curve map.

[0074] Using the above clustering processing results, the crab images of different clusters (i.e. different genders) in the crab sex classification dataset are analyzed to determine the key features that can distinguish male and female crabs. These features usually include the shape of the belly navel, the size of the pliers, the distribution of the hair on the pliers, etc. Select representative crab images from the clustering results, and extract the key point map of the belly navel shape and the hair map of the pliers as feature data. Among them, the key point map of the belly navel shape can be obtained through edge detection, contour extraction and other technologies, marking the key points of the abdominal contour. The hair map of the pliers can be extracted through image segmentation, texture analysis and other technologies, highlighting the distribution of hair on the pliers.

[0075] On the one hand, professionals can manually annotate the extracted feature data to ensure that each key point and each piece of fluff is accurately marked. Different colors, shapes or numbers can be used to distinguish different feature points during annotation. If the amount of data is large, you can consider using semi-automatic or fully automatic annotation methods, such as image segmentation algorithms based on deep learning, to assist or replace manual annotation. The annotated feature data is superimposed on the original image to form a gender feature point map, which is used to clearly show the key feature differences between male and female crabs.

[0076] By reading the grayscale value of each pixel in the sex feature point map, the grayscale value reflects the brightness or color intensity of different areas in the image. For the key point map of the belly crab navel shape and the pliers hair map, the grayscale value distribution around the key points and the hair area can be analyzed respectively. According to the distribution of grayscale values, the key features, such as the key points of the belly crab navel shape and the hair area on the pliers, are determined in the image. Use preset mathematical methods, such as polynomial fitting, curve interpolation, etc. to perform curve fitting on the trait position and generate a trait position difference curve map, which can intuitively show the differences between male and female crabs in the key feature positions.

[0077] S203: construct an initial model for gender recognition of river crabs based on artificial intelligence, and train the initial model for gender recognition of river crabs according to the gender feature point map and the trait position difference curve map to obtain a trained target model for gender recognition of river crabs.

[0078] Specifically, the construction of an initial model for identifying sex of river crabs based on artificial intelligence may include:

[0079] An initial model for identifying the sex of river crabs is generated by building a dynamic convolutional depth extraction feature module with a preset number of layers and fusing a feature classification module between specified layers of the dynamic convolutional depth extraction feature module.

[0080] Among them, the dynamic convolution layer in the dynamic convolution deep feature extraction module is the core component of this module. It can dynamically adjust the parameters of the convolution kernel during the processing process, so as to more effectively capture the key features in the image. The dynamic convolution deep feature extraction module contains multiple layers of dynamic convolution layers, each of which will deeply extract different levels of features of the image. According to the specific needs of river crab gender recognition and the complexity of image data, a reasonable number of dynamic convolution layers can be pre-set. The selection of the number of layers needs to balance the complexity and performance of the model to ensure that the model can effectively extract features without causing training difficulties and overfitting due to excessive complexity. As the image data passes through the processing of each layer of dynamic convolution layers, the features in the image will be abstracted and extracted layer by layer. Each layer will output a feature map containing features at a specific level, which will serve as the basis for subsequent classification modules. The fusion feature classification module can be inserted between specific levels of the dynamic convolution deep feature extraction module. The basis for selecting the insertion position is that the feature map of the position contains both sufficient image information and a sufficient level of abstraction, which is suitable for classification judgment.

[0081] In an optional embodiment, the initial model for identifying sex of river crabs comprises at least three layers of dynamic convolution depth feature extraction modules; the fusion feature classification module between designated layers of the dynamic convolution depth feature extraction modules may include:

[0082] A fusion feature classification module is introduced between the second layer and the third layer of the dynamic convolution depth extraction feature module.

[0083] Specifically, the initial model for identifying the sex of river crabs contains at least three layers of dynamic convolution deep feature extraction modules, each of which has the ability to dynamically adjust the convolution kernel parameters to adapt to feature extraction requirements at different levels.

[0084] Each layer is responsible for extracting different levels of features from the input image, and these features become increasingly complex as the number of layers increases. A fusion feature classification module is introduced between the second and third layers of the dynamic convolution depth feature extraction module. This module aims to combine the feature map output by the second layer with the classification information, and then pass the fused features to the third layer for further processing.

[0085] The processing flow of the initial model for sex recognition of river crabs generally includes: the input sex feature point map and trait position difference curve map images first pass through the first layer of dynamic convolution layer to extract preliminary image features, and the second layer of dynamic convolution layer further extracts image features. After the output of the second layer, the fusion feature classification module is introduced to combine the feature map of the second layer with the classification information. The fusion process can involve the splicing of feature maps, weighted summation or other forms of feature fusion technology; finally, the fused features are passed to the third layer of dynamic convolution layer for higher-level feature extraction. Finally, the output of the third layer is passed to the output layer to generate the classification results of the sex of river crabs.

[0086] In an optional embodiment, the dynamic convolution deep extraction feature module is based on a recurrent neural network architecture, and is generated by building a deep fusion feature extraction unit and a dynamic convolution, and extracts features for distinguishing the sex of river crabs from an input sex feature point map of river crabs and a trait position difference curve map;

[0087] The fusion feature classification module is used to fuse the features extracted by the deep extraction feature module, and classify the sex of river crabs based on these fused features.

[0088] Among them, the fusion feature classification module may include: an attention mechanism unit, a feature weight confirmation unit and a fully connected layer, wherein the attention mechanism unit is used to perform weighted processing on different river crab gender features during the river crab feature fusion process; the feature weight confirmation unit is used to form the attention weight of each gender feature after the output of the attention mechanism unit passes through the Softmax function; the fully connected layer is used to perform a product operation on the attention weight of each gender feature, and map the operation result to the classification label space, and output the river crab gender classification probability distribution result.

[0089] Specifically, first, the preliminary features of the crab image are extracted through the dynamic convolution deep feature extraction module, and then these features are sent to the attention mechanism unit to calculate the weights of different crab gender features. The output of the attention mechanism unit is converted through the Softmax function to form the attention weight of each crab gender feature. Then, these weights are input into the fully connected layer for product operation and mapping to generate the final gender classification probability distribution. According to the probability distribution, the crab gender recognition model outputs the crab gender classification result.

[0090] Through the above design, the fusion feature classification module can more effectively integrate and utilize the gender feature information in river crab images, thereby improving the accuracy and robustness of gender recognition.

[0091] S204: Obtain the view image data of the river crab to be identified, and determine the gender identification result of the river crab to be identified based on the river crab gender identification target model.

[0092] Specifically, in the task of identifying the gender of the crab to be identified, the crab gender identification target model usually extracts features from the view image data of the crab to be identified and maps these features to gender labels. The probability distribution output by the crab gender identification target model represents the possibility that the input view image data of the crab to be identified belongs to each gender label.

[0093] Compared with the prior art, the present invention first collects crab abdomen and navel images for preprocessing and data enhancement to construct a crab sex classification data set; based on the crab sex classification data set, generates a sex feature point map and a trait position difference curve map for identifying crabs of different sexes; then constructs an initial model for crab sex recognition based on artificial intelligence, and trains the initial model for crab sex recognition according to the sex feature point map and the trait position difference curve map to obtain a trained crab sex recognition target model; finally, obtains the view image data of the crab to be identified, and determines the sex recognition result of the crab to be identified according to the crab sex recognition target model. It realizes the rapid and accurate identification of crab sex by introducing artificial intelligence technology and deep learning models, which not only improves the accuracy and efficiency of identification, but also reduces the labor cost and time cost, and provides strong technical support for the development of aquaculture.

[0094] Another embodiment of the present application provides a crab gender recognition system based on artificial intelligence, such as Figure 3 The schematic diagram of the structure of a crab gender recognition system based on artificial intelligence is shown, and the system includes:

[0095] The acquisition module 301 is used to collect images of the crab abdomen and navel for preprocessing and data enhancement to construct a crab gender classification dataset;

[0096] A generating module 302 is used to generate a sex feature point diagram and a trait position difference curve diagram for identifying different sexes of crabs based on the sex classification data set of crabs;

[0097] A construction module 303 is used to construct an initial model for sex identification of river crabs based on artificial intelligence, and train the initial model for sex identification of river crabs according to the sex feature point diagram and the trait position difference curve diagram to obtain a trained target model for sex identification of river crabs;

[0098] The determination module 304 is used to obtain the view image data of the river crab to be identified, and determine the gender recognition result of the river crab to be identified according to the river crab gender recognition target model.

[0099] Compared with the prior art, the present invention first collects crab abdomen and navel images for preprocessing and data enhancement to construct a crab sex classification data set; based on the crab sex classification data set, generates a sex feature point map and a trait position difference curve map for identifying crabs of different sexes; then constructs an initial model for crab sex recognition based on artificial intelligence, and trains the initial model for crab sex recognition according to the sex feature point map and the trait position difference curve map to obtain a trained crab sex recognition target model; finally, obtains the view image data of the crab to be identified, and determines the sex recognition result of the crab to be identified according to the crab sex recognition target model. It realizes the rapid and accurate identification of crab sex by introducing artificial intelligence technology and deep learning models, which not only improves the accuracy and efficiency of identification, but also reduces the labor cost and time cost, and provides strong technical support for the development of aquaculture.

[0100] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to implement the steps in the above method embodiment when running.

[0101] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0102] S201: Collect crab belly and navel images for preprocessing and data enhancement to build a crab gender classification dataset;

[0103] S202: Based on the crab sex classification data set, generating a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes;

[0104] S203: constructing an initial model for sex identification of river crabs based on artificial intelligence, and training the initial model for sex identification of river crabs according to the sex feature point diagram and the trait position difference curve diagram to obtain a trained target model for sex identification of river crabs;

[0105] S204: Obtain the view image data of the river crab to be identified, and determine the gender identification result of the river crab to be identified based on the river crab gender identification target model.

[0106] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0107] Compared with the prior art, the present invention first collects crab abdomen and navel images for preprocessing and data enhancement to construct a crab sex classification data set; based on the crab sex classification data set, generates a sex feature point map and a trait position difference curve map for identifying crabs of different sexes; then constructs an initial model for crab sex recognition based on artificial intelligence, and trains the initial model for crab sex recognition according to the sex feature point map and the trait position difference curve map to obtain a trained crab sex recognition target model; finally, obtains the view image data of the crab to be identified, and determines the sex recognition result of the crab to be identified according to the crab sex recognition target model. It realizes the rapid and accurate identification of crab sex by introducing artificial intelligence technology and deep learning models, which not only improves the accuracy and efficiency of identification, but also reduces the labor cost and time cost, and provides strong technical support for the development of aquaculture.

[0108] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the above method embodiment.

[0109] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0110] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0111] S201: Collect crab belly and navel images for preprocessing and data enhancement to build a crab gender classification dataset;

[0112] S202: Based on the crab sex classification data set, generating a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes;

[0113] S203: constructing an initial model for sex identification of river crabs based on artificial intelligence, and training the initial model for sex identification of river crabs according to the sex feature point diagram and the trait position difference curve diagram to obtain a trained target model for sex identification of river crabs;

[0114] S204: Obtain the view image data of the river crab to be identified, and determine the gender identification result of the river crab to be identified based on the river crab gender identification target model.

[0115] Compared with the prior art, the present invention first collects crab abdomen and navel images for preprocessing and data enhancement to construct a crab sex classification data set; based on the crab sex classification data set, generates a sex feature point map and a trait position difference curve map for identifying crabs of different sexes; then constructs an initial model for crab sex recognition based on artificial intelligence, and trains the initial model for crab sex recognition according to the sex feature point map and the trait position difference curve map to obtain a trained crab sex recognition target model; finally, obtains the view image data of the crab to be identified, and determines the sex recognition result of the crab to be identified according to the crab sex recognition target model. It realizes the rapid and accurate identification of crab sex by introducing artificial intelligence technology and deep learning models, which not only improves the accuracy and efficiency of identification, but also reduces the labor cost and time cost, and provides strong technical support for the development of aquaculture.

[0116] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0117] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0118] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0119] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0121] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0122] The embodiments of the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for identifying sex of river crabs based on artificial intelligence, characterized in that: The method comprises: Collect crab abdomen and navel images for preprocessing and data enhancement to build a crab gender classification dataset; Based on the crab sex classification data set, a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes are generated; Constructing an initial model for sex identification of river crabs based on artificial intelligence, and training the initial model for sex identification of river crabs according to the sex feature point diagram and the trait position difference curve diagram to obtain a trained target model for sex identification of river crabs; The visual image data of the river crab to be identified is obtained, and the gender identification result of the river crab to be identified is determined according to the river crab gender identification target model.

2. The method according to claim 1, characterized in that After collecting the crab belly and navel images for preprocessing and data enhancement to construct a crab gender classification data set, the method further includes: Performing sample partitioning on the sex classification data set of river crabs to obtain training samples and test samples of the sex classification data set of river crabs; Clustering processing is performed on the training samples and the test samples to determine the clustering results of the sex classification of river crabs.

3. The method according to claim 2, characterized in that The method of generating a gender feature point diagram and a trait position difference curve diagram for identifying different genders of river crabs based on the river crab gender classification data set includes: Determine the characteristic data of river crabs according to the clustering results of the sex classification of river crabs; the characteristic data includes a key point diagram of the shape of the navel of the river crab abdomen and a diagram of the hairs of the river crab claws; Performing labeling on the crab feature data to generate a gender feature point map for identifying crabs of different genders; According to the grayscale values ​​corresponding to the pixel points in the gender feature point map, the trait positions used to identify the genders of river crabs of different genders are located and the trait position curve is fitted to determine the trait position difference curve map.

4. The method according to claim 3, characterized in that The construction of an initial model for identifying sex of river crabs based on artificial intelligence includes: An initial model for identifying the sex of river crabs is generated by building a dynamic convolutional depth extraction feature module with a preset number of layers and fusing a feature classification module between specified layers of the dynamic convolutional depth extraction feature module.

5. The method according to claim 4, characterized in that The initial model for identifying sex of river crabs comprises at least three layers of dynamic convolution depth feature extraction modules; the feature classification module for fusion between designated layers of the dynamic convolution depth feature extraction modules comprises: A fusion feature classification module is introduced between the second layer and the third layer of the dynamic convolution depth extraction feature module.

6. The method according to claim 5, characterized in that The dynamic convolution deep extraction feature module is based on a recurrent neural network architecture and is generated by deep fusion feature extraction units and dynamic convolution. It extracts features for distinguishing the sex of river crabs from the input sex feature point map of river crabs and the trait position difference curve map. The fusion feature classification module is used to fuse the features extracted by the deep extraction feature module, and classify the sex of river crabs based on these fused features.

7. The method according to claim 6, characterized in that The fusion feature classification module includes: Attention mechanism unit, feature weight confirmation unit and fully connected layer, where: The attention mechanism unit is used to perform weighted processing on different gender features of river crabs during the process of river crab feature fusion; The feature weight confirmation unit is used to form the attention weight of each gender feature after the output of the attention mechanism unit passes through the Softmax function; The fully connected layer is used to perform a product operation on the attention weights of each gender feature, map the operation result to the classification label space, and output the probability distribution result of river crab gender classification.

8. A crab gender recognition system based on artificial intelligence, characterized in that: The system comprises: The acquisition module is used to collect images of the crab abdomen and navel for preprocessing and data enhancement to build a crab gender classification dataset; A generation module, for generating a sex feature point diagram and a trait position difference curve diagram for identifying crabs of different sexes based on the sex classification data set of crabs; A construction module is used to construct an initial model for sex identification of river crabs based on artificial intelligence, and train the initial model for sex identification of river crabs according to the sex feature point map and the trait position difference curve map to obtain a trained target model for sex identification of river crabs; The determination module is used to obtain the view image data of the river crab to be identified, and determine the gender recognition result of the river crab to be identified based on the river crab gender recognition target model.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to implement the method according to any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the computer program to implement the method according to any one of claims 1 to 7.