Living broiler chicken TD leg disease quantitative diagnosis method and device based on medical image

Through a quantitative diagnostic method based on medical images, using X-ray image preprocessing and unsupervised clustering algorithms, the problem of rapid and accurate diagnosis of broiler TD leg disease in large-scale intensive breeding was solved, and low-cost and efficient intelligent diagnosis was achieved.

CN120689655APending Publication Date: 2025-09-23GUANGDONG WIZAGRICULTURAL SCI & TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510642015.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing technologies make it difficult to quickly and accurately diagnose TD leg disease in live broiler chickens in large-scale intensive farming. Traditional diagnostic methods are time-consuming, costly, and rely on manual empirical judgment, resulting in inconsistent treatment plans.

Method used

A quantitative diagnosis method based on medical images is adopted to realize intelligent quantitative diagnosis of broiler TD leg disease through X-ray image preprocessing, medical image segmentation network and unsupervised clustering algorithm, including image format conversion, random cropping, image enhancement, data set partitioning, SE channel attention UNet3+ network construction and multiple unsupervised clustering algorithm processing.

Benefits of technology

It achieves rapid, accurate and low-cost diagnosis of TD leg disease in live broiler chickens, meets the needs of large-scale intensive breeding, and provides a basis for subsequent treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689655A_ABST
    Figure CN120689655A_ABST
Patent Text Reader

Abstract

The invention relates to a living broiler TD leg disease quantitative diagnosis method based on a medical image, and relates to the field of broiler TD leg disease intelligent diagnosis. The method comprises the following steps: acquiring a broiler sample X-ray image; preprocessing the image; constructing a data set; establishing a medical image segmentation model; verifying the model and reasoning a sample; analyzing results and constructing clustering features; processing the sample by a clustering algorithm; and delimiting a grade range and verifying correctness. According to the method, living body quantitative analysis on the TD leg disease of the yellow feather broiler chicken is realized based on medical image segmentation and unsupervised clustering, and the operation is simple, rapid, safe and efficient; the problem that sub-clinical symptoms are not easy to perceive in the early stage of disease attack is solved, and reference is provided for specific diagnosis and subsequent treatment of the TD leg disease.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to intelligent diagnosis of TD leg disease in living broiler chickens, and in particular to a quantitative diagnosis method and device for TD leg disease in living broiler chickens based on medical images. Background Art

[0002] Tibial Dyschondroplasia (TD) in broiler chickens is a non-infectious disease that occurs frequently in fast-growing poultry breeds. The main clinical symptoms are abnormal standing, lethargy, difficulty in eating, and movement disorders. In China, intensive livestock and poultry farming is used to alleviate people's increasing demand for poultry food, resulting in a significant increase in the incidence of this disease. Under normal circumstances, the incidence of TD is about 10%. In actual breeding processes, broiler TD often manifests as subclinical symptoms, and typical clinical symptoms are mostly seen in broilers in the late stages of the disease. Therefore, TD remains one of the important diseases that restrict the development of broiler chickens and should be given sufficient attention and importance.

[0003] Traditional diagnostic methods primarily include clinical observation of broiler chickens for symptoms such as lameness, growth retardation, difficulty standing, or reluctance to walk; palpation of the proximal tibia for swelling, pain, or abnormal hardness; and microscopic examination of cartilage tissue for pathological changes, such as chondrocyte disorganization and matrix abnormalities. Early subclinical symptoms are difficult to detect with traditional diagnostic methods, while late symptoms, while evident, can worsen the disease and complicate treatment. Furthermore, traditional diagnostic methods primarily rely on manual observation and pathological dissection. Manual observation is labor-intensive, time-consuming, and leads to poor data accuracy. Pathological dissection offers high accuracy but requires slaughtering laboratory specimens, resulting in significant costs and specialized procedures. In large-scale, intensive farming operations, traditional diagnostic methods cannot meet the demands for rapid and accurate measurement of large numbers of live samples. Furthermore, there is no clear range for the severity of TD leg disease, and most rely on manual judgment based on experience, resulting in multiple discrepancies in the same sample, complicating subsequent treatment decisions. Therefore, rapid and accurate high-throughput measurement of TD leg disease in live broiler chickens is an urgent challenge. Summary of the Invention

[0004] The purpose of the present invention is to solve at least one of the deficiencies of the prior art and to provide a quantitative diagnosis method for TD leg disease in living broiler chickens based on medical images.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] Specifically, a quantitative diagnosis method for TD leg disease in live broiler chickens based on medical images is proposed, which includes the following:

[0007] Step 1: Obtain an X-ray image of a broiler chicken sample;

[0008] Step 2: preprocessing the X-ray image to obtain a preprocessed image;

[0009] Step 3: construct a data set based on the preprocessed images, and divide the data set into a training set, a validation set, and a test set according to a preset ratio;

[0010] Step 4: Build a medical image segmentation network and train it based on the training set, validation set, and test set to obtain a weighted medical image segmentation network.

[0011] Step 5: Input the sample to be processed into the medical image segmentation network with loaded weights, output the segmentation results and construct clustering features;

[0012] Step 6: Processing the samples to be processed by using a variety of unsupervised clustering algorithms;

[0013] Step 7: Count the numerical ranges of different clusters and calculate the accuracy based on the anatomical true value.

[0014] Further, specifically, preprocessing the X-ray image to obtain a preprocessed image includes:

[0015] The X-ray image is format converted, randomly cropped, and image enhanced,

[0016] The image format of the X-ray image was converted from a dicom file to a jpg file, randomly cropped to a size of 128×128, and image augmentation included random flipping and rotation with a probability of 0.5.

[0017] Further, specifically, a data set is constructed based on the preprocessed images, and the data set is divided into a training set, a validation set, and a test set according to a preset ratio, including:

[0018] The preprocessed images were annotated, and the two categories of leg disease lesion area and normal tibia were annotated pixel by pixel to construct a dataset, and the dataset was divided into training set, validation set and test set according to 7:2:1.

[0019] Furthermore, specifically, a medical image segmentation network is constructed based on the UNet3+ network with SE channel attention mechanism. The operation steps of the network structure of the medical image segmentation network are as follows:

[0020] Step 4.1: For an input image I of size 128×128, first perform feature extraction through a convolutional layer Conv consisting of convolution-batch normalization, BN-activation function ReLU. The calculation formula is as follows:

[0021] x=Conv(I)=ReLU(BN(conv(I))),

[0022] Where I∈R 3×128×128 is the input image, x∈R C×H×W is the output feature map;

[0023] Step 4.2: Perform max-pooling on the feature map x to reduce the feature map resolution and expand the receptive field. The calculation formula is as follows:

[0024] E1=max pool(x),

[0025] in, is the feature map of the first encoding stage;

[0026] Step 4.3: Repeat steps 5.1 and 5.2 to continuously perform convolution and pooling operations to obtain 5 layers of encoding feature maps with different resolutions, where shallow features contain detail information and deep features contain semantic information.

[0027]

[0028] Step 4.4: E5 serves as the basis for the decoding stage. While continuously restoring the resolution through bilinear interpolation, full-scale features are introduced to eliminate the semantic gap between the encoding features and the decoding features. Take the fourth decoding stage feature D4 as an example:

[0029]

[0030] Among them, upSample(,2) means 2x upsampling, maxPool(,2) means 2x downsampling, and concate() means splicing in the channel dimension;

[0031] Step 4.5: D4 uses SE channel attention to highlight the importance of different channels at different scales. The calculation formula is as follows:

[0032] G=Global-pooling(D4),

[0033] R = ReLU(FC(G)),

[0034] Attention = Sigmoid(FC(R)),

[0035] D4=D4×Attention,

[0036] Among them, Global-pooling is a global pooling operation, the length and width of the feature map are both 1, FC is a fully connected layer, Sigmoid() is an activation function, and different channels of the processed feature map have different weights;

[0037] Step 4.6: To reduce the amount of computation and fuse features, D4 is convolved with a small kernel to output the final decoded feature D4. Repeat steps 4.4 to 4.6 to construct a 5-layer decoded feature map {D1, D2, D3, D4, E5}. Auxiliary supervision is added to the last four decoding stages, and D1 outputs the final segmentation prediction.

[0038] Step 4.7: The training set data continuously adjusts the network parameters to minimize the network loss value until the network converges and the loss is stable.

[0039] Further, specifically, the segmentation results are output and clustering features are constructed, including,

[0040] For any sample image, count the number of TD lesion pixels and the number of normal tibia pixels, calculate the logarithm R of the ratio between the two, and then embed the R values ​​of all samples into the cluster space as cluster features. The calculation of R is as follows:

[0041]

