A Method for Locating and Detecting Key Parts of Breeding Eggs

Through deep learning and semantic segmentation model combined with spectral detection technology, the physiological state of the seed eggs and the precise positioning of key parts are achieved, solving the problems of low efficiency and high misjudgment rate of existing seed egg detection technology, and improving the detection accuracy and success rate.

CN119850899BActive Publication Date: 2025-05-27ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510338893.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-05-27
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

The existing breeding egg detection technology is low efficiency, high misjudgment rate, large loss, and lacks the ability to accurately locate key parts of breeding eggs and automatically classify multi-category physiological states.

Method used

A deep learning classification model and semantic segmentation model are used to build a seed egg image acquisition device. Through transmission image acquisition and processing, the physiological state of the seed egg and key part segmentation are realized, the optimal coordinate points for the extraction of allanto fluid are located, and subsequent testing is carried out in combination with spectral non-destructive detection technology.

Benefits of technology

It significantly improves the accuracy of discrimination of physiological status of seed eggs, accurately locates key parts of seed eggs, reduces the risk of puncture damage to embryos, improves the success rate and hatching rate of allanto fluid extraction, and provides a dual-verified early assessment of seed egg hatching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850899B_ABST
    Figure CN119850899B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for locating and detecting key parts of hatching eggs. The method includes: obtaining transmission images inside hatching eggs of different days through a hatching egg image acquisition device, training and establishing a discriminant model for the physiological state of hatching eggs and a segmentation model for key parts of hatching eggs; the discriminant model outputs the transmission images of fertilized eggs to be located and detected, and after processing with the segmentation model, the key parts are identified, and then an image processing method is used to locate the optimal coordinate points for allantoic fluid extraction, and then the allantoic fluid is extracted to realize the detection of hatching eggs. The method of the present invention establishes a dual model for hatching egg development evaluation and key part recognition, weakens the interference of human subjective factors, and also reduces detection and classification errors; the allantoic fluid coordinate positioning method reduces the risk of puncturing and damaging embryos and improves the success rate of allantoic fluid extraction; the present invention can provide rapid and accurate hatching egg information evaluation and detection of differential characteristics between male and female chicken embryos according to the needs of hatching applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for detecting hatching eggs, involving the detection technology in the poultry egg industry and the field of computer vision, and specifically relates to a method for locating and detecting key parts of hatching eggs. Background Art

[0002] The detection and evaluation of hatching eggs are the core links in the poultry breeding and hatching industries, directly related to the utilization rate of hatching eggs, hatching efficiency, and subsequent production benefits. Traditional hatching egg detection mainly relies on manual candling and sampling destructive testing, which have problems such as low efficiency, high misjudgment rate, and large hatching egg losses. For example, manual inspection not only has a high labor intensity, but also has a strong subjectivity in judging the embryonic development status (such as infertile eggs, dead sperm eggs, fertilized eggs), making it difficult to meet the needs of large-scale breeding. In the prior art, although there are already hatching egg inspection devices based on optical transmission (such as obtaining transmission images through a light source and a light receiving unit), they rely on a fixed light source layout, have insufficient positioning accuracy for key parts of hatching eggs (such as embryos, air chambers, blood vessels), and lack the ability to automatically classify multiple types of physiological states, resulting in limited reliability of detection results. In addition, hatching egg sex identification, development evaluation, and quality detection mostly rely on molecular biology techniques or destructive sampling after hatching, which not only lags behind the production cycle but also causes resource waste. In recent years, non-destructive testing techniques (such as visible near-infrared spectroscopy, Raman spectroscopy) have been tried for hatching egg quality analysis, but due to inaccurate positioning of key parts and high complexity of data modeling, it is difficult to achieve efficient and accurate online detection. With the development of deep learning and semantic segmentation techniques, how to construct a dedicated model adapted to the multi-scale features of hatching eggs and achieve accurate positioning and non-destructive detection of key parts has become a technical bottleneck that the industry urgently needs to break through. Summary of the Invention

[0003] In order to solve the problems in the background art, the present invention provides a method for locating and detecting key parts of hatching eggs.

[0004] The technical solution adopted by the present invention is:

[0005] The method for locating and detecting key parts of hatching eggs of the present invention includes:

[0006] Step 1, build a hatching egg image acquisition device, collect transmission images inside several hatching eggs of different days, and respectively obtain a hatching egg physiological state discrimination model and a hatching egg key part segmentation model after training through a deep learning classification model and a semantic segmentation model.

[0007] Step 2, use the hatching egg image acquisition device to collect the transmission image inside the hatching egg to be located and detected, input the transmission image of the hatching egg to be located and detected into the hatching egg physiological state discrimination model, and obtain the transmission image of the fertilized egg after discrimination after processing.

