A hepatopancreas segmentation method for Chinese mitten crab based on DF-UNet model

Through the segmentation method based on the DF-UNet model, combined with preprocessing and loss function optimization, the problem of difficult segmentation of hepatopancreas in Chinese mitten crabs in CT images was solved, and the segmentation effect of high accuracy and low error rate was achieved.

CN118762036BActive Publication Date: 2025-01-14NANJING AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410926397.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-01-14
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The hepatopancreas of Chinese mitten crabs are difficult to segment in CT images, mainly due to the wide range of pixel values ​​in the 16-bit image and the contrast of similar density of the hepatopancreas and surrounding tissues, making it difficult to effectively distinguish existing models.

Method used

Using the segmentation method based on the DF-UNet model, a 2D-UNet model is constructed through the ResNet50 convolutional network, combined with preprocessing techniques such as image filling and window normalization, to build an improved anti-false loss function and focus loss function to balance positive and negative Sample weights, optimize network training to improve segmentation accuracy.

Benefits of technology

It significantly improves the accuracy and f1 coefficient of hepatopancreatic segmentation of Chinese mitten crabs, reduces false positive and false negative errors, improves the network's information extraction ability when processing CT images, and improves segmentation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762036B_ABST
    Figure CN118762036B_ABST
Patent Text Reader

Abstract

The present invention discloses a hepatopancreas segmentation method of Chinese mitten crab based on DF-UNet model, comprising the following steps: (1) obtaining a Chinese mitten crab CT image database, including a plurality of Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels; preprocessing each Chinese mitten crab CT image sequence; (2) constructing a DF-UNet network, wherein the network architecture is a 2D-UNet model with ResNet50 convolutional network as the backbone, taking the preprocessed image as training input, and then obtaining the predicted output of the network, and taking the predicted results distributed on the pixels as the discrimination positions of the hepatopancreas. confidence score; (3) construct an improved false positive elimination loss function; for the predicted confidence score of each pixel, introduce a focusing loss function to constrain it to correctly balance the weights of positive and negative samples; weight the false positive elimination loss function and the focusing loss function as the total loss function, and then train the network by optimizing this loss function through gradient descent; (4) save the trained DF-UNet model and test it to obtain test results, use accuracy and f1 coefficient as evaluation indicators to evaluate the test results, and analyze the segmentation performance of the DF-UNet model; the present invention achieves good segmentation performance in the hepatopancreas segmentation task of Chinese mitten crab.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a hepatopancreas segmentation method of Chinese mitten crab based on a DF-UNet model. Background Art

[0002] The hepatopancreas segmentation task of Chinese mitten crab is of great significance in agriculture and aquaculture. The automatic hepatopancreas segmentation system of Chinese mitten crab can speed up the processing process and improve production efficiency. Through deep learning algorithms, fast and accurate hepatopancreas segmentation of a large amount of Chinese mitten crab data can be achieved, reducing the time and labor cost of manual operation. The automatic hepatopancreas segmentation system of Chinese mitten crab helps to improve the monitoring and control of hepatopancreas quality. Through the precise segmentation of the model, the size, density and other characteristics of the hepatopancreas can be more accurately evaluated, helping agricultural producers implement more effective quality management strategies.

[0003] However, since CT image data is a 16-bit image, it means that its pixel value range is very large. Such a wide range of pixel values ​​makes it challenging for the network to process and extract effective information. In addition, the hepatopancreas of Chinese mitten crab and other surrounding tissues often show similar density and contrast in CT images, which further increases the difficulty of distinguishing them. The above two problems make the task of hepatopancreas segmentation of Chinese mitten crab very difficult. At the same time, there is currently no research that proposes a complete model for the segmentation of the hepatopancreas of Chinese mitten crab. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to provide a hepatopancreas segmentation method for Chinese mitten crab based on the DF-UNet model to solve the problems raised in the background technology.

[0005] Technical solution: The hepatopancreas segmentation method of Chinese mitten crab based on the DF-UNet model described in the present invention comprises the following steps:

[0006] (1) Obtaining a Chinese mitten crab CT image database, including a number of Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels; preprocessing each Chinese mitten crab CT image sequence;

[0007] (2) Construct a DF-UNet network. The network architecture is a 2D-UNet model with a ResNet50 convolutional network as the backbone. The preprocessed image is used as the training input to obtain the network's prediction output. The prediction results distributed on the pixels are used as the discriminant confidence scores of the hepatopancreas.

[0008] (3) Construct an improved false positive elimination loss function; for each pixel’s prediction confidence score, introduce a focus loss function to constrain it to correctly balance the weights of positive and negative samples; weight the false positive elimination loss function and the focus loss function as the total loss function, and then optimize this loss function through gradient descent to train the network;

[0009] (4) Save the trained DF-UNet model and perform tests to obtain test results. Use accuracy and f1 coefficient as evaluation indicators to evaluate the test results and analyze the segmentation performance of the DF-UNet model.

[0010] Furthermore, the preprocessing in step (1) is specifically as follows: image filling, fixing the window position and window width, and normalizing the image pixels with the window position as the center.

[0011] Furthermore, step (2) includes the following steps:

[0012] (21) The DF-UNet network is constructed using 2D-UNet with ResNet50 as the backbone, as follows: First, the features of the five residual blocks are extracted using the ResNet50 feature extractor, and the spatial resolution of the features is gradually reduced through four encoders. Each encoder includes two 3×3 two-dimensional convolutions and relu operations for downsampling to obtain the feature map; then the decoder part of the 2D-UNet is used to upsample the features extracted by the encoder, and the spatial resolution of the feature dimensions is restored through four upsamplings. Finally, the output prediction result is obtained through a two-channel two-dimensional 1×1 convolution layer.

[0013] (22) Obtain a single-channel W × H CT image sequence, which contains the computed tomography information of the entire Chinese mitten crab, where the pixel at position (x, y) is used as the descriptor c i,j,x,y , thus obtaining the descriptor C of the jth CT image of the i-th Chinese mitten crab i,j :

[0014]

[0015] In the formula, C i,j,x,y represents the spatiotemporal descriptor of the pixel at position (x, y) in the jth CT image of the i-th Chinese mitten crab. The spatial resolution of the CT image is W×H.

[0016] (23) The spatiotemporal descriptors are input into the constructed DF-UNet network, which encodes and decodes each spatiotemporal descriptor and outputs the predicted confidence score for each pixel. i,j,x,y , that is, the probability that the pixel identified by the model belongs to the hepatopancreas of Chinese mitten crab:

[0017] scorei,j,x,y = de (ae (C i,j ))| X=x,Y=y

[0018] Where ae represents the encoding operation function in the selected DF-UNet, de represents the decoding operation function in DF-UNet, X represents the horizontal coordinate, Y represents the vertical coordinate, x represents the horizontal coordinate of the current pixel, and y represents the vertical coordinate of the current pixel.

[0019] Furthermore, in step (3), constructing an improved false elimination loss function includes the following steps:

[0020] (31) Based on the prediction confidence score of each pixel point by DF-UNet, the prediction category pred of each pixel point is obtained by the network. i,j,x,y :

[0021]

[0022] Where pred i,j,x,y 0 represents the predicted result is not hepatopancreas, pred i,j,x,y The value 1 represents the predicted result is hepatopancreas.

[0023] (32) Construct a false elimination loss function, and for each pixel the prediction result pred i,j,x,y , the constraint is how to eliminate false positives and false negatives and ignore the influence of true positives and true negatives, the false elimination loss function As shown below:

[0024]

[0025] Where N is the total number of Chinese mitten crab samples, and M is the total number of sequences for each Chinese mitten crab. i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, while the true label is non-hepatopancreas, that is, a false positive sample; FN i,j,x,y Indicates that the prediction result of the current pixel is not hepatopancreas, while the true label is hepatopancreas, which is a false negative sample; TP i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, and the true label is also hepatopancreas, that is, a true positive sample, FP i,j,x,y 、FN i,j,x,y and TP i,j,x,y They are as follows:

[0026]

[0027] Among them, gt i,j,x,y Indicates the true label of the current pixel, else indicates other situations. Eliminate false positives and false negatives by constraining the relationship between false negatives and true positives, and the relationship between false positives and true positives.

[0028] Furthermore, in step (3), the focus loss function As shown below:

[0029]

[0030] In the formula, α t is an adjustment factor used to balance the number of positive and negative samples; γ is used to adjust the imbalance problem of difficult and easy samples, and reduces the loss of easy samples by a power function. By constraining the weights of positive and negative samples.

[0031] Furthermore, in step (3), the total loss function is the false elimination loss function And the focus loss function The weighted total loss function is as follows:

[0032]

[0033] In the formula, is the total loss function, and β is the balance The weight of the proportion.

[0034] The hepatopancreas segmentation system of Chinese mitten crab based on DF-UNet model of the present invention comprises:

[0035] Preprocessing module: used to obtain the Chinese mitten crab CT image database, including several Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels; preprocess each Chinese mitten crab CT image sequence;

[0036] DF-Unet module: used to build the DF-UNet network. The network architecture is a 2D-UNet model with the ResNet50 convolutional network as the backbone. The preprocessed image is used as the training input to obtain the network's prediction output. The prediction results distributed on the pixels are used as the discriminant confidence scores of the hepatopancreas.

[0037] Loss function module; used to construct an improved false positive elimination loss function; for the prediction confidence score of each pixel, a focus loss function is introduced to constrain it to correctly balance the weights of positive and negative samples; the false positive elimination loss function and the focus loss function are weighted as the total loss function, and then the network is trained by optimizing this loss function through gradient descent;

[0038] Prediction module: used to save the trained DF-UNet model and perform tests to obtain test results. The accuracy and f1 coefficient are used as evaluation indicators to evaluate the test results and analyze the segmentation performance of the DF-UNet model.

[0039] An electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, any one of the methods for hepatopancreas segmentation of Chinese mitten crab based on the DF-UNet model is implemented.

[0040] A storage medium described in the present invention stores a computer program, and when the computer program is executed by a processor, it implements any one of the methods for hepatopancreas segmentation of Chinese mitten crab based on the DF-UNet model.

[0041] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: by adopting the idea of ​​bandpass filtering and amplifying the shortcomings of false positive and false negative samples, a preprocessing method based on bandpass filtering is constructed, and filtering is performed with the distribution of hepatopancreas pixel values ​​of the sample as the center to reduce the range of image pixel values, thereby making it easier for the network to extract effective information. Then, through two loss constraints, the relationship between false negatives and true positives and the relationship between false positives and true positives are jointly constructed to eliminate false positives and false negatives, while balancing the weight of the hepatopancreas positive samples, which account for a very small proportion, to constrain the network to focus more on learning positive samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the process of the present invention;

[0043] Figure 2 A schematic diagram of a DF-Unet network of the present invention;

[0044] Figure 3 This is a segmentation diagram of the completion categories of the present invention. DETAILED DESCRIPTION

[0045] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0046] like Figure 1 As shown, the embodiment of the present invention provides a method for hepatopancreas segmentation of Chinese mitten crab based on the DF-UNet model, comprising the following steps:

[0047] (1) obtaining a Chinese mitten crab CT image database, wherein the Chinese mitten crab CT image database includes a plurality of Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels;

[0048] (2) Preprocessing operations are performed on each CT image sequence of Chinese mitten crab, mainly including image filling, fixing the window position and window width, and normalizing the image pixels with the window position as the center;

[0049] The specific operations of the preprocessing are filling the image to a fixed size, fixing the window position to the average value of pixels belonging to the hepatopancreas in all Chinese mitten crab CT images, fixing the window width centered on the window position, and normalizing the image pixels centered on the window position.