[0042] Among them, P TD 、P TIBIA are the number of pixels of TD lesions and normal tibia, respectively.

[0043] Furthermore, specifically, the samples to be processed are processed by a variety of unsupervised clustering algorithms, including:

[0044] There are many unsupervised clustering algorithms, including those that require specifying the number of clusters, such as KMEANS, and those that do not require prior knowledge, such as Spectral Clustering.

[0045] Clustering calculations represented by KMEANS require setting the number of clusters in advance. The number of clusters is specified as 4 and the Euclidean distance is used as the consideration of the similarity between samples. The Euclidean distance is calculated as follows:

[0046]

[0047] Where (x1, y1) and (x2, y2) are any two spatial points in the embedding space;

[0048] The KMEANS process is as follows: 4 samples are randomly selected as the initial cluster centers; the Euclidean distance between the remaining samples and each center is calculated and the cluster is divided into the center cluster with the smallest distance; based on the current cluster assignment, the center of each cluster is recalculated, that is, the mean of all points in the cluster is calculated as the new cluster center; the assignment and update steps are repeated until the cluster center stops changing or the maximum number of iterations is reached;

[0049] Clustering algorithms, such as Gaussian Mixture, rely entirely on sample features to divide clusters. The specific process is as follows: select the number of Gaussian distributions in the GM and initialize the mean, covariance, and mixing coefficient of each Gaussian distribution; calculate the posterior probability of each sample point belonging to each Gaussian distribution based on the current parameter estimate; recalculate the mean, covariance, and mixing coefficient of each Gaussian distribution based on the posterior probability; determine whether the algorithm has converged. If not, return to step 2 and continue iterating.

[0050] Birch, Mean-Shift, Mini-Batch KMEANS, Spectral Clustering, and Agglomerative Clustering were used to cluster the samples in the above manner.

[0051] Furthermore, specifically, we count the numerical ranges of different clusters and calculate the accuracy based on the anatomical true values, including:

[0052] Step 7.1: After all clustering algorithms are completed, count the R values ​​of different clusters in each algorithm to get all the ranges;

[0053] Step 7.2: Since each range is discretely distributed, calculate the mean of the values ​​at the adjacent range boundaries to make the ranges continuous;

[0054] Step 7.3: Collect an additional 400 normal samples and calculate the R value. Select the minimum R value among the normal samples as the upper limit of the diseased samples.

[0055] Step 7.4: Calculate the accuracy of different clustering algorithms.

[0056] The present invention also proposes a device for quantitatively diagnosing TD leg disease in live broiler chickens based on medical images, comprising the following:

[0057] A data acquisition module for acquiring X-ray images of broiler chicken samples;

[0058] A preprocessing module, configured to preprocess the X-ray image to obtain a preprocessed image;

[0059] A data set partitioning module is used to construct a data set based on the preprocessed images, and to divide the data set into a training set, a validation set, and a test set according to a preset ratio;

[0060] The network model training module is used to build a medical image segmentation network and train it based on the training set, validation set, and test set to obtain a medical image segmentation network with loaded weights;

[0061] The data processing module is used to input the samples to be processed into the medical image segmentation network with loaded weights, output the segmentation results and construct clustering features;

[0062] A clustering module, used to process the samples to be processed by using a variety of unsupervised clustering algorithms;

[0063] The result statistics module is used to count the numerical ranges of different clusters and calculate the accuracy based on the anatomical true value.

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

[0065] The present invention proposes a quantitative diagnosis method for TD leg disease in living broiler chickens based on medical images. Through medical image segmentation and unsupervised clustering technology, intelligent quantitative diagnosis of TD leg disease in living broiler chickens is realized. This method is simple, safe, efficient, and has low cost and time consumption. It meets the need for rapid identification of TD leg disease in large-scale intensive breeding, and also provides assistance for the subsequent treatment of TD leg disease. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The above and other features of the present disclosure will become more apparent through a detailed description of the embodiments shown in conjunction with the accompanying drawings. The same reference numerals in the drawings of the present disclosure represent the same or similar elements. Obviously, the drawings described below are only some embodiments of the present disclosure. It is possible for a person skilled in the art to derive other drawings based on these drawings without inventive effort. In the drawings:

[0067] Figure 1 Shown is a flow chart of a method for quantitative diagnosis of TD leg disease in living broiler chickens based on medical images according to the present invention;

[0068] Figure 2 FIG2 is a network structure diagram of UNet3+ used in the medical image segmentation network constructed by the present invention;