[0008] Step 3: Input the transmitted image of the fertilized eggs after discrimination into the key parts segmentation model of the breeding eggs. After processing, identify the key parts of the breeding eggs to be located and detected, so as to obtain the transmitted image of the fertilized eggs after segmentation.

[0009] Step 4: Use image processing methods to locate the optimal coordinate points for allantoic fluid extraction from the transmitted image of the fertilized eggs after segmentation. Extract allantoic fluid at the optimal coordinate points, and detect the breeding eggs through the extracted allantoic fluid. Use spectral non-destructive testing technology or molecular biology minimally invasive testing technology to detect the information of the breeding eggs for subsequent sex identification, development evaluation and quality detection of the breeding eggs.

[0010] In the above-mentioned Step 1, the breeding egg image acquisition device includes an image collector, a light source, an egg tray, an egg candler, a rotating bracket, a shielding ring and a dark box. The image collector, the egg tray, the egg candler, the rotating bracket and the shielding ring are all located inside the dark box. The egg tray is horizontally installed at the center bottom of the rotating bracket. The breeding eggs are vertically placed on the egg tray with the blunt end facing up. The egg candler is installed at the center top of the rotating bracket and the bottom end is directly above the breeding eggs. The top end of the breeding eggs and the bottom end of the egg candler are sealed by a shielding ring that isolates light. The light source is installed inside the egg candler and the light source is vertically downward towards the breeding eggs directly below. The image collector is installed on the side of the rotating bracket and the lens is horizontally oriented towards the breeding eggs. When the breeding egg image acquisition device acquires images, irradiate the breeding eggs with the light source, rotate the rotating bracket, and control the rotating bracket to drive the image collector to rotate 360° around its own vertical central axis. After setting the image acquisition parameters, obtain the internal transmitted images of the breeding eggs in all directions through the image collector, and then transmit them to the computer for storage.

[0011] In the above-mentioned Step 1, the breeding eggs are all chicken eggs incubated for 3 - 15 days.

[0012] In the above-mentioned Step 1, different categories of breeding eggs include infertile eggs, dead sperm eggs and fertilized eggs; add category labels to the transmitted images inside various breeding eggs and then train the deep learning model to obtain a breeding egg physiological state discrimination model, so as to discriminate the category of the breeding eggs according to the breeding egg physiological state discrimination model and obtain the transmitted image of the fertilized eggs for the next step of positioning and detection.

[0013] In the above-mentioned Step 3, screen the transmitted images of the fertilized eggs after discrimination, screen out the transmitted images of the fertilized eggs with embryos, blood vessels and air chambers, label the areas of embryos, blood vessels and air chambers in each of the selected images, and then input them into the semantic segmentation model for training to obtain the key parts segmentation model of the breeding eggs.

[0014] In step 4, the transmission image of the segmented fertilized egg is processed by an image processing method to obtain the optimal coordinate points for allantoic fluid extraction. First, an image coordinate system is established on the transmission image of the segmented fertilized egg in the horizontal and vertical directions, so as to obtain the contours and position coordinates of the embryo, blood vessels and air chamber. The contour of the embryo is expanded equidistantly to obtain the expanded area of the embryo. The expanded area of the embryo is compared with the contour area of the blood vessels. If there is a repeated area in the contour, all the coordinate points in the repeated area of the contour are set as repeated coordinate points, and the repeated coordinate points are removed. The remaining coordinate points in the contour of the expanded area of the embryo and each coordinate in the contour of the air chamber area are traversed, and the Euclidean distance is calculated, and the tree-shaped KDTree (k-dimensional) data structure is used to accelerate the nearest neighbor search to obtain the shortest Euclidean distance, so as to locate the coordinate points in the contour of the expanded area of the embryo as the optimal coordinate points for allantoic fluid extraction and mark them.

[0015] In step 4, the allantoic fluid of the extracted breeding egg is spectroscopically scanned to obtain spectral data for the detection of the breeding egg.

[0016] Non-destructive testing can be carried out on the key parts of the breeding egg, such as the allantois, embryo, blood vessels, etc. based on spectral technology, and a non-destructive testing model is constructed in combination with machine learning for sex identification, breeding egg development evaluation, breeding egg quality detection, etc. Spectral technology includes visible near-infrared spectroscopy, Fourier transform near-infrared spectroscopy, Raman spectroscopy, infrared spectroscopy, and terahertz spectroscopy, etc.

[0017] The breeding egg key part positioning and detection system of the present invention includes:

[0018] A data acquisition and processing unit for acquiring the transmission image inside the breeding egg and obtaining the transmission image of the discriminated fertilized egg after being processed by the breeding egg physiological state discrimination model and the breeding egg key part segmentation model.

