Method, medium and device for tracking and identifying turbot individuals and breeding application of turbot individuals
By collecting and analyzing images of the abdomen and back of turbot fish, combined with fin texture, and using a deep learning model for individual identification, the problem of damage-free and low-cost identification in fish breeding is solved, and high-accuracy individual monitoring is achieved. and breeding precision.
Patent Information
- Application Number
- CN202410879242.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Existing technology makes it difficult to achieve damage-free, low-cost individual identification in fish breeding, especially in the fry and juvenile stages. The use of electronic tags will cause trauma to the fish body and high costs, limiting the accuracy and scope of breeding.
By collecting images of the abdomen and back of turbot, preprocessing and principal component analysis were performed to reduce dimensionality, and a deep learning model was used for individual identification based on fin texture. A deep learning network was designed to monitor the entire growth cycle of individual fish.
It achieves high-accuracy identification of turbot individuals, reduces fish damage and costs, and supports accurate breeding decisions and germplasm protection.
Smart Images

Figure CN118865084A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of biometric identification, and in particular provides a method, a medium, a device and a breeding application of turbot individuals for tracking and identifying. Background Art
[0002] Turbot is the main fish species farmed in factory farming in northern my country. With global warming, extreme environments frequently occur, and problems such as frequent diseases, poor resistance to adversity, and declining quality are becoming increasingly serious. It is urgent to carry out the selection and breeding of turbot for adversity resistance and disease resistance to improve the germplasm, which is of great significance to the development of marine fish seed industry. In fish breeding, in order to improve the accuracy of breeding, electronic tags are often used. In the case of mixed breeding, individuals can be tracked, and kinship archives and trait performance can be established to screen out excellent traits, design breeding plans, and establish core breeding groups. However, this marking method often causes trauma to the surface of the fish, making it easy to be infected with pathogens and die. In order to avoid damage, electronic tag tracking cannot be carried out during the fry and juvenile stage, which affects the trait monitoring and evaluation of the entire growth cycle, and is a technical barrier to precision breeding. In addition, the cost of electronic tags suitable for fish on the market is relatively high. The number of groups for individual trait tracking in breeding is often large, so the tag cost also restricts the number of test groups, resulting in reduced breeding accuracy. Therefore, conducting research on non-destructive and low-cost individual identification technology based on the biological characteristics of fish is a key technological breakthrough for precision breeding.
[0003] With the development of computer vision technology, there have been studies on the identification of individual fish based on fish image samples. However, due to limited recognition features, most studies are based on a fixed set of fish sample images, which is not suitable for tracking the entire growth cycle of the tested individuals, thus limiting the scope of application of fish identification. Summary of the invention
[0004] In view of the above technical problems, the present invention provides a method, medium, device and breeding application for individual tracking and identification of turbot. In the previous study, it was found that the pattern of the belly of turbot has individual differences and is immutable during the growth process from juveniles (about 15g) to adult fish (about 500g), and the texture of the fins (including dorsal fin, caudal fin, pelvic fin and anal fin) also has individual differences. Although the color depth will change with growth, the texture remains basically unchanged; this provides a new idea and method for feature extraction of turbot individuals.
[0005] Based on the above findings, the present invention solves the technical problems of the present invention through the following technical solutions:
[0006] A method for tracking and identifying turbot individuals, the method is as follows:
[0007] The first step is to collect images of the ventral and dorsal surfaces of turbot and preprocess the collected turbot images, including mask annotation and image enhancement.
[0008] The second step is to use the PCA algorithm to reduce the dimension of the belly images of turbot fish samples, and to eliminate the turbot belly texture images that do not meet the conditions by setting the Euclidean distance constraint conditions, so as to achieve individual identification;
[0009] Step 3: For individual images that do not meet the conditions and are eliminated, the fins are segmented on the image using a deep learning model algorithm based on the texture of the fins (dorsal fin, caudal fin, pelvic fin and anal fin);
[0010] The fourth step is to design a deep learning network based on the acquired fin image dataset to complete the individual identification of all samples.
[0011] As a more specific implementation, in the second step, in the pre-processed turbot data set, for turbot fish individuals that meet the conditions, dimension reduction is performed based on principal component analysis, and then the individual identification is completed using a logistic regression algorithm. The specific implementation process is as follows:
[0012] Step 2.1: For the continuously tracked turbot individuals, since the similarity of the abdominal images taken is relatively high, each individual has only 5 valid abdominal sample images at the same time. During training, the image size is adjusted to 512*512, and the image data set is divided into a training data set and a test data set in a ratio of 4:1;
[0013] Step 2.2: For the samples of the training set, convert them into 1-dimensional 1-column data, and organize the training set images into a matrix, calculate the average value of the matrix based on the column, and obtain the average abdominal image;
[0014] Step 2.3: Expand the training image to form a matrix and subtract the matrix mean to obtain a new data matrix, and calculate the covariance matrix of the matrix to obtain its eigenvalues and eigenvectors;
[0015] Step 2.4: Sort by eigenvalue to obtain the matrix of eigenvectors. Select the dimension of the eigenvectors as 120 to obtain the corresponding projection matrix. Calculate the distance of the test image in the projection matrix. Discard all turbot images with distance values greater than 35,000. Finally, obtain the test image.
[0016] Step 2.5: The test image uses a logistic regression algorithm to complete category recognition, with a correct recognition rate of 100%, completing the recognition model verification.
[0017] As a more specific implementation, in the third step, for the turbot individuals that do not meet the conditions and are eliminated, fin texture features are extracted for identification, and the specific process is as follows:
[0018] Step 3.1: First, use labelme software to mark the dorsal fin, caudal fin, pelvic fin or anal fin on the fin picture taken;
[0019] Step 3.2: Divide the labeled fin image dataset into a training set and a test set, and divide each image into two parts: background and fin;
[0020] Step 3.3: Select the deep learning network of deeplabv3 for semantic segmentation, which includes the resnet 50 backbone network, ASPP module (Atrous Spatial Pyramid Pooling Module) and FCN head part;
[0021] Step 3.4: Input the image of the training set, adjust the image size to 2048*512, and set the learning rate from 0.0001 to 0.01. After 2000 rounds of training, the network completes the segmentation of the image fins, and the segmentation accuracy is 93.99%;
[0022] As a more specific implementation, in the fourth step, the turbot individual recognition model based on fin (dorsal fin, caudal fin, pelvic fin and anal fin) images has the following specific process:
[0023] Step 4.1: Based on the fin image dataset obtained by the segmentation algorithm, the training set and the test set are divided into a ratio of 4:1;
[0024] Step 4.2: Use a deep learning network, the backbone network uses the resnet18 structure, the neck uses a global pooling average module, the head uses a linear classifier, and the classification function uses softmax;
[0025] Step 4.3: Deep learning network optimizer selection selects stochastic gradient descent algorithm, cross entropy as loss function, and 40 categories;
[0026] Step 4.4: After 200 rounds of training, the network obtains the weights of the deep learning network, and the individual recognition accuracy is 92%.
[0027] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing a method for identifying turbot individuals.
[0028] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes a method for identifying turbot individuals.
[0029] The present invention also provides application of the method for individual identification in turbot breeding. The method can be used to identify parental source information, genetic information, and phenotypic information of the entire growth cycle of turbot individuals; it is beneficial to screen core breeding groups, cultivate parents, formulate reasonable breeding plans, avoid inbreeding, protect the genetic diversity of germplasm, and breed more accurately.
[0030] The beneficial effects of the present invention compared with the prior art are as follows:
[0031] 1. The present invention is based on previous research and found that the pattern of the belly of turbot has individual differences and is immutable during the growth process from juveniles (about 15g) to adult fish (about 500g), and the texture of the fins (including dorsal fin, caudal fin, pelvic fin and anal fin) also has individual differences. Although the color depth will change with growth, the texture remains basically unchanged. Based on this discovery, a turbot individual recognition model based on cascade features is proposed, which has the advantages of: using traditional machine learning algorithms to identify easily distinguishable fish belly images; then using image segmentation models to extract turbot fin images, using the ability of deep learning algorithms to extract features, and identifying fin images with high complexity; thereby improving the overall recognition accuracy of turbot individuals; the recognition of multiple characteristic parts realizes the monitoring of a growth cycle of turbot, and completes the monitoring task from seedling stage to adult fish, which is innovative.
[0032] 2. The present invention is applied in turbot breeding to identify the parental source information, genetic information, and phenotypic information of the entire growth cycle of turbot individuals; it is beneficial to screen the core breeding population, formulate a reasonable breeding plan, avoid inbreeding, and protect the genetic diversity of germplasm; because it is for the full growth cycle monitoring of individuals, breeding is more accurate.
[0033] 3. The present invention can realize non-destructive tracking of fish bodies, that is, there is no need to track individuals through damaging methods such as electronic tags and fluorescent markers, thereby reducing the risk of pathogen infection due to surface damage of fish bodies, saving energy and protecting the environment, and reducing breeding risks.
[0034] 4. It can reduce the cost of tracking individual turbot. The market price of electronic tags is 12-15 yuan / tag. A batch of breeding traits is usually more than 2,000, which greatly reduces the cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is the process of individual identification of turbot fish;
[0036] Figure 2 It is a dataset of individual images of turbot fish at different growth stages;
[0037] Figure 3 This is the average picture of the turbot abdomen;
[0038] Figure 4 Figure 1. Segmentation method for turbot image data.
[0039] Figure 5 It is the deepLabV3 network structure;
[0040] Figure 6 It is the dorsal fin, caudal fin, pelvic fin and anal fin of turbot fish.
[0041] Figure 7 It is a deep learning network structure for individual identification based on the fin features of turbot. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is further explained below by way of embodiments, but the protection scope of the present invention is not limited in any form by the embodiments.
[0043] Example 1
[0044] This embodiment tracked and monitored 40 turbot fish for 2 years. Each individual was equipped with a physical identification mark. Image samples of turbot fish were collected once every three months. Each time, images of the abdomen and back were collected to form the training data set used in the present invention. Through continuous tracking, it was found that the abdominal pattern of turbot fish had obvious individual characteristics, so a turbot individual identification method combining back characteristics and abdominal characteristics was designed. The specific method is as follows:
[0045] A method for identifying turbot individuals, the specific process is as follows Figure 1 As shown, the method steps are as follows:
[0046] The first step is to use a smartphone to collect images of the ventral and dorsal surfaces of turbot, and preprocess the collected turbot images, mainly including mask annotation, image enhancement, etc. ( Figure 2 ).
[0047] In the second step, the principal component analysis (PCA) method was used to reduce the dimension of the abdominal images of turbot samples. By setting the Euclidean distance constraint condition, the turbot abdominal texture images that did not meet the condition were eliminated, and the individual recognition accuracy rate was 100%.
[0048] Step 2.1: For the continuously tracked turbot individuals, since the similarity of the abdominal images taken is relatively high, only 5 valid abdominal sample images are used for the same image of each individual, and a total of 200 images for 40 individuals. During training, the image size is adjusted to 512*512, and the image data set is divided into a training data set and a test data set at a ratio of 4:1, that is, 5 images of each individual, 4 of which are included in the training data set and 1 in the test data set.
[0049] Step 2.2: For the samples in the training set, convert them into 1-dimensional 1-column data, and organize the 160 images in the training set into a 160-column matrix X = [x1 x2…x 160 ], the matrix x i It is a vector of 512*512=262144 dimensions. The average value of the matrix can be calculated based on the following formula: Thus, the average abdominal image of turbot fish was obtained ( Figure 3 ).
[0050]
[0051] Step 2.3: Expand the training images to form the matrix X minus the mean matrix A new 262144*160 data matrix is obtained, and the covariance matrix is calculated, and its eigenvalues and eigenvectors are obtained. The 160 eigenvalues are as follows:
[0052]
[0053] Step 2.4: Sort based on the size of the eigenvalue to obtain the matrix of the eigenvector, select the dimension of the eigenvector as 120, obtain the corresponding projection matrix, calculate the distance of the test image in the projection matrix, discard the test images of the flatfish with a distance value greater than 35,000, and finally obtain 20 test images.
[0054] Step 2.5: The 20 test images obtained were used to complete category recognition using a logistic regression algorithm, with a correct recognition rate of 100%, completing the recognition model verification.
[0055] The third step is to segment the fins of individuals that are not identified using images of the fish abdomen based on the texture of the fins (dorsal fin, caudal fin, pelvic fin and anal fin) using a deep learning model algorithm.
[0056] Step 3.1: First, use the 5,000 pictures you took and label the fins (dorsal fin, caudal fin, pelvic fin and anal fin) using labelme software.
[0057] Step 3.2: Divide the labeled image dataset into a training set and a test set, and divide each image into two parts: background and fin, as shown in Figure 4 The enclosed area drawn with dots is the fin, and the rest is the background.
[0058] Step 3.3: Considering the sample size of the image and the complexity of the data, the deep learning network of deeplabv3 for semantic segmentation is selected ( Figure 5 ), the structure mainly includes resnet 50 backbone network, ASPP module (Atrous SpatialPyramid Pooling Module) and FCN head part.
[0059] Step 3.4: Input the training set image, adjust the image size to 2048*512, and set the learning rate from 0.0001 to 0.01. After 2000 rounds of training, the network completes the segmentation of the image fins ( Figure 6 ), the segmentation accuracy is 93.99%.
[0060] Step 4: Based on the acquired fin (dorsal fin, caudal fin, pelvic fin and anal fin) image dataset, design a deep learning network to complete individual identification.
[0061] Step 4.1: Based on the fin image dataset obtained by the segmentation algorithm, the training set and the test set are divided into a ratio of 4:1 according to the number of images;
[0062] Step 4.2: Since the fish sample image only contains fins and the image complexity is not high, this embodiment designs the following Figure 7 The deep learning network shown in the figure adopts the resnet18 structure as the backbone, the global pooling average module as the neck, the linear classifier as the head, and the softmax as the classification function.
[0063] Step 4.3: Deep Learning Network Optimizer Selection Select the stochastic gradient descent algorithm, cross entropy as the loss function, and 40 categories.
[0064] Step 4.4: After 200 rounds of training, the network obtains the weight of the deep learning network. The weight file size is 520M and the test accuracy is 92%.
[0065] After the above method test, the individual correct recognition rate of 40 test images is (20*100%+20*92%) / 40=96%, which shows that the accuracy of turbot individual recognition combined with the abdomen and tail fin features proposed by the present invention has been improved to a certain extent compared with the use of only a single deep learning algorithm, and the complexity has also been reduced to a certain extent. The present invention does not discuss how to efficiently implement a single method of principal component analysis or deep learning method, because the improvement of specific algorithm performance can be applied to the present invention, thereby improving the overall recognition accuracy.
Claims
1. A method for tracking and identifying turbot individuals, characterized in that: The method is as follows: The first step is to collect pictures of the ventral and dorsal surfaces of turbot, and pre-process the collected pictures of turbot; The second step is to use the PCA algorithm to reduce the dimension of the belly images of turbot fish samples, and to eliminate the turbot belly texture images that do not meet the conditions by setting the Euclidean distance constraint conditions, so as to achieve individual identification; Step 3: For individual images that do not meet the conditions and are eliminated, the fins are segmented on the image using a deep learning model algorithm based on the fin texture; Step 4: Based on the acquired fin image dataset, a deep learning network is designed to complete individual identification.
2. The method for tracking and identifying turbot individuals according to claim 1, characterized in that: In the second step, in the preprocessed turbot data set, for turbot individuals that meet the conditions, dimension reduction is performed based on principal component analysis, and then the individual identification is completed using a logistic regression algorithm. The specific implementation process is as follows: Step 2.1: For the continuously tracked turbot individuals, since the similarity of the abdominal images taken is relatively high, each individual has only 5 valid abdominal sample images at the same time. During training, the image size is adjusted to 512*512, and the image data set is divided into a training data set and a test data set in a ratio of 4:1; Step 2.2: For the samples of the training set, convert them into 1-dimensional 1-column data, and organize the training set images into a matrix, calculate the average value of the matrix based on the column, and obtain the average abdominal image; Step 2.3: Expand the training image to form a matrix and subtract the matrix mean to obtain a new data matrix, and calculate the covariance matrix of the matrix to obtain its eigenvalues and eigenvectors; Step 2.4: Sort by eigenvalue to obtain the matrix of eigenvectors. Select the dimension of the eigenvectors as 120 to obtain the corresponding projection matrix. Calculate the distance of the test image in the projection matrix. Discard all turbot images with distance values greater than 35,000. Finally, obtain the test image. Step 2.5: The test image uses a logistic regression algorithm to complete category recognition, with a correct recognition rate of 100%, completing the recognition model verification.
3. The method for tracking and identifying turbot individuals according to claim 1, characterized in that: In the third step, for the turbot individuals that do not meet the conditions and are eliminated, fin texture features are extracted for identification. The specific process is as follows: Step 3.1: First, use software to mark the dorsal fin, caudal fin, pelvic fin or anal fin on the photographed fins; Step 3.2: Divide the labeled fin image dataset into a training set and a test set, and divide each image into two parts: background and fin; Step 3.3: Select the deep learning network of deeplabv3 for semantic segmentation, which includes the resnet 50 backbone network, ASPP module and FCN head part; Step 3.4: Input the image of the training set, adjust the image size to 2048*512, and set the learning rate from 0.0001 to 0.
01. After 2000 rounds of training, the network completes the segmentation of the image fins.
4. The method for tracking and identifying turbot individuals according to claim 1, characterized in that: In the fourth step, the turbot individual recognition model based on fin images has the following specific process: Step 4.1: Based on the fin image dataset obtained by the segmentation algorithm, the training set and the test set are divided into a ratio of 4:1; Step 4.2: Use a deep learning network, the backbone network uses the resnet18 structure, the neck uses a global pooling average module, the head uses a linear classifier, and the classification function uses softmax; Step 4.3: Deep learning network optimizer selection selects stochastic gradient descent algorithm, cross entropy as loss function, and 40 categories; Step 4.4: After 200 rounds of training, the network obtains the weights of the deep learning network, and the individual recognition accuracy is 92%.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing a method for identifying turbot individuals.
6. A computer device, characterized in that: The device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes a method for identifying turbot individuals.
7. Application of the method of claim 1 in individual identification in turbot breeding, characterized in that: The method described in claim 1 can be used to identify the parental source information, genetic information, and phenotypic information of the entire growth cycle of individual turbot; it is beneficial to screen the core breeding population, cultivate parents, formulate a reasonable breeding plan, avoid inbreeding, protect the genetic diversity of germplasm, and make breeding more accurate.
Citation Information
Patent Citations
Marking method of selective breeding individual of turbot
CN101731167A
Image processing-based target fish recognition method and system
CN103400147A
Chinese white dolphin dorsal fin identification method based on convolutional neural network
CN110837818A
Fish identification method, device and equipment and storage medium
CN117218481A
