Leiocassis longirostris sex identification method based on image feature dotting analysis
Through the method of image feature analysis, image preprocessing, landmark marking and machine learning model training, the problem of inaccurate gender identification of long-butt parent fish in the existing technology is solved, and high-accurate gender identification is achieved, supporting large-scale proliferation and breeding of long-butt parent fish.
Patent Information
- Application Number
- CN202411770343.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is difficult to accurately identify the gender of long-butt horned parent fish in batches, which limits the large-scale proliferation and breeding of long-butt horned parent fish.
Using a method based on image feature dot analysis, gender identification is performed through image preprocessing, landmark marking, digitization and morphological analysis, machine learning model training and statistical analysis software.
The accuracy of the identification of the gender of the long-butt horned parent fish has been improved, and the accurate identification of the gender of the long-butt horned parent fish has been achieved, and the large-scale proliferation and breeding of the long-butt horned parent fish has been supported.
Smart Images

Figure CN119723616A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of aquaculture, and in particular relates to a method for identifying the sex of a long-rumped catfish based on image feature dot analysis. Background Art
[0002] Long-rumped catfish, also known as bone fish and gulu fish in the local area, belongs to the order Siluriformes, family Long-rumped catfish and genus Long-rumped catfish. It is a wild and precious economic fish unique to the Pearl River system. The fish is large, has a high meat content, is rich in protein and vitamins, has few intramuscular bones, has tender meat, tastes delicious and is rich in nutrition.
[0003] Due to the increasing depletion of wild resources of long-rump catfish, it is crucial to cultivate and breed aquatic organisms by artificial means and then release them into natural waters to increase the number and variety of aquatic biological resources, protect and restore aquatic biological resources, and maintain the ecological balance of aquatic organisms. However, under artificial breeding conditions, the gonadal development of long-rump catfish broodstock is poor, the success rate of natural mating and reproduction is extremely low, and the artificial breeding technology is not yet mature, which limits the large-scale proliferation, release and breeding of long-rump catfish. Therefore, it is particularly important to explore the reproductive biology of long-rump catfish and the key technologies of artificial breeding of long-rump catfish to better protect and develop this freshwater native fish; among them, the identification of the sex of long-rump catfish broodstock is currently mostly done manually, and this method cannot accurately identify the sex of long-rump catfish broodstock in batches. Therefore, a method for identifying the sex of long-rump catfish based on image feature dot analysis is proposed. Summary of the invention
[0004] In order to solve at least one of the problems raised in the above background technology, the present invention provides a method for identifying the sex of long-rumped catfish based on image feature dot analysis.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for identifying the sex of long-rumped catfish based on image feature dot analysis, the identification method comprising the following steps: S1. Image preprocessing: export the image to be processed to the image processing software, import the collected parent fish genitalia pictures into the image processing software for preprocessing, and perform grayscale, noise reduction, and contrast enhancement operations to improve image quality; S2. Landmark point marking: Manually mark the collected images with landmark points as the benchmark data for machine learning model training. The marking content includes the key feature points of the male and female fish genitals, i.e., landmark points. S3, Digitization of landmark points: Coordinate extraction, converting the position of each landmark point on the image into specific coordinates (x, y) on a two-dimensional plane, extracting these coordinate data and using them for subsequent data processing; S4. Morphological analysis: extract the coordinate data obtained in S3, import it into statistical analysis software, perform relative distortion analysis, and obtain the results of sex identification of the broodstock.
[0006] Preferably, the method for marking landmark points in S2 comprises the following steps: Marking of the edge contour of the genitals of the broodstock: After the image preprocessing in S1, the edge contour of the genitals of the broodstock is clearly presented. Eight feature points are evenly and symmetrically marked on the edge of the contour. One reference point is marked at the bottom, and two feature points are marked at both ends of the middle contour line of the broodstock genitals.
[0007] Preferably, the method for training the machine learning model in S2 comprises the following steps: Image adjustment: Use the OpenCV library in the image processing library to uniformly adjust all images to the input size of 224x224 pixels required by the VGG16 model to ensure that the input dimension of the data is consistent during the model training process. Normalize the pixel values in the image and map the value range of each pixel from [0, 255] to [0, 1]; Data partitioning: The processed dataset was divided into training set, validation set, and test set using a stratified sampling method with a ratio of 70:15:15. Stratified sampling ensures that in each subset, the ratio of male and female samples is roughly the same as that in the original dataset, avoiding the impact of uneven data distribution on model training.
[0008] Preferably, the VGG16-based training steps in the machine learning model training in S2 are as follows: Build the VGG16 model: Use the TensorFlow deep learning framework to load the pre-trained VGG16 model, build the VGG16 model network architecture, including multiple convolutional layer groups, each group has several 3x3 convolutional layers alternating with pooling layers, and finally connect 3 fully connected layers. Adjust the output of the last layer to 22 neurons to correspond to the coordinate prediction of 11 feature points; Forward propagation: The training set images are input into the VGG16 model, the convolutional layer extracts features, the pooling layer reduces the dimension, and finally the fully connected layer outputs the feature point position prediction; Calculate the loss: Use the mean square error loss function to calculate the loss value based on the predicted feature point position and the actual annotation position; Back propagation and parameter update: Based on the loss value, the model parameter gradient is calculated through back propagation, and then the convolutional layer and fully connected layer parameters of the VGG16 model are updated using the Adam optimization algorithm; Repeat the steps of forward propagation, loss calculation, back propagation and parameter update to complete multiple rounds of training. After each round of training, the model performance is evaluated on the validation set, and the training parameters are adjusted according to the validation set results. After the training is completed, the final performance is evaluated on the test set.
[0009] Preferably, the morphological analysis in S4 comprises the following steps: S41, obtaining coordinate information of the landmark points in S3, importing the landmark point information obtained by manual annotation into statistical analysis software, performing relative distortion analysis, and obtaining the sex identification result of the parent fish; S42. The coordinate information of the marked points obtained through the machine learning model training is imported into the statistical analysis software for relative distortion analysis, and the sex identification result of the parent fish is obtained with the help of the result rule obtained in S41.
[0010] Compared with the prior art, the present invention has the following beneficial effects: Existing sex identification of long-rump catfish broodstock mostly adopts manual identification methods, which makes it difficult to conduct sex identification of broodstock in batches and accurately. The present invention is based on image feature dot analysis, and quantifies the specific parameters in broodstock sex identification through image processing, landmark point marking, digitization and morphological analysis, thereby improving the accuracy of sex identification of long-rump catfish broodstock.
[0011] The present invention uses machine learning model training and calibrated images to more accurately mark the genital contour feature points of long-rump catfish broodstock, and the marking efficiency is high; because the machine learning model designed by the invention is only used to output the coordinate information of the genital contour feature points of long-rump catfish broodstock, and the gender identification result is obtained by analysis through statistical analysis software, the machine learning model has high training efficiency, high output result accuracy, and simple parameter adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 The present invention is a flow chart of a method for identifying the sex of long-rumped catfish based on image feature dot analysis; Figure 2 This is a labeled schematic diagram of the reproductive organs of a male long-rumped catfish; Figure 3 This is a labeled schematic diagram of the reproductive organs of a female long-rumped catfish; Figure 4 The relative distortion coordinate diagram of the landmark point data obtained in the statistical analysis software tpsrelw. DETAILED DESCRIPTION
[0013] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0014] First, refer to Figure 1-Figure 4 A method for identifying the sex of a long-rump catfish based on image feature dot analysis according to an embodiment of the present invention is specifically described, wherein the selected broodstock are all long-rump catfish.
[0015] A method for identifying the sex of a long-rumped catfish based on image feature dot analysis, the identification method comprising the following steps: S1. Image preprocessing: export the image to be processed to the image processing software, import the collected parent fish genitalia pictures into the image processing software for preprocessing, and perform grayscale, noise reduction, and contrast enhancement operations to improve image quality; S2. Landmark point marking: Manually mark the collected images with landmark points as the benchmark data for machine learning model training. The marking content includes the key feature points of the male and female fish genitals, i.e., landmark points. Landmark points are specific points in the image with biological or geometric significance. S3, Digitization of landmark points: Coordinate extraction, converting the position of each landmark point on the image into specific coordinates (x, y) on a two-dimensional plane, extracting these coordinate data and using them for subsequent data processing; S4. Morphological analysis: extract the coordinate data obtained in S3, import it into statistical analysis software, perform relative distortion analysis, and obtain the results of sex identification of the broodstock.
[0016] The method for marking landmark points in S2 includes the following steps: The outline of the reproductive organs of the broodstock is marked as follows: Figure 2 and Figure 3 As shown, after the image preprocessing in S1, the edge contour of the parent fish genitals is clearly presented, and 8 feature points are evenly and symmetrically marked on the edge of the contour, with 1 reference point marked at the bottom and 2 feature points marked at both ends of the middle contour line of the parent fish genitals.
[0017] The method for training the machine learning model in S2 includes the following steps: Image adjustment: Use the OpenCV library in the image processing library to uniformly adjust all images to the input size of 224x224 pixels required by the VGG16 model to ensure that the input dimension of the data is consistent during the model training process. Normalize the pixel values in the image and map the value range of each pixel from [0, 255] to [0, 1]; Data partitioning: The processed dataset was divided into training set, validation set, and test set using a stratified sampling method with a ratio of 70:15:15. Stratified sampling ensures that in each subset, the ratio of male and female samples is roughly the same as that in the original dataset, avoiding the impact of uneven data distribution on model training.
[0018] The VGG16-based training steps in the machine learning model training in S2 are as follows: Build the VGG16 model: Use the TensorFlow deep learning framework to load the pre-trained VGG16 model, build the VGG16 model network architecture, including multiple convolutional layer groups, each group has several 3x3 convolutional layers alternating with pooling layers, and finally connect 3 fully connected layers. Adjust the output of the last layer to 22 neurons to correspond to the coordinate prediction of 11 feature points; Forward propagation: The training set images are input into the VGG16 model, the convolutional layer extracts features, the pooling layer reduces the dimension, and finally the fully connected layer outputs the feature point position prediction; Calculate the loss: Use the mean square error loss function to calculate the loss value based on the predicted feature point position and the actual annotation position; Back propagation and parameter update: Based on the loss value, the model parameter gradient is calculated through back propagation, and then the convolutional layer and fully connected layer parameters of the VGG16 model are updated using the Adam optimization algorithm; Repeat the steps of forward propagation, loss calculation, back propagation and parameter update to complete multiple rounds of training. After each round of training, the model performance is evaluated on the validation set, and the training parameters are adjusted according to the validation set results. After the training is completed, the final performance is evaluated on the test set.
[0019] Morphological analysis in S4 includes the following steps: S41, obtaining coordinate information of the landmark points in S3, importing the landmark point information obtained by manual annotation into statistical analysis software, performing relative distortion analysis, and obtaining the sex identification result of the parent fish; S42. The coordinate information of the marked points obtained through the machine learning model training is imported into the statistical analysis software for relative distortion analysis, and the sex identification result of the parent fish is obtained with the help of the result rule obtained in S41.
[0020] like Figure 4, the method was verified by 25 long-rumped catfish samples, including 13 females and 12 males. Data from 11 landmark points were obtained for each sample and relative distortion analysis was performed in tpsrelw. The first and third dimensions of the relative distortion score were selected as the x and y axes to make a relative distortion coordinate diagram. The left side of the y axis is female, and the right side of the y axis is male, which can be clearly distinguished.
[0021] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for identifying the sex of long-rumped catfish based on image feature dot analysis, characterized in that: The identification method comprises the following steps: S1, image preprocessing: export the image to be processed to the image processing software, import the collected genital images of the long-rumped catfish broodstock into the image processing software for preprocessing, and perform grayscale, noise reduction, and contrast enhancement operations to improve the image quality; S2. Landmark point marking: Manually mark the collected images with landmark points as the benchmark data for machine learning model training. The marking content includes the key feature points of the male and female fish genitals, i.e., landmark points. S3, Digitization of landmark points: Coordinate extraction, converting the position of each landmark point on the image into specific coordinates (x, y) on a two-dimensional plane, extracting these coordinate data and using them for subsequent data processing; S4. Morphological analysis: Extract the coordinate data obtained in S3, import it into statistical analysis software, perform relative distortion analysis, and obtain the results of sex identification of the broodstock.
2. The method for identifying the sex of long-rumped catfish based on image feature dot analysis according to claim 1, characterized in that: The method for marking landmark points in S2 comprises the following steps: Marking of the edge contour of the genitals of the broodstock: After the image preprocessing in S1, the edge contour of the genitals of the broodstock is clearly presented. Eight feature points are evenly and symmetrically marked on the edge of the contour. One reference point is marked at the bottom, and two feature points are marked at both ends of the middle contour line of the broodstock genitals.
3. The method for identifying the sex of long-rumped catfish based on image feature dot analysis according to claim 1, characterized in that: The method for training the machine learning model in S2 comprises the following steps: Image adjustment: Use the OpenCV library in the image processing library to uniformly adjust all images to the input size of 224x224 pixels required by the VGG16 model to ensure that the input dimension of the data is consistent during the model training process. Normalize the pixel values in the image and map the value range of each pixel from [0, 255] to [0, 1]; Data partitioning: The processed dataset was divided into training set, validation set, and test set using a stratified sampling method with a ratio of 70:15:
15. Stratified sampling ensures that in each subset, the ratio of male and female samples is roughly the same as that in the original dataset, avoiding the impact of uneven data distribution on model training.
4. The method for identifying the sex of long-rumped catfish based on image feature dot analysis according to claim 3, characterized in that: The training steps based on VGG16 in the machine learning model training in S2 are as follows: Build the VGG16 model: Use the TensorFlow deep learning framework to load the pre-trained VGG16 model, build the VGG16 model network architecture, including multiple convolutional layer groups, each group has several 3x3 convolutional layers alternating with pooling layers, and finally connect 3 fully connected layers. Adjust the output of the last layer to 22 neurons to correspond to the coordinate prediction of 11 feature points; Forward propagation: The training set images are input into the VGG16 model, the convolutional layer extracts features, the pooling layer reduces the dimension, and finally the fully connected layer outputs the feature point position prediction; Calculate the loss: Use the mean square error loss function to calculate the loss value based on the predicted feature point position and the actual annotation position; Back propagation and parameter update: Based on the loss value, the model parameter gradient is calculated through back propagation, and then the convolutional layer and fully connected layer parameters of the VGG16 model are updated using the Adam optimization algorithm; Repeat the steps of forward propagation, loss calculation, back propagation and parameter update to complete multiple rounds of training. After each round of training, the model performance is evaluated on the validation set, and the training parameters are adjusted according to the validation set results. After the training is completed, the final performance is evaluated on the test set.
5. The method for identifying the sex of long-rumped catfish based on image feature dot analysis according to claim 1, characterized in that: The morphological analysis in S4 includes the following steps: S41, obtaining coordinate information of the landmark points in S3, importing the landmark point information obtained by manual annotation into statistical analysis software, performing relative distortion analysis, and obtaining the sex identification result of the parent fish; S42. The coordinate information of the marked points obtained through the machine learning model training is imported into the statistical analysis software for relative distortion analysis, and the sex identification result of the parent fish is obtained with the help of the result rule obtained in S41.