[0019] A key part positioning and detection unit for obtaining the transmission image of the segmented fertilized egg after processing the transmission image of the fertilized egg by the breeding egg key part segmentation model, and then using an image processing method to locate the optimal coordinate points for allantoic fluid extraction, and extracting allantoic fluid according to the optimal coordinate points for subsequent detection.

[0020] The electronic device of the present invention includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method as described above.

[0021] The computer-readable storage medium of the present invention stores program data thereon, and when the program data is executed by a processor, the method as described above is implemented.

[0022] The beneficial effects of the present invention are:

[0023] The present invention combines a deep learning classification model and a semantic segmentation model to achieve automatic discrimination of the physiological state of hatching eggs (infertile eggs / dead sperm eggs / fertilized eggs) and precise segmentation of key parts (embryos, air chambers, blood vessels, etc.). Compared with the traditional manual egg candling technology, the discrimination accuracy is significantly improved (especially for the instability of embryo development), and the human subjective error is reduced.

[0024] The present invention integrates the development characteristics of hatching eggs and an image processing algorithm to design an optimal coordinate positioning method for allantoic fluid extraction. By excluding the blood vessel overlapping area and optimizing the spatial distance calculation, this method reduces the risk of puncturing and damaging the embryo, and improves the success rate of allantoic fluid extraction and the hatching rate.

[0025] The hatching egg information obtained by the present invention can meet the multi-modal hatching application requirements of hatching egg sex identification, development assessment, and quality detection. Compared with single detection means, this system combines the physical characteristics of image positioning and the biochemical characteristics of allantoic fluid, providing double verification for the early assessment of hatching eggs. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flow chart of the method of the present invention;

[0027] Figure 2 is a schematic diagram of the image acquisition device of the present invention;

[0028] Figure 3 is a physiological characteristic diagram of hatching eggs of the present invention;

[0029] Figure 4 is a schematic diagram of the allantoic positioning process of the present invention;

[0030] Figure 5 is a partial experimental result of the allantoic fluid extraction rate and the chicken embryo hatching rate of the present invention;

[0031] In the figure: 1. Hatching egg, 101. Infertile egg, 102. Dead sperm egg, 103. Fertilized egg, 104. First development hatching egg, 105. Second development hatching egg, 106. Third development hatching egg, 107. Fourth development hatching egg, 108. Allantois, 109. Embryo, 110. Blood vessel, 111. Air chamber, 112. Embryo expansion area, 115. Coordinate points of the embryo expansion area, 2. Image collector, 3. Light source, 4. Egg tray, 5. Egg candler, 6. Rotating bracket, 7. Occlusion ring. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] Candling eggs, also known as inspecting eggs, means using the light of the candler 5 to optically examine the development of the embryo 109 and the internal quality of the breeding egg 1. Since there are many pores on the surface of the poultry eggshell, and they are unevenly distributed (300 - 370 pores / cm at the blunt end 2 , 150 - 180 pores / cm at the pointed end 2 ), and different in size (9×10 - 22×29 μm), the eggs have the property of being optically penetrable. The pores can connect the inside and outside of the breeding egg 1 to ensure the normal development of the embryo 109. After a certain period of incubation, the contents of the breeding egg 1 change to form different quality conditions. By using a candling lamp 5 to optically examine the breeding egg 1 under dark conditions, the eggshell, the height of the air chamber 111, the egg white, the egg yolk, the chalazae, and the condition of the embryo 109 can be observed to identify the quality of the breeding egg 1 and make a comprehensive evaluation. The principle of the optical examination method is as follows: Since there are pores on the poultry eggshell that can transmit light, and the contents of the breeding egg 1 change to form different quality conditions, under the optical examination with light, the eggshell, the height of the air chamber 111, the egg white, the egg yolk, the chalazae, and the condition of the embryo 109 can be observed to identify the quality of the breeding egg 1 and make a comprehensive evaluation. By using the optical transmission method in combination with computer vision to monitor and classify the physiological development characteristics of the breeding egg 1, the positioning of the key parts of the breeding egg 1 can be assisted. Based on the above principle, the present invention proposes a method for positioning and detecting the key parts of a breeding egg to achieve the classification of the physiological state of the breeding egg 1 and the positioning and detection of the key parts of the breeding egg 1 (such as the embryo 109, blood vessels 110, air chamber 111, allantois 108, etc.). As Figure 1 shown, the method for positioning and detecting the key parts of the breeding egg of the present invention is as follows:

[0034] First, build an image acquisition device for breeding eggs, as Figure 2As shown in the figure, the hatching egg image acquisition device includes an image collector 2, a light source 3, an egg tray 4, an egg candler 5, a rotating bracket 6, a shielding ring 7 and a dark box. The image collector 2, the egg tray 4, the egg candler 5, the rotating bracket 6 and the shielding ring 7 are all located inside the dark box. The egg tray 4 is horizontally installed at the center bottom of the rotating bracket 6. The hatching egg 1 is vertically placed on the egg tray 4 with the blunt end facing upward. The egg candler 5 is installed at the center top of the rotating bracket 6 and the bottom end is located directly above the hatching egg 1. The top end of the hatching egg 1 and the bottom end of the egg candler 5 are sealed by a light-shielding ring 7 that isolates light. The light source 3 is installed inside the egg candler 5 and the light source 3 is vertically downward facing the hatching egg 1 directly below. The image collector 2 is installed on the side of the rotating bracket 6 and the lens is horizontally facing the hatching egg 1. When the hatching egg image acquisition device acquires an image, the hatching egg 1 is irradiated by the light source 3, and the rotating bracket 6 is rotated, and the rotating bracket 6 is controlled to drive the image collector 2 to rotate 360° around its own vertical central axis. After setting the image acquisition parameters, the internal transmission images of the hatching egg 1 in all directions are acquired by the image collector 2 and then transmitted to a computer for storage. The image collector 2 can use a complementary metal-oxide semiconductor (CMOS) industrial camera and an industrial lens; the light source 3 can use an LED cold light source. Before collection, a 0.1% bromogeramine solution also needs to be configured to disinfect the hatching egg 1; during collection, the position of the hatching egg 1 is kept stationary with the blunt end facing upward. After the light source 3 is turned on, parameters such as the focal length, aperture, size of the object to be measured, measurement accuracy, and working distance are adjusted, and the perspective information image of the hatching egg 1 is obtained through the camera. The shielding ring 7 of the hatching egg image acquisition device is used to seal the light of the egg candler to ensure that all the light from the light source is irradiated on the hatching egg 1.

[0035] In the present invention, the lens focal length is determined based on the size of a conventional egg and the size of the light source range. The transverse diameter in the middle of the egg is 40 - 60 mm, the maximum field of view range is 90 mm. When collecting images, the camera lens is at the blunt end of the egg and 100 mm away from the middle of the egg. The object distance D for shooting is taken as 100 mm, and the size of the camera sensor target surface is 1.1'' (12×12 mm). Therefore, the lens focal length should be: f = v×D÷V = 12×100÷90 = 13.33 mm, where f is the lens focal length, v is the longitudinal dimension of the camera chip, and V is the transverse dimension of the field of view area. To meet the field of view requirements, the lens focal length is selected as 12 mm. The parameters of the light source assembly involved in the present invention are as follows: light source: LED lamp, lamp socket temperature: ≤10°C (when the ambient temperature is 20°C), cold light source, mercury-free, no ultraviolet and infrared rays, no heat radiation, energy-saving and environmental protection, vibration-resistant, impact-resistant, and long service life; strong light penetration for candling eggs, more capable of clearly inspecting the development of the breeding egg 1 and grasping the development of the embryo 109. The candler 5 is designed to be cylindrical and is located between the breeding egg 1 and the light source 3, which enables the light from the light source 3 to reach the breeding egg 1 through the channel of the candler 5, thereby reducing the scattering of the incident light on the breeding egg 1 and the reflection of the light from other surfaces. The sizes of the breeding eggs 1 vary. There is a compressible rubber ring at the bottom of the spacer, which is closer to the eggshell surface to prevent light leakage and avoid damage. The light source is adjusted to be 5 - 8 cm away from both sides of the breeding egg 1 to ensure uniform light distribution in the area of the breeding egg 1. The egg tray 4 is provided with circular egg holes with a diameter extending downward from 4 cm to 2 cm. The overall size of the dark box is 50 cm×50 cm×130 cm, built with black aluminum profiles, configured with black experimental light-shielding cloth to reduce light reflection. In addition, a cooling fan is equipped on the top of the dark box to cool the camera. A piece of black flannelette is also laid at the bottom of the egg tray 4 to reduce the possible influence of the background on the imaging system. The position of the chicken embryo egg remains stationary with the blunt end facing up. After the light source 3 is turned on, parameters such as the focal length, aperture, size of the object to be measured, measurement accuracy, and working distance are adjusted, and the perspective information image of the breeding egg 1 is obtained through the camera.

