Segmentation model training method, device, electronic device and storage medium

By obtaining the timing diagram and projection diagram of the image data, the temporal and spatial features are extracted and fused to generate target fusion features for training the segmentation model, which solves the problem of inaccurate segmentation in cerebral vascular images and improves the segmentation accuracy.

CN118015017BActive Publication Date: 2024-10-22NINGBO INST OF MATERIALS TECH & ENG CHINESE ACAD OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410171102.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2024-10-22
Estimated Expiration
2044-02-06

AI Technical Summary

Technical Problem

Existing segmentation algorithms for cerebral arteries in cerebrovascular images based on digital subtraction angiography imaging technology lack temporal information, resulting in poor segmentation capabilities and inaccurate segmentation.

Method used

By obtaining the timing diagram and projection diagram of the image data, the temporal and spatial features are extracted, and the spatio-temporal weight matrix is ​​used for fusion processing to generate target fusion features, which are used to train the segmentation model and improve segmentation accuracy.

Benefits of technology

The method improves the segmentation accuracy of cerebral arteries in cerebrovascular images, enhances the segmentation effect, and solves the problem of inaccurate segmentation in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118015017B_ABST
    Figure CN118015017B_ABST
Patent Text Reader

Abstract

The present application provides a training method, device, electronic device and storage medium for a segmentation model; the method includes: obtaining a timing diagram and a projection diagram corresponding to the image data of digital subtraction angiography; obtaining an annotated image corresponding to the target structure in the image data according to the projection diagram; determining the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data; and training a segmentation model according to the target fusion feature and the annotated image. The training method for the segmentation model provided in the present application improves the accuracy of the segmentation model in acquiring the target structure in the image data and improves the segmentation effect by fusing the timing feature and spatial feature of the image data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a training method, device, electronic device and storage medium for a segmentation model. Background Art

[0002] Currently, the existing segmentation algorithm of cerebral arteries in cerebral vascular images based on digital subtraction angiography (DSA) technology lacks time information, resulting in poor segmentation ability and inaccurate segmentation. Summary of the invention

[0003] The embodiments of the present application provide a training method, device, electronic device and storage medium for a segmentation model, which can improve the segmentation accuracy of the segmentation model.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a training method for a segmentation model, comprising:

[0006] Obtaining the timing diagram and projection diagram corresponding to the image data;

[0007] Acquire a labeled image corresponding to the target structure in the image data according to the projection image;

[0008] Determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram, and the spatiotemporal weight matrix corresponding to the image data;

[0009] A segmentation model is trained according to the target fusion features and the annotated image.

[0010] In the above solution, the timing diagram and projection diagram corresponding to the acquired image data include:

[0011] Perform at least one of data decompression processing, screening processing, and resampling processing on the image data to obtain a timing diagram corresponding to the image data;

[0012] Perform minimum density projection on the time series image after the registration process to obtain a projection image corresponding to the image data.

[0013] In the above solution, the step of obtaining the annotated image corresponding to the target structure in the image data according to the projection image includes:

[0014] Selecting a preset first number of projection images, annotating each pixel in the projection images based on a local threshold method, modifying incorrectly annotated pixels, and obtaining annotated images corresponding to the first number of target structures;

[0015] training a labeling model based on the first number of labeled images;

[0016] Each pixel in each remaining projection image is labeled according to the trained labeling model, and the incorrectly labeled pixels are modified to obtain the labeled image corresponding to the target structure in the remaining projection image.

[0017] In the above solution, determining the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data includes:

[0018] Performing a first fusion process on the temporal feature and the spatial feature to obtain a spatiotemporal weight matrix corresponding to the image data;

[0019] Determining the weighted time feature after attention enhancement and the weighted space feature after attention enhancement according to the spatiotemporal weight matrix;

[0020] Performing a second fusion process on the weighted time feature and the weighted spatial feature to obtain a weighted feature;

[0021] The weighted feature, the time feature and the space feature are added together to obtain the target fusion feature.

[0022] In the above solution, the first fusion processing is performed on the time feature and the space feature to obtain the spatiotemporal weight matrix corresponding to the image data, including:

[0023] Determine a first time multi-scale feature corresponding to the time feature according to a first key vector corresponding to the time feature, and determine a time weight matrix according to the first time multi-scale feature, the first query vector and the time feature;

[0024] Determine a first spatial multi-scale feature corresponding to the spatial feature according to a second key vector corresponding to the spatial feature, and determine a spatial weight matrix according to the first spatial multi-scale feature, the second query vector and the spatial feature;

[0025] The temporal weight matrix and the spatial weight matrix are added to obtain the spatiotemporal weight matrix.

[0026] In the above scheme, determining the weighted time feature after attention enhancement and the weighted space feature after attention enhancement according to the spatiotemporal weight matrix includes:

[0027] Determine a second time multi-scale feature corresponding to the time feature according to the first numerical vector corresponding to the time feature, and determine a second space multi-scale feature corresponding to the space feature according to the second numerical vector corresponding to the space feature;

[0028] Multiplying the spatiotemporal weight matrix and the second time multi-scale feature corresponding to the time feature to obtain the weighted time feature;

[0029] The spatiotemporal weight matrix is ​​multiplied by a second spatial multi-scale feature corresponding to the spatial feature to obtain the weighted spatial feature.

[0030] In the above solution, the training of the segmentation model according to the target fusion feature and the annotated image includes:

[0031] Acquire semantic information of the target fusion feature according to the encoder of the segmentation model;

[0032] Restoring the semantic information according to the decoder of the segmentation model to obtain a restored image;

[0033] The segmentation model is trained according to the difference between the restored image and the annotated image.

[0034] In a second aspect, an embodiment of the present application provides a segmentation method, the segmentation method comprising:

[0035] Acquiring a timing diagram and a projection diagram corresponding to the image data of the digital subtraction angiography to be segmented;

[0036] Determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram, and the spatiotemporal weight matrix corresponding to the image data;

[0037] The target structure in the image data is segmented according to the target fusion feature.

[0038] In a third aspect, an embodiment of the present application provides a training device for a segmentation model, the training device for the segmentation model comprising:

[0039] A first acquisition module, used to acquire a timing diagram and a projection diagram corresponding to the image data;

[0040] A labeling module, used for obtaining a labeling image corresponding to the target structure in the image data according to the projection image;

[0041] A first fusion module is used to determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data;

[0042] A training module is used to train a segmentation model according to the target fusion features and the annotated image.

[0043] In a fourth aspect, an embodiment of the present application provides a segmentation device, the segmentation device comprising:

[0044] A second acquisition module is used to acquire a timing diagram and a projection diagram corresponding to the image data of the digital subtraction angiography to be segmented;

[0045] A second fusion module is used to determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data;

[0046] A segmentation module is used to segment the target structure in the image data according to the target fusion feature.

[0047] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method or segmentation method of the segmentation model provided in the embodiment of the present application.

[0048] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a set of computer-executable instructions, which, when executed, are used to execute the training method or segmentation method of the segmentation model provided in the embodiment of the present application.

[0049] The training method of the segmentation model provided in the embodiment of the present application obtains the timing diagram and projection diagram corresponding to the image data; obtains the annotated image corresponding to the target structure in the image data according to the projection diagram; determines the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data; and trains the segmentation model according to the target fusion feature and the annotated image. The training method of the segmentation model of the present application can obtain the timing feature and spatial feature corresponding to the image data by obtaining the timing diagram and projection diagram corresponding to the image data, and can obtain more accurate target fusion feature corresponding to the image data by integrating the timing feature, spatial feature and spatiotemporal weight matrix corresponding to the image data, and train the segmentation model according to the target fusion feature and the annotated image. The method of the present application can solve the problem of inaccurate segmentation of the segmentation algorithm of the southeast of the brain in cerebrovascular images in the prior art, and improve the segmentation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0051] Figure 1 This is a schematic diagram of an optional processing flow of the training method of the segmentation model provided in the embodiment of the present application;

[0052] Figure 2 It is a schematic diagram of the processing flow of the method for spatiotemporal fusion provided in an embodiment of the present application;

[0053] Figure 3 is a schematic diagram of a segmentation model provided in an embodiment of the present application;

[0054] Figure 4 This is a schematic diagram of an optional processing flow of the segmentation method provided in an embodiment of the present application;

[0055] Figure 5 It is an optional structural schematic diagram of a training device for a segmentation model provided in an embodiment of the present application;

[0056] Figure 6 A schematic diagram of an optional structure of a segmentation device provided in an embodiment of the present application;

[0057] Figure 7 It is a schematic block diagram of an optional electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0059] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0060] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0062] The following is an introduction to a training method for a segmentation model provided in an embodiment of the present application. Figure 1 , Figure 1 This is an optional processing flow diagram of the training method of the segmentation model provided in the embodiment of the present application. Figure 1 Steps S101-S104 are shown for explanation.

[0063] Step S101, obtaining a timing diagram and a projection diagram corresponding to the image data of digital subtraction angiography.

[0064] In some embodiments, sufficient digital subtraction angiography image data collected by multiple cooperative medical institutions can be collected. For example, for the digital subtraction angiography image data of cerebral blood vessels, the frame sequence of the cerebral blood vessel structure image formed by the contrast agent flowing in the cerebral blood vessels at different times can be obtained by DSA technology. The sampling rate can be determined based on actual sampling experience, such as the sampling rate can be set to 3 to 6 frames per second, and the duration can be 3 seconds to 7 seconds.

[0065] In some embodiments, the acquired image data may be subjected to at least one of data decompression processing, screening processing, and resampling processing to obtain a corresponding timing diagram. Decompression includes decompressing the collected image data, restoring the data from the compressed format, and obtaining restored image data; screening processing includes excluding image data that does not meet preset conditions, such as deleting image data with incomplete angiography, deleting image data with serious bone artifacts, and deleting image data without arterial phase; registration processing includes intercepting and retaining the sequence frames of the arterial phase in the image data, resampling the retained sequence frames of the arterial phase, and adjusting the frame rate to 8 frames.

[0066] In some embodiments, the acquired timing graph can be registered, and then the registered timing graph can be subjected to minimum density projection to obtain a projection graph corresponding to the image data. The registration process can include adjusting the position and direction of each frame in each image data. Since the patient may move slightly due to breathing or other movements when collecting image data, resulting in differences in the position and direction of the same structure in different frames of the image data, the position and direction of the cerebral blood vessel structure in each frame of each image data can be moved so that the position and direction of the cerebral blood vessel structure can be kept consistent in each frame to accurately reflect the changes in cerebral blood flow over time, and accurately compare the image changes of each frame at different time points; the timing graph obtained after the registration process can be subjected to minimum density projection, and the three-dimensional timing graph can be generated into a two-dimensional projection graph for visualizing the cerebral blood vessel structure.

[0067] Step S102: acquiring a labeled image corresponding to the target structure in the image data according to the projection image.

[0068] In some embodiments, a preset first number of projection images can be selected, and each pixel in the projection image can be annotated based on the local threshold method to determine the label corresponding to each pixel. The local threshold method is an image segmentation method based on local areas, and a local threshold can be determined according to the grayscale information of the local neighborhood of each pixel, and the label corresponding to each pixel can be determined using the local threshold. The target structure can be a cerebrovascular structure in the projection image. For example, when the grayscale value of the pixel is greater than the local threshold, it is marked as "1", that is, set to white, indicating that its label is "belonging to the cerebrovascular structure"; otherwise, it is marked as "0", that is, set to black, indicating that its label is "not belonging to the cerebrovascular structure". The annotated projection image is a binary annotated image, and the white area is the area where the cerebrovascular structure is located.

