Chicken testis weight prediction method and device based on deep learning and gray value calibration
Through deep learning and grayscale value calibration methods, the weight prediction of chicken testicles is used to use CT images and semantic segmentation models to solve the problems of high computing resources, slow processing speed and unsatisfactory prediction results in the prior art, and the accuracy is achieved Fast testicle weight prediction.
Patent Information
- Application Number
- CN202411250988.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, chicken testicle weight prediction has problems such as excessive computing resources, slow processing speed, poor timeliness and unsatisfactory prediction results.
Using deep learning and grayscale value calibration methods, the CT images of chicken testicles were obtained through CT scans, and the grayscale distribution histogram curve was used for pre-segmentation, combining semantic segmentation model and weight prediction model to achieve accurate and fast testicle weight prediction .
It improves the accuracy and efficiency of testicle weight prediction, reduces the consumption of computing resources, enhances the reliability of prediction results, and is suitable for real-time processing and analysis.
Smart Images

Figure CN119399569A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biological breeding and artificial intelligence image recognition, and in particular to a method and device for predicting chicken testicle weight based on deep learning and gray value calibration. Background Art
[0002] The testicle is an important part of the reproductive organs. Studying chicken testicles helps to understand the development, function and regulatory mechanism of the male chicken reproductive system. Traditional chicken testicle measurement methods are mostly manual measurements, which have the problems of low efficiency, high slaughter costs and large variability in measurement results. In addition, some trait data are difficult to collect, which seriously affects the chicken breeding process.
[0003] To solve the above problems, the weight of chicken testicles is currently predicted by recognition technology based on image segmentation.
[0004] However, the commonly used recognition technology based on image segmentation requires the input of all cross-sections in each direction, but some cross-sections cannot fully show the outline of the testicles, so the prediction results are not ideal; in addition, the three-dimensional data reconstructed after CT scanning can also be used for testicle recognition and segmentation, but the use of three-dimensional data requires a sufficient amount of sample data to be labeled, the labeling workload is huge, and there are problems such as excessive computing resources, slow processing speed, and poor timeliness when performing calculations. It is difficult to combine with agricultural sites and promote them on a large scale. Summary of the invention
[0005] The present invention provides a chicken testicle weight prediction method and device based on deep learning and gray value calibration, which are used to solve the defects of the prior art such as excessive computing resources, slow processing speed, poor timeliness and unsatisfactory prediction results, and realize accurate and rapid prediction of chicken testicle weight.
[0006] The present invention provides a chicken testicle weight prediction method based on deep learning and gray value calibration, comprising:
[0007] Performing CT scanning on the rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicle outline;
[0008] Obtaining a grayscale distribution histogram curve of a chicken testicle, and pre-segmenting the CT image according to the grayscale distribution histogram curve of the chicken testicle to obtain a pre-segmentation result of the CT image;
[0009] Inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model;
[0010] The semantic segmentation result of the CT image is input into a weight prediction model to obtain a weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on a grayscale distribution histogram curve of a sample testicle and the actual weight of the sample testicle.
[0011] According to the chicken testicle weight prediction method based on deep learning and gray value calibration provided by the present invention, the gray distribution histogram curve of the chicken testicle is obtained, comprising:
[0012] Obtain CT images of chicken testicles;
[0013] Based on the CT image of the chicken testicle, three-dimensionally reconstructing the chicken testicle;
[0014] Based on the result of the three-dimensional reconstruction, a grayscale distribution histogram curve of the chicken testicle is determined.
[0015] According to the chicken testicle weight prediction method based on deep learning and grayscale value calibration provided by the present invention, the grayscale value of the chicken testicle is determined based on the result of the three-dimensional reconstruction, including:
[0016] Select the section with the most pixels and the most complete contour in the result of 3D reconstruction to read the gray value;
[0017] Based on the result of the grayscale value reading, a grayscale distribution histogram curve of the chicken testicle is obtained.
[0018] According to the chicken testicle weight prediction method based on deep learning and gray value calibration provided by the present invention, the semantic segmentation model is a DeepLabv3+ model;
[0019] The DeepLabv3+ model includes an encoding layer and a decoding layer, the encoding layer includes a deep convolutional neural network and a spatial pyramid pooling module, the deep convolutional neural network is used to extract the global semantic information of the rooster testicle to be tested, and the spatial pyramid pooling module is used to extract the multi-scale deep semantic information of the rooster testicle to be tested;
[0020] The decoding layer is used to fuse the global semantic information and the multi-scale deep semantic information, and output the fused semantic information.
[0021] According to the chicken testicle weight prediction method based on deep learning and gray value calibration provided by the present invention, the spatial pyramid pooling module includes a 1*1 convolution layer, an average pooling layer, and three dilation rates of 6, 12, and 18 respectively.
[0022] The step of inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain the semantic segmentation result of the CT image output by the semantic segmentation model comprises:
[0023] The pre-segmentation result of the CT image is input into the coding layer, the global semantic information of the rooster testicle to be tested is extracted through the deep convolutional neural network of the coding layer, and 1*1 convolution, average pooling and three dilation rates of 6, 12 and 18 are respectively performed through the spatial pyramid pooling module of the coding layer to obtain 1*1 convolution result, average pooling result and dilation rates of 6, 12 and 18 respectively.
[0024] The 1*1 convolution result, the average pooling result and the dilation rate of 6, 12 and 18 are spliced, and the spliced results are fused through 1*1 convolution to obtain the multi-scale deep semantic information of the rooster testicle to be tested output by the spatial pyramid pooling module;
[0025] The global semantic information of the rooster testicle to be tested is input into the decoding layer for 1*1 convolution, and then input into the decoding layer together with the multi-scale deep semantic information for feature fusion to obtain the fused semantic information output by the decoding layer.
[0026] According to the chicken testicle weight prediction method based on deep learning and gray value calibration provided by the present invention, the weight prediction model is trained by the following process:
[0027] Based on the grayscale distribution histogram curve of the sample testis, the number of pixels of the sample testis and the grayscale value of each pixel are obtained;
[0028] The gray value of each pixel and the actual weight of the sample testis are used to construct a sample data set;
[0029] Based on the sample data set, the weight prediction model is trained using a catboost algorithm.
[0030] The present invention also provides a chicken testicle weight prediction device based on deep learning and gray value calibration, comprising:
[0031] An image acquisition module is used to perform CT scanning on the rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicular outline;
[0032] A pre-segmentation module, used for pre-segmenting the CT image according to grayscale values to obtain a pre-segmentation result of the CT image, wherein the pre-segmentation includes threshold segmentation and pseudo-color enhancement;
[0033] A semantic segmentation module, used for inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model;
[0034] The weight prediction module is used to input the semantic segmentation result of the CT image into a weight prediction model to obtain the weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on the gray value distribution of the sample testicle CT image and the actual weight of the sample testicle.
[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for predicting chicken testicle weight based on deep learning and grayscale value calibration as described in any one of the above methods is implemented.
[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a chicken testicle weight prediction method based on deep learning and grayscale value calibration as described in any one of the above.
[0037] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the chicken testicle weight prediction methods based on deep learning and grayscale value calibration as described above.
[0038] The present invention provides a chicken testicle weight prediction method and device based on deep learning and grayscale value calibration. The method pre-segmented the chicken testicle CT image based on the grayscale distribution histogram curve, and had the characteristics of high robustness, high confidence, high segmentation efficiency, fast calculation speed, high accuracy, low error rate, and was suitable for real-time processing and analysis. The present invention fully combined the true value measured in breeding and was based on the anatomical value. The process was more in line with the actual breeding site needs. During the chicken cultivation and breeding process, the chicken testicles were measured to help the chicken breeding industry to select high-quality seeds and improve the breeding efficiency of high-quality chickens. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flowchart of a chicken testicle weight prediction method based on deep learning and gray value calibration provided by an embodiment of the present invention;
[0041] Figure 2 It is a flow chart of a chicken testicle gray value analysis and prediction method based on CT images provided by an embodiment of the present invention;
[0042] Figure 3 Flow chart of the method for predicting the weight of live chicken testicles provided by the embodiment of the present invention
[0043] Figure 4 This is an overall structural diagram of live chicken testicle segmentation based on gray value analysis and DeepLabv3+ network model provided by an embodiment of the present invention;
[0044] Figure 5 It is a schematic diagram of a structure for performing pseudo color enhancement in different directions provided by an embodiment of the present invention;
[0045] Figure 6 is a schematic diagram of the statistical distribution of gray values provided by an embodiment of the present invention;
[0046] Figure 7 is an architecture diagram of the DeepLabv3+ network model provided by an embodiment of the present invention;
[0047] Figure 8 It is a schematic diagram of the structure of the ASPP module in an embodiment of the present invention;
[0048] Fig. 9 A schematic diagram of the structure of a chicken testicle weight prediction device based on deep learning and gray value calibration provided by an embodiment of the present invention;
[0049] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] In recent years, based on the development of image recognition and artificial intelligence technology, a large number of image processing technologies have been used to evaluate the growth, development, morphological characteristics and physiological indicators of animals and plants, thereby assisting breeding work. With the rapid development of computer vision and image processing technology, breeding methods based on image technology have gradually become a research hotspot. This method has the advantages of non-destructive, efficient and objective, time-saving and labor-saving, and is of great significance for improving breeding efficiency. However, there are relatively few studies on the use of CT images in poultry. CT (computed tomography) technology has the characteristics of accurate positioning, easier image recognition, and high resolution. Conventional X-ray detection technology can easily cause the superposition of image information, and it is difficult to accurately locate and quantitatively measure after obtaining detailed information on the image. When CT scans an object, it can give a two-dimensional or three-dimensional image, thereby effectively obtaining the specific spatial position and size information of the target feature.
[0052] CT (Computed Tomography) technology is a technology that uses X-rays to irradiate a selected fault plane from multiple directions, measure the amount of X-rays transmitted and digitize it, and then use a computer to calculate the absorption coefficient of each unit volume of the tissue at this plane, and then reconstruct the image. The use of CT for live detection has become the focus of attention of developed breeding countries and breeding companies. Usually, in medical imaging, the CT value (Computed Tomography value) represents the gray value of the pixel on the computed tomography (CT) image. It reflects the absorption capacity of different tissues in the scanned object to X-rays. The CT value is expressed in Hounsfield units (HU), with the absorption coefficient of water as 0HU and air as -1000HU as the benchmark. Before performing a CT scan, the equipment needs to be calibrated. The purpose of calibration is to ensure the stable performance of the CT equipment and eliminate the impact of equipment errors on image quality. During the calibration process, standard collimators and measuring instruments are usually used to check the equipment's geometric accuracy, grayscale resolution, noise level and other parameters.
[0053] In CT scanning, a standard phantom (such as a model containing materials of different densities) is required for scanning. This helps to evaluate the accuracy of the grayscale value reconstruction of materials of different densities by the CT device. By measuring the CT value of the standard phantom, the grayscale value response curve of the CT device under different density conditions can be obtained. At present, in human medical research, the CT values of different tissues and organs have a rough range. For example, cortical bone usually has a higher HU value (close to +1000), while fat and muscle tissues have lower density, so their HU values are usually between -100 and +200. Air has the lowest density, and its HU value is close to -1000. However, there has been no relevant research report on the CT value standards for different tissues and organs of poultry.
[0054] The testicle is an important part of the reproductive organs. Studying chicken testicles helps us understand the development, function and regulatory mechanism of the male reproductive system. Chicken testicles are an important high-value-added economic trait in the south, especially in Guangdong and Guangxi. As a delicacy, they are deeply loved by people. It is of great significance to the development of the chicken breeding industry. At present, most chicken testicle measurement methods are done manually, which has low efficiency, high slaughter costs and large variability in measurement results. Some trait data are even difficult to collect, which seriously affects the breeding process of chickens.
[0055] The commonly used recognition technology based on image segmentation requires the input of all cross sections in each direction, but some cross sections cannot fully show the outline of the testicles, and selecting images containing the complete testicular outline is crucial to the accuracy of the model. Secondly, for some cross-sectional data of chicken testicles, segmentation using three-dimensional reconstruction data processing methods has problems such as excessive computing resources, slow processing speed, and poor timeliness. It is difficult to combine with agricultural sites and promote them on a large scale. In response to the above problems, a grayscale value-based segmentation method can be used. The method is a simple image segmentation method, usually based on pixel intensity. It distinguishes the foreground and background or different areas in the image by setting one or more thresholds, and has the advantages of fast computing speed and suitability for real-time processing.
[0056] The present invention belongs to the intersection of biological breeding and artificial intelligence image recognition. It aims to establish a gray value standard for live chicken testicular tissue based on CT image data, and design a research method and process for chicken testicular segmentation, correction and weight prediction based on CT images according to this standard. This method uses two-dimensional images of different sections of the testicle after reconstruction, combined with the gray value standard, and jointly analyzed with the real phenotype, so as to realize the live testicular weight measurement.
[0057] Figure 1 A flowchart of a chicken testicle weight prediction method based on deep learning and gray value calibration provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the chicken testicle weight prediction method provided by the embodiment of the present invention includes:
[0058] Step 110, performing CT scanning on the rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicle outline;
[0059] Step 120, obtaining a grayscale distribution histogram curve of the chicken testicle, and pre-segmenting the CT image according to the grayscale distribution histogram curve of the chicken testicle to obtain a pre-segmentation result of the CT image;
[0060] In this step, obtaining the grayscale distribution histogram curve of the chicken testicle may include the following steps:
[0061] Obtain CT images of chicken testicles;
[0062] Based on the CT image of the chicken testicle, three-dimensionally reconstructing the chicken testicle;
[0063] Based on the result of the three-dimensional reconstruction, the grayscale distribution histogram curve of the chicken testicle is determined. Specifically, the section with the most pixels and the most complete contour in the result of the three-dimensional reconstruction can be selected to read the grayscale value, and then based on the result of the grayscale value reading, the grayscale distribution histogram curve of the chicken testicle is obtained.
[0064] Furthermore, pre-segmentation is performed according to the grayscale distribution histogram curve of the chicken testicle, specifically comprising the following steps: first, using an image processing library (such as OpenCV) to read the image to be processed, and selecting to read the image in grayscale mode or color mode; then, selecting a part for threshold segmentation according to image characteristics and task requirements, applying the threshold to the image according to a pre-obtained threshold, and based on the threshold, segmenting the image into two regions, that is, pixels greater than the threshold are divided into one region, and pixels less than the threshold are divided into another region, thereby completing the initial segmentation of the testicle.
[0065] Step 130, inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model;
[0066] In this step, the semantic segmentation model is a DeepLabv3+ model; the DeepLabv3+ model includes an encoder layer and a decoder layer, the encoder layer includes a deep convolutional neural network and a spatial pyramid pooling module, the deep convolutional neural network is used to extract the global semantic information of the rooster testicles to be tested, and the spatial pyramid pooling module is used to extract the multi-scale deep semantic information of the rooster testicles to be tested; the decoder layer is used to fuse the global semantic information and the multi-scale deep semantic information, and output the fused semantic information.
[0067] Optionally, the spatial pyramid pooling module includes a 1*1 convolutional layer, an average pooling layer, and three dilated convolutional layers with expansion rates of 6, 12, and 18 respectively;
[0068] Correspondingly, the pre-segmentation result of the CT image is input into the semantic segmentation model to obtain the semantic segmentation result of the CT image output by the semantic segmentation model, which specifically includes:
[0069] The pre-segmentation result of the CT image is input into the coding layer, the global semantic information of the rooster testicle to be tested is extracted through the deep convolutional neural network of the coding layer, and 1*1 convolution, average pooling and three dilation rates of 6, 12 and 18 are respectively performed through the spatial pyramid pooling module of the coding layer to obtain 1*1 convolution result, average pooling result and dilation rates of 6, 12 and 18 respectively.
[0070] The 1*1 convolution result, the average pooling result and the dilation rate of 6, 12 and 18 are spliced, and the spliced results are fused through 1*1 convolution to obtain the multi-scale deep semantic information of the rooster testicle to be tested output by the spatial pyramid pooling module;
[0071] The global semantic information of the rooster testicle to be tested is input into the decoding layer for 1*1 convolution, and then input into the decoding layer together with the multi-scale deep semantic information for feature fusion to obtain the fused semantic information output by the decoding layer.
[0072] Step 140, inputting the semantic segmentation result of the CT image into a weight prediction model to obtain a weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on a grayscale distribution histogram curve of the sample testicle and the actual weight of the sample testicle.
[0073] In this step, the weight prediction model is trained through the following process:
[0074] Based on the grayscale distribution histogram curve of the sample testis, the number of pixels of the sample testis and the grayscale value of each pixel are obtained;
[0075] The gray value of each pixel and the actual weight of the sample testis are used to construct a sample data set;
[0076] Based on the sample data set, the weight prediction model is trained using a catboost algorithm.
[0077] The above steps are described in detail below in conjunction with specific embodiments.
[0078] In order to solve the problems of time-consuming and labor-intensive, low efficiency, large subjective influence, large error and low accuracy in the task of measuring the weight of live chicken testicles in traditional breeding sites, the embodiment of the present invention performs gray value analysis, CT value standard establishment and effective section selection on chicken testicles in the first part, and performs two-dimensional training and weight prediction on the screened testicle images with complete contours in the second part, which plays a positive role in accurately mining the intrinsic relationship between "genotype-phenotype" and accelerating the genetic progress of precise breeding of economic traits.
[0079] Specifically, an embodiment of the present invention provides a calculation method based on gray value analysis and DeepLabv3+ network model, which includes three steps of testicular tissue calibration, segmentation and weight prediction, specifically including:
[0080] Step 1: Perform CT scans on a large number of dissected testicular original samples and analyze the grayscale value range of the reconstructed testicles. After analyzing a large number of dissected testicular samples, rescan the whole chicken and select a slice with a complete testicular contour surface;
[0081] Step 2: Use the grayscale value standard established previously to perform the initial segmentation of each chicken's effective section, and then use the DeepLabV3+ model for secondary segmentation. DeepLabV3+ improves the dilated convolution by using different atrous rates. This method allows the model to capture multi-scale information while maintaining computational efficiency, thereby effectively improving the accuracy of secondary segmentation.
[0082] Here, the effective cross-section of each chicken individual can be automatically selected through the trained image classification network vgg16.
[0083] Furthermore, the embodiment of the present invention introduces an Atrous Spatial Pyramid Pooling (ASPP) module, which can simultaneously process features of multiple scales, thereby improving the segmentation capability of objects of different sizes to be segmented, and effectively combining high-level semantic information with lower-level features, which is crucial for the extraction of accurate image edge detail features.
[0084] In this step,
[0085] It can be understood that using the grayscale value-based method as a preprocessing step can remove noise, highlight the contour features around the testicles, and improve the image quality input to the DeepLabv3+ model.
[0086] Step 3: Based on the pixel points of the segmented testicles, the grayscale value of each pixel is used as the weight of each pixel, and a linear fit is performed with the true mass value. This method uses image recognition technology and grayscale value analysis for initial segmentation, and then uses the grayscale value of each pixel as a weight, comprehensively considering the density value and size of each area on the testicle, to more accurately predict the weight and apply it to the breeding field.
[0087] In another specific embodiment, Figure 2 FIG. 1 is a flow chart of a method for analyzing and predicting the gray value of chicken testicles based on CT images provided by an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0088] Step 210, scanning and preprocessing: Scanning and preprocessing operations are performed on the dissected chicken testicles, three-dimensional reconstruction is performed based on the testicle CT scanning data, the format of the CT image is adjusted, and Gaussian filtering and contrast enhancement are performed on the scanned testicle sections. And the distribution histogram is analyzed according to the grayscale values of different areas of the entire contour to obtain grayscale value analysis and pixel point information in the entire area.
[0089] Step 220, secondary segmentation: Use the gray value standard established in step 210 to perform initial segmentation on the effective section of each individual, and then use the DeepLabV3+ model to perform secondary segmentation.
[0090] Step 230, weight value fitting: according to the segmented testicular tissue pixels, the gray value of each pixel is combined as the weight of each pixel, and the real weight value is fitted. This fitting process adopts a catboost algorithm, and the statistical index of the gray value is added to the pixel as a feature for training.
[0091] Specifically, after obtaining the number of pixels of the segmented testicular tissue, the average grayscale value of the pixels, the median grayscale value, the one-quarter value (Q1), the three-quarter average value (Q3) and other grayscale values, the above values are used as features and the true weight is used as a label to train the weight prediction model.
[0092] The embodiment of the present invention, by the above steps, compared with the prior art, by the gray value analysis based on statistics and the DeepLabv3+ network model, in the initial stage, the specific density of testicular tissue is considered, because the difference of density in different regions produces different gray values, and the segmentation of testicular tissue and surrounding areas is performed according to the statistical characteristics of gray values. For the high contrast between testicle and background in the image, and the relatively consistent pixel value of the object, the situation that other tissues are not obviously fused, the first segmentation can effectively extract the testicular tissue, and calculate the number of pixels.
[0093] Furthermore, the embodiment of the present invention adopts the DeepLabv3+ network model, which fully considers the characteristics and edge contour information of the live chicken testicle CT image, and extracts the testicle-related area to the greatest extent to improve the efficiency and accuracy of segmentation. Compared with the threshold segmentation method, when there is confusion between the testicle part and the intermuscular fat, bone marrow, soft tissue and other tissues, the redundancy of the related areas is high and it is difficult to distinguish. This method can perform segmentation more accurately.
[0094] The gray value threshold segmentation adopted by the method of the present invention is based on the gray value statistical law obtained from a large number of dissected testicles, and has the characteristics of high robustness and high confidence, while the overall method has the advantages of high segmentation efficiency, fast calculation speed, high accuracy, low error rate, and is suitable for real-time processing and analysis, and fully combines the true value measured in breeding, based on the anatomical value, and its process is more in line with the real breeding site needs. In the process of chicken cultivation and breeding, chicken testicles are measured to help the chicken breeding industry to select high-quality seeds and improve the efficiency of high-quality chicken breeding in my country.
[0095] In another specific embodiment, in order to solve the problems of difficulty in predicting the weight of live chicken testicles in the prior art, multiple operation steps, low accuracy, and low efficiency, the embodiment of the present invention designs a live chicken testicle prediction method based on gray value analysis and using gray value as pixel weight after image segmentation. Specifically, Figure 3 The flowchart of the method for predicting the testicle weight of live chicken provided by the embodiment of the present invention is as follows: Figure 3 As shown, the method includes:
[0096] Step 310: Scan the dissected chicken testicle tissue using CT and obtain the grayscale value of each pixel point on the section.
[0097] In this step, as a specific implementation of the present invention, the processing operation process described in step 310 includes:
[0098] Step 311, three-dimensionally reconstruct the original projection format of the live chicken CT, convert the reconstructed data into dicom format data, and then convert it into ordinary png image format.
[0099] Step 312: Select the section with the most pixels and the most complete outline among all the sections, and use OpenCV to read the grayscale value.
[0100] Step 313: Perform statistics based on the grayscale values of the cross-section and draw a grayscale distribution histogram curve.
[0101] Step 320: Obtain a grayscale distribution histogram according to the grayscale value of each section, and count the frequency distribution characteristics of the testicular tissue.
[0102] Step 330: Perform a CT scan on the whole chicken to obtain an effective section that includes the complete outline of the testicle.
[0103] Step 340: According to the calibration result, threshold segmentation and pseudo-color enhancement are performed on the section containing the complete outline of the testicle.
[0104] Step 350: Input the slices after threshold segmentation into the DeepLabv3+ network model for semantic segmentation training.
[0105] Step 360: Count the number of pixels of the output section of the DeepLabv3+ network model, combine the grayscale value of each pixel as a weight feature, and use the catboost algorithm and the anatomical weight value to train the regression model.
[0106] Figure 4 is an overall structural diagram of live chicken testicle segmentation based on gray value analysis and DeepLabv3+ network model provided by an embodiment of the present invention, such as Figure 4 As shown in FIG. 1 , as a specific embodiment of the present invention, after obtaining the dissected chicken testicles, pseudo color enhancement and gray value distribution statistics are first performed. Figure 5 is a schematic diagram of a structure for performing pseudo color enhancement in different directions provided by an embodiment of the present invention, Figure 6 is a schematic diagram of the gray value statistical distribution provided by an embodiment of the present invention, such as Figure 5 and Figure 6 As shown, the DeepLabv3+ network model in S210 includes an encoder and a decoder from front to back. Figure 7 is an architecture diagram of the DeepLabv3+ network model provided by an embodiment of the present invention, such as Figure 7 As shown in the figure, the main body of the encoder is a deep convolutional neural network (DCNN) with dilated convolution. After the dilated convolution is introduced, the receptive field is enlarged without losing information, so that each convolution output contains a larger range of information. The use of DCNN is conducive to extracting multi-scale information. Furthermore, the spatial pyramid pooling module (ASPP) with dilated convolution is introduced to introduce multi-scale information. The DeepLabv3+ network model introduces the encoder-decoder module to further integrate the underlying features with the high-level features to improve the accuracy of boundary segmentation. In addition, the encoder captures the deep semantic feature information of the image through continuous downsampling, and uses the Xception network and the dilated spatial pyramid pooling unit (ASPP) as the encoder part to extract features from the image. The decoder part upsamples this part of the deep semantic feature information to the original position. The ASPP module uses dilated convolution to solve the problem of information loss and image resolution reduction in the downsampling process in semantic segmentation. The encoder Decoder upsamples this part of the deep semantic feature information to the original position. In more detail, Figure 8 FIG. 1 is a schematic diagram of the ASPP module structure in an embodiment of the present invention. Figure 8As shown in the figure, a single ASPP module includes five sub-modules, namely a 1*1 convolution, an average pooling, and three dilation rates of 6, 12, and 18 respectively. The average pooling part also includes 1×1 convolution and upsampling. The five feature maps processed by the five sub-modules are spliced and then fused to obtain the final feature map. The Decoder part uses upsampling to restore the deep global features to 1 / 4 size, and then fuses them with the shallow local features. Finally, the fused features are upsampled four times to restore to the original size of the image and output the final segmentation map.
[0107] The chicken testicle weight prediction method provided by the present invention combines CT imaging, three-dimensional reconstruction, gray value analysis and section pre-selection technology to develop a new live chicken testicle segmentation and prediction process based on three-dimensional imaging technology, and establishes the corresponding gray value standard for the testicles of live chickens for the first time. On this basis, the DeepLabv3+ network is used to achieve testicular segmentation, and the weight is predicted in combination with the anatomical value data collected at the breeding site, solving the application problems such as low accuracy of artificial measurement of testicular phenotype and high slaughter cost, and realizing a framework process for non-destructive, continuous measurement and automatic analysis of testicles at the living body level. Provide guidance for genome selection, genetic improvement, and precise breeding of broilers, and accelerate the progress of breeding research.
[0108] The chicken testicle weight prediction device provided by the present invention is described below. The chicken testicle weight prediction device described below and the chicken testicle weight prediction method described above can be referred to each other.
[0109] Fig. 9 A schematic diagram of the structure of a chicken testicle weight prediction device based on deep learning and gray value calibration provided by an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the device comprises:
[0110] An image acquisition module 910 is used to perform CT scanning on the rooster to be tested, and obtain a CT image of the rooster to be tested containing a complete testicle outline;
[0111] A pre-segmentation module 920, configured to pre-segment the CT image according to grayscale values to obtain a pre-segmentation result of the CT image, wherein the pre-segmentation includes threshold segmentation and pseudo color enhancement;
[0112] A semantic segmentation module 930, configured to input the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model;
[0113] The weight prediction module 940 is used to input the semantic segmentation result of the CT image into a weight prediction model to obtain the weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on the gray value distribution of the sample testicle CT image and the actual weight of the sample testicle.
[0114] The chicken testicle weight prediction device provided by the present invention combines CT imaging, three-dimensional reconstruction, gray value analysis and section pre-selection technology to develop a new live chicken testicle segmentation and prediction process based on three-dimensional imaging technology, and establishes the corresponding gray value standard for the testicles of live chickens for the first time. On this basis, the DeepLabv3+ network is used to achieve testicular segmentation, and the weight is predicted in combination with the anatomical value data collected at the breeding site, solving the application problems such as low accuracy of artificial measurement of testicular phenotype and high slaughter cost, and realizing a framework process for non-destructive, continuous measurement and automatic analysis of testicles at the living body level. Provide guidance for genome selection, genetic improvement, and precise breeding of broilers, and accelerate the progress of breeding research.
[0115] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor (processor) 1010, a communication interface (Communications Interface) 1020, a memory (memory) 930 and a communication bus 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 can call the logic instructions in the memory 1030 to execute the chicken testicle weight prediction method, which includes: performing a CT scan on the rooster to be tested to obtain a CT image of the rooster to be tested that includes a complete testicle outline; obtaining a grayscale distribution histogram curve of the chicken testicle, and pre-segmenting the CT image according to the grayscale distribution histogram curve of the chicken testicle to obtain a pre-segmentation result of the CT image; inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model; inputting the semantic segmentation result of the CT image into a weight prediction model to obtain a weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on the grayscale distribution histogram curve of the sample testicle and the actual weight of the sample testicle.
[0116] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0117] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the chicken testicle weight prediction method provided by the above-mentioned methods, the method comprising: performing a CT scan on a rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicle outline; obtaining a grayscale distribution histogram curve of the chicken testicle, pre-segmenting the CT image according to the grayscale distribution histogram curve of the chicken testicle, and obtaining a pre-segmentation result of the CT image; inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model; inputting the semantic segmentation result of the CT image into a weight prediction model to obtain a weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on the grayscale distribution histogram curve of the sample testicle and the actual weight of the sample testicle.
[0118] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the chicken testicle weight prediction method provided by the above-mentioned methods, the method comprising: performing a CT scan on a rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicle outline; obtaining a grayscale distribution histogram curve of the chicken testicle, pre-segmenting the CT image according to the grayscale distribution histogram curve of the chicken testicle, and obtaining a pre-segmentation result of the CT image; inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model; inputting the semantic segmentation result of the CT image into a weight prediction model to obtain a weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on the grayscale distribution histogram curve of the sample testicle and the actual weight of the sample testicle.
[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0121] Finally, 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A chicken testicle weight prediction method based on deep learning and gray value calibration, characterized in that: include: Performing CT scanning on the rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicle outline; Obtaining a grayscale distribution histogram curve of a chicken testicle, and pre-segmenting the CT image according to the grayscale distribution histogram curve of the chicken testicle to obtain a pre-segmentation result of the CT image; Inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model; The semantic segmentation result of the CT image is input into a weight prediction model to obtain a weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on a grayscale distribution histogram curve of a sample testicle and the actual weight of the sample testicle.
2. The chicken testicle weight prediction method based on deep learning and gray value calibration according to claim 1, characterized in that: The method of obtaining the grayscale distribution histogram curve of the chicken testicle comprises: Obtain CT images of chicken testicles; Based on the CT image of the chicken testicle, three-dimensionally reconstructing the chicken testicle; Based on the result of the three-dimensional reconstruction, a grayscale distribution histogram curve of the chicken testicle is determined.
3. The chicken testicle weight prediction method based on deep learning and gray value calibration according to claim 2, characterized in that: Determining the grayscale value of the chicken testicle based on the result of the three-dimensional reconstruction comprises: Select the section with the most pixels and the most complete contour in the result of 3D reconstruction to read the gray value; Based on the result of the grayscale value reading, a grayscale distribution histogram curve of the chicken testicle is obtained.
4. The chicken testicle weight prediction method based on deep learning and gray value calibration according to claim 1, characterized in that: The semantic segmentation model is the DeepLabv3+ model; The DeepLabv3+ model includes an encoding layer and a decoding layer, the encoding layer includes a deep convolutional neural network and a spatial pyramid pooling module, the deep convolutional neural network is used to extract the global semantic information of the rooster testicle to be tested, and the spatial pyramid pooling module is used to extract the multi-scale deep semantic information of the rooster testicle to be tested; The decoding layer is used to fuse the global semantic information and the multi-scale deep semantic information, and output the fused semantic information.
5. The chicken testicle weight prediction method based on deep learning and gray value calibration according to claim 4 is characterized in that: The spatial pyramid pooling module includes a 1*1 convolutional layer, an average pooling layer, and three dilation rates of 6, 12, and 18 respectively. The step of inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain the semantic segmentation result of the CT image output by the semantic segmentation model comprises: The pre-segmentation result of the CT image is input into the coding layer, the global semantic information of the rooster testicle to be tested is extracted through the deep convolutional neural network of the coding layer, and 1*1 convolution, average pooling and three dilation rates of 6, 12 and 18 are respectively performed through the spatial pyramid pooling module of the coding layer to obtain 1*1 convolution result, average pooling result and dilation rates of 6, 12 and 18 respectively. The 1*1 convolution result, the average pooling result and the dilation rate of 6, 12 and 18 are spliced, and the spliced results are fused through 1*1 convolution to obtain the multi-scale deep semantic information of the rooster testicle to be tested output by the spatial pyramid pooling module; The global semantic information of the rooster testicle to be tested is input into the decoding layer for 1*1 convolution, and then input into the decoding layer together with the multi-scale deep semantic information for feature fusion to obtain the fused semantic information output by the decoding layer.
6. The chicken testicle weight prediction method based on deep learning and gray value calibration according to claim 1 is characterized in that: The weight prediction model is trained by the following process: Based on the grayscale distribution histogram curve of the sample testis, the number of pixels of the sample testis and the grayscale value of each pixel are obtained; The gray value of each pixel and the actual weight of the sample testis are used to construct a sample data set; Based on the sample data set, the weight prediction model is trained using a catboost algorithm.
7. A chicken testicle weight prediction device based on deep learning and gray value calibration, characterized in that: include: An image acquisition module is used to perform CT scanning on the rooster to be tested to obtain a CT image of the rooster to be tested containing a complete testicular outline; A pre-segmentation module, used for pre-segmenting the CT image according to grayscale values to obtain a pre-segmentation result of the CT image, wherein the pre-segmentation includes threshold segmentation and pseudo-color enhancement; A semantic segmentation module, used for inputting the pre-segmentation result of the CT image into a semantic segmentation model to obtain a semantic segmentation result of the CT image output by the semantic segmentation model; The weight prediction module is used to input the semantic segmentation result of the CT image into a weight prediction model to obtain the weight prediction result of the rooster testicle to be tested output by the weight prediction model, wherein the weight prediction model is trained based on the gray value distribution of the sample testicle CT image and the actual weight of the sample testicle.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the chicken testicle weight prediction method based on deep learning and grayscale value calibration as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the chicken testicle weight prediction method based on deep learning and grayscale value calibration as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the chicken testicle weight prediction method based on deep learning and grayscale value calibration as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Follicle ultrasonic processing method and system based on level set image segmentation
CN111192251A
Pig weight estimation method
CN113516071A
Chicken flock uniformity estimation method, device and system based on depth image and medium
CN113989538A
Ultrasonic imaging method and ultrasonic imaging system for fetuses in middle and late pregnancy
CN116322521A
Image segmentation method, weight prediction method and device based on living body CT (Computed Tomography) data
CN116704181A