[0069] Figure 3 Shown is a structural diagram of the channel attention SE module used in the medical image segmentation network constructed by the present invention;

[0070] Figure 4 Shown is a schematic diagram of constructing cluster features of the present invention;

[0071] Figure 5 Shown is a schematic diagram of clustering results of various unsupervised clustering algorithms used in the present invention. DETAILED DESCRIPTION

[0072] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other unless there is a conflict. The same reference numerals used throughout the drawings indicate the same or similar parts.

[0073] Example 1, with reference to Figure 1 The present invention proposes a quantitative diagnosis method for TD leg disease in live broiler chickens based on medical images, comprising the following steps:

[0074] 1. Obtain X-ray images of broiler chickens

[0075] Multiple broiler chicken samples with TD leg disease were numbered in sequence to distinguish them; CT machine parameters such as scanning thickness, voltage, and current were set; the samples were fixed and the conveyor belt was moved to start scanning; the scanned images were collected and named, and kept corresponding to the sample numbers.

[0076] 2. Image format conversion and preprocessing.

[0077] The image format is converted from DICOM files to JPG files and randomly cropped to 128×128. Image enhancement includes random flipping with a probability of 0.5, random rotation, and contrast change.

[0078] 3. Data Labeling

[0079] The annotation software ITK-SNAP was used to perform pixel-by-pixel annotation of the image lesion area and normal tibia, where the true value of the normal tibia was 1 and the true value of the lesion area was 2, for a total of two categories.

[0080] 4. Build a dataset

[0081] After all sample images are preprocessed and labeled, a dataset is constructed and divided into training set, validation set, and test set according to the ratio of 7:2:1.

[0082] 5.Reference Figure 2 as well as Figure 3 , build the medical image segmentation network UNet3+ with SE attention.

[0083] 5.1: For an input image I of size 128×128, the feature extraction is first performed through a convolutional layer (Conv) consisting of convolution, batch normalization (BN), and activation function (ReLU). The calculation formula is as follows:

[0084] x=Conv(I)=ReLU(BN(conv(I))),

[0085] Where I∈R 3×128×128is the input image, x∈R C×H×W is the output feature map;

[0086] 5.2: Perform max-pooling on the feature map x to reduce the feature map resolution and expand the receptive field. The calculation formula is as follows:

[0087] E1=maxpool(x),

[0088] in, It is the feature map of the first encoding stage.

[0089] 5.3: Repeat the above steps to continuously perform convolution and pooling operations to obtain 5 layers of encoding feature maps with different receptive fields, where shallow features contain detail information and deep features contain semantic information.

[0090]

[0091] 5.4: E5 serves as the basis for the decoding stage. While continuously restoring the resolution through bilinear interpolation, it also introduces full-scale features to eliminate the semantic gap between the encoding and decoding features. Take the fourth decoding stage feature D4 as an example:

[0092]

[0093] Here, upSample(,2) indicates 2x upsampling, maxPool(,2) indicates 2x downsampling, and concate() indicates concatenation in the channel dimension.

[0094] 5.5: In order to highlight the importance of different channels at different scales, the SE channel attention mechanism is introduced when fusing multi-scale features. Taking the fourth decoding stage feature D4 as an example, its calculation formula is as follows:

[0095] G=Global-pooling(D4),

[0096] R = ReLU(FC(G)),

[0097] Attention = Sigmoid(FC(R)),

[0098] D4=D4×Attention,

[0099] Among them, Global-pooling is a global pooling operation, the length and width of the feature map are both 1, FC is a fully connected layer, Sigmoid() is an activation function, and different channels of the processed feature map have different weights.

[0100] 5.6: To reduce computational effort and integrate features, D4 undergoes convolutional dimensionality reduction and outputs the final decoded feature D4. Repeat steps 5.4 to 5.6 to construct a five-layer decoded feature map {D1, D2, D3, D4, E5}. Auxiliary supervision is added to the last four decoding stages, and D1 outputs the final segmentation prediction. This completes the construction of the medical image segmentation network.

[0101] 5.7: The training set data continuously adjusts the network parameters to minimize the network loss value until the network converges and the loss is stable; the validation set is used to adjust the network and select hyperparameters; the test set is used to evaluate the final performance of the network and reflect the generalization ability of the model.

[0102] 6. Inference Sample