[0069] After the first number of projection images are annotated based on the local threshold method, the annotated projection images can be inspected to determine whether there are errors in the annotation. The annotated visualized images can be manually inspected, and the incorrectly annotated pixels can be manually modified to ensure that the preliminary pixel annotation results are more accurate.

[0070] In some embodiments, a labeling model can be trained based on the first number of projection images and the labels of each pixel in these projection images, so that the trained labeling model can automatically label cerebral blood vessels for all unlabeled projection images, construct a pseudo label corresponding to each pixel in the projection image, and determine the pseudo label as the label corresponding to each pixel. The labeling model can be constructed based on a neural network, such as a convolutional neural network.

[0071] After labeling each pixel in each remaining projection image according to the trained labeling model, the remaining labeled projection images can be manually inspected, and the pixels with incorrect labeling can be manually modified to obtain the remaining labeled images. The pixel-level labeled images corresponding to the target structures in all the projection images are obtained according to the first number of labeled images and the remaining labeled images.

[0072] By first using part of the projection images to label based on the local threshold method and combining it with manual correction, the accuracy of labeling can be improved. By training the labeling model based on this part of accurately labeled data, the labeling efficiency of the remaining projection images can be improved. At the same time, combined with manual correction, the accuracy and reliability of the labeled data can be improved.

[0073] Step S103: determining target fusion features corresponding to the image data according to the time features corresponding to the timing diagram, the spatial features corresponding to the projection diagram, and the spatiotemporal weight matrix corresponding to the image data.

[0074] In some embodiments, in the image data, although the target structure between different frames has certain similarities in topology, the direction and position of the target structure in each frame are different in the time dimension. The time series features between different frames in each image data can be obtained according to the time series diagram. As an example, taking the cerebrovascular structure as an example, in the DSA cerebrovascular image data, the cerebrovascular structure will show dynamic change characteristics of diffusion from the bottom to the top in time, and the time series feature is its inherent attribute.

[0075] In some embodiments, the first sub-neural network in the segmentation model can be used to obtain the time characteristics of the timing graph corresponding to the image data. Among them, the first sub-neural network can be implemented based on a bidirectional convolutional long short-term memory (BiConvLSTM) network. The first sub-neural network may include an input layer, a biconvolution module, a convolution layer, a BiConvLSTM module, and an output layer. Among them, the input layer encodes the input timing graph to obtain the size information of the feature graph corresponding to the input of the timing graph, and the encoding format may be B×C×T×H×W. B represents the batch size, C represents the number of dimensions of the feature map corresponding to the timing graph, T represents the number of frames of the feature map corresponding to the timing graph, H represents the length of the feature map corresponding to the timing graph, and W represents the width of the feature map corresponding to the timing graph. For example, the encoding format can be 2×1×8×512×512; the dual convolution module includes two convolution layers, each of which includes a 3×3 convolution kernel for obtaining feature information corresponding to the feature map. The convolution layer is used to further capture the feature information corresponding to the timing graph. After one convolution layer, the size information of the feature map corresponding to the timing graph becomes 2×32×8×512×512; the BiConvLSTM module includes four BiConvLSTM layers, each of which is composed of a forward LSTM unit and a backward LSTM unit. The LSTM unit in each direction has a forget gate, an input gate, and an output gate to control the flow of data information. The forward LSTM unit and the backward LSTM unit interact through bidirectional connections, which enables the first sub-neural network to consider the past information and future information of the time series graph at the same time, so as to better obtain the time series dependencies in the time series graph; the output layer is used to output the time series features corresponding to the time series graph, that is, the time features, and the size information corresponding to the output time features can be 2×32×512×512.

[0076] The first sub-neural network based on the bidirectional convolutional long-short term memory network can mine the temporal features between different frame images and enhance the capture of long-distance temporal dependencies of cerebral blood vessels. At the same time, compared with the traditional convolutional long-short term memory (Convolutional Long-Short Term Memory, ConvLSTM) network, it does not need to stretch the image, does not need to destroy the spatial structure of the image, and can perform bidirectional convolution operations.

[0077] In some embodiments, the spatial features of the image data can be obtained according to the projection map based on the dual convolution module of the second sub-neural network in the segmentation model. The second sub-neural network may include a dual convolution module consisting of a dual convolution layer and a spatiotemporal attention mechanism module. The second sub-neural network may be implemented based on an existing convolutional neural network or other technologies. The dual convolution module may include two convolution layers, each of which includes a 3×3 convolution kernel.

[0078] In some embodiments, the acquired temporal features and spatial features can be spatiotemporally fused based on the spatiotemporal attention mechanism (STA) module of the second sub-neural network in the segmentation model to obtain the target fusion features corresponding to the image data.

[0079] In some embodiments, the spatiotemporal attention mechanism module can perform a first fusion process on the temporal features and the spatial features to obtain a spatiotemporal weight matrix corresponding to the image data. The process of the first fusion process can be: the first multi-scale features corresponding to the temporal features can be determined according to the first query vector corresponding to the temporal features, and the temporal weight matrix can be determined according to the first multi-scale features, the first query vector and the temporal features; the second multi-scale features corresponding to the spatial features can be determined according to the second query vector corresponding to the spatial features, and the spatial weight matrix can be determined according to the second multi-scale features, the second query vector and the spatial features; the temporal weight matrix and the spatial weight matrix are added to obtain the spatiotemporal weight matrix.