[0036] The collected breeding eggs 1 in the present invention have different categories. The different categories of the breeding eggs 1 include infertile eggs 101, dead sperm eggs 102, and fertilized eggs 103; the physiological state of the breeding egg refers to the characteristics of the egg itself or the characteristics of the embryo in the egg, including systems of unfertilized eggs or eggs containing dead, undeveloped, or underdeveloped embryos. Such as Figure 3As shown, the light source 3 irradiates from the blunt end of the breeding egg 1 downward. For the first time, on the fifth and sixth days after the start of incubation, the chicken embryo 109 in the egg develops normally, and the blood vessels 110 are radially distributed. When irradiating the egg, if the darkness is deep and the color is bright red, it is a normal fertilized egg 103. If the part of the blood vessels 110 accounts for less than four-fifths of the egg surface and no eye spot can be seen, it is determined to be a weak sperm egg. If the egg is turbid inside and has blood circles or blood clots, it is a dead sperm egg 102. When irradiating the egg, if the brightness is high and only the shadow of the egg yolk can be seen, it is determined to be an infertile egg 101. The development state of the breeding egg refers to the degree of development of the biological, biochemical, and physical characteristics of the embryo in the healthy breeding egg 1. For example Figure 3 As shown, on the 4th day of incubation of the breeding egg 1, the vitelline sac blood vessels 110 surround nearly 1 / 3 of the yolk. When irradiating the egg, the yolk is not easily rotated. The chicken embryo and the vitelline sac blood vessels 110 resemble a spider. The allantois 108 is a very small water bubble, and melanin begins to deposit in the eyes, which is the first development stage of the breeding egg 104. On the 6th day of incubation of the breeding egg 1, the allantois 108 grows rapidly, and the blood vessel 110 system of the allantois 108 develops rapidly. When irradiating the egg, two small round masses can be seen in the head and trunk, which is the second development stage of the breeding egg 105. On the 8th day of incubation, the allantois 108 almost surrounds the vitelline sac. The external shape of the chicken embryo develops towards perfection, and the amniotic fluid and allantoic fluid increase rapidly, which is the third development stage of the breeding egg 106. On the 10th day of incubation, the allantois 108 rapidly develops downward on the back of the embryo 109 and gradually surrounds the albumen. The blood vessels 110 cover the entire egg surface, and the position of the chicken embryo is close to the air chamber 111, which is the fourth development stage of the breeding egg 107. Different detection technologies are implemented according to the characteristics and application requirements of the development state of the breeding egg.

[0037] Then, the deep learning classification model and the semantic segmentation model are trained. 800 breeding eggs 1 on the 7th day of incubation are collected, and the transmission images of the breeding eggs 1 are obtained using a breeding egg image acquisition device (resolution 2048×2048, LED backlight wavelength 550±10nm). For image preprocessing, grayscale conversion and denoising are first performed: Gaussian filtering (convolution kernel size 3×3, standard deviation σ = 1.5), and contrast enhancement: CLAHE (Contrast Limited Adaptive Histogram Equalization) histogram equalization (contrast limit = 2.0, block size = 8×8). The labelme software is used to add class labels to the transmission images inside the breeding eggs 1, namely fertilized eggs (class 1) and infertile eggs (class 0). The images are divided into a training set (640 images) and a test set (160 images) to train the deep learning classification model and the semantic segmentation model.

[0038] During training, a hatching egg image acquisition device is used to acquire the transmission image inside the hatching egg 1 and input it into the deep learning classification model. After processing, the transmission image of the fertilized egg 103 after discrimination is obtained, and then the next step of positioning and detection is carried out. The deep learning classification model specifically adopts the ResNet-18 classification model, including an input layer (512×512 grayscale image), a convolutional layer (7×7 convolutional kernel, stride 2, output channels 64), a residual module (4 groups of residual blocks, each group containing 2 3×3 convolutional layers), global average pooling, a classification layer (fully connected layer outputting 2 neurons, corresponding to the fertilized / unfertilized probabilities respectively), and the activation function adopts the Softmax classifier. The classification result accuracy of the output images of the training set is 97.2%, and the accuracy of the validation set is 95.3%. The transmission image of the fertilized egg 103 after discrimination is saved as a 512×512 grayscale image for subsequent key part segmentation.

[0039] The transmission images of the fertilized eggs 103 after discrimination also need to be screened. The transmission images of the fertilized eggs 103 with embryos 109, blood vessels 110 and air chambers 111 are screened out, and the regions of the embryos 109, blood vessels 110 and air chambers 111 in each of the selected images are marked, so as to be input into the semantic segmentation model for training. Specifically in implementation, 600 transmission images of the fertilized eggs 103 after discrimination (at this time, the embryonic vascular network has been formed and the air chamber boundary is clear) are divided into a training set, a validation set and a test set according to 7:2:1 for training until the semantic segmentation model converges. When performing key part segmentation, the present invention combines the semantic segmentation algorithm to detect the development state of the hatching egg. The process includes loading the image, preprocessing the image, selecting the segmentation algorithm, initializing the algorithm parameters, iterating the segmentation process until the stop condition is met and outputting the segmentation result, post-processing the segmentation result, and displaying the segmentation result. Specifically in implementation, a lightweight neural network available for semantic segmentation of mobile devices is selected. The available deep learning-based semantic segmentation models include the semantic segmentation model CGnet (Context Guided), the fully convolutional network FCN (Fully Convolutional Networks), the convolutional neural network SegNet (Semantic Segmentation), the convolutional neural network U-Net (U-shaped Network), and the deep convolutional neural network PSPNet (Pyramid Scene Parsing Network), etc.