[0103] The segmentation network loads the weight file corresponding to the minimum loss, inputs the sample to be processed into the network for inference, and outputs the pixel mask of the normal tibia and the lesion in the sample.

[0104] 7. Processing inference results

[0105] Reference Figure 4 , the number of TD lesion pixels and normal tibia pixels in the mask results are counted, and the logarithm R of the ratio between the two is calculated to quantitatively represent the differences between different samples. The calculation of R is as follows:

[0106]

[0107] PTD and PTIBIA are the total number of TD pixels and normal tibia pixels, respectively. The R value of each sample is embedded into the cluster space as a cluster feature.

[0108] 8. Processing Batch Samples

[0109] All samples are inferred and the R value is calculated.

[0110] 9. Sample Clustering

[0111] Reference Figure 5 Select from a variety of clustering algorithms to cluster all samples in the space. Clustering algorithms include KMeans, Birch, MeanShift, MiniBatchKMeans, SpectralClustering, and GaussianMixture. These clustering algorithms can be divided into two categories based on whether the number of clusters needs to be specified: KMeans, which requires the number of clusters to be specified, and Spectral Clustering, which requires no prior knowledge.

[0112] 9.1: Clustering calculations such as KMEANS require the number of clusters to be set in advance. This paper refers to relevant TD genetic breeding data, specifies the number of clusters to be 4, and uses Euclidean distance as the consideration of similarity between samples. The Euclidean distance is calculated as follows:

[0113]

[0114] Where (x1, y1) and (x2, y2) are any two spatial points in the embedding space.

[0115] The KMEANS processing process is as follows: randomly select 4 samples as the initial cluster centers; calculate the Euclidean distance between the remaining samples and each center and divide them into the center cluster with the smallest distance; based on the current cluster assignment, recalculate the center of each cluster, that is, calculate the mean of all points in the cluster as the new cluster center; repeat the assignment and update steps until the cluster center no longer changes or the maximum number of iterations is reached.

[0116] 9.2: Clustering algorithms represented by Gaussian Mixture rely entirely on sample features to divide different clusters. The specific process is as follows: select the number of Gaussian distributions in the GM and initialize the mean, covariance, and mixing coefficient of each Gaussian distribution; based on the current parameter estimate, calculate the posterior probability of each sample point belonging to each Gaussian distribution; recalculate the mean, covariance, and mixing coefficient of each Gaussian distribution based on the posterior probability; determine whether the algorithm has converged. If not, return to step 2 and continue iterating.

[0117] 9.3: Taking steps 9.1 and 9.2 as examples, cluster the samples using Birch, Mean-Shift, Mini-Batch KMEANS, Spectral Clustering, and Agglomerative Clustering respectively.

[0118] Specifically, when applying, the scope of clustering results and the correctness of the relevant clustering methods are shown in Table 1 below.

[0119]

[0120] Table 1

[0121] 10. Post-clustering processing

[0122] The numerical ranges of different clusters were counted and the accuracy was calculated based on the anatomical true values.

[0123] Step 10.1: After all clustering algorithms are completed, count the R values ​​of different clusters in each algorithm to get all the ranges.

[0124] Step 10.2: Since each range is discretely distributed, calculate the mean of the adjacent range boundary values ​​to make the ranges continuous.

[0125] Step 10.3: Collect an additional 400 normal samples and calculate the R value. Select the minimum R value among the normal samples as the upper limit of the diseased samples.

[0126] Step 10.4: Calculate the accuracy of different clustering algorithms.

[0127] Example 2: The present invention further proposes a device for quantitatively diagnosing TD leg disease in live broiler chickens based on medical images, comprising the following:

[0128] A data acquisition module for acquiring X-ray images of broiler chicken samples;

[0129] A preprocessing module, configured to preprocess the X-ray image to obtain a preprocessed image;

[0130] A data set partitioning module is used to construct a data set based on the preprocessed images, and to divide the data set into a training set, a validation set, and a test set according to a preset ratio;

[0131] The network model training module is used to build a medical image segmentation network and train it based on the training set, validation set, and test set to obtain a medical image segmentation network with loaded weights;

[0132] The data processing module is used to input the samples to be processed into the medical image segmentation network with loaded weights, output the segmentation results and construct clustering features;

[0133] A clustering module, used to process the samples to be processed by using a variety of unsupervised clustering algorithms;

[0134] The result statistics module is used to count the numerical ranges of different clusters and calculate the accuracy based on the anatomical true value.