[0080] In some embodiments, the method for determining the time weight matrix may be: Figure 2As shown, the time feature can be convolved, the feature map obtained after the convolution process is stretched, the two-dimensional or multi-dimensional feature map is converted into a one-dimensional vector, and the one-dimensional vector obtained after the stretching is subjected to feature transformation to obtain the first query vector, the first key vector, and the first numerical vector corresponding to the time feature. The information on multiple scales corresponding to the first key vector can be obtained based on the pyramid pooling module (Pyramid Pooling Module, PPM) to obtain the first time multi-scale feature corresponding to the time feature. The pyramid pooling module can include an adaptive average pooling (AdaptiveAvgpool) layer and a feature splicing layer, the adaptive average pooling is used to implement pooling operations on different scales, and the feature splicing layer is used to splice the feature map obtained after the pooling operation to form an integrated first multi-scale feature for use by the next layer. The time weight matrix can be determined according to the dimensions of the first time multi-scale feature, the first query vector and the time feature. For example, the first query vector and the first time multi-scale feature can be similarity calculated to obtain similarity, and then the obtained similarity is converted into a time weight matrix through a Softmax function, as shown in formula (1).

[0081]

[0082] In formula (1), Weight matrix s represents the time weight matrix, Q s represents the first query vector, K s Denotes the first key vector. s Represents the dimension of time features. ppm(K s T ) indicates obtaining the first time multi-scale feature corresponding to the first key vector based on the pyramid pooling module.

[0083] In some embodiments, the method for determining the spatial weight matrix may be: Figure 2 As shown, the spatial feature can be convolved, the feature map obtained after the convolution process can be stretched, the two-dimensional or multi-dimensional feature map can be converted into a one-dimensional vector, and then the one-dimensional vector obtained after the stretching can be transformed to obtain the second query vector, the second key vector and the second numerical vector corresponding to the spatial feature. The information on multiple scales corresponding to the second key vector can be obtained based on the pyramid pooling module to obtain the first spatial multi-scale feature corresponding to the spatial feature, and the spatial weight matrix can be determined according to the dimensions of the first spatial multi-scale feature, the second query vector and the spatial feature. For example, the second query vector can be similarly calculated with the second multi-scale feature to obtain the similarity, and then the obtained similarity can be converted into a spatial weight matrix through the Softmax function, as shown in formula (2).

[0084]

[0085] In formula (2), Weight matrix t represents the spatial weight matrix, Q t represents the second query vector, K t Denotes the second key vector. t Represents the dimension of spatial features. ppm(K s T ) indicates that the first spatial multi-scale features corresponding to the second key vector are obtained based on the pyramid pooling module.

[0086] In some embodiments, the temporal weight matrix and the spatial weight matrix are added to obtain a spatiotemporal weight matrix, as shown in formula (3).

[0087] Weight matrix=Weight matrix s +Weight matrix t (3)

[0088] In some embodiments, the weighted temporal features after attention enhancement and the weighted spatial features after attention enhancement can be determined according to the spatiotemporal weight matrix.

[0089] Based on the pyramid pooling module (PPM), information on multiple scales corresponding to the first numerical vector can be obtained to obtain a second time multi-scale feature corresponding to the time feature. The spatiotemporal weight matrix can be multiplied by the second time multi-scale feature corresponding to the time feature to obtain a weighted time feature after attention enhancement, as shown in formula (4).

[0090] Attention(Q s ,K s ,V s )=Weight matrix×ppm(V s ) (4)

[0091] In formula (4), Weight matrix represents the spatiotemporal weight matrix, ppm(V s ) indicates that the second time multi-scale feature corresponding to the first numerical vector is obtained based on the pyramid pooling module.

[0092] Based on the pyramid pooling module (PPM), the information on multiple scales corresponding to the second numerical vector can be obtained to obtain the second spatial multi-scale features corresponding to the spatial features. The spatiotemporal weight matrix can be multiplied by the second spatial multi-scale features corresponding to the spatial features to obtain the weighted spatial features after attention enhancement, as shown in formula (5).

[0093] Attention(Q t ,K t ,V t )=Weight matrix×ppm(V t ) (5)

[0094] In formula (5), Weight matrix represents the spatiotemporal weight matrix, ppm(V t ) indicates that the second spatial multi-scale features corresponding to the second numerical vector are obtained based on the pyramid pooling module.

[0095] In some embodiments, the spatiotemporal attention mechanism module may perform a second fusion process on the weighted temporal features after attention enhancement and the weighted spatial features after attention enhancement to obtain weighted features that integrate temporal features and spatial features.

[0096] In some embodiments, the spatiotemporal attention mechanism module can use residual connections to add weighted features, temporal features, and spatial features to obtain target fusion features.

[0097] The second sub-neural network effectively combines temporal features and spatial features through the spatiotemporal attention mechanism and residual connection to obtain a more representative and more informative target fusion feature to improve the accuracy of the subsequent segmentation model.

[0098] In some embodiments, after obtaining the target fusion features, further feature extraction can be performed through the encoder in the third sub-neural network in the segmentation model. Among them, the encoder can be composed of four layers of residual convolution modules, each residual convolution module includes two groups of convolution layers, each group of convolution layers uses a 3×3 convolution kernel; a normalization layer and a GeLU activation layer are connected after the convolution operation. In order to reduce the amount of network calculation and obtain the high-dimensional semantic features of cerebral blood vessels, a maximum pooling layer can be added after each residual convolution module to reduce the resolution of the feature map of the image data by half. The size information of the final output feature map is 2×512×32×32.