[0040] Taking the semantic segmentation model CGnet as an example, the present invention identifies and segments the image of the hatching egg 1, and the main process is as Figure 4As shown, the semantic segmentation model CGnet introduces a context-guided module CG (Context Guided Block), which consists of a local feature extractor floc, a surrounding context extractor fsur, a joint feature extractor fjoi, and a global context extractor fglo. The context-guided module CG can learn the joint features of local features and the surrounding environmental context, and finally further improve the learning of joint features by introducing global context features. The semantic segmentation CGNet has the ability to aggregate context information from bottom to top, reducing the number of parameters and improving the segmentation accuracy. The results show the recognition accuracies of the key parts of the hatching egg 1 as follows: for embryo 109: 96.8%, for air chamber 111: 93.2%, for main blood vessel 110: 90.5%; Intersection over Union (IoU): for embryo 109: 73.3%; for air chamber 111: 67.6%; for main blood vessel 110: 74.1%.

[0041] After the training is completed, a discriminant model for the physiological state of the hatching eggs and a segmentation model for the key parts of the hatching eggs are obtained. Then, a transmission image inside the hatching egg 1 to be located and detected is collected by using the hatching egg image acquisition device. The transmission image of the hatching egg 1 to be located and detected is input into the discriminant model for the physiological state of the hatching eggs. After processing, the transmission image of the fertilized egg 103 after discrimination is obtained. The transmission image of the fertilized egg (103 after discrimination is input into the segmentation model for the key parts of the hatching eggs. After processing, the key parts of the hatching egg 1 to be located and detected are identified, so as to obtain the transmission image of the fertilized egg 103 after segmentation. The optimal coordinate points for allantoic fluid extraction are located from the transmission image of the fertilized egg 103 after segmentation by using an image processing method. First, an image coordinate system is established on the transmission image of the fertilized egg 103 after segmentation in the horizontal and vertical directions, so as to obtain the contours and position coordinates of the embryo 109, blood vessels 110 and air chamber 111. Specifically, when implementing, the obtained hatching egg state image is selected. This image contains the segmentation regions of the embryo 109, air chamber 111 and blood vessels 110. The steps for extracting the contours of the embryo 109, air chamber 111 and blood vessels 110 in the image include: grayscale conversion of the original image, cropping the mask region of the grayscale image, binarization of the mask region, and binary image operation. The Canny edge detection algorithm is used to detect the edges of the embryo, air chamber and blood vessel regions. The findContours function in OpenCV is used to extract the contours of the embryo 109, air chamber 111 and blood vessel 110 regions, and a contour coordinate set is obtained. These coordinates represent the boundaries of the embryo 109, air chamber 111 and blood vessel 110 regions. The boundingRect function is used to obtain the minimum bounding rectangle of each contour, and the coordinate information of the embryo 109, air chamber 111 and blood vessel 110 regions is obtained. The coordinate output of the hatching egg 1 on the 7th day measured in the present invention is: embryo center: (320±5, 280±3 pixels), air chamber centroid: (150±2, 480±4 pixels), main blood vessel endpoint set: [(215, 310), (228, 305),..., (392, 287)].

[0042] Then, the contour of the embryo 109 is expanded equidistantly outward. Taking the center of the embryo as the origin, the radius is dynamically expanded (formula: the expanded radius r′ = r×(1 + 10 / 7), where 7 is the hatching day), and the initial radius r is the radius of the maximum circumscribed circle of the embryo contour. After obtaining the embryo expanded region 112, the region contours of the embryo expanded region 112 and the blood vessel 110 are compared, and the overlap rate between the expanded region 112 and the blood vessel 110 is calculated using the scan line algorithm. When the overlap rate > 10%, coordinate elimination is triggered, and all coordinates in the overlapping region of the contour are set to 0, indicating that these coordinates are unavailable. After eliminating the duplicate coordinate points, the proportion of the remaining valid coordinate points in the expanded region 112 is 87.7%. Input the contour coordinate set of the air chamber 111, traverse the remaining coordinate points in the contour of the embryo expanded region 112 and each coordinate in the contour of the air chamber 111 region, calculate the Euclidean distance, and use the tree-shaped KDTree (k-dimensional) data structure to accelerate the nearest neighbor search to obtain the shortest Euclidean distance, so as to locate the coordinate points in the contour of the embryo expanded region 112 as the optimal coordinate points for allantoic fluid extraction and mark them. Output result: The coordinates of the allantoic fluid extraction point are (285, 185) ± 3 pixels, and the positioning repeatability error < 2.1% is verified by 20 repeated experiments.

[0043] Then, the allantoic fluid is extracted at the optimal coordinate points, and the allantoic fluid of the hatching egg 1 extracted is subjected to spectral scanning to obtain spectral data for the detection of the hatching egg 1. The information of the hatching egg 1 is detected using spectral non-destructive detection technology or molecular biology minimally invasive detection technology for subsequent sex identification, development evaluation, and quality detection of the hatching egg 1. Non-destructive detection can be carried out on the key parts of the hatching egg 1, such as the allantois 108, embryo 109, blood vessel 110, etc., based on spectral technology, and a non-destructive detection model is constructed in combination with machine learning for sex identification, hatching egg development evaluation, hatching egg quality detection, etc. Spectral technology includes visible near-infrared spectroscopy, Fourier transform near-infrared spectroscopy, Raman spectroscopy, infrared spectroscopy, and terahertz spectroscopy, etc.

[0044] After positioning the allantoic region of the hatching egg 1, the allantoic fluid was extracted by an extractor, and the extraction rate of allantoic fluid and the survival rate of the hatching egg 1 at different hatching days were evaluated to ensure the reliability of the method of the present invention. The allantoic fluid was detected based on molecular biology methods for sex identification, evaluation of hatching egg development, detection of hatching egg quality, etc. Molecular biology methods include quantitative real-time polymerase chain reaction (Quantitative Real-time polymerase chain reaction), immunoassay, liquid chromatography LC (Liquid Chromatograph) and mass spectrometry MS (Liquid Chromatograph) analysis, etc. The extraction rate of allantoic fluid was defined as the ratio of successful extraction to the total number of attempts, combined with the hatching rate of the hatching egg 1, as a dual-index to evaluate the feasibility of the extraction method. As Figure 5 shown, the test results show that the method of positioning and extracting allantoic fluid of the present invention has been significantly improved compared with the currently used air chamber extraction method. Specifically, on the 9th day of chicken embryo hatching, the extraction rate of allantoic fluid of 280 hatching eggs 1 was greater than 90%, and the hatching rate of the hatching eggs 1 was greater than 92% (compared with 200 in the untreated hatching group: the hatching rate was 96%; 200 in the traditional extraction method hatching group: the extraction rate of allantoic fluid of the hatching eggs 1 was less than 80%, and the hatching rate of the hatching eggs 1 was about 88%). The evaluation results of the dual criteria strongly prove the effectiveness of the method of the present invention.

[0045] Finally, the allantoic fluid can be detected based on molecular biology methods, which can meet the multi-modal hatching application requirements of hatching egg sex identification, development evaluation and quality detection. Compared with a single detection method, this system combines the physical characteristics of image positioning and the biochemical characteristics of allantoic fluid, providing double verification for the early evaluation of hatching eggs.

[0046] The present invention also constructs a positioning and detection system for key parts of hatching eggs, including a data acquisition and processing unit and a key part positioning and detection unit. The data acquisition and processing unit is used to obtain the transmission image inside the hatching egg 1, and after being processed by the hatching egg physiological state discrimination model and the hatching egg key part segmentation model, the transmission image of the fertilized egg 103 after discrimination is obtained; the key part positioning and detection unit is used to obtain the transmission image of the fertilized egg 103 after segmentation by processing the transmission image of the fertilized egg 103 by the hatching egg key part segmentation model, and then use an image processing method to locate the optimal coordinate points for allantoic fluid extraction, and extract allantoic fluid according to the optimal coordinate points for subsequent detection.

[0047] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) that contain computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages. The present application is described according to the flowcharts of the method, system, and computer program product of the embodiments of the present application.