[0135] In this Example 2, consistent with the quantitative diagnosis method of TD leg disease in living broilers based on medical images proposed in the present invention, intelligent quantitative diagnosis of TD leg disease in living broilers is achieved through medical image segmentation and unsupervised clustering technology. This method is simple, safe, efficient, and has low cost and time consumption, meeting the need for rapid identification of TD leg disease in large-scale intensive breeding, and also provides assistance for the subsequent treatment of TD leg disease.

[0136] Although the present invention has been described in considerable detail and with particularity with respect to several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but rather should be construed as providing a broad possible interpretation of these claims in view of the prior art by reference to the appended claims, thereby effectively encompassing the intended scope of the invention. In addition, the invention has been described above in terms of embodiments foreseen by the inventors for the purpose of providing a useful description, and those insubstantial modifications of the invention that are not currently foreseen may still represent equivalent modifications of the invention.

[0137] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. As long as the technical effects of the present invention are achieved by the same means, they shall fall within the scope of protection of the present invention. Within the scope of protection of the present invention, various modifications and variations of the technical solutions and / or implementation methods may be made.

Claims

1. A quantitative diagnosis method for TD leg disease in live broiler chickens based on medical images, characterized in that: These include: Step 1: Obtain an X-ray image of a broiler chicken sample; Step 2: preprocessing the X-ray image to obtain a preprocessed image; Step 3: construct a data set based on the preprocessed images, and divide the data set into a training set, a validation set, and a test set according to a preset ratio; Step 4: Build a medical image segmentation network and train it based on the training set, validation set, and test set to obtain a weighted medical image segmentation network. Step 5: Input the sample to be processed into the medical image segmentation network with loaded weights, output the segmentation results and construct clustering features; Step 6: Processing the samples to be processed by using a variety of unsupervised clustering algorithms; Step 7: Count the numerical ranges of different clusters and calculate the accuracy based on the anatomical true value.

2. The method for quantitative diagnosis of TD leg disease in live broilers based on medical images according to claim 1, characterized in that: Specifically, the X-ray image is preprocessed to obtain a preprocessed image, including: The X-ray image is format converted, randomly cropped, and image enhanced, The image format of the X-ray image was converted from a dicom file to a jpg file, randomly cropped to a size of 128×128, and image augmentation included random flipping and rotation with a probability of 0.

5.

3. The method for quantitative diagnosis of TD leg disease in live broilers based on medical images according to claim 2, characterized in that: Specifically, a data set is constructed based on the preprocessed images, and the data set is divided into a training set, a validation set, and a test set according to a preset ratio, including: The preprocessed images were annotated, and the two categories of leg disease lesion area and normal tibia were annotated pixel by pixel to construct a dataset, and the dataset was divided into training set, validation set and test set according to 7:2:

1.

4. The method for quantitative diagnosis of TD leg disease in live broilers based on medical images according to claim 2, characterized in that: Specifically, a medical image segmentation network is constructed based on the UNet3+ network with SE channel attention mechanism. The operation steps of the network structure of the medical image segmentation network are as follows: Step 4.1: For an input image I of size 128×128, first perform feature extraction through a convolutional layer Conv consisting of convolution-batch normalization, BN-activation function ReLU. The calculation formula is as follows: x=Conv(I)=ReLU(BN(conv(I))), Where I∈R 3×128×128 is the input image, x∈R C×H×W is the output feature map; Step 4.2: Perform max-pooling on the feature map x to reduce the feature map resolution and expand the receptive field. The calculation formula is as follows: E1=maxpool(x), in, is the feature map of the first encoding stage; Step 4.3: Repeat steps 5.1 and 5.2 to continuously perform convolution and pooling operations to obtain 5 layers of encoding feature maps with different resolutions, where shallow features contain detail information and deep features contain semantic information. Step 4.4: E5 serves as the basis for the decoding stage. While continuously restoring the resolution through bilinear interpolation, full-scale features are introduced to eliminate the semantic gap between the encoding features and the decoding features. Take the fourth decoding stage feature D4 as an example: Among them, upSample(,2) means 2x upsampling, maxPool(,2) means 2x downsampling, and concate() means splicing in the channel dimension; Step 4.5: D4 uses SE channel attention to highlight the importance of different channels at different scales. The calculation formula is as follows: G=Global-pooling(D4), R = ReLU(FC(G)), Attention = Sigmoid(FC(R)), D4=D4×Attention, Among them, Global-pooling is a global pooling operation, the length and width of the feature map are both 1, FC is a fully connected layer, Sigmoid() is an activation function, and different channels of the processed feature map have different weights; Step 4.6: To reduce the amount of computation and fuse features, D4 is convolved with a small kernel to output the final decoded feature D4. Repeat steps 4.4 to 4.6 to construct a 5-layer decoded feature map {D1, D2, D3, D4, E5}. Auxiliary supervision is added to the last four decoding stages, and D1 outputs the final segmentation prediction. Step 4.7: The training set data continuously adjusts the network parameters to minimize the network loss value until the network converges and the loss is stable.