[0050] The above preprocessing operation is aimed at the 16-bit pixel of the CT image data of Chinese mitten crab, which is intended to deal with the difficulty of network learning and information extraction caused by its wide range of pixel values, and only retain the pixel information near the target hepatopancreas pixel value, thereby effectively filtering out most of the other tissue information with a large difference from the hepatopancreas pixel value. This filtering technology can significantly reduce the dynamic range of pixel values ​​in the image, making the hepatopancreas-related areas more prominent, thereby improving the network's ability to extract effective information in the subsequent learning stage.

[0051] like Figure 2 As shown, (3) constructing a DF-UNet network, the network framework is a 2D-UNet model with a ResNet50 convolutional network as the backbone, taking the preprocessed image as the training input, and then obtaining the network's prediction output, which is the discriminant confidence score predicted as the hepatopancreas distributed on the pixel; including the following steps:

[0052] (3-1) The DF-UNet network is constructed using 2D-UNet with ResNet50 as the backbone, which includes a convolutional layer composed of residual blocks. First, the features of 5 residual blocks are extracted using the ResNet50 feature extractor, and the spatial resolution of the features is gradually reduced through four encoders. Each encoder includes two 3×3 two-dimensional convolutions and relu operations to downsample the feature map. The decoder part of 2D-UNet is responsible for upsampling the features extracted by the encoder, restoring the spatial resolution of the feature dimension through four upsamplings, and finally obtaining the output prediction result through a two-channel two-dimensional 1×1 convolution layer.

[0053] (3-2) A single-channel W×H CT image sequence is obtained through preprocessing, which contains the computed tomography information of the entire Chinese mitten crab, and a pixel point at position (x, y) is used as the descriptor c i,j,x,y , thus obtaining the descriptor C of the jth CT image of the i-th Chinese mitten crab i,j :

[0054]

[0055] In the formula, C i,j,x,yRepresents the spatiotemporal descriptor of the pixel at position (x, y) in the j-th CT image of the i-th Chinese mitten crab. The spatial resolution of the CT image is W×H.

[0056] (3-3) The spatiotemporal descriptors are input into the constructed DF-UNet network, and the network encodes and decodes each spatiotemporal descriptor and outputs the predicted confidence score for each pixel. i,j,x,y , which actually means the probability that the model determines that this pixel belongs to the hepatopancreas of Chinese mitten crab:

[0057] score i,j,x,y = de (ae (C i,j ))| X=x,Y=y

[0058] Where ae represents the encoding operation function in the selected DF-UNet, de represents the decoding operation function in DF-UNet, X represents the horizontal coordinate, Y represents the vertical coordinate, x represents the horizontal coordinate of the current pixel, and y represents the vertical coordinate of the current pixel.

[0059] The prediction confidence score for each pixel output by the above network actually means the probability of whether the model determines that this pixel belongs to the hepatopancreas. The discrimination probability of the correct category corresponding to the sample label represents the certainty that the model correctly classifies this pixel. For the model, the higher the sample prediction confidence score, the higher the confidence in the correct judgment.

[0060] (4) For each pixel's prediction result obtained based on the prediction confidence score, a new Destroying False (DF) loss function is constructed to constrain the loss of false positives and false negatives and ignore the loss of true positives and true negatives. The following steps are included:

[0061] (4-1) Based on the prediction confidence score of each pixel point by the network, the prediction category pred of each pixel point by the network is determined. i,j,x,y :

[0062]

[0063] Where pred i,j,x,y 0 represents the predicted result is not hepatopancreas, pred i,j,x,y The value 1 represents the predicted result is hepatopancreas.

[0064] (4-2) Construct a false elimination loss function, and for each pixel the prediction result pred i,j,x,y , constraining it to focus on how to eliminate false positives and false negatives and ignore the impact of true positives and true negatives, the false elimination loss function As shown below:

[0065]

