Peking duck liver volume calculation method based on CT image
By using the improved lightweight neural network model MSDA_UNet++, combined with depthwise separable convolution and multi-scale channel attention mechanism, the problems of lossless accuracy and computational load in liver volume measurement of living Peking ducks were solved, and fast and efficient liver volume calculation was achieved.
Patent Information
- Application Number
- CN202510548272.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-09-26
AI Technical Summary
When measuring the liver volume of living Peking ducks, existing technologies have problems such as insufficient non-destructive measurement accuracy, high computing load, and large hardware resource requirements, making it difficult to meet real-time requirements.
An improved lightweight neural network model MSDA_UNet++ is used, combined with depthwise separable convolution and lightweight upsampling to reduce the model computational complexity and parameter quantity. A multi-scale channel attention mechanism is introduced to enhance the feature expression capability for CT image segmentation of the liver volume of living Peking ducks.
The speed and accuracy of liver volume calculation are improved, the computational load is reduced, fast and lossless liver volume measurement of living Peking ducks is achieved, and segmentation accuracy and performance are improved.
Smart Images

Figure CN120707846A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CT image processing, and in particular to a method for calculating the liver volume of a Peking duck based on a CT image. Background Art
[0002] The liver volume of Pekin ducks is influenced by multiple factors, including genetics and the environment, and there is considerable variation between individuals, making it difficult to breed ducks with superior liver quality. Therefore, how to quickly and accurately measure the liver volume of Pekin ducks is crucial for improving liver quality and profitability.
[0003] There are two main traditional methods for measuring the liver volume of Peking ducks. One is to measure the liver's weight and volume directly after slaughter. While accurate, this method destroys the liver's integrity and cannot be used for live duck breeding and screening. The other is to use ultrasound to scan the liver of a live duck and estimate the liver's volume based on its area and thickness. Although this method is non-destructive, it is limited by the ultrasound equipment and cannot capture the liver's three-dimensional structure. It also requires high operator skill and is prone to errors. Therefore, a new method is needed to perform three-dimensional, non-destructive measurement of the liver of a live duck to improve the accuracy and efficiency of the measurement.
[0004] Existing technology uses ShuffleNetV2 to automatically select CT images containing the liver, and then performs segmentation based on UNet++. The UNet++ model is an enhanced version of the UNet model. It adds dense connections to the UNet model, which further improves the model's accuracy, especially when processing complex biomedical images. However, UNet++ still faces some challenges when processing CT images of small individuals such as Peking ducks. Secondly, due to its complex dense connection structure, the UNet++ model leads to a significant increase in the number of parameters and computational complexity, which places higher demands on hardware resources. In actual production environments, especially when large amounts of data need to be processed efficiently, this high computational load makes it difficult to meet real-time requirements. In order to reduce the computational load while maintaining high accuracy, further improvements to UNet++ are needed. Therefore, a new liver CT image segmentation method is urgently needed to improve the existing segmentation accuracy and ultimately achieve rapid and lossless calculation of the liver volume of living Peking ducks. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for calculating the liver volume of a Peking duck based on CT images, comprising:
[0006] Step 1: Obtain a CT scan sequence of a living Peking duck and construct a PNG format CT image of the Peking duck abdomen;
[0007] Step 2: The abdominal CT image of the Beijing duck obtained in step 1 is labeled to determine whether it contains the liver, and is classified based on the high-performance classification model ShuffleNetV2 to obtain a CT image containing only the liver;
[0008] Step 3: Label the liver region of the CT image containing only the liver in step 2, and use the improved lightweight neural network model MSDA_UNet++ to perform segmentation processing to obtain the liver region segmentation result of the CT image;
[0009] The improved lightweight neural network model MSDA_UNet++ uses depthwise separable convolution and lightweight upsampling. In each encoder stage, the number of convolution channels is halved for feature extraction, and then the features are fused with the downsampled features from the previous stage using concatenation. An improved multi-scale channel attention mechanism is introduced to enhance the feature representation capability of detail branches.
[0010] Step 4: Based on the liver region segmentation result obtained in step 3, the predicted liver volume and the correlation index between the predicted liver volume and the actual liver volume are calculated.
[0011] Step 1 is as follows:
[0012] Using Xiaosaikankan CT image analysis software, we selected a window width of 217, a window level of 36, and used histogram equalization to convert the Beijing duck abdominal CT image from DICOM format to PNG format.
[0013] The formula for calculating the predicted liver volume in step 4 is as follows:
[0014]
[0015] Where V is the liver volume of the Peking duck in cubic centimeters, S is the voxel set during the CT scan of the Peking duck, n is the number of slices in all CT slice sequences of a Peking duck that are classified as containing liver slices after the first stage classification task, and p i is the number of pixels in the liver area in the i-th slice.
[0016] The encoder of the improved lightweight neural network model MSDA_UNet++ is divided into two data channels. One channel is sequentially connected to concat after passing through BN, ReLU, DW3*3 convolution, BN, ReLU, DW3*3 convolution, and the other channel is connected to concat after passing through the improved multi-scale channel attention mechanism, and concat is then output through Channel shuffle.
[0017] The improved multi-scale channel attention mechanism includes a first data channel and a second data channel. The second data channel is directly connected to the multiplier and then output; the first data channel is divided into a first sub-data channel, a second sub-data channel, a third sub-data channel, and a fourth sub-data channel after 5*5 convolution. The first sub-data channel is directly connected to concat, the second sub-data channel is sequentially connected to concat through 1*7 convolution and 7*1 convolution, the third sub-data channel is sequentially connected to concat through 1*11 convolution and 11*1 convolution, and the fourth sub-data channel is sequentially connected to concat through 1*21 convolution and 21*1 convolution. Concat is connected to the multiplier through 1*1 convolution and then output.
[0018] The beneficial effects of the present invention are:
[0019] 1. The improved lightweight neural network model proposed in the present invention can reduce the computational complexity and parameter amount of the model, realize model lightweighting, reduce the parameter amount while supplementing detail information, and enhance the feature expression ability of detail branches.
[0020] 2. The improved lightweight neural network model proposed in this invention can not only obtain more low-level detail information, but also more effectively capture the characteristics of target areas of varying sizes in the image, improve the feature fusion capability, enhance the segmentation accuracy of the model, and further improve the speed and performance of liver volume calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for calculating the liver volume of a Peking duck based on CT images of the present invention;
[0022] Figure 2 (a) (b) are schematic diagrams of CT images of the abdomen of Beijing duck;
[0023] Figure 3 (a) (b) Schematic diagram of the network model structure for Beijing duck liver classification;
[0024] Figure 4(a) is a schematic diagram of the structure of MSDA_UNet++;
[0025] Figure 4(b) is a schematic diagram of the improved encoder structure;
[0026] Figure 4(c) shows the improved convolution,X i,j ,j>0 structural diagram;
[0027] Figure 4(d) is a schematic diagram of the structure of the improved lightweight upsampling;
[0028] Figure 5 (a)(b) are schematic diagrams of the Beijing duck liver region segmentation results. DETAILED DESCRIPTION
[0029] The present invention proposes a method for calculating the liver volume of a Peking duck based on CT images, which will be further described below with reference to the accompanying drawings and specific embodiments.
[0030] Figure 1 The flowchart of the method for calculating the liver volume of a Peking duck based on CT images of the present invention specifically includes:
[0031] Step 1: Obtain a live Peking duck CT scan sequence and construct a PNG format CT image of the Peking duck abdomen. Specifically, use the Xiaosaikankan CT image analysis software, select a window width of 217, a window level of 36, and use histogram equalization. Finally, convert it from DICOM format to PNG format.
[0032] Step 2: Label the abdominal CT images of Peking ducks to see whether they contain livers. Based on the abdominal CT images of Peking ducks, a Peking duck liver classification dataset is constructed. The high-performance ShuffleNetV2 model is used to train the Peking duck classification neural network model. The classification results of the Peking duck classification dataset and CT images containing only livers are obtained.
[0033] Specifically, veterinary medical experts identified and annotated CT images of the Pekin duck abdomen to generate a Pekin duck liver classification dataset. Extensive comparative experiments with mainstream image classification models ultimately led to the selection of ShuffleNetV2 as the classification model. This model was then trained on the Pekin duck liver classification data to develop an efficient neural network model for Pekin duck liver classification. A sequence of Pekin duck abdominal CT images was sequentially fed into the neural network model. After recognition, the resulting classification results and liver CT images were generated.
[0034] Step 3: Annotate the liver region based on the CT image containing the liver, construct a liver segmentation dataset, use the improved lightweight neural network model MSDA_UNet++ for segmentation processing, train the liver segmentation neural network model, and obtain the liver region segmentation result of the liver CT image.
[0035] The annotated images were divided into training, validation, and test sets in a ratio of 8:1:1 to construct a Peking duck liver segmentation dataset. The original target segmentation network structure was improved, and the convolution module of the original UNet++ network was replaced with the Depthwise Separable Convolution (DW). This convolution can reduce the model's computational complexity and parameter count, achieving model lightweighting. Furthermore, at each encoder stage, the number of convolution channels was halved compared to the original model for feature extraction. This feature was then fused with the downsampled features from the previous stage (called the low-level detail branch, LDB) using concat, supplementing its detail information while reducing its parameter count. An improved Multi-Scale Channel Attention (MSCA) mechanism was introduced to enhance the feature expression capability of the detail branch. This structure not only allows for more low-level detail information to be obtained, but also allows for more effective capture of target region features of varying sizes in the image through the MSCA mechanism. Finally, the concatenated results are shuffled using the Channel Shuffle strategy, which improves the feature fusion capability, better captures complex patterns and details in the image, and enhances the segmentation accuracy of the model. This allows for the construction of a lightweight neural network model structure for Beijing duck liver segmentation.
[0036] Step 4: Based on the liver region segmentation result of the liver CT image, the predicted liver volume and the Pearson correlation coefficient between the predicted liver volume and the actual liver volume are calculated.
[0037] The formula for calculating the liver volume of Peking duck is as follows:
[0038]
[0039] Where V is the liver volume of the Peking duck in cubic centimeters, S is the voxel set during the CT scan of the Peking duck, n is the number of slices in all CT slice sequences of a Peking duck that are classified as containing liver slices after the first stage classification task, and p i is the number of pixels in the liver area in the i-th slice.
[0040] The calculation formula of Pearson correlation coefficient is as follows:
[0041]
[0042] X i and Y i are the i-th values in the sample data respectively. and are the means of X and Y, respectively. This formula is used to measure the linear correlation between two variables, and its value range is between -1 and 1. A value of 1 indicates a perfect positive correlation, a value of -1 indicates a perfect negative correlation, and a value of 0 indicates no linear correlation.
[0043] The CT images collected in this embodiment were collected at the Nankou Breeding Duck Farm in Beijing. Figure 2 As shown in (a) and (b), a total of 8,154 abdominal CT images of 26 Pekin ducks were collected. The Pekin duck abdominal CT images were annotated, and the CT images containing the liver were annotated. Finally, 1,744 positive sample CT images containing the liver and 6,410 negative sample CT images not containing the liver were obtained. To reduce the imbalance between positive and negative samples, data augmentation was performed using rotation, cropping, and flipping. The positive samples were expanded to 8,720 and the negative samples to 8,360, resulting in a total of 17,080 Pekin duck liver classification datasets. The annotated images were divided into a training set of 13,664, a validation set of 1,708, and a test set of 1,708, in a ratio of 8:1:1. The Pekin duck liver segmentation dataset totaled 8,720, and the annotated images were also divided into a training set of 6,976, a validation set of 872, and a test set of 872, in a ratio of 8:1:1.
[0044] This example conducts comparative experiments on the mainstream image classification models RepVGG, MobileNetV2, ResNet, DenseNet, ShuffleNetV2, ResNet, ResNext, Poolformer, and EfficientNetV2, and ultimately determines ShuffleNetV2 as the classification model. Its network structure is as follows: Figure 3 As shown in (a) and (b), the classification accuracy rate in the 13,386 Beijing duck liver classification dataset is 99.58%, which has a very high classification accuracy, and the number of parameters is only 699,000, and the number of calculations is only 100.8 million.
[0045] Figure 4(a) is a schematic diagram of the structure of the Multi-Scale Detail Augmentation UNet++Network (MSDA_UNet++). In this network structure, there are five encoders X i,0 (i=0,1,2,3,4), 4 decoders, X i,j (i+j=4,i>=0,j>0) and use X i,j(i+j<4,i>=0,j>0) further extracts features to fill the semantic gap between high and low layers, and is composed of skip connections and lightweight upsampling modules; the input channels of the encoder in these five stages are {3, 64, 128, 256, 512}, and the output channels are {64, 128, 256, 512, 1024}, especially X 0,0 The number of input channels in the stage is 3. After the first DW3*3 convolution of the first data channel on the left side of the encoder structure in Figure 4(b), it becomes 61 channels and the second data channel on the right side maintains 3 channels after detail enhancement. Then the results of the two branches are concat, and Channel Shuffle is used to obtain the output of the first stage with 64 channels. The overall structure of the following four encoder stages is also shown in Figure 4(b), but the specific input and output channels are different. In Figure 4(b), X is the main channel. 1,0 This example illustrates the detailed changes in input and output within this architecture. The overall structure consists of two data channels. One channel undergoes batch normalization (BN), a rectified linear unit (ReLU), a DW3*3 convolution, BN, ReLU, and a DW3*3 convolution, followed by concatenation. The other channel undergoes an improved multi-scale channel attention mechanism, followed by concatenation. The concatenation output then undergoes a channel shuffle, ensuring that the output channels at each stage are twice the input. The improved multi-scale channel attention mechanism includes a first data channel and a second data channel. The second data channel is directly connected to the multiplier and then output. After the first data channel undergoes a 5*5 convolution, it is divided into a first sub-data channel, a second sub-data channel, a third sub-data channel, and a fourth sub-data channel. The first sub-data channel is directly connected to concat, the second sub-data channel passes through a 1*7 convolution, a 7*1 convolution, and then concat. The third sub-data channel passes through a 1*11 convolution, a 11*1 convolution, and then concat. The fourth sub-data channel passes through a 1*21 convolution, a 21*1 convolution, and then concat. Concat is connected to the multiplier through a 1*1 convolution and then output. Figure 4(c) shows the improved feature extraction module X. i,j (i+j<=4,i>=0,j>0) Figure 4(d) is a schematic diagram of the structure of the improved lightweight upsampling.
[0046] The convolutional modules of the original UNet++ network are replaced with Depthwise Separable Convolution (DW), which reduces the computational complexity and parameter count of the model, achieving model lightweighting. Furthermore, at each encoder stage, the number of convolutional channels is halved compared to the original model for feature extraction. These features are then fused with the downsampled features from the previous stage (called the low-level detail branch (LDB)) using concatenation, supplementing the detail information while reducing the number of parameters. A modified Multi-Scale Channel Attention (MSCA) mechanism is introduced to enhance the feature representation of the detail branch. This architecture not only captures more low-level detail information but also allows the MSCA mechanism to more effectively capture the features of target regions of varying sizes in the image. Finally, a channel shuffle strategy is used to shuffle the concatenated results, improving feature fusion, better capturing complex patterns and details in the image, and enhancing segmentation accuracy. The improved model structure has 4.77M parameters, which is 89.89% lower than the original network structure. The computational complexity is 20.77GFLOPs, which is 84.72% lower than the original network structure UNet++. The liver area segmentation accuracy IoU in Beijing duck liver CT images reaches 94.17%.
[0047] Based on this dataset, a neural network model for Beijing duck liver segmentation was trained and the Beijing duck liver CT image was input into the network model. The segmentation results are shown in the figure below. Figure 5 As shown in (a)(b).
[0048] Based on the CT image segmentation results of Pekin duck livers, there were 17 complete Pekin duck livers in this embodiment. According to the Pekin duck liver volume calculation method described above, the predicted liver volumes of the 17 Pekin ducks were obtained. The Pearson correlation coefficient between the predicted liver volumes and the actual liver volumes was calculated to be 92.4%, showing a very high correlation.
[0049] The improved lightweight neural network model proposed in this invention can not only obtain more low-level detail information, but also more effectively capture the characteristics of target areas of varying sizes in the image, improve the feature fusion capability, enhance the segmentation accuracy of the model, and further improve the speed and performance of liver volume calculation, which can provide strong assistance for the breeding of Beijing ducks.
Claims
1. A method for calculating the liver volume of a Peking duck based on CT images, characterized in that: include: Step 1: Obtain a CT scan sequence of a living Peking duck and construct a PNG format CT image of the Peking duck abdomen; Step 2: The abdominal CT image of the Beijing duck obtained in step 1 is labeled to determine whether it contains the liver, and is classified based on the high-performance classification model ShuffleNetV2 to obtain a CT image containing only the liver; Step 3: Label the liver region of the CT image containing only the liver in step 2, and use the improved lightweight neural network model MSDA_UNet++ to perform segmentation processing to obtain the liver region segmentation result of the CT image; The improved lightweight neural network model MSDA_UNet++ is implemented using depthwise separable convolution and lightweight upsampling. In each encoder stage, the number of convolution channels is halved for feature extraction, and then the features are fused with the downsampled features from the previous stage using concat. An improved multi-scale channel attention mechanism is introduced to enhance the feature expression capability of detail branches. Step 4: Based on the liver region segmentation result obtained in step 3, the predicted liver volume and the correlation index between the predicted liver volume and the actual liver volume are calculated.
2. The method for calculating the liver volume of a Peking duck based on CT images according to claim 1, wherein: The step 1 is specifically as follows: Using Xiaosaikankan CT image analysis software, we selected a window width of 217, a window level of 36, and used histogram equalization to convert the Beijing duck abdominal CT image from DICOM format to PNG format.
3. The method for calculating the liver volume of a Peking duck based on CT images according to claim 1, wherein: The calculation formula for the predicted liver volume in step 4 is as follows: Where V is the liver volume of the Peking duck in cubic centimeters, S is the voxel set during the CT scan of the Peking duck, n is the number of slices in all CT slice sequences of a Peking duck that are classified as containing liver slices after the first stage classification task, and p i is the number of pixels in the liver area in the i-th slice.
4. The method for calculating the liver volume of a Peking duck based on CT images according to claim 1, wherein The encoder of the improved lightweight neural network model MSDA_UNet++ is divided into two data channels. One channel is sequentially connected to concat after passing through BN, ReLU, DW3*3 convolution, BN, ReLU, DW3*3 convolution, and the other channel is connected to concat after passing through the improved multi-scale channel attention mechanism, and concat is then output through Channel shuffle.
5. The method for calculating the liver volume of Beijing duck based on CT images according to claim 1 or 4, wherein: The improved multi-scale channel attention mechanism includes a first data channel and a second data channel. The second data channel is directly connected to the multiplier and then output; the first data channel is divided into a first sub-data channel, a second sub-data channel, a third sub-data channel, and a fourth sub-data channel after 5*5 convolution. The first sub-data channel is directly connected to concat, the second sub-data channel is sequentially connected to concat through 1*7 convolution and 7*1 convolution, the third sub-data channel is sequentially connected to concat through 1*11 convolution and 11*1 convolution, and the fourth sub-data channel is sequentially connected to concat through 1*21 convolution and 21*1 convolution. Concat is connected to the multiplier through 1*1 convolution and then output.