5. The method for quantitative diagnosis of TD leg disease in live broiler chickens based on medical images according to claim 1, characterized in that: Specifically, output the segmentation results and construct clustering features, including, For any sample image, count the number of TD lesion pixels and the number of normal tibia pixels, calculate the logarithm R of the ratio between the two, and then embed the R values ​​of all samples into the cluster space as cluster features. The calculation of R is as follows: Among them, P TD 、P TIBIA are the number of pixels of TD lesions and normal tibia, respectively.

6. The method for quantitative diagnosis of TD leg disease in live broiler chickens based on medical images according to claim 1, characterized in that: Specifically, the samples to be processed are processed by a variety of unsupervised clustering algorithms, including: There are many unsupervised clustering algorithms, including those that require specifying the number of clusters, such as KMEANS, and those that do not require prior knowledge, such as SpectralClustering. Clustering calculations represented by KMEANS require setting the number of clusters in advance. The number of clusters is specified as 4 and the Euclidean distance is used as the consideration of the similarity between samples. The Euclidean distance is calculated as follows: Where (x1, y1) and (x2, y2) are any two spatial points in the embedding space; The KMEANS process is as follows: 4 samples are randomly selected as the initial cluster centers; the Euclidean distance between the remaining samples and each center is calculated and the cluster is divided into the center cluster with the smallest distance; based on the current cluster assignment, the center of each cluster is recalculated, that is, the mean of all points in the cluster is calculated as the new cluster center; the assignment and update steps are repeated until the cluster center stops changing or the maximum number of iterations is reached; Clustering algorithms, such as Gaussian Mixture, rely entirely on sample features to divide clusters. The specific process is as follows: select the number of Gaussian distributions in the GM and initialize the mean, covariance, and mixing coefficient of each Gaussian distribution; calculate the posterior probability of each sample point belonging to each Gaussian distribution based on the current parameter estimate; recalculate the mean, covariance, and mixing coefficient of each Gaussian distribution based on the posterior probability; determine whether the algorithm has converged. If not, return to step 2 and continue iterating. Birch, Mean-Shift, Mini-Batch KMEANS, Spectral Clustering, and Agglomerative Clustering were used to cluster the samples in the above manner.

7. The method for quantitative diagnosis of TD leg disease in live broilers based on medical images according to claim 1, characterized in that: Specifically, the numerical ranges of different clusters are counted and the accuracy is calculated based on the anatomical true values, including: Step 7.1: After all clustering algorithms are completed, count the R values ​​of different clusters in each algorithm to get all the ranges; Step 7.2: Since each range is discretely distributed, calculate the mean of the values ​​at the adjacent range boundaries to make the ranges continuous; Step 7.3: Collect an additional 400 normal samples and calculate the R value. Select the minimum R value among the normal samples as the upper limit of the diseased samples. Step 7.4: Calculate the accuracy of different clustering algorithms.

8. A quantitative diagnostic device for TD leg disease in live broilers based on medical images, characterized in that: These include: A data acquisition module for acquiring X-ray images of broiler chicken samples; A preprocessing module, configured to preprocess the X-ray image to obtain a preprocessed image; A data set partitioning module is used to construct a data set based on the preprocessed images, and to divide the data set into a training set, a validation set, and a test set according to a preset ratio; The network model training module is used to build a medical image segmentation network and train it based on the training set, validation set, and test set to obtain a medical image segmentation network with loaded weights; The data processing module is used to input the samples to be processed into the medical image segmentation network with loaded weights, output the segmentation results and construct clustering features; A clustering module, used to process the samples to be processed by using a variety of unsupervised clustering algorithms; The result statistics module is used to count the numerical ranges of different clusters and calculate the accuracy based on the anatomical true value.