[0099] In some embodiments, the feature map output by the encoder can be restored according to the decoder in the third sub-neural network of the segmentation model, and the resolution of the image data can be improved, such as improving the resolution of cerebrovascular features, to obtain the corresponding cerebrovascular information. Among them, the decoder can be composed of four layers of residual convolution modules, each convolution module contains a double convolution layer, and each convolution layer corresponds to the convolution layer in the residual convolution module in the encoder. The corresponding layers between the encoder and the decoder can be connected in series to further compensate for the loss of spatial structural information caused by the pooling layer, while improving the efficiency of gradient feedback. In the last layer of the decoder, a 1×1 convolution layer can be used to reduce the 32-dimensional feature map to 2 dimensions to characterize the target structure in the image data of digital subtraction angiography, such as the cerebrovascular structure in DSA cerebrovascular imaging data. The 0th dimension is used to represent background pixels, while the 1st dimension represents cerebrovascular pixels, and finally a complete segmentation map of the cerebrovascular structure is obtained.

[0100] As an example, Figure 3 The schematic diagram of the segmentation model is shown. The time features are obtained after the time sequence graph is processed by the first sub-neural network, the spatial features are obtained after the projection graph is processed by the second sub-neural network, and the target fusion features are obtained after the spatial and temporal fusion processing of the spatial and temporal features by the spatiotemporal attention mechanism. The target fusion features are further input into the third sub-neural network. The third sub-neural network is implemented based on the U-shaped convolutional neural network, including an encoder and a decoder. The encoder and the decoder are connected by a double convolution layer (DoubleCovBlock) to enhance the features obtained by the encoder. In the encoder, four double convolution layers (DoubleCovBlock) and four downsampling pooling layers (DownBlock) are included. The double convolution layer includes two convolution layers, and the size of the convolution kernel corresponding to each convolution layer is 3×3. A maximum pooling layer is added after each double convolution layer, and the double convolution layer is connected to the pooling layer to obtain high-dimensional semantic features in the target fusion features. In the decoder, there are four double convolutional layers and four upsampling pooling layers (UpBlock), which are used to restore the high-dimensional features obtained by the encoder to obtain the restored image. Then, through deep supervision (DeepSupervion), the third sub-neural network is trained based on the difference between the restored image and the annotated image, so that the trained third sub-neural network can obtain the segmentation image corresponding to the target structure in the image data based on the target fusion features, that is, the prediction image. Among them, Figure 3 The first sub-neural network in the CNN includes an input layer, a dual convolution module, a convolution layer, a BiConvLSTM layer, and an output layer. The second sub-neural network includes a dual convolution module (StemBlock) and a spatiotemporal attention mechanism module, which can obtain the spatial features of the projection image, and then perform spatiotemporal fusion processing on the spatial features and temporal features based on the spatiotemporal attention mechanism.

[0101] By combining the operations of the encoder and decoder with the third sub-neural network, we can make full use of the convolutional neural network and the pooling layer to improve the efficiency and performance of high-dimensional semantic feature extraction, and restore the feature map extracted by the encoder through the decoder. Model training is performed based on the difference between the restored image and the real annotated image, which helps to more accurately extract information about the target structure from the image data and improve the accuracy of the trained segmentation model.

[0102] The following is an introduction to a segmentation method provided by an embodiment of the present application. Figure 2 , Figure 2 This is an optional processing flow diagram of the segmentation method provided in the embodiment of the present application. Figure 2 Steps 201-204 are shown for illustration.

[0103] Step 201 : obtaining a timing diagram and a projection diagram corresponding to the image data of the digital subtraction angiography to be segmented.

[0104] Step 202, determining the target fusion features corresponding to the image data according to the time features corresponding to the timing diagram, the spatial features corresponding to the projection diagram, and the spatiotemporal weight matrix corresponding to the image data.

[0105] Step 203: segment the target structure in the image data according to the target fusion feature.

[0106] In some embodiments, image data of digital subtraction angiography to be segmented may be obtained. As an example, the image data may be DSA cerebral vascular image data.

[0107] In some embodiments, the acquired image data of the digital subtraction angiography to be segmented can be subjected to at least one of data decompression processing, screening processing, and resampling processing to obtain a corresponding timing diagram. Among them, decompression includes decompressing the image data of the digital subtraction angiography to be segmented and restoring the data from the compressed format; screening processing includes excluding image data that does not meet the preset conditions in the image data, such as deleting image data with incomplete angiography display, deleting image data with serious bone artifacts, and deleting image data without arterial phase; registration processing includes intercepting and retaining the sequence frames of the arterial phase in the image data, resampling the retained sequence frames of the arterial phase, and adjusting the frame rate to 8 frames.

[0108] In some embodiments, the time sequence diagram corresponding to the acquired digital subtraction angiography image data to be segmented can be registered, and then minimum density projection can be performed to obtain the corresponding projection diagram. The registration process can include adjusting the position and direction of each frame in each image data so that the position and direction of the cerebral vascular structure can be kept consistent in each frame to accurately reflect the temporal changes of cerebral blood flow and accurately compare the image changes of each frame at different time points; the time sequence diagram obtained after the registration process can be minimum density projected to generate a two-dimensional projection diagram from the three-dimensional time sequence diagram for visualizing the cerebral vascular structure.

[0109] In some embodiments, the time series features corresponding to the time series graph can be obtained through the first sub-neural network in the segmentation model, and the spatial features corresponding to the projection graph can be obtained through the second sub-neural network in the segmentation model. After obtaining the time features and the spatial features, the time features and the spatial features are fused in time and space through the attention mechanism in the segmentation model to obtain the target fusion features. Among them, the attention mechanism can include: performing a first fusion process on the time features and the spatial features to obtain the time and space weight matrix corresponding to the image data; determining the weighted time features after attention enhancement and the weighted space features after attention enhancement according to the time and space weight matrix; performing a second fusion process on the weighted time features and the weighted space features to obtain the weighted features; adding the weighted features, the time features and the space features to obtain the target fusion features.

