A Non-destructive Method for Sex Detection of Chicken Embryo Eggs in Early Incubation Based on RF-DS Atlas Information Fusion
By combining visible-near-infrared transmission spectroscopy and machine vision image information fusion modeling, the accuracy and efficiency issues of non-destructive detection of chicken embryo sex in the early stage of incubation were solved, achieving high-precision identification of male and female embryos, reducing resource waste and ethical issues.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG AGRI UNIV
- Filing Date
- 2022-06-14
- Publication Date
- 2026-06-30
AI Technical Summary
Existing methods for sex detection in chicken embryos are difficult to achieve non-destructive and high-precision detection in the early stages of incubation, leading to the slaughter of roosters, resulting in resource waste and ethical issues. Existing single detection technologies also have limitations in model prediction accuracy.
A method based on RF-DS spectral information fusion is adopted, which combines visible-near infrared transmission spectra and machine vision images. Through data preprocessing, feature extraction and model building, the fusion model of spectral and image information is realized. DS evidence theory is used for decision-level fusion to improve detection accuracy.
High-precision non-destructive detection of male and female embryos was achieved in the early stage of incubation, with a recognition rate of 88.00%, a male and female recognition rate of 90.00% and 86.25% respectively, and a detection time of 2.843s, which is an improvement compared with the single information source model.
Smart Images

