An electronic device and a method for non-destructive identification of egg sex
The electronic device uses spectral imaging and neural network algorithms to non-destructively identify egg sex, addressing inefficiencies in existing methods by improving speed and accuracy.
Patent Information
- Application Number
- CN202410910017.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing methods for identifying the sex of early egg embryos are time-consuming, costly, invasive, or unsuitable for batch processing, and lack accuracy and repeatability.
An electronic device processes spectral images of specific wavelength bands of fertilized eggs using a neural network algorithm, capturing image and channel features through techniques like depthwise separable convolution and channel attention mechanisms, enabling non-destructive sex identification.
The method significantly enhances the efficiency and accuracy of egg sex identification, reducing time and labor costs while ensuring high reliability.
Smart Images

Figure CN118465202B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of egg gender recognition, in particular to an electronic device and a method for losslessly identifying the gender of an egg using a neural network algorithm. Background Art
[0002] At present, the methods for identifying the sex of early egg embryos at home and abroad mainly include the following:
[0003] 1. Identification method based on volatile organic compounds (VOC): This method is based on the analysis of the gas emitted by eggshells, but it takes a long time to collect gas samples and is not suitable for batch use. Although chemical ionization and other technologies have been proposed recently for rapid detection of gas components, the accuracy and repeatability of their models are still poorly understood, and repeatability is unknown.
[0004] 2. Identification method based on polymerase chain reaction (PCR): PCR is a commonly used technology for sex identification in bird research. It can amplify sex-specific genes located on the Z and W sex chromosomes. This method mainly involves three steps: DNA separation, PCR, and gel electrophoresis. After screening the PCR products by agarose gel electrophoresis, the difference between males and females is obvious, and the embryos can be classified based on this. However, this method is not only not economical, but also requires professional equipment and precise experiments. It is also quite time-consuming and cannot be applied in batches to actual scenarios.
[0005] 3. Identification method based on Raman spectroscopy: This method uses Raman spectroscopy to analyze the spectrum of blood in extraembryonic blood vessels by opening windows in eggs. The identification accuracy can reach 90% on the 3.5th day of incubation. However, invasive testing will bring infection risks, and opening windows in eggshells and sealing windows later will increase the identification cost, which is not suitable for parallel application in large hatcheries. Summary of the invention
[0006] In view of the problems existing in the above-mentioned existing methods for detecting the sex of eggs, the present invention is proposed.
[0007] Therefore, one of the problems to be solved by the present invention is how to provide an electronic device capable of processing spectral images of specific wavelength bands of fertilized eggs.
[0008] To solve the above technical problems, the present invention provides the following technical solutions: an electronic device, comprising: a memory storing computer-readable instructions; and a processor, which is configured to: process a spectral image of a specific band of a fertilized egg when executing the computer-readable instructions; the spectral image of the specific band of a fertilized egg being capable of being processed includes screening the spectral image band of the characteristics of the fertilized egg; and further extracting the image characteristics and channel characteristics of the fertilized egg, wherein the spectral image of the specific band includes:
[0009] Spectral images of 945.354nm, 762.407nm, 409.377nm and 644.587nm bands.
[0010] As a preferred embodiment of the electronic device of the present invention, the spectral image of the specific band includes spectral images of 945.354nm, 762.407nm, 409.377nm, 644.587nm, 888.39nm, 399.991nm, 618.669nm, 578.621nm, 728.801nm, 954.091nm, 562.989nm, 470.638nm, 1004.87nm, 904.482nm, 520.684nm, 779.97nm, 718.592nm, 441.857nm, 840.049nm, 494.166nm, 670.619nm and 829.789nm bands.
[0011] As a preferred embodiment of the electronic device of the present invention, the image characteristic bands for screening fertilized eggs capture the information of potential correlation between channels in the average spectrum of the spectral image through a channel attention mechanism, and assign greater weights to important channels.
[0012] As a preferred embodiment of the electronic device described in the present invention, the image characteristic bands for screening fertilized eggs are processed as follows: each channel of the spectral image is downsampled to a mean; an improvement operation is performed to obtain vectors of multiple dimensions; the obtained vectors are added to obtain the weight of each channel; the weight is multiplied by each channel of the spectral image, and the importance characteristics of the channel are included in the output data.
[0013] As a preferred solution of the electronic device of the present invention, the image characteristic band for screening fertilized eggs is to perform an improvement operation on the SE layer, and the improvement operation is to perform first-order and second-order derivative operations, specifically,
[0014] ,
[0015] ,
[0016] in, is the mean of the i-th channel image, n is the number of channels of the spectral image, is the first-order derivative corresponding to the i-th channel, and is the second-order derivative of the ith channel.
[0017] As a preferred solution of the electronic device of the present invention, wherein: the further extraction of image features and channel features of fertilized eggs, further extraction of image texture information and channel information, and reduction of the channel features.
[0018] As a preferred solution of the electronic device described in the present invention, wherein: the image features and channel features of the fertilized eggs are further extracted, and the channel dimensions are reduced by point-by-point convolution; deep convolution is performed on the reduced channels to extract the image features inside each channel; point-by-point convolution is performed again to fuse the information between channels to obtain the output image of the reduced channels.
[0019] As a preferred solution of the electronic device of the present invention, the further extraction of image features and channel features of fertilized eggs is achieved by a depthwise separable convolution algorithm.
[0020] As a preferred solution of the electronic device of the present invention, it also includes: collecting a spectral image of a specific band of a fertilized egg; and segmenting a region of interest from the spectral image of the specific band.
[0021] Another problem to be solved by the present invention is how to provide a method for non-destructively identifying the sex of eggs.
[0022] To solve the above technical problems, the present invention provides the following technical solutions: a method for non-destructive identification of the sex of eggs, comprising: an image acquisition device acquires a spectral image of a specific band of a fertilized egg; preprocesses the spectral image of the specific band; and uses an electronic device to process the preprocessed spectral image of the specific band of the fertilized egg.
[0023] As a preferred embodiment of the method for non-destructive identification of egg sex according to the present invention, the spectral image of the specific band is pre-processed, including segmenting a region of interest from the spectral image of the specific band.
[0024] As a preferred embodiment of the method for non-destructive identification of egg sex according to the present invention, segmenting the region of interest from the spectral image of the specific band comprises: merging the R, G, and B bands of the spectral image of the specific band, selecting the egg range and obtaining a grayscale image; further processing the grayscale image, and then segmenting the spectral image of the region of interest from the spectral image of the specific band.
[0025] The beneficial effect of the present invention is that the present invention designs an electronic device that can directly process the spectral image of a specific band of a fertilized egg. The efficiency of identifying the gender of eggs through the device is higher and the time consumption is greatly shortened. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0027] Figure 1 is a block diagram of a configuration of an electronic device according to an embodiment of the present disclosure.
[0028] Figure 2 It is a schematic diagram of processing a spectral image of a specific wavelength band of a fertilized egg in one embodiment of the present invention.
[0029] Figure 3 It is a characteristic wavelength diagram selected by the present invention by analyzing the spectral image of a specific wavelength band of a fertilized egg.
[0030] Figure 4 This is a schematic diagram of assigning greater weights to important channels through a channel attention mechanism in one embodiment of the present invention.
[0031] Figure 5 The figure is a schematic diagram of the process of extracting the region of interest described in the present invention.
[0032] Figure 6 This is a schematic diagram of collecting spectral images of specific wavelength bands of fertilized eggs in one embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0035] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0036] Example 1
[0037] The first embodiment of the present invention provides an electronic device for non-destructively identifying the sex of eggs. The electronic device can directly process the spectral image of a specific wavelength band of a fertilized egg.
[0038] In one embodiment, the electronic device 100 can be implemented as any of a variety of devices, such as a smartphone, a server device, a desktop PC, a notebook PC, a tablet PC, a TV, a set-top box, a kiosk, and a wearable device. Alternatively, the electronic device 100 can be implemented in the form of a system including a plurality of distributed devices that can communicate with each other.
[0039] refer to Figure 1 , the electronic device 100 may include a memory 101 and a processor 102. The memory 101 may store various data related to an operating system and elements of the electronic device 100 for controlling the operations of the elements of the electronic device 100. The memory 101 may include software, a program, and at least one instruction for controlling the functions of one or more elements of the electronic device 100.
[0040] The memory may be implemented as a non-volatile memory (eg, a hard disk, a solid state drive (SSD), a flash memory), a volatile memory, or the like.
[0041] The processor 120 may control the operation of the electronic device 100. In terms of hardware, the processor 120 may include a central processing unit (CPU), a graphics processing unit (GPU), a neural processing unit (NPU), etc., and may perform calculations or data processing for controlling other elements included in the electronic device 100.
[0042] The processor 102 may be implemented as a microprocessing unit (MPU) or a central processing unit (CPU), etc., coupled to a system bus and a memory 101 such as a random access memory (RAM) and a read only memory (ROM).
[0043] The processor 102 can not only control the hardware elements included in the electronic device 100, but also control the execution of one or more software modules included in the electronic device 100, and the result of the processor 102 controlling the software module can be exported to control the hardware elements and their functions to perform the operation of the electronic device 100.
[0044] Specifically, the processor 102 may control the electronic device 100 by executing at least one instruction stored in the memory 101 .
[0045] The operation of the electronic device 100 will be described in more detail below.
[0046] The processor 102 is configured to process the spectral image of the specific band of the fertilized egg when executing the computer readable instructions. Specifically, processing the spectral image of the specific band of the fertilized egg includes screening the characteristic spectral image band of the fertilized egg and further extracting the image features and channel features of the fertilized egg.
[0047] The "spectral image" mentioned here includes the use of hyperspectral image or multispectral image.
[0048] Among them, the screening of image feature bands of fertilized eggs can be achieved through machine learning algorithms such as RF algorithm (Random Forest Simplifid) that identifies the average spectral curve, CARS algorithm (Competitive Adapative Reweighted Sampling), SPA algorithm (Successive Projections Algorithm), and PCA algorithm (Principal Component Analysis).
[0049] The ability to further extract the image features and channel features of fertilized eggs can be achieved through conventional deep learning methods, such as deep separable convolution, full convolution or dilated convolution.
[0050] In one embodiment, the spectral image of a specific wavelength band of the input fertilized egg is a 22-channel or 4-channel image composed of 22 selected wavelengths or 4 selected wavelengths, see Figure 2, take 22 channels as an example: each channel image is a grayscale image with a width and length of 224, that is, the input dimension is (22, 224, 224), and the value of each pixel is between 0-255. After the spectral image band processing of the characteristics of fertilized eggs is screened, the output dimension remains unchanged, still (22, 224, 224), but each channel image contains the weight information of the channel, where each color represents a different channel image, the darker the color, the higher the importance of the channel, and the greater the weight. Subsequently, the image features and channel information are further extracted through the depthwise separable convolution, and the number of channels is adjusted from 22 to 32, and the output dimension is (32, 224, 224). Similarly, the darker the color of each channel, the higher the importance. The function of the depthwise separable convolution here is mainly to extract and integrate the texture information of images of different channels, and the output channel images are mostly dark. When the number of wavelengths acquired by the hyperspectral camera is 4, the downsampling multiple of the spectral image band processing for screening the characteristics of fertilized eggs is adjusted from 4 times to 1 times, that is, the first Linear remaps the three 4-dimensional vectors to 4 dimensions without performing dimensionality reduction. After the first filter layer 100, the output dimension is (4, 224, 224). After the depthwise separable convolution, the output dimension is (32, 224, 224).
[0051] Of course, those skilled in the art should also be aware that a third filter layer or a fourth filter layer or even more filter layers may be used.
[0052] At the same time, the inventor's comparative experiments have proved that the electronic device can be used to identify the gender of chicken eggs and quail eggs, but it is not necessarily applicable to duck eggs, goose eggs and other poultry eggs. Its recognition effect is not as good as the combination of the spectral image band for screening the characteristics of fertilized eggs and further extracting the image characteristics and channel characteristics of fertilized eggs in this embodiment.
[0053] In this embodiment, the “spectral images of specific wavelength bands” directly processed by the electronic device 100 are limited to include spectral images of four wavelength bands: 945.354 nm, 762.407 nm, 409.377 nm, and 644.587 nm.
[0054] See also Figure 3 , Figure 3 The wavelength contribution values shown in are distributed in the whole band. In order to select a few effective bands, a certain sampling interval is set, and the wavelength between the intervals is uniquely selected from the contribution value from large to small. When the sampling interval is set to a factor of 440 (1, 2, 4, 5, 10, 20, 22), the 4-band input is 945.354nm, 762.407nm, 409.377nm, and 644.587nm to maintain an accuracy of 0.946.
[0055] Example 2
[0056] like Figure 3 As shown, in this embodiment, the "spectral images of specific bands" directly processed by the electronic device 100 include spectral images of twenty-two bands: 945.354nm, 762.407nm, 409.377nm, 644.587nm, 888.39nm, 399.991nm, 618.669nm, 578.621nm, 728.801nm, 954.091nm, 562.989nm, 470.638nm, 1004.87nm, 904.482nm, 520.684nm, 779.97nm, 718.592nm, 441.857nm, 840.049nm, 494.166nm, 670.619nm and 829.789nm.
[0057] At the same time, in the case of 22-band input, the accuracy of the analysis by the electronic device 100 still remains at 0.954.
[0058] Example 3
[0059] Compared with Example 1, the method for screening characteristic spectral image bands of fertilized eggs in this embodiment captures the information of potential correlations between channels in the average spectrum through the channel attention mechanism, and gives greater weight to important channels.
[0060] The channel attention mechanism adaptively rescales the features of each channel by modeling the interdependencies between feature channels. The channel attention mechanism allows the network to focus on more useful channels and enhance discriminative learning capabilities. The channel attention mechanism enables the neural network to automatically determine which channel is important or unimportant, and then assign appropriate weights. Each channel of the feature map is regarded as a feature detector, so the channel feature focuses on "what" is the useful information in the image.
[0061] The "capturing of information about potential channel correlations in the average spectrum" mentioned herein refers specifically to the result obtained by averaging the spectral data of multiple samples in a certain area. Spectra are usually used to describe the characteristics or composition of an object by measuring the intensity of light at different wavelengths. When analyzing spectra, attention is usually paid to the intensity changes between different wavelengths and the correlation between them. This correlation helps understand how signals at different wavelengths change over time, conditions or other factors, thereby revealing the nature or state of the object.
[0062] Understanding the correlation of average spectra helps analyze data and identify patterns. When the spectral data of different samples are observed to have the same trend at certain wavelengths, it can be considered that there is a correlation between these wavelengths. This correlation shows that these wavelengths are important for distinguishing different categories of samples or features.
[0063] The reason why the model can classify based on the average spectral curves is that these curves represent the typical spectral features of different categories or features. When these features are input into the machine learning model for training, the model can learn the differences between different categories and make classification predictions based on these learned features when receiving new spectral data.
[0064] In this embodiment, the channel attention mechanism can be implemented by using the ECANet attention mechanism (Efficient Channel Attention for Deep Convolutional Neural Networks), the SE layer attention mechanism (Squeeze-and-Excitation Networks), the CBAM network architecture (Convolutional Block Attention Module), the STN network (Spatial Transformer Networks) or the STL network structure (Spatial Transformer Layer).
[0065] The concept of "important channels" can be understood as follows: Take the improved SE layer attention mechanism as an example, see Figure 4 , taking 22 channels as an example: AvgPool2d is the average spectrum of the input spectrum image, D1 and D2 are the first and second order derivatives of AvgPool2d respectively, all three are 22-dimensional vectors, Sigmoid is a function that scales the input to 0-1, Linear is a nonlinear transformation, and the Relu function sets the input less than 0 to 0. After Linear transformation again, the three 22-dimensional vectors are directly added. Finally, after the Sigmoid function transformation, it is projected to the 0-1 interval and multiplied point by point with the original spectrum image, that is, the i-th value is directly multiplied with the i-th input channel (i∈[0, 22]), and the output dimension is still 22 channels, but after the improved SE layer attention mechanism, it contains the importance information of the channel.
[0066] Example 4
[0067] The method of screening the characteristic spectral image bands of fertilized eggs in this embodiment can be processed as follows relative to embodiment 4: each channel of the collected spectral image is downsampled to a mean value. For example, each channel of the spectral image can be downsampled to a mean value through a two-dimensional average pooling operation (AvgPool2d), and the image downsampling of all channels is the average spectrum. Then, after two fully connected layers or nonlinear transformations and improvement operations, vectors of multiple dimensions are obtained. For example, the spectral image of a specific band has 22 channels. After two fully connected layers or nonlinear transformations and improvement operations, three 22-dimensional vectors are obtained. The obtained vectors are then added together to obtain the weight of each channel; finally, the weight is multiplied by each channel of the original image, and the importance features of the channel are included in the output data.
[0068] The mathematical formula for the “nonlinear transformation” described here is as follows:
[0069] ,
[0070] in: is the input tensor of size (N, in_features), where N is the size of the input and in_features is the number of input features; is a weight matrix of size (out_features, in_features), where out_features is the number of output features; is a bias vector of size (out_features). Specifically, it can be expressed as:
[0071] ,
[0072] Where x is the input tensor, is the i-th row and j-th column tensor of the input matrix, and for The j-th column tensor, as can be seen from the expression, the output tensor That is, the i-th behavior of y All data in row i and The sum of all data points in the jth column multiplied by a constant b.
[0073] In this embodiment, the "improved operation" can be SG (Savitzjy Golay) smoothing algorithm, MSC (Multiplicative Scatter Correction) multivariate scattering correction, SNV (Standard Normalized Variate) variable standardization, D1 (1st Derivatives) first-order derivatives, D2 (2nd Derivatives) second-order derivatives, or a combination of first-order and second-order derivatives.
[0074] For example, the way to combine the first-order and second-order derivative operations is as follows:
[0075] ,
[0076] ,
[0077] in, is the mean of the i-th channel image, n is the number of channels of the spectral image, is the first-order derivative corresponding to the i-th channel, and is the second-order derivative of the ith channel.
[0078] Example 5
[0079] In this embodiment, the method of screening the characteristic spectral image bands of fertilized eggs directly uses the SE layer.
[0080] In another embodiment, an improved operation is performed on the SE layer.
[0081] Specifically, the improved operation preferably performs a first-order and second-order derivative combined operation, specifically,
[0082] ,
[0083] ,
[0084] in, is the mean of the i-th channel image, n is the number of channels of the spectral image, is the first-order derivative corresponding to the i-th channel, and is the second-order derivative of the ith channel.
[0085] Example 6
[0086] The image features and channel features of the fertilized egg are further extracted. In this embodiment, the image texture information and channel information are further extracted, and the channel features are reduced.
[0087] In this embodiment, the following processing is performed: the channel dimension is reduced by point-by-point convolution; deep convolution is performed on the reduced channel to extract the features inside each channel; point-by-point convolution is performed again to fuse the information between channels to obtain an output image of the reduced channel.
[0088] The second filter layer can be implemented by conventional convolution methods. Taking the classic full convolution and dilated convolution as examples, comparative experiments show that depthwise separable convolution not only has the best accuracy of 0.954, but also requires fewer parameters and training parameters than full convolution and dilated convolution, which helps to reduce the model's inference time and speed up the prediction efficiency of eggs.
[0089] Preferably, the method of further extracting the image features and channel features of the fertilized eggs using a depthwise separable convolutional layer is the best.
[0090] In another embodiment, the provided electronic device 100 is an integrated device that can collect spectral images of a specific wavelength band of a fertilized egg, see Figure 5 , and then segment the region of interest from the spectral image of a specific band. In this step, the spectral image of a specific band is first merged into R, G, and B bands, the egg range is selected and a grayscale image is obtained, and then the grayscale image is further processed to segment the spectral image of the region of interest from the spectral image of a specific band; finally, the spectral image of a specific band of the fertilized egg is processed.
[0091] Example 7
[0092] This embodiment of the present invention provides a method for non-destructive identification of the sex of eggs, which includes three steps. First, the image acquisition device 200 is used to acquire a spectral image of a specific band of a fertilized egg. The acquisition process is as follows: Figure 6 The halogen lamp light source 300 illuminates the fertilized egg 400 disposed on the mobile platform 500, and the image acquisition device 200 acquires a spectral image of a specific band; then the spectral image of the specific band is preprocessed; finally, the electronic device 100 processes the preprocessed spectral image of the fertilized egg in the specific band.
[0093] In another embodiment, the spectral image of a specific wavelength band is preprocessed, including segmenting the region of interest from the spectral image of the specific wavelength band. Figure 5 , merge the R, G, and B bands of the spectral image of the specific band, select the egg range and obtain a grayscale image; further process the grayscale image, and then segment the spectral image of the area of interest from the spectral image of the specific band.
[0094] In a preferred embodiment, the image acquisition device 200 can directly acquire spectral images including four wavelength bands: 945.354 nm, 762.407 nm, 409.377 nm and 644.587 nm.
[0095] In another preferred embodiment, the image acquisition device 200 is capable of directly acquiring spectral images of twenty-two bands including 945.354nm, 762.407nm, 409.377nm, 644.587nm, 888.39nm, 399.991nm, 618.669nm, 578.621nm, 728.801nm, 954.091nm, 562.989nm, 470.638nm, 1004.87nm, 904.482nm, 520.684nm, 779.97nm, 718.592nm, 441.857nm, 840.049nm, 494.166nm, 670.619nm and 829.789nm.
[0096] Compared with the prior art, the present invention can directly collect spectral images of specific bands through electronic devices to accurately determine the sex of early chicken embryos. In addition, the identification process is mainly completed independently by the equipment, with a high degree of automation, which greatly reduces labor and time costs.
[0097] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An electronic device (100), characterized in that: include, a memory (101) storing computer readable instructions; and, A processor (102), which, when executing computer-readable instructions, is configured to: process a spectral image of a fertilized egg in a specific wavelength band; The method of processing the spectral image of a specific wavelength band of a fertilized egg comprises: spectral image bands to screen for characteristics of fertilized eggs; and, Further extract the image features and channel features of the fertilized eggs; The spectral image of the specific wavelength band includes: Spectral images of 945.354nm, 762.407nm, 409.377nm and 644.587nm bands; The spectral image bands for screening the characteristics of fertilized eggs capture the information of potential correlation between channels in the average spectrum of the spectral image of a specific band through a channel attention mechanism, and give greater weight to important channels; The method further extracts the image features and channel features of the fertilized eggs, further extracts the image texture information and channel information, and reduces the channel features.
2. The electronic device (100) according to claim 1, characterized in that: The spectral image of the specific waveband also includes: Spectral images of 888.39nm, 399.991nm, 618.669nm, 578.621nm, 728.801nm, 954.091nm, 562.989nm, 470.638nm, 1004.87nm, 904.482nm, 520.684nm, 779.97nm, 718.592nm, 441.857nm, 840.049nm, 494.166nm, 670.619nm and 829.789nm bands.
3. The electronic device (100) as claimed in claim 2, characterized in that: The spectral image bands for screening the characteristics of fertilized eggs are processed as follows: Downsample each channel of the spectral image to a mean value; Perform improvement operations to obtain vectors of multiple dimensions; Add the obtained vectors to get the weight of each channel; Multiply the weights by each channel of the spectral image to include the importance features of the channel in the output data.
4. The electronic device (100) as claimed in claim 3, characterized in that: The method of screening the image characteristic bands of fertilized eggs is to perform an improvement operation on the SE layer, and the improvement operation is to perform first-order and second-order derivative operations, specifically, , , in, is the mean of the i-th channel image, n is the number of channels of the spectral image, is the first-order derivative corresponding to the i-th channel, and is the second-order derivative of the ith channel.
5. The electronic device (100) according to claim 1, 2 or 3, characterized in that: The image features and channel features of the fertilized eggs are further extracted and processed as follows: The channel dimension is reduced through point-by-point convolution; Performing deep convolution on the reduced channels to extract the image features within each channel; Perform point-by-point convolution again to fuse the information between channels and obtain the output image of the reduced channels.
6. The electronic device (100) as claimed in claim 5, characterized in that: The further extraction of the image features and channel features of the fertilized eggs is achieved by a depth-separable convolution algorithm.
7. The electronic device (100) according to claim 5, characterized in that: Also includes, Collect spectral images of specific wavelengths of fertilized eggs; A region of interest is segmented from the spectral image of the specific wavelength band.
8. A method for non-destructive identification of the sex of eggs, characterized in that: include, The image acquisition device (200) acquires a spectral image of a specific wavelength band of a fertilized egg; Preprocessing the spectral image of the specific band; An electronic device (100) is used to process the spectral image of the specific wavelength band of the pre-processed fertilized egg; Screen the characteristic spectral image bands of fertilized eggs, and through the channel attention mechanism, capture the potential correlation information between channels in the average spectrum of the spectral image of a specific band, and give greater weight to important channels; Further extracting image features and channel features of the fertilized egg, further extracting image texture information and channel information, and reducing the channel features; The spectral image of the specific wavelength band includes: Spectral images of 945.354nm, 762.407nm, 409.377nm and 644.587nm bands.
9. The method for non-destructive identification of egg sex according to claim 8, characterized in that: The spectral image of the specific waveband is preprocessed, including segmenting a region of interest from the spectral image of the specific waveband.
10. The method for non-destructive identification of egg sex according to claim 9, characterized in that: The segmenting of the region of interest from the spectral image of the specific wavelength band includes: Merging the R, G, and B bands of the spectral image of the specific band, selecting the egg range and obtaining a grayscale image; The grayscale image is further processed to segment the spectral image of the region of interest from the spectral image of the specific band.