[0110] In some embodiments, the first sub-neural network may include an input layer, a dual convolution module, a convolution layer, a BiConvLSTM module, and an output layer. The input layer encodes the input timing graph to obtain the size information of the input feature graph corresponding to the timing graph, and the encoding format may be B×C×T×H×W. B represents the batch size, C represents the number of dimensions of the feature map corresponding to the timing graph, T represents the number of frames of the feature map corresponding to the timing graph, H represents the length of the feature map corresponding to the timing graph, and W represents the width of the feature map corresponding to the timing graph. For example, the encoding format can be 2×1×8×512×512; the dual convolution module includes two convolution layers, which are used to enhance the feature information output by the input layer. The convolution layer is used to obtain the structural features in the feature map. After one convolution layer, the size information of the feature map corresponding to the timing graph becomes 2×32×8×512×512; the BiConvLSTM module includes four BiConvLSTM layers, each BiConvLSTM layer consists of a forward LSTM unit and a backward LSTM unit, and the LSTM unit in each direction has a forget gate, an input gate, and an output gate to control the flow of data information. The forward LSTM unit and the backward LSTM unit interact through bidirectional connections, which enables the first sub-neural network to consider the past information and future information of the time series graph at the same time, so as to better obtain the time series dependencies in the time series graph; the output layer is used to output the time series features corresponding to the time series graph, and the size information corresponding to the output time series features can be 2×32×1×512×512.

[0111] In some embodiments, the second sub-neural network can be implemented based on an existing convolutional neural network or other technologies.

[0112] In some embodiments, the process of obtaining the target fusion feature based on the attention mechanism can be: convolution processing of the time feature, stretching operation of the feature map obtained after the convolution processing, converting the two-dimensional or multi-dimensional feature map into a one-dimensional vector, and performing feature transformation on the one-dimensional vector obtained after stretching to obtain the first query vector, the first key vector, and the first numerical vector corresponding to the time feature. The information on multiple scales corresponding to the first key vector can be obtained based on the pyramid pooling module (Pyramid Pooling Module, PPM) to obtain the first time multi-scale feature corresponding to the time feature. The time weight matrix can be determined according to the dimensions of the first time multi-scale feature, the first query vector and the time feature. For example, the first query vector and the first time multi-scale feature can be similarity calculated to obtain the similarity, and then the obtained similarity is converted into the time weight matrix through the Softmax function; the spatial feature is convolution processed, the feature map obtained after the convolution processing is stretched, the two-dimensional or multi-dimensional feature map is converted into a one-dimensional vector, and then the one-dimensional vector obtained after stretching is feature transformed to obtain the second query vector, the second key vector and the second numerical vector corresponding to the spatial feature. Based on the pyramid pooling module, information on multiple scales corresponding to the second key vector can be obtained to obtain the first spatial multi-scale feature corresponding to the spatial feature, and the spatial weight matrix can be determined according to the dimensions of the first spatial multi-scale feature, the second query vector and the spatial feature. For example, the second query vector and the first spatial multi-scale feature can be similarly calculated to obtain similarity, and then the obtained similarity can be converted into a spatial weight matrix through a Softmax function; the temporal weight matrix and the spatial weight matrix can be added to obtain a spatiotemporal weight matrix; the information on multiple scales corresponding to the first numerical vector can be obtained based on a pyramid pooling module (PPM) to obtain a second temporal multi-scale feature corresponding to the temporal feature; the information on multiple scales corresponding to the second numerical vector can be obtained based on the pyramid pooling module to obtain a second spatial multi-scale feature corresponding to the spatial feature; the spatiotemporal weight matrix can be multiplied with the second temporal multi-scale feature corresponding to the temporal feature to obtain a weighted temporal feature after attention enhancement; the spatiotemporal weight matrix can be multiplied with the second spatial multi-scale feature corresponding to the spatial feature to obtain a weighted spatial feature after attention enhancement; the weighted temporal feature after attention enhancement and the weighted spatial feature after attention enhancement are subjected to a second fusion process to obtain a weighted feature of the comprehensive temporal feature and the spatial feature; the weighted feature, the temporal feature and the spatial feature are added using a residual connection to obtain a target fusion feature.

[0113] In some embodiments, the target structure in the image data of the digital subtraction angiography to be segmented can be determined according to the target fusion features by the third sub-neural network in the segmentation model, and the target area where the target structure is located can be segmented to obtain the segmented image corresponding to the target structure. Wherein, the third sub-neural network includes an encoder and a decoder. The encoder can be composed of four layers of residual convolution modules, each layer includes two groups of convolution layers, and each group of convolution layers uses a 3×3 convolution kernel; a normalization layer and a GeLU activation layer are connected after the convolution operation, and a maximum pooling layer is added after each residual convolution module. To reduce the amount of network calculation and obtain the high-dimensional semantic features of cerebral blood vessels; the decoder can be composed of four layers of residual convolution modules, which correspond to the residual convolution layers in the encoder one by one. The corresponding layers between the encoder and the decoder can be connected in series to further compensate for the loss of spatial structural information caused by the pooling layer, while improving the efficiency of gradient return. In the last layer of the decoder, a 1×1 convolution layer can be used to reduce the dimensionality of the 32-dimensional feature map to 2 dimensions to characterize the target structure in the image data of the digital subtraction angiography.

[0114] In this application, the corresponding time sequence diagram and projection diagram in the image data of the digital subtraction angiography to be segmented are obtained; then the time sequence features are obtained according to the time sequence diagram, and the spatial features are obtained according to the projection diagram; the time features and spatial features are fully fused in time and space through the time and space attention mechanism to obtain the target fusion features with richer feature information; the target structure in the image data is segmented based on the target fusion features, thereby improving the accuracy of segmentation.

[0115] Figure 5 500 is a schematic diagram of an optional device structure of a segmentation model training device provided in an embodiment of the present application. The segmentation model training device 500 includes a first acquisition module 501, a labeling module 502, a first fusion module 503 and a training module 504. Among them,