[0066] Where N is the total number of Chinese mitten crab samples, and M is the total number of sequences for each Chinese mitten crab. i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, while the true label is non-hepatopancreas, that is, a false positive sample; FN i,j,x,y Indicates that the prediction result of the current pixel is not hepatopancreas, while the true label is hepatopancreas, which is a false negative sample; TP i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, and the true label is also hepatopancreas, that is, a true positive sample, FP i,j,x,y 、FN i,j,x,y and TP i,j,x,y They are as follows:

[0067]

[0068] Among them, gt i,j,x,y Indicates the true label of the current pixel, else indicates other situations. Eliminate false positives and false negatives by constraining the relationship between false negatives and true positives, and the relationship between false positives and true positives.

[0069] The above-mentioned false elimination loss function can effectively prevent the model from over-learning false positive and false negative samples, so that the network can focus more on learning true positive and true negative samples. Since the network designed in (4) above only uses the 2D-UNet-based architecture, it does not take into account that the task is first concerned with how to correctly classify whether the liver and pancreas are hepatopancreas or not. Here, the false elimination loss function is constructed by targeting the proportion of false positive samples predicted as positive samples and the proportion of false negative samples predicted as negative samples. The larger the proportion, the larger the loss value, thereby forcing the network to learn how to correctly predict the sample category and prevent it from learning wrong knowledge.

[0070] (5) For the prediction confidence score of each pixel, a focus loss function is introduced to constrain it to correctly balance the weights of positive and negative samples; specifically, based on the prediction confidence score score of each pixel point i,j,x,y Due to the problem of extreme imbalance between positive and negative samples, a focused loss function is constructed on the basis of the balanced cross entropy loss function to establish the connection between the predicted confidence score of the hepatopancreas of Chinese mitten crab and the true hepatopancreas label, and an adjustment factor α is added. t Reduce the weight of easy-to-classify samples, focus on the training of difficult samples, and focus on the loss function As shown below:

[0071]

[0072] In the formula, αt is an adjustment factor used to balance the number of positive and negative samples; γ is used to adjust the imbalance problem of difficult and easy samples, and reduces the loss of easy samples by a power function. By constraining the weights of positive and negative samples.

[0073] Furthermore, the total loss function described in step (6) is the false elimination loss function And the focus loss function The weighted total loss function is as follows:

[0074]

[0075] In the formula, is the total loss function, and β is the balance The weight of the proportion.

[0076] The above-mentioned focus loss function can effectively solve the imbalance problem of positive and negative samples of the hepatopancreas of Chinese mitten crab, so that the network can focus on learning true positive samples. Since the false elimination loss function designed in (5) above only eliminates the influence of false positive samples and false negative samples, it does not take into account the target task of correctly classifying the true positive hepatopancreas. In addition, since the hepatopancreas only occupies a very small part of the Chinese mitten crab in practice, the positive and negative samples of the Chinese mitten crab sequence data are extremely unbalanced. Here, by focusing more on positive samples and solving the problem of imbalance between positive and negative samples, an adjustment factor is introduced to balance the number of positive and negative samples. By assigning smaller values ​​to negative samples with a large number and larger values ​​to positive samples with a small number, the network is forced to learn how to focus on correctly classifying the positive sample category and eliminate the sample imbalance problem, thereby preventing it from learning too much negative sample knowledge.

[0077] (6) The above two loss functions are weighted as the total loss function, and then the network is trained by optimizing this loss function through gradient descent;

[0078] Wherein, the total loss function is the false elimination loss function And the focus loss function The weighted total loss function is as follows:

[0079]

[0080] In the formula, is the total loss function, and β is the balance The weight of the proportion.

[0081] (7) Save the trained DF-UNet model and test it to obtain the test results. Use accuracy and f1 coefficient as evaluation indicators to evaluate the test results and analyze the segmentation performance of the DF-UNet model.

[0082] To verify the effectiveness of the present invention, the hepatopancreas segmentation tasks of Chinese mitten crab were performed on a private hepatopancreas database of Chinese mitten crab.