[0048] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the present invention is intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0049] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the equivalent technology of the present invention, the present application is also intended to include these changes and modifications.

Claims

1. A method for locating and detecting key parts of breeding eggs, characterized in that: include: Step 1, building a breeding egg image acquisition device, collecting transmission images of the inside of a number of breeding eggs (1) of different days, and respectively obtaining a breeding egg physiological state discrimination model and a breeding egg key part segmentation model after training through a deep learning classification model and a semantic segmentation model; Step 2, using a breeding egg image acquisition device to acquire a transmission image of the interior of the breeding egg (1) to be located and detected, inputting the transmission image of the breeding egg (1) to be located and detected into a breeding egg physiological state discrimination model, and obtaining a transmission image of a fertilized egg (103) after discrimination after processing; Step 3, inputting the identified transmission image of the fertilized egg (103) into the breeding egg key part segmentation model, and identifying the key parts of the breeding egg (1) to be located and detected after processing, thereby obtaining the segmented transmission image of the fertilized egg (103); Step 4, using an image processing method to locate the optimal coordinate point for allantoic fluid extraction from the transmission image of the segmented fertilized egg (103), extracting the allantoic fluid at the optimal coordinate point, and detecting the breeding egg (1) through the extracted allantoic fluid.

2. The method for locating and detecting key parts of eggs according to claim 1, characterized in that: In the step 1, the egg image acquisition device comprises an image acquisition device (2), a light source (3), an egg tray (4), an egg candling device (5), a rotating bracket (6), a shielding ring (7) and a dark box. The image acquisition device (2), the egg tray (4), the egg candling device (5), the rotating bracket (6) and the shielding ring (7) are all located in the dark box. The egg tray (4) is horizontally mounted at the center bottom of the rotating bracket (6). The egg (1) is vertically placed on the egg tray (4). The egg candling device (5) is mounted at the center top of the rotating bracket (6) and its bottom end is located directly above the egg (1). The top end of the egg (1) and the bottom end of the egg candling device (5) are separated by an insulating layer. The light shielding ring (7) is sealed, the light source (3) is installed inside the egg illuminator (5) and the light source (3) is vertically downwardly directed toward the breeding egg (1) directly below, and the image collector (2) is installed on the side of the rotating bracket (6) and the lens is horizontally directed toward the breeding egg (1); when the breeding egg image acquisition device acquires an image, the breeding egg (1) is illuminated by the light source (3), the rotating bracket (6) is rotated, and the rotating bracket (6) is controlled to drive the image collector (2) to rotate 360 ​​degrees around its own vertical center axis, and the transmission image of the inside of the breeding egg (1) in all directions is acquired by the image collector (2), and then transmitted to a computer for storage.