[0116] The first acquisition module 501 is used to acquire the timing diagram and projection diagram corresponding to the image data;

[0117] A labeling module 502, configured to obtain a labeling image corresponding to a target structure in the image data according to the projection image;

[0118] A first fusion module 503 is used to determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data;

[0119] The training module 504 is used to train a segmentation model according to the target fusion feature and the annotated image.

[0120] In some embodiments, the first acquisition module 501 is also used to: perform at least one of data decompression, screening, and resampling processing on the image data to obtain a timing diagram corresponding to the image data; perform minimum density projection on the timing diagram after the registration processing to obtain a projection diagram corresponding to the image data.

[0121] In some embodiments, the labeling module 502 is also used to: select a preset first number of projection images, label each pixel in the projection images based on a local threshold method, modify the incorrectly labeled pixels, and obtain labeled images corresponding to the first number of target structures; train a labeling model based on the first number of labeled images; label each pixel in each remaining projection image based on the trained labeling model, modify the incorrectly labeled pixels, and obtain labeled images corresponding to the target structures in the remaining projection images.

[0122] In some embodiments, the first fusion module 503 is also used to: perform a first fusion processing on the time features and the spatial features to obtain a spatiotemporal weight matrix corresponding to the image data; determine the weighted time features after attention enhancement and the weighted spatial features after attention enhancement according to the spatiotemporal weight matrix; perform a second fusion processing on the weighted time features and the weighted spatial features to obtain weighted features; add the weighted features, the time features and the spatial features to obtain the target fusion features.

[0123] In some embodiments, the first fusion module 503 is also used to: determine the first time multi-scale feature corresponding to the time feature according to the first key vector corresponding to the time feature, and determine the time weight matrix according to the first time multi-scale feature, the first query vector and the time feature; determine the first spatial multi-scale feature corresponding to the spatial feature according to the second key vector corresponding to the spatial feature, and determine the spatial weight matrix according to the first spatial multi-scale feature, the second query vector and the spatial feature; add the time weight matrix and the spatial weight matrix to obtain the spatiotemporal weight matrix.

[0124] In some embodiments, the first fusion module 503 is also used to: determine the second time multi-scale feature corresponding to the time feature according to the first numerical vector corresponding to the time feature, and determine the second space multi-scale feature corresponding to the space feature according to the second numerical vector corresponding to the space feature; multiply the space-time weight matrix and the second time multi-scale feature corresponding to the time feature to obtain the weighted time feature; multiply the space-time weight matrix and the second space multi-scale feature corresponding to the space feature to obtain the weighted space feature.

[0125] In some embodiments, the training module 504 is also used to: obtain semantic information of the target fusion feature according to the encoder of the segmentation model; restore the semantic information according to the decoder of the segmentation model to obtain a restored image; and train the segmentation model according to the difference between the restored image and the annotated image.

[0126] Figure 6 This is a schematic diagram of an optional device structure of a segmentation device provided in an embodiment of the present application. The segmentation device 600 includes a second acquisition module 601, a second fusion module 602 and a brightness control module 603.

[0127] The second acquisition module 601 is used to acquire the timing diagram and projection diagram corresponding to the image data;

[0128] The second fusion module 602 is used to determine the target fusion feature corresponding to the image data according to the time feature corresponding to the time sequence diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data;

[0129] The segmentation module 603 is used to segment the target structure in the image data according to the target fusion feature.

[0130] It should be noted that the segmentation device of the embodiment of the present application is similar to the description of the training method of the segmentation model described above, and has similar beneficial effects as the method embodiment, so it will not be described in detail. Figures 1 to 5 The present invention can be understood by referring to the description of any one of the accompanying drawings.

[0131] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present application is shown. The electronic device 700 is used to implement the training method or segmentation method of the segmentation model of the embodiment of the present application. In some optional embodiments, the electronic device 700 can implement the training method or segmentation method of the segmentation model provided in the embodiment of the present application by running a computer program. For example, the computer program can be a software module in the operating system; it can be a native APP (Application), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.

[0132] In practical applications, the electronic device 700 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, where cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks in a wide area network or a local area network to achieve data computing, storage, processing, and sharing. The electronic device 700 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart TV, a smart watch, etc., but is not limited thereto.

[0133] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, vehicle-mounted terminals, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0134] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0135] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0136] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the training method or segmentation method of the segmentation model. For example, in some optional embodiments, the training method or segmentation method of the segmentation model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some optional embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method or segmentation method of the segmentation model described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured as a training method or a segmentation method of a segmentation model in any other appropriate manner (eg, by means of firmware).

[0137] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the training method or segmentation method of the segmentation model provided in the embodiment of the present application.

[0138] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, E PROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0139] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0140] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0141] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0143] It should be understood that in the various embodiments of the present application, the size of the serial number of each implementation process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0144] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A training method for a segmentation model, It is characterized in that The method comprises: Acquiring a timing diagram and a projection diagram corresponding to the image data of digital subtraction angiography; Acquire a corresponding annotated image of the target structure in the image data according to the projection image; Determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram, and the spatiotemporal weight matrix corresponding to the image data; Training a segmentation model according to the target fusion features and the annotated image; Wherein, obtaining the annotated image corresponding to the target structure in the image data according to the projection image includes: selecting a preset first number of projection images, annotating each pixel point in the projection image based on a local threshold method, modifying the pixel points with incorrect annotations, and obtaining the annotated images corresponding to the first number of target structures; training an annotation model according to the first number of annotated images; annotating each pixel point in each remaining projection image according to the trained annotation model, modifying the pixel points with incorrect annotations, and obtaining the annotated images corresponding to the target structures in the remaining projection images; The method of determining the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data includes: performing a first fusion process on the time feature and the spatial feature to obtain the spatiotemporal weight matrix corresponding to the image data; determining the weighted time feature after attention enhancement and the weighted spatial feature after attention enhancement according to the spatiotemporal weight matrix; performing a second fusion process on the weighted time feature and the weighted spatial feature to obtain a weighted feature; and adding the weighted feature, the time feature and the spatial feature to obtain the target fusion feature.