[0083] The expression of the private Chinese mitten crab hepatopancreas database was processed as follows: the 149 Chinese mitten crab CT image samples obtained were divided into training data and verification data, of which 20 Chinese mitten crab CT image samples were randomly selected as verification data, including 20621 Chinese mitten crab CT image sequences, and the remaining 129 Chinese mitten crab CT image samples were used as training data, including 132801 Chinese mitten crab CT image sequences. Figure 3 As shown, the segmentation task of 2 categories is finally completed. The categories and number of samples required for the Chinese mitten crab hepatopancreas segmentation task under the private Chinese mitten crab hepatopancreas database are shown in Table 1:

[0084] Table 1

[0085] data Number of samples Number of categories Training data / Training data / sheet Verification data / Verification data / sheet private 149 2 129 132801 20 20621

[0086] The verification accuracy and f1 coefficient results are shown in Table 2:

[0087] Table 2

[0088] method Accuracy f1 coefficient DF-UNet 99.80% 86.75%

[0089] The embodiment of the present invention also provides a Chinese mitten crab hepatopancreas segmentation system based on the DF-UNet model, comprising:

[0090] Preprocessing module: used to obtain the Chinese mitten crab CT image database, including several Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels; preprocess each Chinese mitten crab CT image sequence;

[0091] DF-Unet module: used to build the DF-UNet network. The network architecture is a 2D-UNet model with the ResNet50 convolutional network as the backbone. The preprocessed image is used as the training input to obtain the network's prediction output. The prediction results distributed on the pixels are used as the discriminant confidence scores of the hepatopancreas.

[0092] Loss function module; used to construct an improved false positive elimination loss function; for the prediction confidence score of each pixel, a focus loss function is introduced to constrain it to correctly balance the weights of positive and negative samples; the false positive elimination loss function and the focus loss function are weighted as the total loss function, and then the network is trained by optimizing this loss function through gradient descent;

[0093] Prediction module: used to save the trained DF-UNet model and perform tests to obtain test results. The accuracy and f1 coefficient are used as evaluation indicators to evaluate the test results and analyze the segmentation performance of the DF-UNet model.

[0094] An embodiment of 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 when the computer program is loaded into the processor, any one of the methods for hepatopancreas segmentation of Chinese mitten crab based on the DF-UNet model is implemented.

[0095] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any one of the methods for hepatopancreas segmentation of Chinese mitten crab based on the DF-UNet model.

Claims