3. The method for locating and detecting key parts of eggs according to claim 1, characterized in that: In step 1, the breeding eggs (1) are all eggs that have been incubated for 3-15 days.

4. The method for locating and detecting key parts of eggs according to claim 1, characterized in that: In the step 1, different categories of breeding eggs (1) include unfertilized eggs (101), dead sperm eggs (102) and fertilized eggs (103); after adding category labels to the transmission images inside the various breeding eggs (1), the deep learning model is trained to obtain a breeding egg physiological state discrimination model, so as to discriminate the category of the breeding eggs (1) according to the breeding egg physiological state discrimination model, obtain the transmission image of the fertilized egg (103), and then carry out the next step of positioning and detection.

5. The method for locating and detecting key parts of eggs according to claim 1, characterized in that: In the step 3, the transmission images of the identified fertilized eggs (103) are screened to select the transmission images of the fertilized eggs (103) having embryos (109), blood vessels (110) and air chambers (111). The regions of the embryos (109), blood vessels (110) and air chambers (111) in each of the screened images are labeled and then input into a semantic segmentation model for training to obtain a segmentation model of key parts of the breeding eggs.

6. The method for locating and detecting key parts of eggs according to claim 1, characterized in that: In the step 4, the transmission image of the segmented fertilized egg (103) is processed using an image processing method to obtain the optimal coordinate points for allantoic fluid extraction. First, an image coordinate system is established on the transmission image of the segmented fertilized egg (103) to obtain the contours and position coordinates of the embryo (109), blood vessels (110) and air chambers (111); the contour of the embryo (109) is expanded at equal distances to obtain the embryo expansion area (112); the regional contours of the embryo expansion area (112) and the blood vessels (110) are compared. If If there are repeated areas in the contour, all coordinate points in the repeated areas of the contour are set as repeated coordinate points, and the repeated coordinate points are removed. The remaining coordinate points in the contour of the embryonic expansion area (112) and the coordinates in the contour of the air chamber (111) are traversed, and the Euclidean distance is calculated. The tree-shaped KDTree data structure is used to accelerate the nearest neighbor search to obtain the shortest Euclidean distance, so that the coordinate points in the contour of the embryonic expansion area (112) are located according to the shortest Euclidean distance as the optimal coordinate points for allantoic fluid extraction and marked.

7. The method for locating and detecting key parts of eggs according to claim 1, characterized in that: In the step 4, the allantoic fluid extracted from the breeding eggs (1) is spectrally scanned to obtain spectral data for testing the breeding eggs (1).

8. A system for positioning and detecting key parts of hatching eggs suitable for the method according to any one of claims 1 to 7, characterized in that: include: A data acquisition processing unit, used to acquire a transmission image of the interior of a breeding egg (1), and obtain a transmission image of a fertilized egg (103) after being identified through processing using a breeding egg physiological state identification model and a breeding egg key part segmentation model; The key part positioning and detection unit is used to obtain a segmented transmission image of the fertilized egg (103) after processing the transmission image of the fertilized egg (103) through the key part segmentation model of the breeding egg, and then use the image processing method to locate the optimal coordinate point for allantoic fluid extraction, and extract the allantoic fluid according to the optimal coordinate point for subsequent detection.

9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Egg embryo sex determination method and device based on egg shape characteristic parameters

    CN110751178A

  • Optical fiber spectrum sorting device and method for male and female embryos of hatching eggs during incubation

    CN111999257A