A method for generating a three-dimensional irregular removal interface of pig tail fork bones
Through block processing and adaptive three-dimensional segmentation model, the problem of complex area processing in pig tail fork bone removal is solved, efficient and accurate erasure interface generation is achieved, and the quality and efficiency of erasure are improved.
Patent Information
- Application Number
- CN202510344992.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The prior art is difficult to accurately handle complex areas during pig tail fork bone removal, resulting in inefficient removal quality and efficiency, and rely too much on standard models, reducing the flexibility of handling non-standard shapes.
A three-dimensional irregular culling interface generation method for pig tail fork bones is adopted. By obtaining the three-dimensional curvature model of the tail fork bones, regions with similar complexity are processed in blocks, and an adaptive 3D segmentation model is constructed, and the segmentation strategy is dynamically adjusted to generate the optimal culling interface.
It realizes flexible processing of bone deformation forms, ensures the continuity and smoothness of the removal interface, reduces meat loss, and improves the accuracy and efficiency of segmentation.
Smart Images

Figure CN119904581B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of livestock carcass segmentation, and particularly to a method for generating a three-dimensional irregular removal interface of pig tail fork bones. Background Art
[0002] Pork is rich in nutrition and is widely used in various dishes and food processing, being an indispensable part of the global food culture. In the process of pork production, fine segmentation is a key step to ensure meat quality and economic benefits. Among them, the geometric structure of the tail fork bone is complex, with variable and irregular shapes, and removing it from the pig's hind leg has always been a complex and challenging task. Currently, the removal of tail fork bones in China still mostly relies on manual labor. During the manual boning process, even with certain segmentation experience, due to the complexity and invisibility of the bone structure, there will still be problems such as damage to the key soft tissues closely connected to the tail fork bone, tool sliding and jamming during boning, and it is difficult to maintain the same shape requirements for the tail fork bone after removal, resulting in low removal quality and efficiency. When using mechanical automation for boning, although it can reduce the labor burden of workers and improve the boning efficiency, it is difficult to obtain the precise removal interface between the pig tail fork bone and the surrounding tissues before the machine performs the boning operation, resulting in the tool being unable to cut along the predetermined trajectory and causing meat loss.
[0003] The invention patent with the application number 202111393371.7 discloses a livestock carcass boning and segmentation device and method. The boning and segmentation device includes: a workbench, a bone scanning mechanism, a segmentation and boning robot, and an auxiliary grasping robot. The boning and segmentation method is as follows: fix the livestock carcass to be segmented on the workbench; move the workbench to the scanning position and use the X-ray in the bone scanning mechanism to obtain the bone shape and position information; move the workbench to the cutting position and start the grasping device to assist in fixing the bone; the segmentation and boning robot automatically adjusts the cutting path according to the scanned bone information to complete the segmentation; put the separated bones and meat into the material baskets respectively. Specifically, the shape, density, position, and two-dimensional image data of the pig bone are captured by the X-ray scanning device in the bone scanning mechanism, and through an algorithm, they are converted into the three-dimensional shape information of the bone to form a bone model. Compare the current bone model with the standard bone model to obtain the deviation value between the actual bone and the standard bone, and use this deviation value to correct the preset boning path and motion trajectory of the segmentation and boning robot. This method has a simple process, is easy to control and implement, and improves the accuracy and stability to a certain extent. However, it is too dependent on the standard model, reducing the flexibility when dealing with non-standard shapes. In the case of large deviations or sudden changes in the bone structure, it may cause the segmentation path to deviate, resulting in meat loss, and the method is based on the deviation calculation of the overall model rather than making fine adjustments and optimizations to the segmentation path for complex local areas in the bone structure, which will affect the consistency of the removal effect. Summary of the Invention
[0004] In view of the problems in the prior art, the present invention provides a method for generating a three-dimensional irregular removal interface of pig tail fork bones, aiming to process the morphology of the complex area of the tail fork bones and obtain an accurate tail fork bone removal interface.
[0005] A method for generating a three-dimensional irregular removal interface of pig tail fork bones includes the following steps:
[0006] Step 1: Obtain a three-dimensional curvature model of the tail fork bones;
[0007] Step 2: Based on the three-dimensional curvature model, divide the tail fork bone area into blocks according to the complexity of the shape of the tail fork bones, and obtain areas with similar complexity and record them as blocks;
[0008] Step 3: For different areas with similar complexity, construct an adaptive three-dimensional segmentation model to obtain the optimal tail fork bone removal interface.
[0009] Furthermore, the adaptive three-dimensional segmentation model includes a first network unit, a second network unit, and an overall adaptive three-dimensional segmentation network. The first network unit is used to process the complexity score data of each block in the tail fork bone area to form a complexity score processing layer, and then introduce it to the key position of the second network unit. According to the distribution of the complexity score data and the input feature map, a dynamic feature modeling path is generated through the Mamba module;
[0010] The second network unit is used to process the three-dimensional point cloud data in the tail fork bone area, gradually extract and restore features, and perform a preliminary segmentation of the tail fork bone area;
[0011] The overall adaptive three-dimensional segmentation network is jointly composed of the first network unit and the second network unit. The second network unit combines the complexity score processing layer and the Mamba module in the first network unit to segment and refine the features of each block in the tail fork bone area, and generate the final accurate tail fork bone removal interface.
[0012] Furthermore, the first network unit consists of two parts: a complexity score processing layer and a Mamba module;
[0013] The complexity score processing layer processes the complexity score data through a fully connected layer (FC), and expands the score into a tensor form that matches the dimension of the feature map at the key position of the second network unit;
[0014] The Mamba module consists of a linear transformation (Linear), a 1D convolution (Conv1D), a non-linear activation function (SiLU), and a selective state space (S6); in the Mamba module, the input feature map 𝑥 first undergoes two parallel linear transformations to generate two different feature streams; secondly, the first feature stream undergoes a 1D convolution operation to capture local tailbone features and extract the local feature patterns and short-term dependencies of the features; then, both feature streams pass through the Silu activation function, and the formula of the SiLU activation function is:
[0015]
[0016] where is the Sigmoid function, which enhances the sensitivity to the input value;
[0017] Then, the first feature stream continues to pass through the selective state space; finally, the two feature streams are added together through a residual connection to obtain the fused features, and the fused features pass through a linear layer to generate the final output features.
[0018] Furthermore: The Mamba module dynamically adjusts the feature map generated by a specific path through the selective state space, that is, it models the path for generating dynamic features.
[0019] Furthermore: The second network unit consists of a 3D U-Net framework;
[0020] The 3D U-Net framework includes 3 encoding layers, 1 bottleneck layer, and 3 decoding layers. Each encoding layer consists of two 3D convolutional layers (Conv). After each 3D convolutional layer, batch normalization (BN) and the Relu activation function (Conv+BN+Relu) are connected. At the end of each encoding layer, a 3D max pooling (Max pool) operation is adopted to halve the resolution of the feature map. During the encoding process of the encoding layer, the number of feature channels of the second network unit doubles;
[0021] The bottleneck layer contains two consecutive 3D convolution operations;
[0022] Each decoding layer contains one transposed convolution operation and is used to upsample the feature map. The feature map formed after upsampling is concatenated (Cat) with the corresponding encoding layer feature map through a skip connection to combine low-level and high-level feature maps; the concatenated feature map undergoes two 3D convolutional layers, batch normalization, and the Relu activation function operations; a single 3D convolution operation is added to the last decoding layer.
[0023] Furthermore, there are 3 key positions in the second network unit, namely: the position after Max pool in the third encoding layer, the position after Up Conv in the first decoding layer, and the position after Up Conv in the third decoding layer.
[0024] Furthermore, the overall adaptive 3D segmentation network consists of 3 encoding layers, 1 bottleneck layer, and 3 decoding layers;
[0025] The first two encoding layers of the overall adaptive 3D segmentation network are the same as the first two encoding layers in the second network unit. The third encoding layer of the overall adaptive 3D segmentation network includes the same structure as the third encoding layer of the second network unit, and at the position after Max pool in the same structure as the third encoding layer of the second network unit, the score in the complexity scoring processing layer is extended to a tensor with the same shape as the feature map generated after the Max pool operation; then, a broadcast operation is performed between the complexity scoring processing layer and the feature map generated after the Max pool operation, and the feature map generated after the broadcast operation is the deep feature map of this third encoding layer. The broadcast operation introduces the complexity scoring processing layer of this part to the key position after Max pool in the third encoding layer of the second network unit; finally, through the Mamba module, selective modeling is further performed on the deep feature map generated after the broadcast operation of the third encoding layer, and the feature expression ability of the network is enhanced through local convolution and the state space mechanism, so as to adapt to the feature requirements of different complexity regions, forming the third encoding layer of the overall adaptive 3D segmentation network;
[0026] The bottleneck layer of the adaptive 3D segmentation network is used to connect the encoding layer and the decoding layer, and is the same as the bottleneck layer in the second network unit;
[0027] The first decoding layer of the overall adaptive 3D segmentation network includes the same structure as the first decoding layer of the second network unit. At the position after the transposed convolution in the same structure as the first decoding layer of the second network unit, the score in the complexity scoring processing layer is extended to a tensor with the same shape as the feature map generated after the transposed convolution operation; then, a broadcast operation is performed between the complexity scoring processing layer and the feature map generated after the transposed convolution operation, and the feature map generated after the broadcast operation is the deep feature map of the first decoding layer of the adaptive 3D segmentation network. The broadcast operation introduces the complexity scoring processing layer of this part to the position after the transposed convolution in the first decoding layer of the second network unit; then, through the Mamba module, selective modeling is further performed on the deep feature map generated after the broadcast operation of the first decoding layer, and the feature expression ability of the network is enhanced through local convolution and the state space mechanism, so as to adapt to the feature requirements of different complexity regions; finally, after two 3D convolutional layers, batch normalization, and Relu activation function operations (Conv + BN + Relu 2) After that, the first decoding layer of the adaptive three-dimensional segmentation network is formed;
[0028] The second decoding layer of the adaptive three-dimensional segmentation network is the same as the second decoding layer in the second network unit;
[0029] The third decoding layer of the overall adaptive three-dimensional segmentation network includes the same structure as the third decoding layer of the second network unit. At the position after deconvolution in the same structure as the first decoding layer of the second network unit, the score in the complexity scoring processing layer will be extended to a tensor with the same shape as the feature map generated after the deconvolution operation; then, a broadcast operation is performed between the complexity scoring processing layer and the feature map generated after the deconvolution operation. The feature map generated after the broadcast operation is the deep feature map of the first decoding layer of the adaptive three-dimensional segmentation network. The broadcast operation introduces the complexity scoring processing layer of this part after deconvolution in the first decoding layer of the second network unit; then, the Mamba module further selectively models the deep feature map generated after the broadcast operation of the first decoding layer, enhancing the feature expression ability of the network through local convolution and state space mechanism, so as to adapt to the feature requirements of different complexity regions; finally, after two 3D convolutional layers, batch normalization, and Relu activation function operations (Conv+BN+Relu 2) After that, the third decoding layer of the adaptive three-dimensional segmentation network is formed;
[0030] Furthermore, the adaptive three-dimensional segmentation model is trained using the cross-entropy loss function, an additional regularization term to balance the model, and the gradient descent optimization algorithm.
[0031] Furthermore, step 1 includes the following steps:
[0032] Step 1.1: According to the cross-sectional slice images of the three-dimensional model of the pig's hind leg, use threshold segmentation technology to obtain the preliminary segmentation line of the pig's hind leg tail fork bone;
[0033] Step 1.2: Conduct curvature analysis on the preliminary segmentation line, quantify the degree of bone curvature in each slice image, and obtain the curvature value of the preliminary segmentation line on each slice image;
[0034] Step 1.3: Use the multi-directional slice curvature value data mapping method to construct a three-dimensional curvature model for the tail fork bone.
[0035] Furthermore, step 2.1: Map the curvature data in each slice image in each direction into three-dimensional space respectively to obtain three-dimensional point clouds containing curvature information in each direction, set the number of block categories , and divide the three-dimensional point cloud into blocks;
[0036] For the three-dimensional point cloud, the feature vector of each point consists of its three-dimensional spatial position and curvature values which consists of, that is, the feature vector is ; First, sort the curvature values of all points. After sorting, the threshold can be directly determined based on the statistical distribution of the curvature values. After sorting the curvature values from small to large, select appropriate multiple quantiles as the thresholds for dividing complexity level regions. According to the set thresholds, correspond the position of each point in the three-dimensional space of the tail fork bone with its curvature category to form point sets with different complexities, which consists of different block regions, that is, blocks;
[0037] Step 2.2: Use the K-Means++ method to initialize the cluster centers;
[0038] Randomly select a data point from the dataset formed by the three-dimensional point cloud as the first cluster center; calculate the Euclidean distance between each data point in the dataset and the cluster center; for each data point that has not been selected as a cluster center, calculate its distance to the nearest cluster center; according to the squares of these distances, assign the probability of being selected as the next cluster center. The greater the distance, the higher the probability of being selected; use the probability distribution calculated in the previous step to select a new cluster center through random sampling; repeat the above steps until cluster centers are selected. The N selected cluster centers are the initial center points;
[0039] Each time the K-Means++ algorithm selects a new center, it calculates the distances and probabilities based on the currently selected centers and all data points. Let the coordinates of the data point P in the three-dimensional curvature model be , and the coordinates of the cluster center C be ;
[0040] Step 2.3: Perform class assignment on the three-dimensional curvature model to obtain a preliminary classification result;
[0041] Assign each data point to the "cluster" where the nearest initial center point is located to form classes, that is, classify each part of the tail fork bone into the group with the most similar complexity for preliminary classification. The class assignment process is as follows: For each data point , calculate its distance from each cluster center , and assign to the cluster center closest to it;
[0042] Step 2.4: Update the cluster centers, that is, according to the preliminary classification result, recalculate the center points of each cluster, that is, calculate the average position of all points in each class as the new cluster center;
[0043] Step 2.5: Iterative optimization, that is, repeat Step 2.3 and Step 2.4. When the positions of the clustering center points tend to be stable or reach a predetermined number of iterations, obtain the results of clusters, and form
[0044] sub-blocks composed of points of the same curvature category, that is, regions with similar complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a schematic flowchart of the present invention;
[0046] Figure 2 is a network structure diagram of the adaptive three-dimensional segmentation model. DETAILED DESCRIPTION OF THE INVENTION
[0047] The present invention will be described in detail below with reference to the accompanying drawings. The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention. The azimuth terms such as left, middle, right, up, and down in the embodiments of the present invention are only relative concepts to each other or are referenced based on the normal use state of the product, and should not be considered as restrictive.
[0048] A method for generating a three-dimensional irregular removal interface of a pig tail fork bone, as Figure 1 shown, includes the following steps:
[0049] Step 1: Obtain a three-dimensional curvature model of the tail fork bone;
[0050] Step 1.1: According to the sliced images of each cross-section of the three-dimensional model of the pig hind leg, use the threshold segmentation technology to obtain the preliminary segmentation line of the tail fork bone of the pig hind leg;
[0051] Step 1.2: Perform curvature analysis on the preliminary segmentation line, quantify the bending degree of the bone in each sliced image, and obtain the curvature value of the preliminary segmentation line on each sliced image;
[0052] Step 1.3: Use the multi-directional sliced curvature value data mapping method to construct a three-dimensional curvature model for the tail fork bone;
[0053] Step 2: Based on the three-dimensional curvature model, divide the caudal furcal bone region according to the complexity of the shape of the caudal furcal bone, obtain regions with similar complexity and denote them as blocks.
[0054] Step 2.1: Map the curvature data in each slice image in each direction to the three-dimensional space respectively, obtain the three-dimensional point cloud containing curvature information in each direction, and set the number of block categories. , and divide the three-dimensional point cloud into blocks.
[0055] Before clustering, it is necessary to perform feature selection and preparation on the data of the bone three-dimensional model; for the three-dimensional point cloud, the feature vector of each point consists of its three-dimensional spatial position and the curvature value , that is, the feature vector is ; first sort the curvature values of all points, and after sorting, the threshold can be directly determined according to the statistical distribution of the curvature values; after sorting the curvature values from small to large, select appropriate quantiles, such as the 10th%, 30th%, 50th% quantiles, etc. as the thresholds for dividing regions with different complexity levels. For example, when the number of categories is 2, select the 50th% quantile (i.e., the median) as the threshold to divide the curvature point set into two parts: a high-complexity region and a low-complexity region. When the number of categories is 4, select the 25th%, 50th%, and 75th% quantiles as the thresholds to divide the curvature point set into four parts with different complexities; according to the set thresholds, correspond the position of each point in the three-dimensional space of the caudal furcal bone with its curvature category to form point sets with different complexities, and form different block regions, that is, blocks.
[0056] Step 2.2: Use the K-Means++ method to initialize the clustering centers to reduce the influence of outliers.
[0057] In the three-dimensional curvature model of the caudal furcal bone, the appearance of curvature outliers may be caused by pathological changes, trauma or other atypical features of the bone; therefore, the present invention uses K-Means++ to select the initial clustering centers to reduce the influence of outliers. The steps of the K-Means++ algorithm are as follows: randomly select a data point from the dataset formed by the three-dimensional point cloud as the first clustering center; calculate the Euclidean distance between each data point in the dataset and the clustering center; for each data point that has not been selected as the clustering center, calculate its distance from the nearest clustering center; according to the squares of these distances, assign the probability of being selected as the next clustering center, the greater the distance, the higher the probability of being selected; use the probability distribution calculated in the previous step to select a new clustering center by random sampling; repeat the above steps until The N cluster centers selected are the initial center points;
[0058] When the K-Means++ algorithm selects a new center each time, it calculates distances and probabilities based on the currently selected centers and all data points. This approach significantly improves the stability and clustering quality of the algorithm. Let the coordinates of data point P in the three-dimensional curvature model be , and the coordinates of cluster center C be ;
[0059] Step 2.3: Perform class assignment on the three-dimensional curvature model to obtain a preliminary classification result;
[0060] Assign each data point to the "cluster" where the nearest initial center point is located to form classes, that is, classify each part of the tail fork bone into the group with the most similar complexity for preliminary classification; The class assignment process is as follows: For each data point , calculate its distance from each cluster center , and assign to the cluster center closest to it;
[0061] Step 2.4: Update the cluster centers, that is, according to the preliminary classification result, recalculate the center points of each cluster, that is, calculate the average position of all points in each class as the new cluster centers;
[0062] Step 2.5: Iterative optimization, that is, repeat Step 2.3 and Step 2.4. When the positions of the cluster centers tend to be stable or reach a predetermined number of iterations, obtain the results of clusters, forming
[0063] sub-blocks composed of points of the same curvature class, that is, regions with similar complexity;
[0064] Among them, for the problem that the bone structure is complex and diverse and the regional characteristics are significantly different during the tail fork bone removal process, existing segmentation methods usually adopt a unified calculation strategy, which is difficult to balance the efficiency of simple regions and the refined requirements of complex regions. The present invention proposes an adaptive three-dimensional segmentation model; this model is a segmentation model that can dynamically adjust the segmentation strategy according to regional complexity to achieve efficient and refined segmentation. The adaptability of this model is mainly the adaptability to the complexity of the tail fork bone model, and the complexity scores of each sub-block of the calculated tail fork bone model After that, the model can adjust the segmentation strategy according to the complexity of each block. For regions with lower scores, the model uses a shallow network, fewer feature extraction layers, or smaller convolutional kernels to reduce waste of computing resources. For regions with higher scores, the model enables a deeper network structure and more feature extraction modules to enhance the model's ability to capture details. This adaptability is achieved by dynamically adjusting the depth of feature extraction of the network, avoiding a "one-size-fits-all" calculation method for all regions, and can improve the segmentation efficiency of the model while ensuring segmentation accuracy. The adaptive three-dimensional segmentation model is trained using the cross-entropy loss function, an additional regularization term to balance the model, and the gradient descent optimization algorithm.
[0065] Combined Figure 2 As shown, the adaptive three-dimensional segmentation model includes a first network unit, a second network unit, and an overall adaptive three-dimensional segmentation network.
[0066] The first network unit is used to process the complexity score data of each block in the tail fork bone region to form a complexity score processing layer, which is then introduced to a key position in the second network unit. According to the distribution of the complexity score data and the input feature map, a dynamic feature modeling path is generated through the Mamba module. The first network unit consists of two parts: a complexity score processing layer and a Mamba module. The complexity score processing layer processes the complexity score data through a fully connected layer (FC) and expands the score into a tensor form that matches the dimension of the feature map at the key position of the second network unit. The Mamba module consists of a linear transformation (Linear), a 1D convolution (Conv1D), a non-linear activation function (SiLU), and a selective state space (S6). In the Mamba module, the input feature map 𝑥 first undergoes two parallel linear transformations to generate two different feature streams. Secondly, the first feature stream undergoes a 1D convolution operation to capture local tail fork bone features and extract local feature patterns and short-term dependencies of the features. Then, both feature streams pass through the Silu activation function to increase the non-linear expression ability of the features. The formula for the SiLU activation function is:
[0067]
[0068] Among them, is the Sigmoid function, which enhances the sensitivity to the input value;
[0069] Then, the first feature stream continues to pass through the selective state space, which controls the retention or update of the state through a gating mechanism, captures global tail fork bone features, and enhances the dynamic modeling ability of the model. Finally, the two feature streams are added together through a residual connection to obtain the fused feature, and the fused feature is then passed through a linear layer to generate the final output feature.
[0070] The Mamba module dynamically adjusts the feature maps generated by specific paths through selective state spaces, namely, modeling the paths for generating dynamic features;
[0071] The second network unit is used to process the three-dimensional point cloud data of the tail fork bone region, gradually extract and restore features, and perform a preliminary segmentation of the tail fork bone region; the overall adaptive three-dimensional segmentation network is jointly composed of the first network unit and the second network unit. The second network unit combines the complex scoring processing layer and the Mamba module in the first network unit to segment and refine the features of each block in the tail fork bone region, generating the final accurate tail fork bone removal interface; the second network unit is composed of a 3D U-Net framework;
[0072] The 3D U-Net framework includes 3 encoding layers, 1 bottleneck layer, and 3 decoding layers. Each encoding layer is composed of two 3D convolutional layers (Conv). After each 3D convolutional layer, batch normalization (BN) and the Relu activation function (Conv + BN + Relu) are connected. At the end of each encoding layer, a 3D max pooling (Max pool) operation is adopted to halve the resolution of the feature map. During the encoding process of the encoding layer, the number of feature channels of the second network unit doubles; the bottleneck layer is used to perform high-level feature extraction and global modeling in the feature space with the lowest resolution, capturing the global context information of the tail fork bone region. The bottleneck layer contains two consecutive 3D convolutional operations, and the receptive field of the convolutional kernel is relatively large, used to capture more complex spatial features; the decoder is used to gradually upsample the low-resolution features extracted by the bottleneck layer, restore the high-resolution feature map, and generate the final segmentation result; each decoding layer contains an anti-convolution (Up Conv) operation and is used to upsample the feature map. The feature map formed after upsampling is concatenated (Cat) with the corresponding encoding layer feature map through a skip connection, combining low-level and high-level feature maps; the concatenated feature map undergoes two 3D convolutional layers, batch normalization, and Relu activation function operations; a separate 3D convolutional operation is added to the last decoding layer; the restored high-resolution feature map is further processed to optimize the boundaries and details of the segmentation result, ensuring that the output resolution is the same as the input;
[0073] Among them, there are 3 key positions in the second network unit, namely: the position after Max pool in the third encoding layer, the position after Up Conv in the first decoding layer, and the position after Up Conv in the third decoding layer;
[0074] The overall adaptive three-dimensional segmentation network is composed of 3 encoding layers, 1 bottleneck layer, and 3 decoding layers;
[0075] The overall adaptive 3D segmentation network is based on the classical 3D U-Net structure, combines the Mamba module and the embedding of the complexity score 𝑆 to achieve precise segmentation of the chunk data in the tail fork bone region; the overall network consists of an encoder, a bottleneck layer, and a decoder, and through the collaborative work of the first network unit and the second network unit, dynamically optimizes feature extraction and recovery, and finally generates a high-resolution segmentation result; the first two encoding layers of the overall adaptive 3D segmentation network are the same as the first two encoding layers in the second network unit, and the third encoding layer of the overall adaptive 3D segmentation network includes the same structure as the third encoding layer of the second network unit, and at the position after Max pool in the same structure as the third encoding layer of the second network unit, the score in the complexity score processing layer is expanded into a tensor with the same shape as the feature map generated after the Max pool operation; then, a broadcast operation is performed on the feature map generated after the complexity score processing layer and the feature map generated after the Max pool operation, and the feature map generated after the broadcast operation is the deep feature map of the third encoding layer. The broadcast operation introduces the complexity score processing layer of this part at the key position after Max pool in the third encoding layer of the second network unit; finally, through the Mamba module, selective modeling is further performed on the deep feature map generated after the broadcast operation of the third encoding layer, and the feature expression ability of the network is enhanced through local convolution and state space mechanism, so as to adapt to the feature requirements of different complexity regions, and the third encoding layer of the overall adaptive 3D segmentation network is formed;
[0076] The bottleneck layer of the adaptive 3D segmentation network is used to connect the encoding layer and the decoding layer, and is mainly responsible for global feature modeling of the feature map with the lowest resolution, and is the same as the bottleneck layer in the second network unit;
[0077] The first decoding layer of the overall adaptive 3D segmentation network includes the same structure as the first decoding layer of the second network unit. At the position after the transposed convolution in the same structure as the first decoding layer of the second network unit, the score in the complexity score processing layer will be expanded into a tensor with the same shape as the feature map generated after the transposed convolution operation; then, a broadcast operation is performed on the feature map generated after the complexity score processing layer and the feature map generated after the transposed convolution operation, and the feature map generated after the broadcast operation is the deep feature map of the first decoding layer of the adaptive 3D segmentation network. The broadcast operation introduces the complexity score processing layer of this part after the transposed convolution in the first decoding layer of the second network unit; then, through the Mamba module, selective modeling is further performed on the deep feature map generated after the broadcast operation of the first decoding layer, and the feature expression ability of the network is enhanced through local convolution and state space mechanism, so as to adapt to the feature requirements of different complexity regions; finally, after two 3D convolutional layers, batch normalization, and Relu activation function operations (Conv+BN+Relu 2), the first decoding layer of the adaptive 3D segmentation network is formed;
[0078] The second decoding layer of the adaptive three-dimensional segmentation network is the same as the second decoding layer in the second network unit;
[0079] The third decoding layer of the overall adaptive three-dimensional segmentation network includes the same structure as the third decoding layer of the second network unit. At the position after deconvolution in the same structure as the first decoding layer of the second network unit, the score in the complexity scoring processing layer will be extended to a tensor with the same size as the feature map generated after the deconvolution operation; then, a broadcast operation is performed between the complexity scoring processing layer and the feature map generated after the deconvolution operation. The feature map generated after the broadcast operation is the deep feature map of the first decoding layer of the adaptive three-dimensional segmentation network, and the broadcast operation introduces the complexity scoring processing layer of this part after deconvolution in the first decoding layer of the second network unit; then, the Mamba module further performs selective modeling on the deep feature map generated after the broadcast operation of the first decoding layer, enhancing the feature expression ability of the network through local convolution and state space mechanism, so as to adapt to the feature requirements of different complexity regions; finally, after two operations of 3D convolutional layer, batch normalization, and Relu activation function (Conv+BN+Relu 2), the third decoding layer of the adaptive three-dimensional segmentation network is formed.
[0080] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and all these changes and improvements fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating a three-dimensional irregular elimination interface of a pigtail wishbone, characterized in that: The following steps are involved: Step 1: Obtain a three-dimensional curvature model of the coccygeal wishbone; Step 2: Based on the three-dimensional curvature model, the coccyx region is divided into blocks according to the complexity of the shape of the coccyx, and regions with similar complexity are obtained and recorded as blocks; Step 3: For regions with different similar complexities, an adaptive three-dimensional segmentation model is constructed to obtain the optimal forkbone removal interface; wherein the adaptive three-dimensional segmentation model includes a first network unit, a second network unit and an overall adaptive three-dimensional segmentation network, wherein the first network unit is used to process the complexity score data of each block in the forkbone region to form a complexity score processing layer, which is then introduced into the key position of the second network unit, and a dynamic feature modeling path is generated through the Mamba module according to the distribution of the complexity score data and the input feature map; The second network unit is used to process the three-dimensional point cloud data of the coccyx region, and then gradually extract and restore features to perform preliminary segmentation of the coccyx region; The overall adaptive three-dimensional segmentation network is composed of a first network unit and a second network unit. The second network unit combines the complex scoring processing layer and the Mamba module in the first network unit to segment and refine the features of each block in the forkbone area to generate the final accurate forkbone removal interface.
2. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 1, characterized in that: The first network unit consists of two parts: the complexity score processing layer and the Mamba module; The complexity score processing layer processes the complexity score data through a fully connected layer and expands the score into a tensor form that matches the dimension of the feature map of the key position of the second network unit; The Mamba module consists of linear transformation, 1D convolution, nonlinear activation function and selective state space. In the Mamba module, the input feature map 𝑥 first undergoes two parallel linear transformations to generate two different feature streams. Secondly, the first feature stream is subjected to a 1D convolution operation to capture the local coccygeal features and extract the local feature patterns and short-term dependencies of the features. Then, both feature streams pass through the Silu activation function. The formula of the SiLU activation function is: ; in, is the Sigmoid function; Then, the first feature stream continues to pass through the selective state space; finally, the two feature streams are added through the residual connection to obtain the fused features, and the fused features are then passed through the linear layer to generate the final output features.
3. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 2, characterized in that: The Mamba module dynamically adjusts the feature maps generated by a specific path through the selective state space, that is, the generated dynamic feature modeling path.
4. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 3, characterized in that: The second network unit is composed of a 3D U-Net framework; The 3D U-Net framework consists of 3 encoding layers, 1 bottleneck layer and 3 decoding layers. Each encoding layer consists of two 3D convolutional layers. Each 3D convolutional layer is followed by batch normalization and Relu activation function. At the end of each encoding layer, 3D maximum pooling operation is used to halve the resolution of the feature map. During the encoding process of the encoding layer, the number of feature channels of the second network unit is doubled. The bottleneck layer contains two consecutive 3D convolution operations; Each decoding layer contains a deconvolution operation and is used to upsample the feature map. The feature map formed after upsampling is concatenated with the corresponding encoding layer feature map through jump connections to combine low-level and high-level feature maps; the concatenated feature map undergoes two 3D convolution layers, batch normalization, and Relu activation function operations; a separate 3D convolution operation is added to the last decoding layer.
5. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 4, characterized in that: There are three key positions of the second network unit, namely: the position after the Max pool in the third encoding layer, the position after the Up Conv in the first decoding layer, and the position after the Up Conv in the third decoding layer.
6. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 4, characterized in that: The overall adaptive 3D segmentation network consists of 3 encoding layers, 1 bottleneck layer and 3 decoding layers; The first two coding layers of the overall adaptive three-dimensional segmentation network are the same as the first two coding layers in the second network unit. The third coding layer of the overall adaptive three-dimensional segmentation network includes the same structure as the third coding layer of the second network unit, and in the same structure as the third coding layer of the second network unit, the score in the complexity score processing layer is expanded to a tensor that is the same as the feature map generated after the Max pool operation. Then, the complexity score processing layer and the feature map generated after the Max pool operation are broadcasted, and the feature map generated after the broadcast operation is the deep feature map of the third coding layer. The broadcast operation introduces the key position after the Max pool in the third coding layer of the second network unit into the complexity score processing layer of this part. Finally, the deep feature map generated after the broadcast operation of the third coding layer is further selectively modeled through the Mamba module, and the feature expression ability of the network is enhanced through local convolution and state space mechanisms, so as to adapt to the feature requirements of different complexity areas, and form the third coding layer of the overall adaptive three-dimensional segmentation network. The bottleneck layer of the adaptive 3D segmentation network is used to connect the encoding layer and the decoding layer, and is the same as the bottleneck layer in the second network unit; The first decoding layer of the overall adaptive three-dimensional segmentation network includes the same structure as the first decoding layer of the second network unit. In the same structure as the first decoding layer of the second network unit, after deconvolution, the score in the complexity score processing layer will be expanded to the same tensor as the feature map generated after the deconvolution operation; then, the complexity score processing layer and the feature map generated after the deconvolution operation are broadcasted, and the feature map generated after the broadcasting operation is the deep feature map of the first decoding layer of the adaptive three-dimensional segmentation network. The broadcasting operation introduces the complexity score processing layer of this part after deconvolution in the first decoding layer of the second network unit; then, the deep feature map generated after the broadcasting operation of the first decoding layer is further selectively modeled through the Mamba module, and the feature expression ability of the network is enhanced through local convolution and state space mechanisms, so as to adapt to the feature requirements of different complexity areas; finally, after two 3D convolution layers, batch normalization and Relu activation function operations, the first decoding layer of the adaptive three-dimensional segmentation network is formed; The second decoding layer of the adaptive 3D segmentation network is the same as the second decoding layer in the second network unit; The third decoding layer of the overall adaptive three-dimensional segmentation network includes the same structure as the third decoding layer of the second network unit. In the same structure as the first decoding layer of the second network unit, the score in the complexity score processing layer will be expanded to the same tensor as the feature map generated after the deconvolution operation; then the complexity score processing layer and the feature map generated after the deconvolution operation are broadcasted, and the feature map generated after the broadcast operation is the deep feature map of the first decoding layer of the adaptive three-dimensional segmentation network. The broadcast operation introduces the complexity score processing layer of this part after the deconvolution in the first decoding layer of the second network unit; then, the Mamba module further selectively models the deep feature map generated after the broadcast operation of the first decoding layer, and enhances the feature expression ability of the network through local convolution and state space mechanisms, so as to adapt to the feature requirements of different complexity areas; finally, after two 3D convolution layers, batch normalization and Relu activation function operations, the third decoding layer of the adaptive three-dimensional segmentation network is formed.
7. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 1, characterized in that: The adaptive 3D segmentation model is trained using the cross entropy loss function, an additional regularization term to balance the model, and a gradient descent optimization algorithm.
8. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 1, characterized in that: Step 1 includes the following steps: Step 1.1: Based on the slice-by-slice images of the cross-section of the three-dimensional model of the pig hind leg, a threshold segmentation technique is used to obtain a preliminary segmentation line of the pig hind leg caudal wishbone; Step 1.2: Perform curvature analysis on the preliminary segmentation line to quantify the curvature of the bone in each slice image and obtain the curvature value of the preliminary segmentation line on each slice image; Step 1.3: Use the multi-directional slice curvature value data mapping method to construct a three-dimensional curvature model of the coccygeal wishbone.
9. The method for generating a three-dimensional irregular elimination interface of a pigtail wishbone according to claim 8, characterized in that: Step 2.1: Map the curvature data in each slice image in each direction to the three-dimensional space, obtain the three-dimensional point cloud containing curvature information in each direction, and set the number of block categories. , the 3D point cloud is divided into blocks; For a 3D point cloud, the feature vector of each point is composed of its 3D spatial position and curvature value The eigenvector is ; First, sort the curvature values of all points. After sorting, the threshold can be determined directly based on the statistical distribution of the curvature values; after sorting the curvature values from small to large, select multiple appropriate quantiles as the division The threshold of the complexity level area is set. According to the set threshold, the position of each point in the three-dimensional space of the coccyx is matched with its curvature category to form Point sets of different complexity, composed of Different block areas, i.e. blocks; Step 2.2: Use K-Means++ method to initialize cluster centers; A data point is randomly selected from the data set formed by the three-dimensional point cloud as the first cluster center; Calculate the Euclidean distance between each data point in the data set and the cluster center; for each data point that is not selected as a cluster center, calculate its distance to the nearest cluster center; assign the probability of being selected as the next cluster center based on the square of these distances, the greater the distance, the higher the probability of being selected; use the probability distribution calculated in the previous step to select a new cluster center by random sampling; repeat the above steps until a new cluster center is selected. The selected N cluster centers are the initial center points; Each time the K-Means++ algorithm selects a new center, it calculates the distance and probability based on the currently selected center and all data points. Suppose the coordinates of the data point P in the three-dimensional curvature model are , the coordinates of cluster center C are ; Step 2.3: Assign categories to the three-dimensional curvature model to obtain preliminary classification results; Assign each data point to the "cluster" where the nearest initial center point is located, forming Classification: Each part of the coccyx is classified into the group with the most similar complexity for preliminary classification; the category assignment process is as follows: for each data point , calculate its relationship with each cluster center Distance ,Will Assigned to the cluster center closest to it; Step 2.4: Update the cluster center, that is, according to the preliminary classification results, recalculate the center point of each cluster, that is, calculate the average position of all points in each category as the new cluster center; Step 2.5: Iterative optimization, that is, repeating steps 2.3 and 2.4, when the position of the cluster center tends to be stable or reaches the predetermined number of iterations, obtain The result of clusters is formed A sub-block composed of points of the same curvature category, that is, an area with similar complexity.
Citation Information
Patent Citations
A device and method for deboning and dividing animal carcasses
CN114176104B
Automatic segmentation method for complex skeleton model fusing skeleton lines
CN114972390A