1. A hepatopancreas segmentation method for Chinese mitten crab based on DF-UNet model, characterized in that: The following steps are involved: (1) Obtaining a Chinese mitten crab CT image database, including a number of Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels; preprocessing each Chinese mitten crab CT image sequence; (2) Constructing a DF-UNet network, the network architecture is a 2D-UNet model with a ResNet50 convolutional network as the backbone, using the preprocessed image as the training input, and then obtaining the network prediction output, and using the prediction results distributed on the pixels as the discriminant confidence score of the hepatopancreas; including the following steps: (21) The DF-UNet network is constructed using 2D-UNet with ResNet50 as the backbone, as follows: First, the features of the five residual blocks are extracted by using the ResNet50 feature extractor, and the spatial resolution of the features is gradually reduced through four encoders. Each encoder performs two 3×3 two-dimensional convolutions and relu operations, and then downsamples; the decoder part of the 2D-UNet is used to upsample the features extracted by the encoder, and the spatial resolution of the feature dimensions is restored by four upsamplings. Finally, the output prediction result is obtained through a two-channel two-dimensional 1×1 convolution layer; (22) Obtain a single-channel W×H CT image sequence containing the computed tomography information of the entire Chinese mitten crab, where the pixel at position (x, y) is used as the descriptor c i,j,x,y , thus obtaining the descriptor C of the jth CT image of the i-th Chinese mitten crab i,j : In the formula, C i,j,x,y represents the spatiotemporal descriptor of the pixel at position (x, y) of the j-th CT image of the i-th Chinese mitten crab, and the spatial resolution of the CT image is W×H; (23) The spatiotemporal descriptors are input into the constructed DF-UNet network, which encodes and decodes each spatiotemporal descriptor and outputs the predicted confidence score for each pixel. i,j,x,y , that is, the probability that the pixel identified by the model belongs to the hepatopancreas of Chinese mitten crab: score i,j,x,y =of(ae(C i,j ))| X=x,Y=y In the formula, ae represents the encoding operation function in the selected DF-UNet, de represents the decoding operation function in DF-UNet, X represents the horizontal coordinate, Y represents the vertical coordinate, x represents the horizontal coordinate of the current pixel point, and y represents the vertical coordinate of the current pixel point; (3) Constructing an improved false positive elimination loss function; for each pixel's predicted confidence score, introducing a focus loss function to constrain it to correctly balance the weights of positive and negative samples; weighting the false positive elimination loss function and the focus loss function as the total loss function, and then optimizing this loss function by gradient descent to train the network; constructing the improved false positive elimination loss function includes the following steps: (31) Based on the prediction confidence score of each pixel point by DF-UNet, the prediction category pred of each pixel point is obtained by the network. i,j,x,y : Where pred i,j,x,y 0 represents the predicted result is not hepatopancreas, pred i,j,x,y 1 represents the predicted result is hepatopancreas; (32) Construct a false elimination loss function, and for each pixel the prediction result pred i,j,x,y , the constraint is how to eliminate false positives and false negatives and ignore the influence of true positives and true negatives, the false elimination loss function As shown below: Where, N is the total number of Chinese mitten crab samples, M is the total number of sequences for each Chinese mitten crab; FP i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, while the true label is non-hepatopancreas, that is, a false positive sample; FN i,j,x,y Indicates that the prediction result of the current pixel is not hepatopancreas, while the true label is hepatopancreas, which is a false negative sample; TP i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, and the true label is also hepatopancreas, that is, a true positive sample, FP i,j,x,y 、FN i,j,x,y and TP i,j,x,y They are as follows: Among them, gt i,j,x,y Indicates the true label of the current pixel, else indicates other situations. Eliminate false positives and false negatives by constraining the relationship between false negatives and true positives and the relationship between false positives and true positives; Focus loss function As shown below: In the formula, α t is an adjustment factor used to balance the number of positive and negative samples; γ is used to adjust the imbalance problem of difficult and easy samples, and reduces the loss of easy samples by a power function; (4) Save the trained DF-UNet model and perform tests to obtain test results. Use accuracy and f1 coefficient as evaluation indicators to evaluate the test results and analyze the segmentation performance of the DF-UNet model.

2. According to the DF-UNet model-based hepatopancreas segmentation method of Chinese mitten crab according to claim 1, it is characterized in that: The specific preprocessing of step (1) is as follows: image filling, fixing the window position and window width, and normalizing the image pixels with the window position as the center.

3. The hepatopancreas segmentation method of Chinese mitten crab based on DF-UNet model according to claim 1, characterized in that: In step (3), the total loss function is the false elimination loss function And the focus loss function The weighted total loss function is as follows: In the formula, is the total loss function, β is the balance The weight of the proportion.

