Spinal disorders have become the most prevalent diseases of our time and are growing younger,so their diagnosis and treatment are especially critical.The difficulty of spine segmentation is exacerbated by the problems of blurred edges and poor contrast in spine CT images.Traditional medical image segmentation methods such as region-based,edge-based,and specific theory-based segmentation algorithms are complicated,have low real-time performance,and often can only achieve semi-automatic segmentation with limited segmentation accuracy.Deep learning-based segmentation algorithms can achieve more accurate segmentation through powerful learning ability.The U-Net model based on convolutional neural networks(CNN)has become the standard for medical image segmentation,but it still suffers from the problem of limited interaction over long distances.While Transformer integrates global self-attention mechanism to capture long-range feature dependencies,and has made further breakthroughs in the field of computer vision in recent years.In this paper,we propose a hybrid segmentation model based on CNN and Transformer,Trans AGUNet(Transformer attention gate u-net),to achieve efficient automated segmentation of spine CT images and improve segmentation accuracy by combining the advantages of CNN and Transformer.In order to reflect the segmentation results more intuitively and to apply the model,PyQt5 is used to develop the spine segmentation system.The specific work in this paper can be described as follows:(1)Combined with Transformer,AG(attention gate)and U-Net,a hybrid segmentation model of CNN and Transformer,Trans AGUNet,is proposed.Trans AGUNet uses a hybrid architecture of Transformer and CNN as an encoder to extract semantic and remote context features;The CNN structure is used as the decoder,and the attention gating mechanism AG is added to the jump connection part to fuse the low-level and high-level features to achieve more precise segmentation.AG can enhance the feature extraction of salient target regions and suppress irrelevant regions,thus improving the segmentation sensitivity and accuracy of the model.The sum of Dice Loss and weighted cross entropy is used as the loss function to solve the problem of uneven distribution of positive and negative samples.(2)The comparison experiment and ablation experiment were designed to verify the effectiveness of the model.Comparative experiments show that the proposed model achieved the highest segmentation accuracy among the other six comparative models,including CNN and CNN Transformer hybrid segmentation models,with Dice coefficients improved by 4.47%and 2.25% compared to U-Net and Trans UNet,respectively.The ablation experiment shows that the Dice coefficient increases with the increase of the number of AG in the jump connection.Adding AG to the three jump connections on the 1/2,1/4 and 1/8 resolution scales,the model performance is the best.At the same time,the decoding structure designed in this paper can also improve the segmentation accuracy to a certain extent,which verifies the effectiveness of the model in this paper.(3)Design and implement the spine segmentation system and apply the models to the system.The spine segmentation system is developed using PyQt5 to realize the user uploaded spine images,and seven segmentation models including the proposed model can be selected for segmentation,and then the segmentation results and Dice coefficients are displayed in the system interface in real time.The spine segmentation system is easy to operate and can display the segmentation results intuitively,which has some application value. |