2. The method according to claim 1, It is characterized in that The method of obtaining the timing diagram and projection diagram corresponding to the image data of the digital subtraction angiography includes: Perform at least one of data decompression processing, screening processing, and resampling processing on the image data to obtain a timing diagram corresponding to the image data; Perform minimum density projection on the time series image after the registration process to obtain a projection image corresponding to the image data.

3. The method according to claim 1, It is characterized in that The first fusion processing is performed on the time feature and the space feature to obtain a spatiotemporal weight matrix corresponding to the image data, including: Determine a first time multi-scale feature corresponding to the time feature according to a first query vector corresponding to the time feature, and determine a time weight matrix according to the first time multi-scale feature, the first query vector and the time feature; Determine a first spatial multi-scale feature corresponding to the spatial feature according to a second query vector corresponding to the spatial feature, and determine a spatial weight matrix according to the first spatial multi-scale feature, the second query vector and the spatial feature; The temporal weight matrix and the spatial weight matrix are added to obtain the spatiotemporal weight matrix.

4. The method according to claim 1, It is characterized in that The step of determining the weighted time feature after attention enhancement and the weighted space feature after attention enhancement according to the spatiotemporal weight matrix includes: Determine a second time multi-scale feature corresponding to the time feature according to the first numerical vector corresponding to the time feature, and determine a second space multi-scale feature corresponding to the space feature according to the second numerical vector corresponding to the space feature; Multiplying the spatiotemporal weight matrix and the second time multi-scale feature corresponding to the time feature to obtain the weighted time feature; The spatiotemporal weight matrix is ​​multiplied by a second spatial multi-scale feature corresponding to the spatial feature to obtain the weighted spatial feature.

5. The method according to claim 1, It is characterized in that The step of training a segmentation model according to the target fusion feature and the annotated image includes: Acquire semantic information of the target fusion feature according to the encoder of the segmentation model; Restoring the semantic information according to the decoder of the segmentation model to obtain a restored image; The segmentation model is trained according to the difference between the restored image and the annotated image.

6. A segmentation method, It is characterized in that The method comprises: Acquiring a timing diagram and a projection diagram corresponding to the image data of the digital subtraction angiography to be segmented; Determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram, and the spatiotemporal weight matrix corresponding to the image data; Segmenting the target structure in the image data according to the target fusion feature; The step of determining the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the space feature corresponding to the projection diagram and the space-time weight matrix corresponding to the image data comprises: performing a first fusion process on the time feature and the space feature to obtain the space-time weight matrix corresponding to the image data; determining the weighted time feature after attention enhancement and the weighted space feature after attention enhancement according to the space-time weight matrix; performing a second fusion process on the weighted time feature and the weighted space feature to obtain the weighted feature; and adding the weighted feature, the time feature and the space feature to obtain the target fusion feature. The segmenting of the target structure in the image data according to the target fusion feature includes: determining the target structure in the image data according to the target fusion feature, segmenting the target area where the target structure is located, and obtaining a segmented image corresponding to the target structure.

7. A training device for a segmentation model, It is characterized in that The device comprises: A first acquisition module, used to acquire a timing diagram and a projection diagram corresponding to the image data; A labeling module, used for obtaining a labeling image corresponding to the target structure in the image data according to the projection image; A first fusion module is used to determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data; A training module, used for training a segmentation model according to the target fusion features and the annotated image; The annotation module is also used to: select a preset first number of projection images, annotate each pixel in the projection images based on a local threshold method, modify the pixel points with incorrect annotations, and obtain annotated images corresponding to the first number of target structures; train an annotation model according to the first number of annotated images; annotate each pixel in each remaining projection image according to the trained annotation model, modify the pixel points with incorrect annotations, and obtain annotated images corresponding to the target structures in the remaining projection images; The first fusion module is also used to: perform a first fusion process on the time feature and the spatial feature to obtain a spatiotemporal weight matrix corresponding to the image data; determine the weighted time feature after attention enhancement and the weighted spatial feature after attention enhancement according to the spatiotemporal weight matrix; perform a second fusion process on the weighted time feature and the weighted spatial feature to obtain a weighted feature; add the weighted feature, the time feature and the spatial feature to obtain the target fusion feature.

8. A segmentation device, It is characterized in that The device comprises: A second acquisition module is used to acquire a timing diagram and a projection diagram corresponding to the image data; A second fusion module is used to determine the target fusion feature corresponding to the image data according to the time feature corresponding to the timing diagram, the spatial feature corresponding to the projection diagram and the spatiotemporal weight matrix corresponding to the image data; A segmentation module, used for segmenting the target structure in the image data according to the target fusion feature; The second fusion module is further used to: perform a first fusion process on the time feature and the space feature to obtain a spatiotemporal weight matrix corresponding to the image data; determine a weighted time feature after attention enhancement and a weighted space feature after attention enhancement according to the spatiotemporal weight matrix; perform a second fusion process on the weighted time feature and the weighted space feature to obtain a weighted feature; add the weighted feature, the time feature and the space feature to obtain the target fusion feature; The segmentation module is also used to: determine the target structure in the image data according to the target fusion feature, segment the target area where the target structure is located, and obtain a segmented image corresponding to the target structure.

9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of any one of claims 1-5 or claim 6.

10. A computer-readable storage medium, It is characterized in that The storage medium includes a set of computer executable instructions, which, when executed, are used to execute the training method of the segmentation model described in any one of claims 1 to 5 or the segmentation method in claim 6.