4. A hepatopancreas segmentation system for Chinese mitten crab based on DF-UNet model, characterized in that: include: Preprocessing module: used to obtain the Chinese mitten crab CT image database, including several Chinese mitten crab CT image sequences and corresponding Chinese mitten crab hepatopancreas mask labels; preprocess each Chinese mitten crab CT image sequence; DF-Unet module: used to build the DF-UNet network. The network architecture is a 2D-UNet model with ResNet50 convolutional network as the backbone. The preprocessed image is used as the training input to obtain the network prediction output. The prediction results distributed on the pixels are used as the discriminant confidence scores of the hepatopancreas. It includes: The DF-UNet network is constructed using 2D-UNet with ResNet50 as the backbone, as follows: First, the features of the five residual blocks are extracted by using the ResNet50 feature extractor, and the spatial resolution of the features is gradually reduced through four encoders. Each encoder performs two 3×3 two-dimensional convolutions and relu operations, and then downsamples; the decoder part of 2D-UNet is used to upsample the features extracted by the encoder, and the spatial resolution of the feature dimensions is restored through four upsamplings. Finally, the output prediction result is obtained through a two-channel two-dimensional 1×1 convolution layer; Get a single-channel W×H CT image sequence, which contains the computed tomography information of the entire Chinese mitten crab, where the pixel at position (x, y) is used as the descriptor c i,j,x,y , thus obtaining the descriptor C of the jth CT image of the i-th Chinese mitten crab i,j : In the formula, C i,j,x,y The spatiotemporal descriptor of the pixel at position (x, y) in the j-th CT image of the i-th Chinese mitten crab. The spatial resolution of the CT image is W×H. The spatiotemporal descriptors are input into the constructed DF-UNet network, which encodes and decodes each spatiotemporal descriptor and outputs the predicted confidence score for each pixel. i,j,x,y , that is, the probability that the pixel identified by the model belongs to the hepatopancreas of Chinese mitten crab: score i,j,x,y =of(ae(C i,j ))| X=x,Y=y In the formula, ae represents the encoding operation function in the selected DF-UNet, de represents the decoding operation function in DF-UNet, X represents the horizontal coordinate, Y represents the vertical coordinate, x represents the horizontal coordinate of the current pixel point, and y represents the vertical coordinate of the current pixel point; Loss function module: used to construct an improved false positive elimination loss function; for each pixel's predicted confidence score, introduce a focus loss function to constrain it to correctly balance the weights of positive and negative samples; weight the false positive elimination loss function and the focus loss function as the total loss function, and then optimize this loss function through gradient descent to train the network; constructing an improved false positive elimination loss function includes: Based on the prediction confidence score of each pixel point by DF-UNet, the prediction category pred of each pixel point is obtained by the network. i,j,x,y : Where pred i,j,x,y 0 represents the predicted result is not hepatopancreas, pred i,j,x,y 1 represents the predicted result is hepatopancreas; Construct a false elimination loss function, and the prediction result pred for each pixel i,j,x,y , the constraint is how to eliminate false positives and false negatives and ignore the influence of true positives and true negatives, the false elimination loss function As shown below: Where, N is the total number of Chinese mitten crab samples, M is the total number of sequences for each Chinese mitten crab; FP i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, while the true label is non-hepatopancreas, that is, a false positive sample; FN i,j,x,y Indicates that the prediction result of the current pixel is not hepatopancreas, while the true label is hepatopancreas, which is a false negative sample; TP i,j,x,y Indicates that the prediction result of the current pixel is hepatopancreas, and the true label is also hepatopancreas, that is, a true positive sample, FP i,j,x,y 、FN i,j,x,y and TP i,j,x,y They are as follows: Among them, gt i,j,x,y Indicates the true label of the current pixel, else indicates other situations. Eliminate false positives and false negatives by constraining the relationship between false negatives and true positives and the relationship between false positives and true positives; Focus loss function As shown below: In the formula, α t is an adjustment factor used to balance the number of positive and negative samples; γ is used to adjust the imbalance problem of difficult and easy samples, and reduces the loss of easy samples by a power function; Prediction module: used to save the trained DF-UNet model and perform tests to obtain test results. The accuracy and f1 coefficient are used as evaluation indicators to evaluate the test results and analyze the segmentation performance of the DF-UNet model.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the hepatopancreas segmentation method of Chinese mitten crab based on the DF-UNet model is implemented according to any one of claims 1 to 3.

6. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the hepatopancreas segmentation method of Chinese mitten crab based on the DF-UNet model according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Eriocheir sinensis strain identification method based on deep learning

    CN116385826A

  • Underwater shrimp contour and visceral organ feature recognition system

    CN117456555A