Broiler testis image processing method and device
By combining coarse and fine segmentation networks and utilizing UNet and FPN structures, the problem of inaccurate segmentation of broiler testicular CT data was solved, achieving high-precision testicular region identification and volume calculation, thus improving the selection efficiency of broiler breeding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA AGRI UNIV
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-23
AI Technical Summary
In existing methods for measuring testes in broilers, the segmentation results of CT data are inaccurate due to limitations in the computing power of edge devices and interference factors in CT data.
A coarse segmentation network was used to segment and crop the testicular region from broiler slice images to obtain the region of interest (ROI) image. A fine segmentation network was then used to extract multi-scale features for accurate segmentation. The network was constructed using the UNet encoder-decoder and FPN structure, and the segmentation effect was optimized by the cross-entropy loss function.
It improves the accuracy of testicular segmentation results in broiler chickens, solves the segmentation difficulty caused by inconsistent testicular region sizes, and achieves high-precision testicular region identification and volume calculation.
Smart Images

Figure CN122265162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method and apparatus for processing images of broiler testicles. Background Technology
[0002] Due to the complexity of poultry traits and their dynamic changes, research on the determination of broiler testes has lagged behind. In the process of breed selection, advanced scientific and technological methods can be used to identify superior breeds in the early stages of breeding, which can reduce the huge workload while expanding the number of dominant populations and shorten the breeding process.
[0003] Although factors such as nutrition, endocrine function, and light exposure regulate the growth and development of rooster testes, these factors actually have a smaller impact on chicken breeding compared to genetic factors. Therefore, selecting well-developed live chickens is crucial for improving the reproductive traits of roosters. However, most indicators of testicular growth and development can only be obtained after slaughter, including the overall weight of the testes, the individual weight of both testes, and testicular-related indices. If these indicators are to be used for selection in the current chicken breeding process, a large number of slaughter operations must be carried out. This method is cumbersome and very costly, and it is clearly not feasible to select chickens after slaughter.
[0004] In related technologies, the existing method for measuring broiler testes involves inputting the CT (Computed Tomography) data of the entire broiler into an image segmentation model to obtain the segmentation results of the broiler testes, and then measuring testis-related indicators based on these results. Due to the limitations of the computing power of existing edge devices, the segmentation effect of directly using CT images is poor. Furthermore, since the testes of different broilers are of varying sizes and the testis region accounts for a relatively small proportion, most of the information space belongs to irrelevant areas. This leads to interference from other non-testis organs and soft tissues in the broiler, resulting in inaccurate broiler testis segmentation results, which in turn affects the accuracy of subsequent measurement results. Summary of the Invention
[0005] This invention provides a method and apparatus for processing images of broiler testes, which solves the defects of the prior art in obtaining broiler teste segmentation results by using broiler CT data for image segmentation. These defects are caused by the limitation of the computing power of edge devices and the large number of interference factors in CT data.
[0006] This invention provides a method for processing images of broiler testes, comprising: Based on a coarse segmentation network, the testicular region of the broiler chicken is segmented from the sliced image of the target broiler chicken and cropped to obtain the region of interest (ROI) image of the testis. Multi-scale features are extracted from the testicular ROI image based on the fine segmentation network, and the testicular ROI image is segmented according to the multi-scale features to obtain the target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
[0007] According to the present invention, a method for processing broiler testis images is provided, wherein the coarse segmentation network includes a head detection head and a localization detection head; the coarse segmentation network is constructed based on the Mosaic data augmentation mechanism, Focus structure, CSP structure, FPN structure, PAN structure, and CBAM attention mechanism.
[0008] According to the present invention, a method for processing broiler testis images is provided, wherein the fine segmentation network is cascaded with the coarse segmentation network through the FPN structure; The fine-segmentation network uses the cross-entropy loss function to calculate the corresponding segmentation loss.
[0009] According to the present invention, a method for processing broiler testis images is provided, wherein the slice image of the target broiler is obtained through the following steps: Obtain computed tomography (CT) scan data of the target broiler chicken; The CT data was processed by Hu threshold adjustment and format conversion to obtain multiple slice images.
[0010] According to the broiler testis image processing method provided by the present invention, after obtaining the target segmentation result, the method further includes: The testicular volume of the target broiler chicken is calculated based on the voxel statistical accumulation algorithm and the target segmentation results; The testicular weight of the target broiler chicken is calculated based on the testicular volume.
[0011] The present invention also provides a broiler testis image processing device, comprising: The coarse segmentation module is used to segment the testicular region of the target broiler chicken from the sliced image of the target broiler chicken based on the coarse segmentation network and crop it to obtain the testicular region of interest (ROI) image; The fine segmentation module is used to extract multi-scale features from the testicular ROI image based on the fine segmentation network, and to segment the testicular ROI image according to the multi-scale features to obtain the target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
[0012] According to the present invention, a broiler testis image processing device further includes: The calculation module is used to calculate the testicular volume of the target broiler chicken based on the voxel statistical accumulation algorithm and the target segmentation result after the target segmentation result is obtained; The testicular weight of the target broiler chicken is calculated based on the testicular volume.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the broiler testis image processing method described above.
[0014] 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 the broiler testis image processing method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the broiler testis image processing method described above.
[0016] The broiler testis image processing method and apparatus provided by this invention segment the broiler testis region from a slice image of a target broiler using a coarse segmentation network and crop it to obtain a region of interest (ROI) image. Then, a fine segmentation network is used to extract multi-scale features from the testis ROI image and segment the testis ROI image according to the multi-scale features to obtain the target segmentation result. This effectively solves the segmentation difficulty caused by the varying sizes of the chicken testis region and improves the accuracy of broiler testis segmentation results. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is one of the flowcharts illustrating the broiler testis image processing method provided by the present invention.
[0019] Figure 2 This is a schematic diagram of the image segmentation process based on a coarse segmentation network provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the image segmentation process based on a fine segmentation network provided by the present invention.
[0021] Figure 4 This is a schematic diagram of the image segmentation process based on the joint coarse segmentation network and fine segmentation network provided by the present invention.
[0022] Figure 5 This is the second flowchart of the broiler testis image processing method provided by the present invention.
[0023] Figure 6 This is a schematic diagram of the structure of the broiler testis image processing device provided by the present invention.
[0024] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] The following is combined with Figures 1-6 The present invention describes a method and apparatus for processing images of broiler testes.
[0027] Figure 1 This is one of the flowcharts illustrating the broiler testis image processing method provided by the present invention, such as... Figure 1 As shown, the method includes the following steps: Step 110: Based on the coarse segmentation network, segment the testicular region of the target broiler chicken from the slice image and crop it to obtain the region of interest (ROI) image of the testis.
[0028] In this step, the target broiler chicken can be of different breeds, such as white-feathered broiler chickens and yellow-feathered broiler chickens.
[0029] In this step, a coarse segmentation network is used to quickly locate the target (chicken testicle) in the full-frame CT slice and eliminate a large number of background interference slice images.
[0030] In this step, the coarse segmentation network can be a YOLOv5 model, used to batch filter slices containing the testicular ROI region from all live chicken CT data to achieve rapid automatic localization, while coarsely segmenting the testicular region in the slices.
[0031] In this embodiment, after segmenting the broiler testis region from the sliced image, the following cropping process is performed: the slice containing the broiler testis ROI (Region of Interest) is processed by expanding the detection box outward by some pixels to crop the ROI region of the live chicken testis and obtain the corresponding testis ROI image.
[0032] For example, slices containing the testicular region of live chickens are cropped, and after automatic positioning is completed, these CT images are cropped by extending the detection box position outward by ten pixels according to the output of the previous step. This achieves coarse segmentation post-processing of the testicular region of live chickens, while ensuring that the testicular edge information can be completely preserved in the ROI image regardless of whether the breed is large or small, thus eliminating the field of view error caused by breed differences.
[0033] Furthermore, in step 110, the coarse segmentation network includes a head detection head and a localization detection head; the coarse segmentation network is constructed based on the Mosaic data augmentation mechanism, Focus structure, CSP structure, FPN structure, PAN structure, and CBAM attention mechanism.
[0034] In this embodiment, the coarse segmentation network adopts a four-head detection structure: a head detection head (including three detectors, used for large, medium and small target detection respectively) and a localization detection head.
[0035] In this embodiment, the neck structure of the coarse segmentation network uses FPN+PAN to fuse features from different dimensions. FPN transmits strong semantic features from top to bottom, while PAN enhances localization features from bottom to top.
[0036] In this embodiment, addressing the issue of the extremely small proportion of chicken testicles, the coarse segmentation network adds a localization detection head to locate the testicles. Combined with its three built-in detection heads, this allows for more effective localization and detection of the testicles in CT images. It also integrates a Convolutional Block Attention Module (CBAM); the Head structure is used to output the target detection results.
[0037] In this embodiment, during the training phase, the coarse segmentation network stitches together multiple images using the Mosaic data augmentation mechanism to increase background complexity and the number of samples containing small targets.
[0038] In this embodiment, the backbone of the coarse segmentation network includes a Focus structure and a CSP structure. The Focus structure is used to slice the input image to reduce computation and preserve information, while the CSP (Cross Stage Partial) structure is used for feature splitting to alleviate gradient vanishing.
[0039] In this embodiment, during the feature fusion stage, the coarse segmentation network uses the CBAM attention mechanism to integrate the channel and spatial dimensions to alleviate problems such as blurred CT images of broiler chickens, low contrast, small testicular region proportion, and adhesion to other tissues and organs.
[0040] In this embodiment, the coarse segmentation network consists of a backbone, a neck, and a head structure from front to back. The backbone uses a focus and CSP structure. The focus module slices the image before it enters the backbone. The CSP structure divides the original input into two branches, CSP1_X and CSP2_X. Compared to CSP1_X, CSP2_X replaces the Resunit with 2*X CBLs. Using the CSP structure reduces the model size and effectively alleviates the gradient vanishing problem. The neck design uses an FPN+PAN structure, and the CBAM attention mechanism is introduced at this stage. The FPN uses top-down side connections to construct a high-level semantic feature map and feature pyramid structure. However, since the target information at the bottom layer becomes relatively blurry after passing through multiple layers of the network, the PAN adds a bottom-up route to compensate for and strengthen the localization information. The main part of the head structure consists of the original three detectors and the newly added detector.
[0041] The coarse segmentation network in this embodiment solves the problem of traditional models easily missing or misdetecting small targets (tiny testes) and low contrast (CT soft tissue) by setting up a four-detector structure and combining it with the CBAM attention mechanism. At the same time, the coarse segmentation network adopts a combination of Focus, CSP and FPN+PAN, which can ensure high-precision localization and improve the computation speed.
[0042] Figure 2 This is a schematic diagram of the image segmentation process based on a coarse segmentation network provided by the present invention. Figure 2 In the illustrated embodiment, the coarse segmentation network includes inputs (Training / Testing images), a data augmentation module, a feature extraction layer, a four-head detector structure, and outputs (Ground Truth, Prediction). The data augmentation module includes three units: Data Augmentation, Mosaic, and Traditional distortion. The gray cubes arranged from largest to smallest are feature maps of different levels within the network extracted by the feature extraction layer, and the four heads represent the four-head detector structure.
[0043] Step 120: Extract multi-scale features from the testicular ROI image based on the fine segmentation network, and segment the testicular ROI image according to the multi-scale features to obtain the target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
[0044] In this step, a UNet-based encoder-decoder network is used for segmentation, and an FPN structure is used to fuse multi-scale feature information of broiler testes for accurate segmentation, outputting the segmentation results.
[0045] Specifically, the cropped testicular ROI image is input into a fine segmentation network to segment the testicular region of a live chicken. The fine segmentation network uses the UNet framework for segmentation, whose skip connections enhance feature propagation throughout the network, effectively mitigating the gradient vanishing problem and improving feature reuse. Additionally, this embodiment embeds an FPN module into the fine segmentation network to accurately segment the chicken testicular region in conjunction with the local image output from the coarse segmentation network.
[0046] In this embodiment, a layer is reduced from U-Net to prevent overfitting of the model due to low-resolution data.
[0047] In this embodiment, the fine segmentation network performs three downsampling operations and three linear interpolation upsampling operations; at the same time, a feature pyramid network structure is incorporated into the fine segmentation network, which can extract features from images at each scale and generate multi-scale feature representations, ultimately effectively improving the segmentation efficiency of the live chicken testis region.
[0048] In this embodiment, the fine segmentation network is cascaded with the coarse segmentation network through an FPN structure.
[0049] In this embodiment, the fine segmentation network and the coarse segmentation network form a cascaded network. The two are connected through an FPN structure and work together to achieve rapid automatic localization and accurate segmentation of the testicular region in broiler CT images, thereby improving the efficiency and accuracy of segmentation.
[0050] Figure 3 This is a schematic diagram of the image segmentation process based on a fine segmentation network provided by the present invention. Figure 3 In the illustrated embodiment, the fine-segmentation network includes the following structure: (1) Encoder network (input is " H * W The image size corresponds to *3”. The downsampling operation consists of a series of convolutions and Max Pooling. In each downsampling operation, the encoder network doubles the number of feature channels. Two 3×3 convolutions are used repeatedly. Each convolutional layer has a ReLU activation function and a 2×2 max pooling with a stride of 2 for downsampling. After each downsampling, the number of feature maps is multiplied by 2.
[0051] (2) Decoder network, each step includes linear upsampling and two 3×3 convolutions, and the number of feature channels is halved. Similarly, each convolution is followed by a ReLU activation function. In the last layer of the decoder network, 1×1 convolutions are used to map each feature vector to the desired number of categories.
[0052] The FPN structure includes bottom-up paths, top-down paths, and lateral connections. The backbone of the bottom-up path is the forward feedback computation of ConvNet, used to compute feature layers composed of multi-scale feature maps, with a stride of 2 for feature compression. The arrows corresponding to "copy and crop" indicate "skip connections"; "conv 3x3 ReLU" indicates a standard convolution operation (i.e., using a 3×3 convolution kernel to extract features, followed by a ReLU activation function to introduce non-linearity); "maxpool 2×2" indicates "max pooling"; "up-conv 2×2" indicates "up convolution"; "conv 1x1" indicates "1x1 convolution"; and "up-cat" indicates upsampling.
[0053] It should be noted that each feature compression is a pyramid feature stage, and the output of the last layer of each stage is selected as the reference feature map set in this embodiment. The top-down path obtains higher resolution features by upsampling spatially coarser but semantically richer feature maps from higher pyramid levels. These features are enhanced from the bottom-up path through lateral connections. Each lateral connection merges feature maps of the same spatial size from the bottom-up path and the top-down path.
[0054] For coarser resolution feature maps, this embodiment sets the spatial resolution upsampling to 2 times. Then, by pixel-by-pixel addition, the upsampled map is merged with the corresponding bottom-up map. This process is repeated until the original resolution image, i.e., the target segmentation result (corresponding to size ""), is generated. H * W The image is a 2” image containing the image region corresponding to the testicles of broilers.
[0055] In this embodiment, the fine-segmentation network uses the cross-entropy loss function to calculate the corresponding segmentation loss.
[0056] Specifically, the cross-entropy loss function is expressed by the following formula: ; in, For the first i One sample, Indicates the number of categories. This represents the true distribution of the sample, assuming the predicted class and the sample class are the same. Select 1 if the value is 1, otherwise select 0. This represents the distribution predicted by the model, i.e., the category to which the sample belongs. The probability of.
[0057] Figure 4 This is a schematic diagram of the image segmentation process based on the joint coarse segmentation network and fine segmentation network provided by the present invention. Figure 4 In the illustrated embodiment, the upper dashed area represents the coarse segmentation network, and the lower dashed area represents the fine segmentation network. In the first stage, the sliced image is input into the coarse segmentation network for data augmentation and multi-head detection, and the output of the first stage (i.e., A1-Output) is cropped to obtain the testicular ROI image. In the second stage, the testicular ROI image is input into the fine segmentation network, which segments the testicular ROI image based on the extracted multi-scale features to obtain the target segmentation result.
[0058] The broiler testis image processing method provided in this invention uses a coarse segmentation network to segment the broiler testis region from a slice image of the target broiler and crop it to obtain a region of interest (ROI) image. Then, a fine segmentation network is used to extract multi-scale features from the testis ROI image and segment the testis ROI image according to the multi-scale features to obtain the target segmentation result. This method effectively solves the segmentation difficulty caused by the varying sizes of the chicken testis region and improves the accuracy of broiler testis segmentation results.
[0059] In some embodiments, slice images of the target broiler chicken are obtained through the following steps: acquiring computed tomography (CT) data of the target broiler chicken; performing Hu threshold adjustment and format conversion on the CT data to obtain multiple slice images.
[0060] In this embodiment, the Hounsfield Unit (HU) is applied to "window width and window level adjustment" in medical image processing. Based on the physical characteristics of broiler testes as soft tissue, it retains grayscale information within a specific density range and filters out interference from bones (high density) and air (low density), thereby enhancing image contrast.
[0061] In this embodiment, medical-grade three-dimensional voxel data can be converted into standardized two-dimensional slice sequences that can be directly read and processed by computer vision models (such as YOLOv5 and UNet) through format conversion.
[0062] Specifically, a CT scanner is used to scan live chickens, with the scanning area covering the entire visible range of the X-ray source, to obtain CT images of the live chickens. The CT images of the live chickens are then preprocessed, including reconstructing 3D CT images using a reverse filtering projection algorithm, independently adjusting the window width and window level for each CT image to scale the appropriate grayscale range, and converting the cross-section into a 2D cross-sectional image using the cross-section as the standard image.
[0063] In some embodiments, the labeled broiler CT data can be divided into training data and test data, with a ratio of 9:1 for training set and test set, for use in subsequent image segmentation process.
[0064] The broiler testis image processing method provided in this embodiment of the invention acquires computed tomography (CT) data of the target broiler; performs Hu threshold adjustment and format conversion on the CT data to obtain multiple slice images; Hu threshold adjustment specifically enhances the characteristic expressiveness of testicular soft tissue, effectively solving the problem of low soft tissue contrast; format conversion unifies the format between medical image data and deep learning algorithms, ensuring data imaging quality.
[0065] In one embodiment, after obtaining the target segmentation result, the broiler testis image processing method further includes: calculating the testis volume of the target broiler based on the voxel statistical accumulation algorithm and the target segmentation result; and calculating the testis weight of the target broiler based on the testis volume.
[0066] In this embodiment, the testicular volume can be calculated based on the segmentation results. The pixel statistics accumulation method is used to perform pixel statistics on the testicles in each slice, thereby calculating the volume of the broiler testicles and fitting the weight.
[0067] Specifically, firstly, the number of pixels in the chicken testicles of each slice is counted. Then, the number of pixels in each slice is summed. Finally, the volume of the chicken testicle is calculated based on the voxel size and the total number of pixels, and this calculation is input into a regression model to predict testicular weight. The formula for calculating chicken testicular volume is shown below: ; in, This refers to the volume of a chicken's testicles. Voxel size, The number of slices containing chicken testicles. This represents the number of testicular pixels in each slice.
[0068] In this embodiment, the regression model can be a weight prediction model, which is trained based on the pixel distribution information corresponding to the target part image sample and the actual weight of the target part corresponding to the target part image sample.
[0069] The broiler testis image processing method provided in this invention calculates the testis volume of the target broiler by using a voxel statistical accumulation algorithm and target segmentation results; and calculates the testis weight of the target broiler based on the testis volume, providing a high-quality breeding scheme for the chicken breeding industry, thereby improving the efficiency of high-quality chicken breeding.
[0070] Figure 5 This is the second flowchart of the broiler testis image processing method provided by the present invention. Figure 5 In the illustrated embodiment, the method includes the following steps: acquiring live CT data of the target breed of chicken, preprocessing the live CT image of the broiler (same as the live CT data), then performing coarse segmentation of the obtained slice image by ROI region localization, cropping the ROI region of the broiler testis; then performing fine segmentation of the testis target, and finally performing testis weight prediction based on voxel statistics.
[0071] The broiler testis image processing device provided by the present invention is described below. The broiler testis image processing device described below and the broiler testis image processing method described above can be referred to in correspondence.
[0072] Figure 6 This is a schematic diagram of the broiler testis image processing device provided by the present invention, as shown below. Figure 6 As shown, the broiler testis image processing device includes: a coarse segmentation module 610 and a fine segmentation module 620.
[0073] The coarse segmentation module 610 is used to segment the testicular region of the broiler chicken from the sliced image of the target broiler chicken based on the coarse segmentation network and crop it to obtain the testicular region of interest (ROI) image. The fine segmentation module 620 is used to extract multi-scale features from the testicular ROI image based on the fine segmentation network, and to segment the testicular ROI image according to the multi-scale features to obtain the target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
[0074] The broiler testis image processing device provided in this embodiment of the invention segments the broiler testis region from the slice image of the target broiler through a coarse segmentation network and crops it to obtain a region of interest (ROI) image of the testis. Then, a fine segmentation network is used to extract multi-scale features from the testis ROI image and segment the testis ROI image according to the multi-scale features to obtain the target segmentation result. This effectively solves the segmentation difficulty caused by the different sizes of the chicken testis region and improves the accuracy of the broiler testis segmentation result.
[0075] In some embodiments, the broiler testis image processing device further includes a computing module 630.
[0076] The calculation module 630 is used to calculate the testicular volume of the target broiler chicken based on the voxel statistical accumulation algorithm and the target segmentation result after obtaining the target segmentation result; The testicular weight of the target broiler chicken is calculated based on the testicular volume.
[0077] The broiler testis image processing device provided in this embodiment of the invention calculates the testis volume of the target broiler by using a voxel statistical accumulation algorithm and target segmentation results; and calculates the testis weight of the target broiler based on the testis volume, thereby providing a high-quality breeding scheme for the chicken breeding industry and improving the efficiency of high-quality chicken breeding.
[0078] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communication bus 740. The processor 710, communications interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a broiler testis image processing method. This method includes: segmenting the broiler testis region from a slice image of a target broiler using a coarse segmentation network and cropping it to obtain a region of interest (ROI) image; extracting multi-scale features from the testis ROI image using a fine segmentation network and segmenting the testis ROI image according to the multi-scale features to obtain a target segmentation result; wherein the fine segmentation network is constructed based on the UNet encoder-decoder and FPN structure.
[0079] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0080] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the broiler testis image processing method provided by the above methods. The method includes: segmenting the broiler testis region from a slice image of a target broiler using a coarse segmentation network and cropping it to obtain a testis region of interest (ROI) image; extracting multi-scale features from the testis ROI image using a fine segmentation network and segmenting the testis ROI image according to the multi-scale features to obtain a target segmentation result; wherein the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet to construct the broiler testis image processing method.
[0081] In another aspect, the present invention also provides a computer program product, which includes a computer program that 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 broiler testis image processing method provided by the above methods. The method includes: segmenting the broiler testis region from a slice image of a target broiler based on a coarse segmentation network and cropping it to obtain a testis region of interest (ROI) image; extracting multi-scale features from the testis ROI image based on a fine segmentation network and segmenting the testis ROI image according to the multi-scale features to obtain a target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
[0082] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for image processing of broiler testes, characterized in that, include: Based on a coarse segmentation network, the testicular region of the broiler chicken is segmented from the sliced image of the target broiler chicken and cropped to obtain the region of interest (ROI) image of the testis. Multi-scale features are extracted from the testicular ROI image based on the fine segmentation network, and the testicular ROI image is segmented according to the multi-scale features to obtain the target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
2. The method for processing broiler testis images according to claim 1, characterized in that, The coarse segmentation network includes a head detection head and a localization detection head; the coarse segmentation network is constructed based on the Mosaic data augmentation mechanism, Focus structure, CSP structure, FPN structure, PAN structure, and CBAM attention mechanism.
3. The method for processing broiler testis images according to claim 1, characterized in that, The fine segmentation network is cascaded with the coarse segmentation network through the FPN structure; The fine-segmentation network uses the cross-entropy loss function to calculate the corresponding segmentation loss.
4. The method for processing broiler testis images according to claim 1, characterized in that, The slice image of the target broiler chicken was obtained through the following steps: Obtain computed tomography (CT) scan data of the target broiler chicken; The CT data was processed by Hu threshold adjustment and format conversion to obtain multiple slice images.
5. The method for processing broiler testis images according to claim 1, characterized in that, After obtaining the target segmentation result, the method further includes: The testicular volume of the target broiler chicken is calculated based on the voxel statistical accumulation algorithm and the target segmentation results; The testicular weight of the target broiler chicken is calculated based on the testicular volume.
6. A broiler testicle image processing device, characterized in that, include: The coarse segmentation module is used to segment the testicular region of the target broiler chicken from the sliced image of the target broiler chicken based on the coarse segmentation network and crop it to obtain the testicular region of interest (ROI) image; The fine segmentation module is used to extract multi-scale features from the testicular ROI image based on the fine segmentation network, and to segment the testicular ROI image according to the multi-scale features to obtain the target segmentation result; wherein, the fine segmentation network is constructed based on the encoder-decoder and FPN structure of UNet.
7. The broiler testis image processing device according to claim 6, characterized in that, The device further includes: The calculation module is used to calculate the testicular volume of the target broiler chicken based on the voxel statistical accumulation algorithm and the target segmentation result after the target segmentation result is obtained; The testicular weight of the target broiler chicken is calculated based on the testicular volume.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the broiler testis image processing method as described in any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the broiler testis image processing method as described in any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the broiler testis image processing method as described in any one of claims 1 to 5.