Method for identifying sex of embryo in egg through non-contact spectrum identification
Through the non-contact spectral recognition method, combined with the egg surface color depth clustering and hyperspectral prediction model, the problem of too long detection of egg embryos in the existing technology is solved, and early gender identification within 7-14 days of incubation is achieved, which improves detection efficiency.
Patent Information
- Application Number
- CN202510155305.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The existing technology only conducts gender testing after eggs are incubated 7-14 days, making it difficult to sell eggs. How to efficiently and accurately identify the gender of eggs within 7-14 days has become an urgent problem.
The non-contact spectral recognition method is used to dynamically regulate the illumination intensity through color depth clustering on the egg surface, obtain hyperspectral images, extract 280nm and 1700nm peaks, train a hyperspectral prediction model, and realize early recognition of embryo gender.
It realizes early non-contact identification of the gender of intraegg embryos, improves detection efficiency, and has significant technological innovation and practical application value.
Smart Images

Figure CN119605695A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence detection, and more specifically, to a non-contact spectral identification method for identifying the sex of embryos in eggs. Background Art
[0002] Chicken farms usually only need a small number of roosters in production and operation, because roosters do not have the ability to produce eggs continuously. However, chicken farms produce a large number of fertilized eggs every day, which consume a lot of electricity during the incubation process. If a rooster is hatched, its economic benefits are much lower than that of a hen, which makes it difficult to recover the cost of the incubation process. Therefore, in order to ensure the economic benefits of the chicken farm, it is necessary to identify the sex of the embryo as early as possible and sell eggs with male embryos to reduce resource waste.
[0003] From a biological perspective, there are differences in gene expression between eggs with male and female embryos. During the developmental stage of 7 to 14 days after fertilization, the embryo begins gonadal differentiation and synthesizes specific proteins. Specifically, eggs with male embryos synthesize HMG17 protein; eggs with female embryos synthesize FOXL2 protein. Since HMG17 protein and FOXL2 protein have significant differences in spectral absorption peaks, the gender of the embryo can be distinguished based on the spectral information of the egg.
[0004] Wavelength range HMG17 (male protein) FOXL2 (female protein) 200-400nm Testosterone-related hormone (HMG17) has strong absorption (peak at 280nm) Aromatics are weakly absorbed, while protein molecules are more dispersed in absorption 1500-2000nm Less vibration absorption Ovarian-related hormone (FOXL2) strong absorption (1700mm)
[0005] However, existing technologies usually start sex detection only after 14 days of embryonic development. This is because after 14 days, the embryonic development in the egg is almost complete, and more significant sex-related protein characteristics can be detected at this time, such as SOX9 protein and ERP synthetic protein. Although such methods are highly accurate, male eggs are difficult to sell because the chicken embryos are close to maturity at this time. Therefore, how to identify the embryonic sex of eggs early within 7-14 days through efficient and accurate identification methods has become an urgent problem to be solved. Summary of the invention
[0006] The invention provides a non-contact spectral identification method for identifying the sex of an embryo in an egg, which solves the technical problems raised in the background technology.
[0007] The present invention provides a non-contact spectral identification method for identifying the sex of an embryo in an egg, comprising: Step 1, obtaining a number of eggs with a fertilized incubation time of 7 days, and clustering the eggs according to the color depth of the egg surface to obtain several categories of characteristic eggs; Step 2, according to the category of the characteristic eggs, obtaining hyperspectral images of the characteristic eggs with fertilization and incubation time ranging from 7 days to 14 days at fixed time intervals; Step 3, extracting the 280 nm peak and the 1700 nm peak of the hyperspectral image to obtain a first data set and a second data set; Step 4, obtaining the sex detection result of the characteristic egg on the 15th day of fertilization and incubation time, and obtaining the embryo sex of each characteristic egg; Step 5, taking the category of each characteristic egg, the first data set and the second data set as training samples, and taking the corresponding embryo gender as the sample label, so as to train and obtain a hyperspectral prediction model; Step 6: Use the hyperspectral prediction model to dynamically detect the target egg according to preset rules to obtain the embryonic sex of the target egg.
[0008] Furthermore, the eggs are clustered according to the color depth of the egg surface, including: Step 7, placing the egg in the circular hole, fixing a stepless dimming lamp at the bottom of the circular hole, and adjusting the stepless dimming lamp from the minimum output to the maximum output according to a fixed output interval; Step 8, during step 7, between every two adjacent outputs of the stepless dimming lamp, place the eggs in the circular holes in sequence, and obtain a high-definition image of each egg at a fixed position; Step 9, grayscale the high-definition image to obtain the grayscale value of the corresponding egg. If the grayscale value is less than the preset grayscale threshold, repeat step 8; if the grayscale value is greater than the preset grayscale threshold, the egg is used as the characteristic egg corresponding to the output of the stepless dimming lamp.
[0009] Furthermore, according to the category of the characteristic eggs, a hyperspectral image is obtained for the characteristic eggs, including: The stepless dimming lamp is adjusted to the corresponding output of the characteristic egg, and the characteristic egg is placed in the circular hole to obtain the hyperspectral image of the characteristic egg at fixed time intervals.
[0010] Furthermore, the 280nm peak and 1700nm peak of the hyperspectral image are extracted as follows: The band indexes corresponding to 280nm and 1700nm of the hyperspectral image are obtained, and the position coordinates of the pixel points of the corresponding bands are extracted according to the indexes through a hyperspectral data analysis tool to obtain the first data set and the second data set. The first data set includes the number and coordinates of 280nm peak pixels with fertilization and incubation times ranging from 7 days to 14 days, and the second data set includes the number and coordinates of 1700nm peak pixels with fertilization and incubation times ranging from 7 days to 14 days.
[0011] Furthermore, the hyperspectral prediction model is trained, including: Based on the number and coordinates of pixel points with fertilization and hatching times ranging from 7 days to 14 days in the first data set, a first vector and a second vector are constructed respectively; Based on the number and coordinates of pixel points with fertilization and hatching times ranging from 7 days to 14 days in the second data set, a third vector and a fourth vector are constructed respectively; The first vector, the second vector, the third vector and the fourth vector are combined to obtain a feature vector, which is used as a training sample. The category of the egg is encoded by real numbers to obtain an adjustment vector of the hidden layer of the hyperspectral prediction model, and the corresponding embryo gender is used as a sample label.
[0012] Furthermore, the hyperspectral prediction model includes an adjustment layer, a hidden layer, and a classifier: An adjustment layer, used for adjusting the feature vector based on the adjustment vector to obtain a standard vector of the feature vector; The hidden layer includes several hidden units, which are used to map the standard vector of the feature vector and output the hidden state; A classifier, which is used to input a hidden state, and the classification space of the classifier represents the maximum probability of embryo sex of the characteristic egg; The hyperspectral prediction model reversely updates the custom parameters of the hidden layer by calculating the mean error variance of the maximum embryo gender probability and the corresponding sample label.
[0013] Furthermore, the calculation formula of the adjustment layer is as follows: ; in, represents the standard vector, represents the feature vector, represents the dimension of the feature vector, represents the index of the dimension of the feature vector, represents the jth element in the feature vector, represents the i-th element in the feature vector, represents the weight matrix, represents the number of categories of characteristic eggs, The index representing the number of categories of the feature eggs, represents the adjustment vector corresponding to the characteristic eggs of the i-th category, represents the adjustment vector corresponding to the characteristic egg of the jth category, Indicates that the size is an orthogonal matrix, represents the smoothing coefficient, represents the operation of obtaining the Euclidean norm, represents the arccosine function, represents the symbolic function, represents element-wise multiplication, represents the weight parameter, Represents the operation of finding the square of the vector modulus.
[0014] Furthermore, the calculation formula of the hidden layer is as follows: ; in, Indicates the hidden state, express Activation function, express The transposed vector of Indicates based on The left diagonal matrix constructed is, Represents the bias parameter of the hidden layer.
[0015] Furthermore, the target eggs are dynamically detected according to preset rules through the hyperspectral prediction model, including: Obtain images of non-stepless dimming lights of characteristic eggs of each category, and calculate the average grayscale value of the images of each category; Obtain an image of the target egg under the non-stepless dimming light, and calculate the average gray value of the image; Calculate the difference between the average gray value of the target egg and the average gray value of the characteristic egg of each category, and determine the characteristic egg of the category corresponding to the minimum difference, assign the target egg to the output of the stepless dimming lamp of the corresponding category, so as to obtain the hyperspectral image of the fertilized incubation time of the target egg from 7 days to 14 days, and extract the 280nm peak and the 1700nm peak to obtain the first data set and the second data set of the target egg; The parameters corresponding to the 14th day in the first and second data sets of the target eggs are added with the Relu activation function, and input into the hyperspectral prediction model to obtain the maximum sex probability of the embryo. If the prediction is accurate, the Relu activation function is added to the parameters in the first and second data sets of the target eggs day by day, and the maximum sex probability of the embryo is obtained in a cycle until the prediction is wrong, and the minimum required parameters of the hyperspectral prediction model are obtained; The first data set and the second data set of the subsequent target eggs are obtained according to the minimum required parameters, and the embryo gender of the subsequent target eggs is obtained.
[0016] The beneficial effect of the present invention is that through the combination of eggshell color preprocessing and hyperspectral prediction model, early non-contact identification of embryo sex in eggs is achieved. First, eggshell color clustering is used to dynamically adjust the light intensity to avoid insufficient light penetration or interference with the extraction of key spectral peaks (280nm and 1700nm). Then, feature vectors are extracted through the hyperspectral prediction model, the maximum embryo sex probability is dynamically calculated, and the data requirements are gradually minimized to achieve the shortest time verification within 7 to 14 days of incubation. The efficiency of detection is improved, and it has significant technical innovation and practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1The present invention is a flow chart of a non-contact spectral identification method for identifying the sex of embryos in eggs. DETAILED DESCRIPTION
[0018] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the contents of this specification. Each example may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.
[0019] like Figure 1 As shown, a non-contact spectral identification method for identifying the sex of embryos in eggs comprises: Step 1, obtaining a number of eggs with a fertilized incubation time of 7 days, and clustering the eggs according to the color depth of the egg surface to obtain several categories of characteristic eggs; Step 2, according to the category of the characteristic eggs, obtaining hyperspectral images of the characteristic eggs with fertilization and incubation time ranging from 7 days to 14 days at fixed time intervals; Step 3, extracting the 280 nm peak and the 1700 nm peak of the hyperspectral image to obtain a first data set and a second data set; Step 4, obtaining the sex detection result of the characteristic egg on the 15th day of fertilization and incubation time, and obtaining the embryo sex of each characteristic egg; Step 5, taking the category of each characteristic egg, the first data set and the second data set as training samples, and taking the corresponding embryo gender as the sample label, so as to train and obtain a hyperspectral prediction model; Step 6: Use the hyperspectral prediction model to dynamically detect the target egg according to preset rules to obtain the embryonic sex of the target egg.
[0020] It should be noted that on the 15th day, the sex of the embryo can be obtained by dissecting characteristic eggs and directly observing the development of the gonads inside the eggs.
[0021] In one embodiment of the present invention, clustering eggs according to the color depth of the egg surface includes: Step 7, placing the egg in the circular hole, fixing a stepless dimming lamp at the bottom of the circular hole, and adjusting the stepless dimming lamp from the minimum output to the maximum output according to a fixed output interval; Step 8, during step 7, between every two adjacent outputs of the stepless dimming lamp, place the eggs in the circular holes in sequence, and obtain a high-definition image of each egg at a fixed position; Step 9, grayscale the high-definition image to obtain the grayscale value of the corresponding egg. If the grayscale value is less than the preset grayscale threshold, repeat step 8; if the grayscale value is greater than the preset grayscale threshold, the egg is used as the characteristic egg corresponding to the output of the stepless dimming lamp.
[0022] Specifically, the light intensity is dynamically adjusted by the stepless dimming lamp to achieve effective clustering of the color depth of eggs. Since the color depth of the eggshell directly affects the penetrability of light, dark eggshells may make it difficult for light to penetrate, and too strong light will introduce interference, affecting the accurate extraction of hyperspectral data. Therefore, by gradually increasing the light output, high-definition images of eggs are obtained under different light intensities, and the images are grayed to obtain the grayscale value of the eggshell. In order to distinguish eggs with different characteristics, a preset grayscale threshold is set. When the grayscale value of the egg exceeds the threshold, it is considered that the light intensity can effectively penetrate the eggshell, and the light intensity at this time is considered to be suitable for further hyperspectral analysis of the corresponding eggs. In this way, by gradually dimming, acquiring images and analyzing grayscale values, effective clustering of eggs of different color depths can be achieved, providing accurate prerequisites for the subsequent extraction and analysis of hyperspectral data. This method can minimize the impact of light intensity on the 280nm and 1700nm peaks, and improve the detection accuracy and stability of the hyperspectral model.
[0023] For example, there are three eggs a, b and c, and a stepless dimming lamp. When the output of the stepless dimming lamp is 1, the grayscale values of the three eggs (the grayscale value is the average grayscale of the egg image) are all less than the preset threshold of 100, then the output of the stepless dimming lamp is adjusted to 3. At this time, the grayscale value of egg a is greater than 100, so egg a is taken as a feature egg and assigned a category. Adjust the output of the stepless dimming lamp to 5, and then continue to detect the subsequent eggs b and c. The grayscale values of eggs b and c are both greater than 100, so eggs b and c are feature eggs and are assigned a category. In this way, the three eggs a, b and c are divided into two feature categories.
[0024] In one embodiment of the present invention, obtaining a hyperspectral image of a characteristic egg according to the category of the characteristic egg includes: The stepless dimming lamp is adjusted to the corresponding output of the characteristic egg, and the characteristic egg is placed in the circular hole to obtain the hyperspectral image of the characteristic egg at fixed time intervals.
[0025] Specifically, egg a is irradiated with a stepless dimming lamp with an output of 3, and egg a is irradiated with a stepless dimming lamp with an output of 5, and corresponding hyperspectral images are obtained respectively.
[0026] In one embodiment of the present invention, the 280 nm peak and the 1700 nm peak of the hyperspectral image are extracted as follows: The band indexes corresponding to 280nm and 1700nm of the hyperspectral image are obtained, and the position coordinates of the pixel points of the corresponding bands are extracted according to the indexes through a hyperspectral data analysis tool to obtain the first data set and the second data set. The first data set includes the number and coordinates of 280nm peak pixels with fertilization and incubation times ranging from 7 days to 14 days, and the second data set includes the number and coordinates of 1700nm peak pixels with fertilization and incubation times ranging from 7 days to 14 days.
[0027] Specifically, the process of extracting the 280nm peak and 1700nm peak of the hyperspectral image is mainly based on the analysis of the specific spectral characteristics of the embryo inside the egg based on the hyperspectral imaging technology. These two spectral peaks are closely related to the characteristic absorption bands of male protein (HMG17) and female protein (FOXL2), respectively. The hyperspectral image covers multiple continuous spectral bands, each of which corresponds to different light reflection or absorption characteristics. In this embodiment, 280nm and 1700nm correspond to the spectral absorption peaks of embryonic sex-related proteins, respectively. Therefore, through the hyperspectral data analysis tool, these two specific bands can be indexed from the hyperspectral data to ensure the pertinence of data extraction. Under the two specific bands of 280nm and 1700nm, the system will identify the pixel position coordinates associated with these two peaks. These pixel points represent the spectral intensity information of specific areas in the hyperspectral image, which helps to quantify the distribution of embryonic sex-related proteins in the egg. The first data set includes the number and coordinates of pixels detected under the 280nm peak within 7 to 14 days of fertilization and incubation. These data mainly reflect the absorption characteristics associated with male protein (HMG17). The second data set includes the number and coordinates of pixels detected under the 1700nm peak within 7 to 14 days of fertilization and incubation. These data mainly reflect the absorption characteristics associated with female protein (FOXL2). Through quantitative analysis of the two characteristic spectral peaks, the present invention can extract key spectral information related to embryonic sex, and use these data to train a hyperspectral prediction model. Since there are significant differences between the 280nm and 1700nm peaks in male and female proteins, by comparing these two data sets, the sex of the embryo in the egg can be accurately predicted. In addition, as the incubation time advances (7 to 14 days), the changing trend of the number and coordinates of pixels can also provide the model with more stable and reliable input data, thereby improving the accuracy of prediction and the efficiency of early identification.
[0028] In one embodiment of the present invention, the hyperspectral prediction model is trained, including: Based on the number and coordinates of pixel points with fertilization and hatching times ranging from 7 days to 14 days in the first data set, a first vector and a second vector are constructed respectively; Based on the number and coordinates of pixel points with fertilization and hatching times ranging from 7 days to 14 days in the second data set, a third vector and a fourth vector are constructed respectively; The first vector, the second vector, the third vector and the fourth vector are combined to obtain a feature vector, which is used as a training sample. The category of the egg is encoded by real numbers to obtain an adjustment vector of the hidden layer of the hyperspectral prediction model, and the corresponding embryo gender is used as a sample label.
[0029] In one embodiment of the present invention, the hyperspectral prediction model includes an adjustment layer, a hidden layer and a classifier: An adjustment layer, used for adjusting the feature vector based on the adjustment vector to obtain a standard vector of the feature vector; The hidden layer includes several hidden units, which are used to map the standard vector of the feature vector and output the hidden state; A classifier, which is used to input a hidden state, and the classification space of the classifier represents the maximum probability of embryo sex of the characteristic egg; The hyperspectral prediction model reversely updates the custom parameters of the hidden layer by calculating the mean error variance of the maximum embryo gender probability and the corresponding sample label.
[0030] Specifically, the process of training the hyperspectral prediction model mainly combines spectral data with machine learning to convert spectral information into feature vectors that can be learned by the model, so as to achieve accurate prediction of embryo gender. The first data set contains the number and coordinates of pixels corresponding to the 280nm peak within 7 to 14 days of fertilization and incubation. The second data set contains the number and coordinates of pixels corresponding to the 1700nm peak within 7 to 14 days of fertilization and incubation. These two data sets reflect the spectral characteristics of male protein (HMG17) and female protein (FOXL2), respectively. According to the first data set, the first vector and the second vector are constructed, which represent the spectral characteristics of the 280nm peak at different time points, respectively. According to the second data set, the third vector and the fourth vector are constructed, which represent the spectral characteristics of the 1700nm peak at different time points, respectively. These vectors quantify the spectral characteristics of different time points and different peaks in the hyperspectral image to form structured data, which is convenient for the subsequent model learning. The first vector, the second vector, the third vector and the fourth vector are merged to form a comprehensive feature vector. This feature vector not only contains the spectral information of the 280nm and 1700nm peaks, but also reflects the changing trend of spectral data at different time points. The feature vector serves as a training sample for the model and represents the overall characteristics of eggs under hyperspectral data. The category of eggs is encoded by real numbers to generate an adjustment vector for the hidden layer of the model, which dynamically adjusts the input features to adapt to the spectral characteristics of eggs of different categories. The sample label is the sex of the embryo, which serves as a supervisory signal for the model to guide the learning direction of the model. The model is trained by inputting feature vectors and sample labels using a neural network structure (including an adjustment layer, a hidden layer, and a classifier): Adjustment layer: adjust the input feature vector according to the category and perform standardization. Hidden layer: extract high-order spectral features by mapping feature vectors. Classifier: map the output of the hidden layer to the classification space and calculate the maximum sex probability of the embryo. The model continuously optimizes parameters through back propagation, ultimately improving the accuracy of the prediction. By constructing feature vectors and training a hyperspectral prediction model, the present invention effectively associates spectral features in hyperspectral images with embryonic sex. The model can utilize the characteristic changes of the 280nm and 1700nm peaks in the spectral data to achieve early identification and efficient prediction of embryo gender, providing precise technical support for subsequent automated testing.
[0031] In one embodiment of the present invention, the calculation formula of the adjustment layer is as follows: ; in, represents the standard vector, represents the feature vector, represents the dimension of the feature vector, represents the index of the dimension of the feature vector, represents the jth element in the feature vector, represents the i-th element in the feature vector, represents the weight matrix, represents the number of categories of characteristic eggs, The index representing the number of categories of the feature eggs, represents the adjustment vector corresponding to the characteristic eggs of the i-th category, represents the adjustment vector corresponding to the characteristic egg of the jth category, Indicates that the size is an orthogonal matrix, represents the smoothing coefficient, represents the operation of obtaining the Euclidean norm, represents the arccosine function, represents the symbolic function, represents element-wise multiplication, represents the weight parameter, Represents the operation of finding the square of the vector modulus.
[0032] In one embodiment of the present invention, the calculation formula of the hidden layer is as follows: ; in, Indicates the hidden state, express Activation function, express The transposed vector of Indicates based on The left diagonal matrix constructed is, Represents the bias parameter of the hidden layer.
[0033] In one embodiment of the present invention, a target egg is dynamically detected according to preset rules using a hyperspectral prediction model, including: Obtain images of non-stepless dimming lights of characteristic eggs of each category, and calculate the average grayscale value of the images of each category; Obtain an image of the target egg under the non-stepless dimming light, and calculate the average gray value of the image; Calculate the difference between the average gray value of the target egg and the average gray value of the characteristic egg of each category, and determine the characteristic egg of the category corresponding to the minimum difference, assign the target egg to the output of the stepless dimming lamp of the corresponding category, so as to obtain the hyperspectral image of the fertilized incubation time of the target egg from 7 days to 14 days, and extract the 280nm peak and the 1700nm peak to obtain the first data set and the second data set of the target egg; The parameters corresponding to the 14th day in the first and second data sets of the target eggs are added with the Relu activation function, and input into the hyperspectral prediction model to obtain the maximum sex probability of the embryo. If the prediction is accurate, the Relu activation function is added to the parameters in the first and second data sets of the target eggs day by day, and the maximum sex probability of the embryo is obtained in a cycle until the prediction is wrong, and the minimum required parameters of the hyperspectral prediction model are obtained; The first data set and the second data set of the subsequent target eggs are obtained according to the minimum required parameters, and the embryo gender of the subsequent target eggs is obtained.
[0034] Specifically, first, obtain images of characteristic eggs of each category under non-stepless dimming light conditions, and calculate their average grayscale values. The average grayscale value represents the color depth of the eggshell or the degree of light penetration. At the same time, obtain images of the target eggs under the same conditions and calculate their average grayscale values. Calculate the difference between the average grayscale value of the target egg and the average grayscale value of the characteristic eggs of each category. By comparing these differences, determine the category corresponding to the minimum difference, and assign the target egg to the lighting condition of that category (stepless dimming light output setting). This process ensures that the lighting conditions can adapt to eggshells of different color depths and improves the accuracy of subsequent hyperspectral image data acquisition. According to the assigned light output, hyperspectral images of the target eggs are collected from 7 to 14 days to obtain the first and second data sets of the target eggs. The parameters of the first and second data sets of the target eggs on the 14th day are processed by the ReLU activation function (used to introduce nonlinear features) and input into the hyperspectral prediction model. The model predicts the gender of the target egg by calculating the maximum gender probability of the embryo. If the prediction result on the 14th day is accurate, the model will verify the data of the target eggs (days 7 to 14) day by day, and continuously calculate the maximum gender probability until the prediction result on a certain day is wrong. At this time, the model will record the minimum data parameters required. When a prediction error occurs, it means that the current data is no longer sufficient to continue accurate prediction, and the model will save the minimum required parameters used in the iteration. These minimum required parameters will be used in the subsequent detection process of target eggs, thereby achieving efficient detection and early gender identification of subsequent target eggs.
[0035] For example, the system assigns the target egg to a lighting category by matching the average grayscale value. Assuming that the average grayscale value of the target egg is closest to category B, the lighting output is set to the corresponding category B lighting condition. Obtain the hyperspectral image data of the target egg from day 7 to day 14, and extract the features of the 280nm peak and the 1700nm peak. Spectral feature data on day 14: First data set (280nm peak): number of pixels = 150, coordinate data. Second data set (1700nm peak): number of pixels = 120, coordinate data. ReLU activation: The parameters of these two data sets on day 14 are processed nonlinearly through the ReLU activation function and input into the hyperspectral prediction model. Model prediction: The hyperspectral prediction model calculates the maximum sex probability of the embryo: Prediction result: The target egg is female (probability 90%, correct). Model verification day by day: If the prediction on day 14 is accurate, the system will trace back the spectral data of the target egg day by day, from day 13, day 12... to day 7, and perform prediction verification respectively: Day 13: Prediction: Female (88% probability).
[0036] Day 12: Prediction: Female (85% probability).
[0037] Day 11: Prediction: Female (82% probability).
[0038] Day 10: Prediction: Female (80% probability).
[0039] Day 9: Prediction result: Wrong (probability 65%, less than the preset probability threshold).
[0040] There was an error in the data forecast for the 9th day, which means that the data at this time is not sufficient to support accuracy.
[0041] The system records the data parameters on the 10th day as the minimum required parameters (i.e., the lowest available data threshold).
[0042] The system uses the data parameters on day 10 as input requirements for subsequent target egg testing.
[0043] When testing new eggs, the system only needs to extract the hyperspectral data on the 10th day (280nm and 1700nm peaks) to quickly predict the gender of the embryo, significantly reducing the amount of data collection and testing time.
[0044] The above describes an embodiment of the present embodiment, but the present embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present embodiment, ordinary technicians in this field can also make many forms, all of which are within the protection of the present embodiment.
Claims
1. A non-contact spectral identification method for identifying the sex of embryos in eggs, characterized in that: include: Step 1, obtaining a number of eggs with a fertilized incubation time of 7 days, and clustering the eggs according to the color depth of the egg surface to obtain several categories of characteristic eggs; Step 2, according to the category of the characteristic eggs, obtaining hyperspectral images of the characteristic eggs with fertilization and incubation time ranging from 7 days to 14 days at fixed time intervals; Step 3, extracting the 280 nm peak and the 1700 nm peak of the hyperspectral image to obtain a first data set and a second data set; Step 4, obtaining the sex detection result of the characteristic egg on the 15th day of fertilization and incubation time, and obtaining the embryo sex of each characteristic egg; Step 5, taking the category of each characteristic egg, the first data set and the second data set as training samples, and taking the corresponding embryo gender as the sample label, so as to train and obtain a hyperspectral prediction model; Step 6: Use the hyperspectral prediction model to dynamically detect the target egg according to preset rules to obtain the embryonic sex of the target egg.
2. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 1, characterized in that: The eggs were clustered based on the color depth of the egg surface, including: Step 7, placing the egg in the circular hole, fixing a stepless dimming lamp at the bottom of the circular hole, and adjusting the stepless dimming lamp from the minimum output to the maximum output according to a fixed output interval; Step 8, during step 7, between every two adjacent outputs of the stepless dimming lamp, place the eggs in the circular holes in sequence, and obtain a high-definition image of each egg at a fixed position; Step 9, grayscale the high-definition image to obtain the grayscale value of the corresponding egg. If the grayscale value is less than the preset grayscale threshold, repeat step 8; if the grayscale value is greater than the preset grayscale threshold, the egg is used as the characteristic egg corresponding to the output of the stepless dimming lamp.
3. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 2, characterized in that: According to the category of characteristic eggs, a hyperspectral image is obtained for the characteristic eggs, including: The stepless dimming lamp is adjusted to the corresponding output of the characteristic egg, and the characteristic egg is placed in the circular hole to obtain the hyperspectral image of the characteristic egg at fixed time intervals.
4. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 3, characterized in that: Extract the 280nm peak and 1700nm peak of the hyperspectral image as follows: The band indexes corresponding to 280nm and 1700nm of the hyperspectral image are obtained, and the position coordinates of the pixel points of the corresponding bands are extracted according to the indexes through a hyperspectral data analysis tool to obtain the first data set and the second data set. The first data set includes the number and coordinates of 280nm peak pixels with fertilization and incubation times ranging from 7 days to 14 days, and the second data set includes the number and coordinates of 1700nm peak pixels with fertilization and incubation times ranging from 7 days to 14 days.
5. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 4, characterized in that: The hyperspectral prediction model obtained by training includes: Based on the number and coordinates of pixel points with fertilization and hatching times ranging from 7 days to 14 days in the first data set, a first vector and a second vector are constructed respectively; Based on the number and coordinates of pixel points with fertilization and hatching times ranging from 7 days to 14 days in the second data set, a third vector and a fourth vector are constructed respectively; The first vector, the second vector, the third vector and the fourth vector are combined to obtain a feature vector, which is used as a training sample. The category of the egg is encoded by real numbers to obtain an adjustment vector of the hidden layer of the hyperspectral prediction model, and the corresponding embryo gender is used as a sample label.
6. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 5, characterized in that: Hyperspectral prediction model, including adjustment layer, hidden layer and classifier: An adjustment layer, used for adjusting the feature vector based on the adjustment vector to obtain a standard vector of the feature vector; The hidden layer includes several hidden units, which are used to map the standard vector of the feature vector and output the hidden state; A classifier, which is used to input a hidden state, and the classification space of the classifier represents the maximum probability of embryo sex of the characteristic egg; The hyperspectral prediction model reversely updates the custom parameters of the hidden layer by calculating the mean error variance of the maximum embryo gender probability and the corresponding sample label.
7. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 6, characterized in that: The calculation formula of the adjustment layer is as follows: ; in, represents the standard vector, represents the feature vector, represents the dimension of the feature vector, represents the index of the dimension of the feature vector, represents the jth element in the feature vector, represents the i-th element in the feature vector, represents the weight matrix, represents the number of categories of characteristic eggs, The index representing the number of categories of the feature eggs, represents the adjustment vector corresponding to the characteristic eggs of the i-th category, represents the adjustment vector corresponding to the characteristic egg of the jth category, Indicates that the size is an orthogonal matrix, represents the smoothing coefficient, represents the operation of obtaining the Euclidean norm, represents the arccosine function, represents the symbolic function, represents element-wise multiplication, represents the weight parameter, Represents the operation of finding the square of the vector modulus.
8. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 7, characterized in that: The calculation formula of the hidden layer is as follows: ; in, Indicates the hidden state, express Activation function, express The transposed vector of Indicates based on The left diagonal matrix constructed is, Represents the bias parameter of the hidden layer.
9. The method for identifying the sex of embryos in eggs by non-contact spectral recognition according to claim 6, characterized in that: The target eggs are dynamically detected according to preset rules through the hyperspectral prediction model, including: Obtain images of non-stepless dimming lights of characteristic eggs of each category, and calculate the average grayscale value of the images of each category; Obtain an image of the target egg under the non-stepless dimming light, and calculate the average gray value of the image; Calculate the difference between the average gray value of the target egg and the average gray value of the characteristic egg of each category, and determine the characteristic egg of the category corresponding to the minimum difference, assign the target egg to the output of the stepless dimming lamp of the corresponding category, so as to obtain the hyperspectral image of the fertilized incubation time of the target egg from 7 days to 14 days, and extract the 280nm peak and the 1700nm peak to obtain the first data set and the second data set of the target egg; The parameters corresponding to the 14th day in the first and second data sets of the target eggs are added with the Relu activation function, and input into the hyperspectral prediction model to obtain the maximum sex probability of the embryo. If the prediction is accurate, the Relu activation function is added to the parameters in the first and second data sets of the target eggs day by day, and the maximum sex probability of the embryo is obtained in a cycle until the prediction is wrong, and the minimum required parameters of the hyperspectral prediction model are obtained; The first data set and the second data set of the subsequent target eggs are obtained according to the minimum required parameters, and the embryo gender of the subsequent target eggs is obtained.
Citation Information
Patent Citations
Gender determination method for chicken hatching egg incubation early embryo based on hyperspectral image
CN104316473A
Method and system for detecting sex of early embryo of chicken hatching egg based on hyperspectral technology
CN116930176A
Method for the viability of embryo in white fertilized egg using hyperspectral imaging
KR1020180055970A
Non-invasive method of determining properties of a chicken egg and / or properties of a chicken embryo inside the egg using near IR spectroscopy, respective system and uses thereof
US20240069000A1