Figure CN115187514B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-destructive testing of chicken embryo eggs, specifically relating to a non-destructive testing method for the sex of chicken embryo eggs in the early incubation stage based on RF-DS map information fusion. Background Technology
[0002] In the egg-laying hen industry, roosters are not worth as much as hens because they cannot lay eggs and have less meat and lower quality. As a result, they are often picked out and slaughtered as soon as they are hatched. Nearly 7 billion one-day-old roosters are slaughtered worldwide every year [1]. This not only leads to the underutilization of high-quality eggs and huge waste of resources, but also goes against animal welfare and ethics [2]. Since embryos can feel pain after day 7 of incubation, it is in line with animal welfare to detect and remove male eggs before day 7 [3][4]. Therefore, it is urgent to find a method for detecting the sex of embryos in the early incubation period that takes into account both production and social ethics.
[0003] Currently, many scholars have used methods such as spectroscopy, image processing, and photoelectric detection to identify the sex of embryos. Steiner et al. [5][6] and Galli et al. [3][4][7] used spectral technology to detect male and female embryos, achieving a recognition rate of over 90%. However, these methods all require shell breaking detection, which is currently difficult to apply on a large scale in hatcheries. In terms of non-destructive testing, Pan Leiqing et al. [8] used hyperspectral imaging in the 600-900nm band to establish a neural network model, achieving a recognition rate of 82.86% on day 10. Alin et al. [9] used photoelectric detection to study the translucency of embryos, and the model they established achieved a recognition rate of 84% on days 16-18. Zhu Zhihui et al.
[10]
[11]
[12] used machine vision technology to extract the vascular texture features of embryo images and model them, achieving a recognition rate of 83.33% on day 4. They also used transmission spectroscopy to achieve a sex recognition rate of 87.14% on day 7 embryos.
[0004] The above studies all build models based on single information such as spectra or images. However, the hatching of fertilized eggs involves changes in many aspects, such as internal chemical composition and embryonic vascular texture. Single detection technology has certain limitations in terms of model prediction accuracy. Summary of the Invention
[0005] This invention proposes a non-destructive method for detecting the sex of chicken embryos in the early stages of incubation based on RF-DS map information fusion.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A non-destructive method for sex detection of chicken embryo eggs in the early incubation stage based on RF-DS map information fusion, the method comprising the following steps:
[0008] S1: Select sample eggs, clean, disinfect, dry, number them, and put them into incubator;
[0009] S2: Acquiring spectral and image data of chicken embryos using an embryo incubation information mapping system:
[0010] S3: Data Processing and Model Building: Preprocessing, feature extraction, and model building of spectral and image data of chicken embryo eggs;
[0011] S4: Spectral-image information fusion modeling for non-destructive detection of sex of chicken embryos in the early stages of incubation.
[0012] Preferably, in step S1: the sample eggs are wiped and disinfected with a 4-5.5% benzalkonium bromide solution, and after air drying, they are numbered on the surface and placed in incubator.
[0013] Preferably, in step S1: the egg weight is 49.82-69.72g, the major axis is 53.13-61.81mm, the minor axis is 40.03-51.87mm, and the egg shape index (major axis / minor axis) is 1.10-1.45.
[0014] Preferably, in step S2, the embryo hatching information map acquisition system consists of two parts: a visible-near-infrared transmission spectroscopy detection system and an image detection system.
[0015] Preferably, in step S2:
[0016] Through light source experiments, the egg-canning effects of LEDs with different color temperatures were compared, and it was determined that the light source for the image detection system was a 20W-40W pure white LED with a color temperature of 6000-7000K. During the acquisition process, the spectrometer integration time was set to 450-550ms, the averaging frequency and smoothness were set to 2-4 and 4-6 respectively, and the effective wavelength range of the final acquired spectrum was 400-900nm. The camera focal length, aperture, and object distance were adjusted, and the exposure parameters of the industrial camera software were set to 70-90ms.
[0017] Preferably, in step S3: during the incubation period of 4 days, the eggs are laid horizontally to collect spectral and image data of the chicken embryos as subsequent processing data.
[0018] Preferably, in step S3:
[0019] S3.1.1 The spectral preprocessing method for chicken embryo eggs adopts normalization processing;
[0020] S3.1.2 Spectral Feature Extraction: The CARS algorithm was used to screen features from the normalized spectrum. This screening was repeated 10 times, selecting the four most frequently occurring feature wavelengths: 587.14nm, 588.04nm, 588.49nm, and 589.39nm. The SPA algorithm was used to screen the normalized embryo-egg spectrum, identifying 12 selectable feature wavelengths: 521.79nm, 526.76nm, 566.02nm, 593.87nm, 607.76nm, and 620.73nm. m, 631.45nm, 688.79nm, 784.2nm, 802.95nm, 830.32nm, 835.08nm; spectral blood value features containing significant differences between males and females were extracted from the original spectrum using the blood value method, namely T575.02 / T596.12, T575.02 / T598.36, and T575.02 / T610.00, where T575.02 / T596.12 represents the ratio of transmittance at 575.02nm to transmittance at 596.12nm;
[0021] S3.1.3 RF models are established using the selected feature variables, and the parameters are optimized.
[0022] Preferably, in step S3,
[0023] Image data preprocessing specifically includes the following steps:
[0024] S3.2.1 First, the region of interest (ROI) is extracted using the minimum bounding rectangle or other methods, and the G component is separated;
[0025] S3.2.2 Remove bright spots and scratches on the embryo image by using a capping algorithm; enhance texture features using the contrast-limited adaptive grayscale histogram equalization (CLAHE) algorithm; extract the central part of the embryo using Otsu's threshold segmentation method; further highlight the blood vessel texture by using capping and black capping, repair the blood vessel pixels by closing and erosion operations, and then extract the blood vessel part of the embryo using Otsu's method.
[0026] S3.2.3 The center and blood vessel parts of the embryo are stitched together using the image "OR" operation, and the noise-reduced image is mapped to the extracted embryo region using the image "AND" operation, resulting in a complete and well-defined embryonic blood vessel morphology map.
[0027] Preferably, in step S3,
[0028] Texture feature extraction and model building specifically include:
[0029] S3.3.1 Extract image texture feature variables from the embryonic blood vessel morphology map obtained in step S3.2.3;
[0030] S3.3.2 After normalizing the image texture feature variables, the sample set is divided, and an image RF model is established;
[0031] S3.3.3 Perform parameter optimization on the RF model.
[0032] Preferably, in step S4, the specific operation of spectral-image information fusion modeling is as follows:
[0033] S4.1 Establish RF models for single spectral and image features respectively, and obtain the recognition rates of the two models for male and female embryos. Assume that the recognition rate of model i for category j is represented by P. ij ;
[0034] S4.2 Spectrum and Image BPA Function Construction: Using R ij R represents the recognition result of spectral or image model i for sample of category j (j takes the value 0 or 1, corresponding to female or male). Assuming the model prediction result is correct, then R... ij =1, otherwise R ij =0; The support of each model for the predicted class j is expressed using the law of total probability: m ij =P ij ×R ij +(1-P ij )×(1-R ij ), m is also called the BPA function; the sum of the support of the BPA function for possible events for each model is 1, that is: m i0 +m i1 =1. Therefore, the BPA function can be normalized: Among them, P ij R represents the recognition rate of model i for category j. ij The recognition result of model i for sample of category j;
[0035] S4.3 DS Decision-Level Fusion and Decision Rules: The support of the fusion model for the predicted outcome of class j is also called joint reliability, denoted by M. j The formula for calculating M is: j =m ij ·m lj / K, where m ij and m lj , represent the support of the spectral and image models for the predicted class j, respectively, and K represents the sum of probabilities of conflicting predictions from different models.
[0036] The decision-making rule is as follows: Let event A be... i and A j The fusion model predicts embryos as categories i and j, where i and j take values of 0 or 1, and i ≠ j. If event A... i Satisfy: m(A)i )>m(A j ),and Make m(A) i )>ε1 and m(A i )-m(A j If ε₁ and ε₂ are manually set thresholds, then the final decision result of the fusion model is A > ε₂. i If the above conditions are not met, the decision result is determined to be female, in order to avoid losses caused by misclassifying female eggs as male eggs.
[0037] The beneficial effects of this invention are:
[0038] To address the resource waste and animal welfare issues caused by the slaughter of one-day-old roosters in the egg-laying hen industry, this invention proposes a method for detecting the sex of embryonic eggs based on the fusion of visible-near-infrared transmission spectroscopy and machine vision images. Experiments determined that the optimal incubation days and egg placement for spectral and image detection were horizontal placement on the fourth day of incubation. The optimal RF model was determined to be established using normalized processing and CARS-screened 4-dimensional feature variables. The optimal RF model was also determined to be established using two texture features extracted from the images after preprocessing: fractal dimension and gray-level co-occurrence matrix correlation. Decision-level fusion modeling of the optimal spectral and image models for embryonic eggs was performed using DS evidence theory. The fusion model achieved an accuracy of 88.00% on the test set, with sex identification rates of 90.00% and 86.25%, respectively, and a discrimination time of 2.843 seconds for a single egg. The results indicate that this method has a certain ability to identify both male and female embryonic eggs on day 4 of incubation. Further sampling and testing on brown-shelled and pink-shelled eggs can be conducted to further improve the universality of the method. Attached Figure Description
[0039] Figure 1 Schematic diagram of the light source test.
[0040] Figure 2 Schematic diagram of chicken embryo egg spectral-image acquisition system: 1. Computer; 2. USB transmission cable; 3. Stage; 4. Egg; 5. Dark box; 6. Glass fiber optic; 7. Halogen lamp light source; 8. Focusing lens; 9. 84UV collimating lens; 10. Fiber optic spectrometer; 11. LED light source; 12. Industrial camera.
[0041] Figure 3 Schematic diagram of embryo spectral-image fusion modeling;
[0042] Figure 4 Recognition rate of transmission spectrum model for chicken embryos at different incubation times: Note: The sample set collected horizontally during the 4-day incubation period is abbreviated as d4h, the sample set collected vertically is abbreviated as d4s, and so on.
[0043] Figure 5 Feature importance ranking in spectral random forest models;
[0044] Figure 6 Changes in spectral blood values at different incubation times;
[0045] Figure 7 Fusion of spectral features of chicken embryo eggs;
[0046] Figure 8 Image processing of chicken embryo eggs;
[0047] Figure 9 Ranking of texture feature importance in image random forest models;
[0048] Figure 10 ROC curves for male and female categories in the fusion model. Detailed Implementation
[0049] The present invention will be further described below with reference to specific embodiments. The present invention will be described in further detail, but is not limited to these embodiments.
[0050] Example 1
[0051] A non-destructive method for sex detection of chicken embryo eggs in the early incubation stage based on RF-DS map information fusion, the method comprising the following steps:
[0052] S1: Select sample eggs, clean, disinfect, dry, number them, and put them into incubator;
[0053] White-shelled eggs of the Jingfen No. 1 variety, produced by 223-day-old hens at the Jingzhou Yukou Hatchery, were selected. A total of 566 eggs were collected, including 278 females and 288 males. The parameter ranges for the eggs are as follows:
[0054] Table 1. Range of parameters for hatching eggs
[0055] parameter Egg weight / g Major axis / mm Short axis / mm Egg-shaped index (major axis / minor axis) scope 49.82~69.72 53.13~61.81 40.03~51.87 1.10~1.45
[0056] The samples were disinfected by wiping with a 5% benzalkonium bromide solution. After air drying, the eggs were numbered on the side of the smaller end and placed in the incubator. Visible-near-infrared spectral and machine vision image data of chicken embryos were collected on days 4, 5, 6, and 7 of the incubation period.
[0057] The sex of the embryos was determined and recorded at day 15 after hatching, serving as the basis for subsequent data analysis and modeling.
[0058] S2: Acquisition of spectral and image data of chicken embryos and eggs
[0059] S2.1 as Figure 1As shown, a light source selection test was conducted for the image detection system. Day 4 incubated eggs were illuminated with LED light sources of different color temperatures. Based on the principle of clarity of blood vessel texture, and after repeated tests and comparisons, a 30W pure white LED light source, model COB spotlight (LED spotlight, USA), was selected.
[0060] S2.2 as Figure 2 The embryo hatching information mapping system consists of two parts: a visible-near-infrared transmission spectroscopy detection system and an image detection system. The spectral acquisition system comprises a Maya2000Pro fiber optic spectrometer (Ocean Optics, USA), a 150W quartz halogen lamp light source, and a PC. The image acquisition system consists of a Basler ace acA1600-20gc industrial camera (Basler, Germany) with a 16mm focal length lens, a 30W neutral white LED light source, and a PC. As the incubation days increase, the light transmittance of the embryos decreases. To avoid sampling values that are too low for analysis, after repeated experiments and comparisons, the spectrometer integration time was set to 500ms, and the average number of times and smoothness were set to 3 and 5 respectively. The final effective spectral range was 400-900nm. The camera focal length, aperture, and object distance were adjusted, and the exposure parameters of the industrial camera software were set to 80ms.
[0061] S3: Data Processing and Model Building: Preprocessing, feature extraction, and model building of spectral and image data of chicken embryo eggs;
[0062] Extraction of spectral feature variables:
[0063] The Maya2000Pro spectrometer collected spectral data with a dimension as high as 2068, including a large number of invalid bands; and some highly correlated bands also existed in the spectral feature set characterizing male-female differences. This embodiment employs the Competitive Adaptive Reweighted Sampling (CARS), Successive Projection Algorithm (SPA), and blood value method to screen spectral features of early-stage incubation eggs.
[0064] Image feature variable extraction:
[0065] Several typical texture descriptors are used to extract texture feature variables from embryonic egg blood vessel images. Gray-level histogram statistics (GLHS) is a typical and easy-to-use method for quantifying texture features; gray-level co-occurrence matrix (GLCM) analyzes the adjacent spacing, variation amplitude, and directionality of gray-level pixels in blood vessel texture; fractal dimension (FD) can describe the structure and order in complex and irregular textures. In this embodiment, 11 blood vessel texture features are extracted from embryonic egg blood vessel images, including the mean, standard deviation, smoothness, third moment, and consistency of GLHS; contrast, energy, correlation, homogeneity, and entropy of GLCM; and FD, which are used as input variables for the image model.
[0066] S4: Spectral-image information fusion modeling for non-destructive detection of sex in early-stage chicken embryos during later incubation.
[0067] Example 2
[0068] Based on Example 1, the incubation days and egg placement method of the sample eggs in step S1 were studied.
[0069] like Figure 4 As shown, transmission spectra of eggs were collected at incubation periods d4, d5, d6, and d7 under two conditions: vertically with the large end facing up and horizontally. An RF model was constructed. The results showed that the RF model test set accuracy of the horizontally placed sample at d4 was the highest (65.11%). Therefore, horizontal placement at d4 was determined to be the optimal combination of detection time and egg placement method for the spectral model.
[0070] Example 3
[0071] Based on Example 1, the preprocessing of chicken embryo egg spectral and image data in step S3 is further refined.
[0072] Table 2 represents the test set accuracy of RF models using different preprocessing methods. The normalized model achieved the highest recognition rate (70.20%). Normalization involves scaling the training set samples before applying the normalization process to the test set, thus avoiding training set leakage. Therefore, normalization was chosen as the spectral preprocessing method.
[0073] Table 2 Comparison of recognition accuracy of different preprocessing methods
[0074]
[0075] Example 4
[0076] Based on Example 1, the extraction and modeling of spectral features of chicken embryo eggs in the early stage of incubation in step S3 are established.
[0077] 1. Spectral feature extraction and model establishment
[0078] The CARS algorithm was used to screen features from the normalized spectra, with a Monte Carlo sampling number of 50 and a cross-validation count of 10. Due to the inherent randomness in feature extraction by the CARS algorithm, it was run 10 times to select the four most frequent feature wavelengths: 587.14 nm, 588.04 nm, 588.49 nm, and 589.39 nm. The SPA algorithm was used to screen the normalized embryo-egg spectra, identifying 12 selectable feature wavelengths: 521.79 nm, 526.76 nm, 566.02 nm, 593.87 nm, 607.76 nm, 620.73 nm, and 630.76 nm. At wavelengths of 1.45nm, 688.79nm, 784.2nm, 802.95nm, 830.32nm, and 835.08nm, spectral blood value features containing significant differences between males and females were extracted from the original spectrum using the blood value method. These features were T575.02 / T596.12, T575.02 / T598.36, and T575.02 / T610.00, respectively. T575.02 / T596.12 represents the ratio of transmittance at the 575.02nm band to that at the 596.12nm band. Next, RF models were established using the selected feature variables, and the results are shown in Table 3. It can be seen that the RF model established using CARS-selected features achieved the highest accuracy on the test set (82.07%), and used the lowest spectral feature dimension, accounting for only 4.42‰ of the original spectrum. This means that the model volume was the smallest among the three. Figure 5 The ranking of feature importance in the CARS-RF model is shown. The contribution weights of the four spectral feature wavelengths to the model are relatively close, which proves the effectiveness of this set of feature variables.
[0079] Table 3. Comparison of Modeling Methods for Different Feature Filtering Methods
[0080] Filtering methods Number of feature variables Training set accuracy % Test set accuracy % No screening 906 100 70.20 CARS 4 100 82.07 SPA 12 100 70.22
[0081] like Figure 6The three blood value groups extracted using the blood value method—T575.02 / T596.12, T575.02 / T598.36, and T575.02 / T610.00—showed significant differences between males and females at day 4 of incubation (P<0.01). Since normalization was used to preprocess the original spectra, the spectral features obtained through feature screening were all ratio-type variables; while the blood value is the ratio of the hemoglobin absorption peak wavelength to the reference band, this feature is also dimensionless. Therefore, the blood value feature can be directly concatenated with the spectral feature variables screened by CARS to achieve feature fusion. The specific implementation method is as follows: Figure 7 The results are shown in Table 4.
[0082] Table 4 Comparison of Modeling with Different Feature Combinations
[0083] Spectral characteristics Number of feature variables Test set accuracy / % CARS Screening Features 4 82.07 CARS+T575.02 / T596.12 5 68.47 CARS+T575.02 / T598.36 5 68.53 CARS+T575.02 / T610.00 5 71.60
[0084] Among the three blood value fusion feature models, the blood value T575.02 / T610.00 performed best, achieving a test set accuracy of 71.60% for the random forest model built after fusion with CARS features. This improved recognition ability compared to the unselected spectral model (70.20%) and the SPA feature model (70.22%). However, compared to the model built using only CARS feature variables, the recognition rate of the blood value fusion feature model decreased by 10.47%. Furthermore, the accuracy of models built using the other two sets of blood value fusion features was lower than the original spectral model. This phenomenon may be due to collinearity between the introduced blood value features and the CARS-selected feature variables, causing the model to overfit due to increased weighting of one or more features during training. After comprehensive analysis, the 4D spectral features selected by the CARS algorithm were ultimately determined as the input variables for the male / female embryo detection model.
[0085] Furthermore, the parameters of the RF model were optimized. The model evaluation metric was set to AUC, and the search range for the number of decision trees and the maximum tree depth was set to 1–100, respectively. A grid search method was used to perform five-fold cross-validation modeling on the spectral sample training set. The results showed that when the maximum tree depth was 90 and the number of decision trees was 16, the training set AUC reached its optimum (0.9973), and the model test set AUC was 0.8938. The accuracy on the training set and the test set were 97.12% and 82.67%, respectively.
[0086] Example 4
[0087] Based on Example 1, an image model of the early incubation chicken embryo egg is established in step S3.
[0088] Machine vision images were acquired by placing the egg horizontally. At day 3, the embryo was initially visible; at day 4, the embryonic blood vessels were fully developed; after day 5, the number of blood vessel branches increased, and the patterns became overly complex. To obtain images of the embryonic blood vessels with complete morphology and clearly defined edges, images of the horizontally placed egg at day 4 were collected as samples.
[0089] 1 Image Processing Methods
[0090] Figure 8 The preprocessing workflow for embryonic egg image samples is shown. First, the region of interest (ROI) is extracted using methods such as minimum bounding rectangle. The G component of the ROI contains rich vascular texture information, thus the G component is separated. Bright spots and scratches on the embryonic egg image are removed using a subtraction cap. Texture features are enhanced using the contrast-limited adaptive gray-level histogram equalization (CLAHE) algorithm. The central part of the embryo is extracted using Otsu's threshold segmentation method; vascular texture is further highlighted using subtraction cap and black cap, and vascular pixels are repaired using closing and erosion operations, then the vascular part of the embryo is extracted again using Otsu's method. Finally, the central part of the embryo and the vascular part are stitched together using an OR operation, and the denoised image is mapped to the extracted embryonic region using an AND operation, resulting in a complete and clearly defined embryonic vascular morphology map.
[0091] 2. Texture feature extraction and model building of eggs in the early stage of incubation
[0092] Eleven-dimensional texture feature variables were extracted from the processed image. Table 5 shows the mean values of the texture feature variables for male and female embryos.
[0093] Table 5. Mean values of texture feature parameters in embryonic egg images
[0094]
[0095] After normalizing image features, the sample set was divided, and an image RF model was established. The accuracy on the training set and the test set was 100.00% and 63.80%, respectively. The model feature importance ranking results are shown in the figure. Figure 9 The results show that the contribution rates of the 10th dimension (fractal dimension FD) and the 7th dimension (correlation features of the gray-level co-occurrence matrix GLCM) are significantly higher than those of other features, playing an important role in reducing information impurity in the model.
[0096] Therefore, keeping the model parameters unchanged, the RF model was built using FD and GLCM correlation 2D feature variables. The training set accuracy was 100.00%, and the test set accuracy reached 74.33%, which is 10.53% higher than the original model. This may be because there is some redundant information in the initially extracted features, and some features containing too much noise can also have an adverse effect on model performance.
[0097] The parameters of the RF model were optimized. The model evaluation metric was set to AUC, and the search range for the number of decision trees and the maximum tree depth was set to 1–100, respectively. A grid search method was used to perform five-fold cross-validation modeling on the image sample training set. Experiments showed that when the maximum tree depth was 48 and the number of decision trees was 70, the training set AUC reached its optimum (0.9998), and the test set AUC was 0.7976. The accuracy on the training and test sets was 100.00% and 78.00%, respectively.
[0098] Example 5
[0099] Modeling of spectral-image information fusion in Examples 3 and 4.
[0100] The optimal number of days for spectral and image modeling of embryos was determined to be day 4 of the incubation period, and the optimal placement of samples was horizontal. The sampling time and sample placement were kept consistent.
[0101] Decision-level fusion modeling is performed using DS evidence theory.
[0102] 1. Establish RF models for single spectral and image features respectively, and obtain the recognition rates of the two models for male and female embryos. Assume that the recognition rate of model i for category j is represented by P. ij ;
[0103] 2. Construction of the BPA function for spectra and images: using R ij R represents the recognition result of spectral or image model i for sample of category j (j takes the value 0 or 1, corresponding to female or male). Assuming the model prediction result is correct, then R... ij =1, otherwise R ij =0; The support of each model for the predicted class j is expressed using the law of total probability: m ij =P ij ×R ij +(1-P ij )×(1-R ij ), m is also called the BPA function; the sum of the support of the BPA function for possible events for each model is 1, that is: m i0 +m i1 =1; Therefore, the BPA function can be normalized: Among them, P ij R represents the recognition rate of model i for category j. ij The recognition result of model i for sample of category j;
[0104] 3. DS Decision-Level Fusion and Decision Rules: The support of the fusion model for the predicted outcome of class j is also called joint reliability, denoted by M. j The formula for calculating M is: j =m ij ·mlj / K, where m ij and m lj , represent the support of the spectral and image models for the predicted class j, respectively, and K represents the sum of probabilities of conflicting predictions from different models.
[0105] The decision-making rule is as follows: Let event A be... i and A j The fusion model predicts embryos as categories i and j, where i and j take values of 0 or 1, and i ≠ j. If event A... i Satisfy: m(A) i )>m(A j ),and Make m(A) i )>ε1 and m(A i )-m(A j If ε₁ and ε₂ are manually set thresholds, then the final decision result of the fusion model is A > ε₂. i If the above conditions are not met, the decision result is determined to be female, in order to avoid losses caused by misclassifying female eggs as male eggs.
[0106] First, the basic probability assignments for the optimal detection models of the spectrum and image are obtained. In the spectral dimension, the spectrum is preprocessed by normalization, and the optimal RF model is established by selecting the 4-dimensional features through CARS. In the image dimension, the optimal RF model is established by preprocessing the embryo and egg image and extracting the two-dimensional feature parameters of FD and GLCM correlation features. Thus, the BPA function of the spectral and image detection models is obtained. Model fusion and decision-making are performed according to the DS fusion algorithm steps. After repeated experiments, the thresholds ε1 and ε2 of the fusion model are determined to be 0.1 and 0.2, respectively.
[0107] The DS fusion model achieved the following recognition results: the accuracy on the training set reached 100.00%, and the accuracy on the test set reached 88.00%. The recognition rates for females and males were 90.00% and 86.25%, respectively. Figure 10 The ROC curves of the fusion model are shown when male and female embryos in the test set are used as positive samples respectively, indicating that the model has a certain predictive ability for the sex of embryos. Comparison between the information fusion model and the single information source model.
[0108] Table 6 compares the modeling results of the single spectral and image model and the RF-DS fusion model.
[0109] Table 6 Comparison of modeling results between single-feature spectral and image models and fusion models.
[0110]
[0111] The DS decision-level fusion model achieved an accuracy of 88.00% on the test set, representing a 5.33% and 10.00% improvement over the best spectral and image models, respectively, making it the best performing of the three models. Furthermore, the DS fusion model achieved a female egg recognition rate of 90.00%, slightly lower than the spectral RF model (91.43%); however, it achieved a male egg recognition rate of 86.25%, an 11.25% improvement over the two single-feature models. This indicates that combining spectral and image-based hatching information enhances the model's recognition capability, enabling it to detect most male eggs while preserving female eggs as much as possible. Regarding detection time, the spectral RF model had the shortest time at only 0.0369s, thanks to the parallel computing structure of the random forest; the other three models required preprocessing of the egg images before prediction, resulting in longer detection times, with the DS decision-level fusion model averaging 2.843s for a single egg. Overall, the decision-level fusion model improved recognition accuracy compared to single-information models and demonstrated good performance in identifying male and female eggs.
[0112] Comparison with other methods
[0113] Table 7 shows the methods, detection periods, and recognition rates of existing literature on non-destructive detection of embryo sex, mainly including spectroscopic methods [8]
[12] , photoelectric detection methods [9], and machine vision methods
[10]
[11] . Zhu Zhihui et al.
[12] used ultraviolet-visible-near-infrared band spectral modeling during the incubation period d7, and the recognition rate reached 87.14%. The RF-DS fusion model determined in this study is earlier in detection time (d4) and performs better in recognition rate (88.00%). In terms of machine vision, Tang Yong et al.
[10] extracted HOG features from the embryo images on d4 and established an artificial neural network model, with a recognition rate of 83.33% and a discrimination time of 7.835s. The RF-DS fusion model has a higher recognition rate and a shorter discrimination time for a single egg (2.843s). Through comparison, it can be seen that the fusion model determined in this invention has certain advantages in the task of detecting embryo sex during the incubation period.
[0114] Table 7. Mean values of texture feature parameters in embryonic egg images
[0115] method Testing period Recognition rate Reference [8]-ANN d10 82.86% Reference [9]-LDA d16-d18 84.00% Reference
[10] - GA-BPNN d4 82.80% Reference
[11] -HOG+DBN d4 83.33% Reference
[12] -ELM d7 87.14% This article - RF-DS d4 88.00%
[0116] The specific documents are as follows:
[0117] [1]Krautwald-Junghanns ME,Cramer K,Fischer B, A, Galli R, Kremer F, Mapesa EU, Meissner S, Preisinger R, Preusse G, Schnabel C, Steiner G, Bartels T. Current approaches to avoid the culling of day-old male chicks in the layer industry, with special reference to spectroscopic methods. Poultry Sci, 2018,97:749-757.
[0118] [2] Xiang Xiaole. Study on the differences in odor, multi-omics matrix and non-destructive identification of male and female chicken hatching eggs [Doctoral Dissertation]. Wuhan: Huazhong Agricultural University, 2019.
[0119] [3] Galli R, Preusse G, Uckermann O, Bartels T, Krautwald-Junghanns ME, Koch E, Steiner G. In ovo sexing of domestic chicken eggs by Ramanspectroscopy. Analytical Chemistry, 2016, 88(17):8657–8663.
[0120] [4] Galli R, Preusse G, Uckermann O, Bartels T, Krautwald-Junghanns ME, Koch E, Steiner G. In ovo sexing of chicken eggs by fluorescence spectroscopy. Analytical and Bioanalytical Chemistry, 2017, 409(5): 1185-1194.
[0121] [5]Steiner G, Bartels T, Stelling A, Krautwald-Junghanns ME, Fuhrmann H, Sablinskas V, Koch E. Gender determination of fertilized unincubated chickeneggs by infrared spectroscopic imaging. Analytical and Bioanalytical Chemistry. 2011, 400(9): 2775–2782.
[0122] [6]Steiner G, Koch E, Krautwald-Junghanns ME. Method and device for determining the sex of fertilized, non-incubated bird eggs. USA patent, 8624190. 2014-01-07.
[0123] [7] Galli R, Preusse G, Schnabel C, Bartels T, Cramer K, Krautwald-Junghanns ME, Koch E, Steiner G. Sexing of chicken eggs by fluorescence and Raman spectroscopy through the shell membrane. Plos One, 2018, 13(2):e0192554.
[0124] [8] Pan Leiqing, Zhang Wei, Yu Minli, Sun Ye, Gu Xinzhe, Ma Long, Li Zijun, Hu Pengcheng, Tu Kang. Sex identification of early embryos in chicken hatching eggs based on hyperspectral images. Transactions of the Chinese Society of Agricultural Engineering, 2016, 32(1): 181-186.
[0125] [9] Alin K, Fujitani S, Kashimori A. Non-invasive broiler chick embryosexing based on opacity value of incubated eggs. Computers and electronics inagriculture, 2019,158:30-35.
[0126]
[10] Tang Yong, Hong Qi, Wang Qiaohua, Zhu Zhihui. Sex identification of hatching eggs based on bloodline texture features and GA-BP neural network. Journal of Huazhong Agricultural University, 2018, 37(6): 130-135.
[0127]
[11] Zhu Zhihui, Tang Yong, Hong Qi, Huang Piao, Wang Qiaohua, Ma Meihu. Early sex identification of chicken embryos based on blood line features of hatching egg images and deep belief network. Transactions of the Chinese Society of Agricultural Engineering, 2018, 34(6): 197-203.
[0128]
[12] Zhu Zhihui, Hong Qi, Wu Linfeng, Wang Qiaohua, Ma Meihu. Early sex identification of chicken embryos based on ultraviolet-visible transmission spectroscopy and extreme learning machine. Spectroscopy and Spectral Analysis, 2019, 39(9): 2780-2787.
[0129]
[13] Feng Yanping. Study on sex ratio and sex difference expression of genes in early embryos of chickens [Doctoral Dissertation]. Wuhan: Huazhong Agricultural University, 2007.
[0130]
[14] Baraka NM, Li J, Mustapha NA, Uwamungu P, Al-Alimi D. Prediction on the fluoride contamination in groundwater at the Datong Basin, Northern China: comparison of random forest, logistic regression and artificial neural network. Applied Geochemistry, 2021: 105054.
[0131]
[15] Dempster AP.Upper and lower probabilities induced by amultivalued mapping.Annals of Mathematical Statistics,1967,38(2):325-339.
[0132]
[16] Lei Zhenshuo, Liu Songtao, Chen Qi. Online evaluation method of interference effect based on SVM-DS fusion [J]. Journal of Detection and Control, 2020, 42(03):92-98.
[0133]
[17] He Dongjian, Qiao Yongliang, Li Pan, Gao Zhan, Li Haiyang, Tang Jinglei. Weed identification based on SVM-DS multi-feature fusion. Transactions of the Chinese Society for Agricultural Machinery, 2013, 44(2): 182-187.
[0134]
[18] Cai Hao, Guo Hongliang. Research on fruit identification based on DS evidence theory fusion of multi-classifier [J]. Chinese Journal of Agricultural Mechanization, 2021, 42(02):184-189.
[0135] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The embodiments and features described in these embodiments can be arbitrarily combined without conflict. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A non-destructive method for sex detection of chicken embryo eggs in the early incubation stage based on RF-DS map information fusion, characterized in that, The method includes the following steps: S1: Select sample eggs, clean, disinfect, dry, number them, and put them into incubator; S2: Acquiring spectral and image data of chicken embryos using an embryo incubation information mapping system: S3: Data Processing and Model Building: Preprocessing, feature extraction, and model building of spectral and image data of chicken embryo eggs; S4: Spectral-image information fusion modeling for non-destructive sex detection of chicken embryos in the early stages of incubation; In step S4, the specific operation of spectral-image information fusion modeling is as follows: S4.1 Establish RF models for single spectral and image features respectively, and obtain the recognition rates of the two models for male and female embryos. Assume that the recognition rate of model i for category j is expressed as... ; S4.2 Construction of the BPA function for spectra and images: using This represents the recognition result of spectral or image model i for sample of category j, where j takes the value 0 or 1, corresponding to female or male. Assuming the model prediction is correct, then... ,otherwise The total probability formula is used to represent the support of each model for the predicted class j: , Also called the BPA function; the sum of the support of the BPA function for possible events for each model is 1, that is: Therefore, the BPA function can be normalized: ,in, Let i be the recognition rate of model i for category j. The recognition result of model i for sample of category j; S4.3 DS Decision-Level Fusion and Decision Rules: The support of the fusion model for the predicted outcome of class j is also called joint reliability, which is expressed as... The calculation formula is as follows: ,in, and These represent the support levels of the spectral and image models for the predicted class j, respectively. This represents the sum of probabilities of conflict predictions given by different models. ; The decision-making rules are as follows: Let the event be... and The representative fusion model predicts the embryo as a category. and , and It takes the value 0 or 1, and If the event satisfy: ,and , making and ,in, If the threshold is set manually, the final decision result of the fusion model is: If the above conditions are not met, the decision result is determined to be female, in order to avoid losses caused by misclassifying female eggs as male eggs.
2. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S1: the sample eggs are wiped and disinfected with a 4-5.5% benzalkonium bromide solution, and after air drying, they are numbered on the surface and placed in the incubator.
3. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S1: the sample eggs weighed 49.82~69.72g, had a long axis of 53.13~61.81 mm, a short axis of 40.03~51.87 mm, and the egg shape index, i.e. the ratio of the long axis to the short axis, was 1.10~1.
45.
4. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S2: the embryo hatching information map acquisition system consists of two parts: a visible-near-infrared transmission spectroscopy detection system and an image detection system. The light source of the image detection system is determined by comparing the egg-candling effects of LEDs with different color temperatures through light source experiments.
5. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S2: During the acquisition process, the spectrometer integration time was set to 450-550ms, the average number of times and the smoothness were set to 2-4 and 4-6 respectively, and the effective wavelength range of the final acquired spectrum was 400-900nm; the camera focal length, aperture size and object distance were adjusted, and the exposure parameters of the industrial camera software were set to 70-90ms.
6. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S3: during the incubation period of 4 days, the eggs are laid horizontally to collect spectral and image data of the chicken embryos as data for subsequent processing.
7. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S3: S3.1.1 The spectral preprocessing method for chicken embryo eggs adopts normalization processing; S3.1.2 Spectral Feature Extraction: The CARS algorithm was used to screen features from the normalized spectrum. This screening was repeated 10 times, selecting the four most frequently occurring feature wavelengths: 587.14nm, 588.04nm, 588.49nm, and 589.39nm. The SPA algorithm was used to screen the normalized embryo-egg spectrum, identifying 12 selectable feature wavelengths: 521.79nm, 526.76nm, 566.02nm, 593.87nm, 607.76nm, and 620.73nm. m, 631.45nm, 688.79nm, 784.2nm, 802.95nm, 830.32nm, 835.08nm; spectral blood value features containing significant differences between males and females were extracted from the original spectrum using the blood value method, namely T575.02 / T596.12, T575.02 / T598.36, and T575.02 / T610.00, where T575.02 / T596.12 represents the ratio of transmittance at 575.02nm to transmittance at 596.12nm; S3.1.3 RF models are established using the selected feature variables, and the parameters are optimized.
8. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S3 Image data preprocessing specifically includes the following steps: S3.2.1 First, the region of interest is extracted using the minimum bounding rectangle or other methods, and the G component is separated; S3.2.2 Remove bright spots and scratches on the embryo image by using a capping method; enhance texture features using an adaptive grayscale histogram equalization algorithm with limited contrast; extract the central part of the embryo using Otsu's threshold segmentation method; further highlight the blood vessel texture by using capping and black capping methods; repair the blood vessel pixels by using closing and erosion operations; and then extract the blood vessel part of the embryo using Otsu's method. S3.2.3 The center and blood vessel parts of the embryo were stitched together using the image "OR" operation, and the noise-reduced image was mapped onto the extracted embryo region using the image "AND" operation, resulting in a complete and well-defined embryonic blood vessel morphology map.
9. The non-destructive detection method for sex of chicken embryos in the early incubation stage based on RF-DS map information fusion according to claim 1, characterized in that, In step S3 Texture feature extraction and model building specifically include: S3.3.1 Extract image texture feature variables from the embryonic blood vessel morphology map obtained in step S3.2.3; S3.3.2 After normalizing the image texture feature variables, the sample set is divided, and an image RF model is established; S3.3.3 Perform parameter optimization on the RF model.