
==== Front
Insights Imaging
Insights Imaging
Insights into Imaging
1869-4101
Springer Vienna Vienna

39266782
1803
10.1186/s13244-024-01803-8
Original Article
Focal cortical dysplasia lesion segmentation using multiscale transformer
Zhang Xiaodong 12
Zhang Yongquan 3
Wang Changmiao 4
Li Lin 1
Zhu Fengjun 1
Sun Yang 1
Mo Tong 1
Hu Qingmao 2
Xu Jinping jp.xu@siat.ac.cn

2
http://orcid.org/0000-0002-7424-8063
Cao Dezhi Caodezhi888@aliyun.com

1
1 https://ror.org/0409k5a27 grid.452787.b 0000 0004 1806 5224 Shenzhen Children’s Hospital, Shenzhen, 518000 Guangdong China
2 grid.9227.e 0000000119573309 Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences, Shenzhen, 518000 Guangdong China
3 grid.463102.2 0000 0004 1761 3129 Zhejiang University of Finance and Economics, Hangzhou, 310000 Zhejiang China
4 https://ror.org/00z1gwf89 grid.511576.1 0000 0004 9345 8642 Shenzhen Research Institute of Big Data, Shenzhen, 518000 Guangdong China
12 9 2024
12 9 2024
12 2024
15 22218 5 2024
27 8 2024
© The Author(s) 2024
2024
https://creativecommons.org/licenses/by/4.0/ Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
Objectives

Accurate segmentation of focal cortical dysplasia (FCD) lesions from MR images plays an important role in surgical planning and decision but is still challenging for radiologists and clinicians. In this study, we introduce a novel transformer-based model, designed for the end-to-end segmentation of FCD lesions from multi-channel MR images.

Methods

The core innovation of our proposed model is the integration of a convolutional neural network-based encoder-decoder structure with a multiscale transformer to augment the feature representation of lesions in the global field of view. Transformer pathways, composed of memory- and computation-efficient dual-self-attention modules, leverage feature maps from varying depths of the encoder to discern long-range interdependencies among feature positions and channels, thereby emphasizing areas and channels relevant to lesions. The proposed model was trained and evaluated on a public-open dataset including MR images of 85 patients using both subject-level and voxel-level metrics.

Results

Experimental results indicate that our model offers superior performance both quantitatively and qualitatively. It successfully identified lesions in 82.4% of patients, with a low false-positive lesion cluster rate of 0.176 ± 0.381 per patient. Furthermore, the model achieved an average Dice coefficient of 0.410 ± 0.288, outperforming five established methods.

Conclusion

Integration of the transformer could enhance the feature presentation and segmentation performance of FCD lesions. The proposed model has the potential to serve as a valuable assistive tool for physicians, enabling rapid and accurate identification of FCD lesions. The source code and pre-trained model weights are available at https://github.com/zhangxd0530/MS-DSA-NET.

Critical relevance statement

This multiscale transformer-based model performs segmentation of focal cortical dysplasia lesions, aiming to help radiologists and clinicians make accurate and efficient preoperative evaluations of focal cortical dysplasia patients from MR images.

Key Points

The first transformer-based model was built to explore focal cortical dysplasia lesion segmentation.

Integration of global and local features enhances the segmentation performance of lesions.

A valuable benchmark for model development and comparative analyses was provided.

Graphical Abstract

Keywords

Drug-resistant epilepsy
Focal cortical dysplasia
Lesion segmentation
Transformer
Dual-self-attention
https://doi.org/10.13039/ Guangdong High-level Hospital Construction Fund ynkt2022-zz12 Zhang Xiaodong http://dx.doi.org/10.13039/501100018609 High-level Hospital Construction Project of Guangdong Provincial People's Hospital LCYJ2022001 Cao Dezhi http://dx.doi.org/10.13039/501100001809 National Natural Science Foundation of China 62001462 Zhang Xiaodong issue-copyright-statement© European Society of Radiology (ESR) 2024
==== Body
pmcIntroduction

Background

The most recent statistics suggest that approximately 70 million people worldwide are afflicted with epilepsy [1]. Focal cortical dysplasia (FCD) is a predominant cause of drug-resistant epilepsy (DRE) [2]. Surgical removal of FCD lesions is the most efficacious intervention for DRE-FCD, yielding seizure remission in about 70% of post-surgery patients [3]. The success of this intervention critically depends on the accurate localization and delineation of FCD lesions.

However, identifying FCD lesions in clinical practice remains fraught with challenges. The structural changes associated with FCD on MR images can be subtle, and as such, are easily missed during routine visual inspections. Such changes include blurring of the gray-white matter junction (as shown in columns 1–4 of Fig. 1), cortical thickening, abnormal sulcal or gyral patterns, hyperintense signals on T2-weighted or fluid-attenuated inversion recovery (FLAIR) sequences, and the transmantle sign [4]. Furthermore, approximately one-third of FCD cases are classified as MRI-negative [5], as shown in columns 5–8 of Fig. 1, further complicating the clinician’s task to localize and evaluate FCD lesions effectively. In light of these challenges, there is an urgent demand for computer-aided techniques capable of detecting and quantifying FCD lesions in an automated and objective manner.Fig. 1 FCD lesion visualization on 6 consecutive MR slices of an MRI-positive patient in columns 1–4 and an MRI-negative one in columns 5–8. The lesion mask is rendered in blue. Region-of-interest (ROI) inside the yellow bounding box surrounding the lesion is enlarged on the right side, with the lesion contour drawn in red

Related work

Over the past few decades, the computer-assisted detection of FCD lesions has been pursued using voxel-based morphometry (VBM) [6] and surface-based morphometry (SBM) [7]. The VBM process involves registering images to standardize their spatial orientation and achieve voxel-wise alignment, followed by voxel-wise statistical analysis [8, 9]. Machine learning models can be trained for voxel-wise classification [10, 11]. However, VBM methods are sensitive to image registration and individual brain variances, with non-linear registration potentially altering local cortical structures and leading to detection failures.

In contrast, SBM methods rebuild the cortical surface to extract vertex-specific features, such as cortical thickness, curvature, sulcal depth, and “doughnut” features. Machine learning models are then trained on these vertex features for vertex-wise classification to identify abnormal vertex clusters [12–14]. Despite their effectiveness in detecting FCD, SBM methods are computationally demanding due to the requirement for cortical surface reconstruction, a process that can take several hours per patient. Both VBM and SBM are reliant on hand-crafted low-level features that may not be sufficiently discriminative to differentiate between FCD lesions and normal structures.

With advancements in parallel computing devices and theories of artificial intelligence, deep learning techniques, particularly convolutional neural networks (CNNs), have shown significant potential in medical applications [15]. In recent years, CNNs have been leveraged to detect FCD lesions from MR images [16]. The detection of FCD lesions can be conceptualized as a voxel-wise classification problem as in [17–19]. Fully convolutional networks, such as UNet [20] and its variants (e.g., Attention-UNet [21], Multi-Res-UNet [22]), can generate dense predictions in an efficient, end-to-end manner and have seen broad application in various medical segmentation tasks. The UNet was initially trained to detect FCD lesions using FLAIR slices [23], and it was subsequently extended to 3D Res-UNet with residual convolution blocks [24]. The utilization of more information provided within the 3D patches significantly improved performance. The Multi-Res-Attention-UNet enhances the UNet by incorporating MultiResUNet with attention gating [25], designed to extract salient features that represent complex FCD lesions.

Challenges and solutions

While CNNs have proven adept at learning compelling feature representations, their local receptive fields limit their capacity to capture long-range dependencies. In contrast, Transformer models excel at modeling long-range dependencies [26]. The vision transformer (ViT) is the first Transformer model applied to image analysis [27] and has been adapted for medical image analysis, achieving state-of-the-art performance across various segmentation tasks [28].

However, Transformer-based models have yet to be extensively explored for FCD lesion segmentation, and challenges abound when applying these models. Specifically, FCD lesions vary in shape, location, and size, potentially curtailing performance improvements due to the single-scale patch splitting employed in current Transformer models on 3D medical images. Furthermore, these models involve extensive parameters and computations, leading to potential overfitting. In addition, existing models trained and validated on proprietary data may lead to pronounced performance disparities. To overcome these limitations, we propose a multiscale transformer-based model for FCD lesion segmentation based on a publicly open dataset.

Methods

Datasets

A publicly open dataset, provided by the Department of Epileptology at the University Hospital Bonn (UHB dataset) [29], is used in this paper. Datasets of 85 patients diagnosed with FCD II, hospitalized from 2006 to 2021, were retrospectively collected, with approval from the university’s ethics committee. 50 of 85 patients (58.8%) are male. The scan age (28.9 ± 12.4 years) and epilepsy onset age (10 ± 8.3 years) distributions of the dataset are plotted in Fig. 2a.Fig. 2 a Age distribution of the patients; b Lesion distribution in different brain lobes

Included in this dataset are MRI sequences for each patient, along with clinical information. MRI was performed using a 3 T MRI Scanner (Magnetom Trio, Simens Healthineers, Erlangen, Germany). T1-MPRAGE and fluid-attenuated inversion recovery (FLAIR) sequences were recorded.

Lesion ground truth was annotated on FLAIR images by two neurologists, based on a combination of diagnostic tools. A subset of 7 cases (8.3%) was categorized as MRI-negative or non-lesional. The lesions are located in the frontal lobe, temporal lobe, parietal lobe, occipital lobe, and insular lobe as shown in Fig. 2b.

Figure 3 gives the flowchart of the proposed method. Preprocessing is firstly applied to align and normalize images as shown in Fig. 3a, b. Preprocessing details are introduced in Appendix 1. The dataset was randomly divided into a training set, a validation set, and a test set containing 62, 6, and 17 samples, respectively.Fig. 3 Flowchart of the proposed method. a Dataset splitting; b Preprocessing procedure; c Architecture of the proposed model based on an encoder-decoder structure. Parallel transformer pathways, each consisting of m dual-self-attention (DSA) modules, are inserted to capture the global features on feature maps of different resolutions, ranging from 1/4 to 1/32. d Architecture of the DSA module, consisting of a spatial self-attention branch and a channel self-attention branch

Model architecture

The proposed multiscale dual-self-attention network (MS-DSA-NET) employs an encoder-decoder architecture with parallel transformer pathways connecting between them. The specific architectural details are elaborated below and represented in Fig. 3c. The proposed model accepts a 3D patch x∈RC0×D×H×W as input and produces a lesion probability map of the same size as the input, whereC0,D,H, and W represent the channels, depth, height, and width of the input patch, respectively.

The encoder within our proposed network is a six-level convolutional hierarchy. Each level incorporates a residual convolution module, referred to asResConv, consisting of two convolutional blocks with residual connection. The feature representation at each level is mathematically expressed as:1 xi∈R2i−1⋅C×D2i−1×H2i−1×W2i−1,

wherei=1, 2,⋯,6 corresponds to the layer index and C denotes the number of filters in the first convolutional layer and is fixed to 16 in our configuration.

Transformer pathway

Our approach capitalizes on CNN feature maps at various resolutions to establish long-range relationships. Initially, the CNN feature map at each level undergoes processing through a ResConv module to halve the feature channels and normalize the output. The normalized features are denoted as x∈Rc×d×h×w, where c represents the feature channels and d×h×w corresponds to the feature spatial size.

In contrast to using patch embedding as in ViT, the feature maps denoted as {xi∈Rci×di×hi×wi}i=3,4,5,6 are directly fed into parallel transformer pathways. Each pathway comprises m DSA modules. In our configuration, we have opted to set m equal to 3.

DSA architecture

The detailed structure of the DSA module is depicted in Fig. 3d. We reshape and transpose feature map into a token sequence denoted as x∈Rn×c, where n=dhw is the sequence length. A learnable positional embedding e∈Rn×c, is added to the feature sequence to encapsulate the position information.

Subsequently, it undergoes normalization by a LayerNorm layer. This is followed by two parallel self-attention modules that independently enrich spatial and channel features. Linear layers first map the feature sequence into four matrices. These represent the query Q∈Rn×c, the key K∈Rn×c, the spatial value Vs∈Rn×c, and the channel value Vc∈Rn×c. Both Vs and Vc are employed in their respective self-attention modules. Meanwhile, Q and K are shared in both modules to avoid additional complexity.

Spatial self-attention (SSA) module

SSA is capable of emphasizing the salient regions of FCD lesions by capturing the global inter-position dependencies. To decrease the complexity of the conventional self-attention mechanism, linear layers are utilized in SSA to project K and Vs into a lower-dimensional space:2 K¯=LinearK∈Rp×c,Vs¯=Linear(Vs)∈Rp×c,

where the projection dimension p≪n. The spatial similarity matrix is then computed by multiplying the query matrix Q∈Rn×c by the transpose of the projected key matrix K¯∈Rp×c, followed by rescaling and Softmax for normalization:3 As=SoftmaxQK¯Ts∈Rn×p,

where the rescaling factor s=c/nh and nh is the number of self-attention heads. A spatial attention map is obtained:4 xs=AsVs¯∈Rn×c

With the aid of linear projection, the computation complexity of SSA is reduced to O(np). This makes it feasible to apply parallel SSA on feature maps at multiple resolutions, ranging from 1/4 to 1/32.

CSA module

CSA is designed to focus more acutely on FCD lesion-related features by capturing the global inter-channel dependencies. CSA utilizes the shared Q∈Rn×c and the key K∈Rn×c with SSA to compute the normalized channel similarity matrix:5 Ac=SoftmaxQTKs∈Rc×c,

where the rescaling factor s=c/nh. Subsequently, the channel attention map is obtained:6 xc=VcAc∈Rn×c

The spatial attention map xs and channel attention map xc are fused by addition. The input feature map x is connected to the fused attention map via a residual connection:7 z′=x+(xs+xc)

We reshape and transpose z′∈Rn×c to z′∈Rc×d×h×w, with the aim of recovering the spatial information and making it suitable for the following convolutional module. The convolutional module consists of a ResConv module and a 1×1×1 convolution with a residual connection to generate the enriched feature maps.

Decoder architecture

The decoder’s function is to fuse features from various hierarchical levels, an operation facilitated by deconvolution and specialized Fusion blocks. A Fusion block receives encoder features, denoted as either zi or xi, to fuse feature maps yi from a deeper level as inputs, thereby enabling concatenation and convolution. The feature maps, yi, are initially upsampled via deconvolution using a kernel and stride of 2×2×2. This process synchronizes feature maps across different resolutions and simultaneously reduces the number of feature channels by half prior to entering the Fusion block. Ultimately, the feature maps are refined through a 1×1×1 convolution. This effectively transforms the feature channels into two output channels, which is immediately followed by a Softmax layer to yield a normalized probability map.

Loss functions

The optimization of the proposed model employs a hybrid loss function as the objective function, which comprises two distinct components: a regional term and a voxel term:8 L=Ldc+ω*Lce,Ldc=1−2*∑iPiGi+ε∑iPi+∑iGi+ε,Lce=−∑iGilogPi+(1−Gi)log(1−Pi),

where reginal term Ldc is the Dice loss to evaluate the disparity between the predicted lesion map, and the ground truth; voxel term Lce is the cross-entropy loss to evaluate the dissimilarity between the predicted probabilities and the ground truth labels at the voxel level; P is the prediction map and G is ground truth; ω is a predefined weight, which in this study is set to 1.

Evaluation metrics

We employed two primary metrics: subject-level and voxel-level assessments. At the subject level, we leveraged detection sensitivity (sSens) and the average number of false-positive clusters (nFPC). An FCD lesion was considered detected if there was at least one-voxel overlap between the prediction and the ground truth, a criterion consistent with that used in [19]. sSens is defined as follows:9 sSens=TPsTPs+FNs,

where TPs denotes true positive subjects, and FNs represents false negative subjects.

nFPC quantifies the count of false-positive lesion detections within FCD patients. Clusters are initially delineated based on voxel connectivity analysis, with any cluster lacking actual lesion voxels being considered a false-positive cluster.

At the voxel level, we used the commonly applied metrics of precision (Prec), sensitivity (Sens), and the Dice coefficient (DC) for evaluation. These metrics are defined as:10 Prec=TPTP+FP,Sens=TPTP+FN,DC=2×TP2×TP+FN+FP,

where TP refers to the number of true positive voxels, FP indicates the number of false-positive voxels, and FN denotes the false negative voxels.

Results

To validate the performance of our proposed method, a series of experiments were conducted. Various current state-of-the-art CNN models were implemented for comparison, including Attention-UNet [21], Res-UNet [24], and Multi-Res-Attention-UNet [25], which have previously been employed for FCD lesion segmentation. Additionally, transformer-based models, specifically UNETR [30] and an extended version, UNETR + + [31], were included in the comparative analysis. Training details are provided in Appendix 2.

Comparisons among different models

Quantitative comparisons

Subject-level and voxel-level evaluations were conducted for each patient in the test set. To quantify nFPC, connected component analysis was employed on the segmentation masks to identify and categorize separate clusters. Any cluster that did not overlap with the ground truth was classified as an FPC. The outcomes of these evaluations for FCD lesion segmentation can be found in Table 1. We also counted the number of ground truth lesions, true positive lesions, false-positive lesions, and false negative lesions as listed in Table 2. In addition, Fig. 4 provides the box-plot of DC values among different models for intuitive performance comparison.Table 1 Quantitative comparisons with state-of-the-art methods using subject-level and voxel-level metrics

Methods	sSens	nFPC	Sens	Prec	DC	
Attention-UNet [21]	0.647	1.118 ± 1.906	0.246 ± 0.258	0.336 ± 0.359	0.236 ± 0.268	
Res-UNet [24]	0.765	1.235 ± 1.214	0.372 ± 0.295	0.385 ± 0.334	0.335 ± 0.265	
Multi-Res-Attention-UNet [25]	0.471	3.000 ± 3.597	0.228 ± 0.314	0.219 ± 0.307	0.187 ± 0.262	
UNETR [30]	0.588	1.529 ± 2.304	0.115 ± 0.171	0.344 ± 0.399	0.115 ± 0.171	
UNETR + + [31]	0.706	0.882 ± 0.900	0.436 ± 0.340	0.382 ± 0.321	0.373 ± 0.295	
MS-DSA-NET (ours)	0.824	0.176 ± 0.381	0.438 ± 0.324	0.481 ± 0.343	0.410 ± 0.288	
sSens denotes the sensitivity at the subject level, while nFPC refers to the average number of false-positive clusters identified. Additionally, Sens and Prec represent the sensitivity and precision at the voxel level, respectively. Lastly, DC signifies the Dice coefficient score, which is a statistical measure of similarity between two sets of data

The bold values provide an intuitive way for readers to find the best performance value of each metric

Table 2 Comparisons of the number of ground truth lesions (GT lesions), true positive lesions (TP lesions), false-positive lesions (FP lesions), and false negative lesions (FN lesions) among different models

Methods	TP lesions	FP lesions	FN lesions	GT lesions	
Attention-UNet [21]	11	19	6	17	
Res-UNet [24]	13	21	4	
Multi-Res-Attention-UNet [25]	8	51	9	
UNETR [30]	10	26	7	
UNETR + + [31]	12	15	5	
MS-DSA-NET (ours)	14	3	3	
The bold values provide an intuitive way for readers to find the best performance value of each metric

Fig. 4 Dice coefficient (DC) comparisons among different models. “+” represents the position of mean DC; the Blue line marks the position of median DC

Qualitative comparisons

For a qualitative comparison of FCD lesion segmentation, segmentation results of one representative case are visualized in Fig. 5. It provides three consecutive axial slices overlapped with prediction maps of different models. The ROI encapsulating lesion and prediction map are enlarged for a better view. The proposed model achieved a DC of 0.787, higher than other models.Fig. 5 Visualization of segmentation results of one typical case. Consecutive 3 axial slices along with segmentation results of different models are drawn in rows. Red, blue, and green colors represent the true positive (TP), false negative (FN), and false positive (FP), respectively. ROIs inside the yellow bounding box encapsulating the lesions are drawn below

Ablation studies

Experiments were conducted to explore the influence of model architecture on performance. Initially, acknowledging that T1 and FLAIR imaging sequences provide distinct insights into the structural alterations linked to FCD lesions, experiments were designed to assess the performance of models trained with varying input sequences. The evaluation outcomes are elaborated in Table 3.Table 3 Ablation experiment results on different input sequences using the proposed method

MRI sequences	sSens	nFPC	Sens	Prec	DC	
T1 only	0.588	1.000 ± 1.138	0.286 ± 0.311	0.339 ± 0.336	0.262 ± 0.254	
FLAIR only	0.588	0.706 ± 1.225	0.325 ± 0.324	0.302 ± 0.321	0.299 ± 0.305	
T1&FLAIR	0.824	0.176 ± 0.381	0.438 ± 0.324	0.481 ± 0.343	0.410 ± 0.288	
The bold values provide an intuitive way for readers to find the best performance value of each metric

We conducted a series of experiments to validate the improved performance provided by different self-attention mechanisms. In our study, we replaced the DSA module in the proposed model with the SSA module and CSA module, respectively, and carried out experiments under the same configuration. The comparative performance of models with different self-attention modules is illustrated in Table 4.Table 4 Ablation experiment results on different self-attention mechanisms

Self-attention modules	sSens	nFPC	Sens	Prec	DC	
SSA	0.824	0.765 ± 0.876	0.482 ± 0.301	0.458 ± 0.324	0.419 ± 0.267	
CSA	0.765	0.824 ± 0.785	0.441 ± 0.337	0.328 ± 0.298	0.328 ± 0.281	
DSA	0.824	0.176 ± 0.381	0.438 ± 0.324	0.481 ± 0.343	0.410 ± 0.288	
Specifically, within the MS-DSA-NET architecture, the original dual-self-attention (DSA) module was substituted with two alternative self-attention modules: the spatial-self-attention (SSA) module and the channel-self-attention (CSA) module

The bold values provide an intuitive way for readers to find the best performance value of each metric

The size of the patch is essential for transformer-based models to extract meaningful semantic features. To evaluate the influence of patch size on segmentation performance, we conducted experiments using MS-DSA-NET with various patch dimensions. Within our experimental setup, we set the patch sizes to be 64×64×64, 96×96×96, and 128×128×128, respectively. The performance comparisons among these different patch sizes are outlined in Table 5.Table 5 Ablation experiment results of MS-DSA-NET with different patch sizes

Patch size	sSens	nFPC	Sens	Prec	DC	
643	0.765	5.588 ± 2.724	0.459 ± 0.309	0.306 ± 0.265	0.342 ± 0.254	
963	0.765	2.294 ± 1.707	0.445 ± 0.328	0.339 ± 0.279	0.352 ± 0.257	
1283	0.824	0.176 ± 0.381	0.438 ± 0.324	0.481 ± 0.343	0.410 ± 0.288	
The bold values provide an intuitive way for readers to find the best performance value of each metric

Discussion

This study introduces a novel multiscale transformer-based network for the segmentation of FCD lesions. Experiments have been conducted to validate its performance on the UHB dataset. Our results illustrate the improved performance achieved by integrating multiscale DSA modules. To the best of our knowledge, this is the first study applying a transformer-based model for the segmentation of FCD lesions.

Our experiments demonstrate that the proposed MS-DSA-NET outperforms both CNN-based and transformer-based models. As shown in Table 1, MS-DSA-NET achieves the highest subject-level sensitivity of 0.824, successfully identifying lesions that overlap with the ground truth mask in 13 out of 17 patients, while maintaining a relatively low average number of false positives per case (nFPC = 0.176 ± 0.381).

At the voxel level, the proposed model performs 9.9% and 3.7% better in terms of Prec and DC compared to the second highest-ranked model (UNETR + +), respectively. The UNETR, based on a traditional ViT architecture, demonstrated the poorest performance among all models, potentially due to its extensive parameter count, leading to overfitting and reduced generalization when trained on limited datasets.

The proposed method offers a flexible framework for combining information from different sequences or imaging modalities, potentially enhancing segmentation task performance. An ablation study on input sequences reveals that the proposed model’s performance using multi-channel input (T1 + FLAIR) is superior to that using T1 or FLAIR alone, both at the subject and voxel levels. The fusion of T1 and FLAIR improved the detection rate from 0.588 to 0.824 and reduced nFPC from 1.000 (T1) and 0.706 (FLAIR) to 0.176. Additionally, it achieved improved voxel-level DC, Sens, and Prec scores of 0.410 ± 0.288, 0.438 ± 0.324, and 0.481 ± 0.343, respectively, surpassing single-modality input performances. Future work will explore the incorporation of PET imaging, a crucial modality for detecting subtle FCD lesions, to further enhance MRI-negative sample segmentation.

Further ablation studies on different attention mechanisms validated the effectiveness of the DSA block. The SSA model achieved the same detection rate as the DSA model (0.824); however, the nFPC for the SSA model increased to 0.765 ± 0.876, compared to 0.176 ± 0.381 for the DSA model. The complementarity of the CSA module to the SSA module was also assessed. While it contributed to recognizing false-positive classifications, it slightly decreased the voxel-level DC metric. The study also found that using patches of size 128×128×128 achieved the best performance at both the subject and voxel levels, indicating that larger patches provide more global information beneficial for enhancing FCD lesion feature representation and improving false-positive discrimination.

Limitations of our proposed model include the inability to identify lesions in 3 patients, resulting in an overall detection sensitivity of 82.4%. MRI slices of one failed case are depicted in Fig. 6. The lesion area masked in blue is poorly defined and represents a challenge for detection. Furthermore, the DC value for FCD lesion segmentation is 0.410, which is low compared to other medical segmentation tasks, highlighting the inherent challenges of FCD lesion segmentation. While numerous studies have investigated this area, they have typically relied on private datasets, leading to discrepancies in data volume and performance metrics. A fair comparison across common datasets would be beneficial. Given the difficulty in collecting FCD datasets with expert annotations, and considering that no other studies on this public UHB dataset have been reported, our method could serve as a valuable benchmark for future model development and comparative analyses in FCD lesion segmentation. In addition, this paper focuses on lesion detection of FCD patients. We will include normal controls to further evaluate the model performance in our future work. An auxiliary task to discriminate between FCDs and normals is worth trying to include in the model, aiming to further enhance performance.Fig. 6 One case that failed to detect any lesion. The lesion ground truths are superimposed on the FLAIR slices in blue, highlighting the regions of interest

Conclusion

This study introduces a novel method for segmenting FCD lesions from multi-channel MR images using a multiscale transformer-based network. Experimental results substantiate the exceptional performance of the proposed model in the segmentation of FCD lesions. The method outlined in this paper holds promise as a valuable tool for medical practitioners, empowering them to swiftly and accurately detect FCD lesions.

Supplementary information

ELECTRONIC SUPPLEMENTARY MATERIAL

Abbreviations

CNNs Convolutional neural networks

CSA Channel self-attention

DC Dice coefficient

DRE Drug-resistant epilepsy

DSA Dual-self-attention

FCD Focal cortical dysplasia

MS-DSA-NET Multiscale dual-self-attention network

nFPC Number of false-positive clusters

Prec Precision

SBM Surface-based morphometry

Sens Sensitivity

SSA Spatial self-attention

sSens Subject-level sensitivity

VBM Voxel-based morphometry

ViT Vision transformer

Supplementary information

The online version contains supplementary material available at 10.1186/s13244-024-01803-8.

Authors contributions

This study was supervised by X.J.P. and C.D.Z. Z.X.D., Z.Y.Q., and W.C.M. developed and validated the deep models; L.L. and Z.F.J. investigated the related resources; S.Y. and M.T. performed the statistical analysis; Z.X.D. and Z.Y.Q. were the major contributors to writing the manuscript; H.Q.M., X.J.P., and C.D.Z. reviewed the manuscript. All authors read and approved the final manuscript.

Funding

This work was supported by the Guangdong High-level Hospital Construction Fund (ynkt2022-zz12), Guangdong High-level Hospital Construction Fund Clinical Research Project of Shenzhen Children’s Hospital (LCYJ2022001), National Natural Science Foundation of China (62001462).

Data availability

The public UHB dataset used in this paper is available at https://openneuro.org/datasets/ds004199/.

Declarations

Ethics approval and consent to participate

This research study was conducted retrospectively using human subject data made available in open access by the Department of Epileptology at the University Hospital Bonn. Ethical approval was not required as confirmed by the license attached with the open-access data.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Xiaodong Zhang and Yongquan Zhang contributed equally to this work.
==== Refs
References

1. Thijs RD Surges R O’Brien TJ Sander JW Epilepsy in adults Lancet 2019 393 689 701 10.1016/S0140-6736(18)32596-0 30686584
Thijs RD, Surges R, O’Brien TJ, Sander JW (2019) Epilepsy in adults. Lancet 393:689–70130686584 10.1016/S0140-6736(18)32596-0
2. Blumcke I Spreafico R Haaker G Histopathological findings in brain tissue obtained during epilepsy surgery N Engl J Med 2017 377 1648 1656 10.1056/NEJMoa1703784 29069555
Blumcke I, Spreafico R, Haaker G et al (2017) Histopathological findings in brain tissue obtained during epilepsy surgery. N Engl J Med 377:1648–165629069555 10.1056/NEJMoa1703784
3. Wagstyl K Whitaker K Raznahan A Atlas of lesion locations and postsurgical seizure freedom in focal cortical dysplasia: a MELD study Epilepsia 2022 63 61 74 10.1111/epi.17130 34845719
Wagstyl K, Whitaker K, Raznahan A et al (2022) Atlas of lesion locations and postsurgical seizure freedom in focal cortical dysplasia: a MELD study. Epilepsia 63:61–7434845719 10.1111/epi.17130
4. Widdess-Walsh P Diehl B Najm I Neuroimaging of focal cortical dysplasia J Neuroimaging 2006 16 185 196 10.1111/j.1552-6569.2006.00025.x 16808819
Widdess-Walsh P, Diehl B, Najm I (2006) Neuroimaging of focal cortical dysplasia. J Neuroimaging 16:185–19616808819 10.1111/j.1552-6569.2006.00025.x
5. Tassi L Colombo N Garbelli R Focal cortical dysplasia: neuropathological subtypes, EEG, neuroimaging and surgical outcome Brain 2002 125 1719 1732 10.1093/brain/awf175 12135964
Tassi L, Colombo N, Garbelli R et al (2002) Focal cortical dysplasia: neuropathological subtypes, EEG, neuroimaging and surgical outcome. Brain 125:1719–173212135964 10.1093/brain/awf175
6. Mechelli A Price CJ Friston KJ Ashburner J Voxel-based morphometry of the human brain: methods and applications Curr Med Imaging 2005 1 105 113 10.2174/1573405054038726
Mechelli A, Price CJ, Friston KJ, Ashburner J (2005) Voxel-based morphometry of the human brain: methods and applications. Curr Med Imaging 1:105–11310.2174/1573405054038726
7. Thesen T Quinn BT Carlson C Detection of epileptogenic cortical malformations with surface-based MRI morphometry PLoS One 2011 6 e16430 10.1371/journal.pone.0016430 21326599
Thesen T, Quinn BT, Carlson C et al (2011) Detection of epileptogenic cortical malformations with surface-based MRI morphometry. PLoS One 6:e1643021326599 10.1371/journal.pone.0016430
8. Wang ZI Jones SE Jaisani Z Voxel-based morphometric magnetic resonance imaging (MRI) postprocessing in MRI-negative epilepsies Ann Neurol 2015 77 1060 1075 10.1002/ana.24407 25807928
Wang ZI, Jones SE, Jaisani Z et al (2015) Voxel-based morphometric magnetic resonance imaging (MRI) postprocessing in MRI-negative epilepsies. Ann Neurol 77:1060–107525807928 10.1002/ana.24407
9. Martin P Winston GP Bartlett P de Tisi J Duncan JS Focke NK Voxel-based magnetic resonance image postprocessing in epilepsy Epilepsia 2017 58 1653 1664 10.1111/epi.13851 28745400
Martin P, Winston GP, Bartlett P, de Tisi J, Duncan JS, Focke NK (2017) Voxel-based magnetic resonance image postprocessing in epilepsy. Epilepsia 58:1653–166428745400 10.1111/epi.13851
10. El Azami M Hammers A Jung J Costes N Bouet R Lartizien C Detection of Lesions Underlying Intractable Epilepsy on T1-Weighted MRI as an Outlier Detection Problem PLoS One 2016 11 e0161498 10.1371/journal.pone.0161498 27603778
El Azami M, Hammers A, Jung J, Costes N, Bouet R, Lartizien C (2016) Detection of Lesions Underlying Intractable Epilepsy on T1-Weighted MRI as an Outlier Detection Problem. PLoS One 11:e016149827603778 10.1371/journal.pone.0161498
11. David B Kröll-Seger J Schuch F External validation of automated focal cortical dysplasia detection using morphometric analysis Epilepsia 2021 62 1005 1021 10.1111/epi.16853 33638457
David B, Kröll-Seger J, Schuch F et al (2021) External validation of automated focal cortical dysplasia detection using morphometric analysis. Epilepsia 62:1005–102133638457 10.1111/epi.16853
12. Jin B Krishnan B Adler S Automated detection of focal cortical dysplasia type II with surface-based magnetic resonance imaging postprocessing and machine learning Epilepsia 2018 59 982 992 10.1111/epi.14064 29637549
Jin B, Krishnan B, Adler S et al (2018) Automated detection of focal cortical dysplasia type II with surface-based magnetic resonance imaging postprocessing and machine learning. Epilepsia 59:982–99229637549 10.1111/epi.14064
13. Wagstyl K Adler S Pimpel B Planning stereoelectroencephalography using automated lesion detection: retrospective feasibility study Epilepsia 2020 61 1406 1416 10.1111/epi.16574 32533794
Wagstyl K, Adler S, Pimpel B et al (2020) Planning stereoelectroencephalography using automated lesion detection: retrospective feasibility study. Epilepsia 61:1406–141632533794 10.1111/epi.16574
14. Spitzer H Ripart M Whitaker K Interpretable surface-based detection of focal cortical dysplasias: a multi-centre epilepsy lesion detection study Brain 2022 145 3859 3871 10.1093/brain/awac224 35953082
Spitzer H, Ripart M, Whitaker K et al (2022) Interpretable surface-based detection of focal cortical dysplasias: a multi-centre epilepsy lesion detection study. Brain 145:3859–387135953082 10.1093/brain/awac224
15. Chen X Wang X Zhang K Recent advances and clinical applications of deep learning in medical image analysis Med Image Anal 2022 79 102444 10.1016/j.media.2022.102444 35472844
Chen X, Wang X, Zhang K et al (2022) Recent advances and clinical applications of deep learning in medical image analysis. Med Image Anal 79:10244435472844 10.1016/j.media.2022.102444
16. Walger L Adler S Wagstyl K Artificial intelligence for the detection of focal cortical dysplasia: challenges in translating algorithms into clinical practice Epilepsia 2023 64 1093 1112 10.1111/epi.17522 36721976
Walger L, Adler S, Wagstyl K et al (2023) Artificial intelligence for the detection of focal cortical dysplasia: challenges in translating algorithms into clinical practice. Epilepsia 64:1093–111236721976 10.1111/epi.17522
17. Wang H Ahmed SN Mandal M Automated detection of focal cortical dysplasia using a deep convolutional neural network Comput Med Imaging Graph 2020 79 101662 10.1016/j.compmedimag.2019.101662 31812131
Wang H, Ahmed SN, Mandal M (2020) Automated detection of focal cortical dysplasia using a deep convolutional neural network. Comput Med Imaging Graph 79:10166231812131 10.1016/j.compmedimag.2019.101662
18. Gill RS, Hong SJ, Fadaie F et al (2018) Deep convolutional networks for automated detection of epileptogenic brain malformations. Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention. Springer International Publishing. pp. 490–497
19. Gill RS Lee HM Caldairou B Multicenter validation of a deep learning detection algorithm for focal cortical dysplasia Neurology 2021 97 e1571 e1582 10.1212/WNL.0000000000012698 34521691
Gill RS, Lee HM, Caldairou B et al (2021) Multicenter validation of a deep learning detection algorithm for focal cortical dysplasia. Neurology 97:e1571–e158234521691 10.1212/WNL.0000000000012698
20. Ronneberger O, Fischer P, Brox T (2015) U-net: Convolutional networks for biomedical image segmentation. Proceedings of the International Conference on Medical image computing and computer-assisted intervention–MICCAI. Springer International Publishing. pp. 234–241
21. Schlemper J Oktay O Schaap M Attention gated networks: Learning to leverage salient regions in medical images Med Image Anal 2019 53 197 207 10.1016/j.media.2019.01.012 30802813
Schlemper J, Oktay O, Schaap M et al (2019) Attention gated networks: Learning to leverage salient regions in medical images. Med Image Anal 53:197–20730802813 10.1016/j.media.2019.01.012
22. Ibtehaz N Rahman MS MultiResUNet: rethinking the U-Net architecture for multimodal biomedical image segmentation Neural Netw 2020 121 74 87 10.1016/j.neunet.2019.08.025 31536901
Ibtehaz N, Rahman MS (2020) MultiResUNet: rethinking the U-Net architecture for multimodal biomedical image segmentation. Neural Netw 121:74–8731536901 10.1016/j.neunet.2019.08.025
23. Dev KMB Jogi PS Niyas S Automatic detection and localization of focal cortical dysplasia lesions in MRI using fully convolutional neural network Biomed. Signal Process. Control 2019 52 218 225 10.1016/j.bspc.2019.04.024
Dev KMB, Jogi PS, Niyas S et al (2019) Automatic detection and localization of focal cortical dysplasia lesions in MRI using fully convolutional neural network. Biomed. Signal Process. Control 52:218–22510.1016/j.bspc.2019.04.024
24. Niyas S Vaisali SC Show I Segmentation of focal cortical dysplasia lesions from magnetic resonance images using 3D convolutional neural networks Biomed. Signal Process. Control 2021 70 102951 10.1016/j.bspc.2021.102951
Niyas S, Vaisali SC, Show I et al (2021) Segmentation of focal cortical dysplasia lesions from magnetic resonance images using 3D convolutional neural networks. Biomed. Signal Process. Control 70:10295110.1016/j.bspc.2021.102951
25. Thomas E Pawan SJ Kumar S Multi-res-attention UNet: a CNN model for the segmentation of focal cortical dysplasia lesions from magnetic resonance images IEEE J Biomed Health Inform 2021 25 1724 1734 10.1109/JBHI.2020.3024188 32931436
Thomas E, Pawan SJ, Kumar S et al (2021) Multi-res-attention UNet: a CNN model for the segmentation of focal cortical dysplasia lesions from magnetic resonance images. IEEE J Biomed Health Inform 25:1724–173432931436 10.1109/JBHI.2020.3024188
26. Vaswani A Shazeer N Parmar N Attention is all you need[J] Adv Neural Inf Process Syst 2017 30 5998 6008
Vaswani A, Shazeer N, Parmar N et al (2017) Attention is all you need[J]. Adv Neural Inf Process Syst 30:5998–6008
27. Dosovitskiy A, Beyer L, Kolesnikov A et al (2021) An image is worth 16x16 words: Transformers for image recognition at scale. International Conference on Learning Representations. OpenReview.net
28. Shamshad F Khan S Zamir SW Transformers in medical imaging: a survey Med Image Anal 2023 88 102802 10.1016/j.media.2023.102802 37315483
Shamshad F, Khan S, Zamir SW et al (2023) Transformers in medical imaging: a survey. Med Image Anal 88:10280237315483 10.1016/j.media.2023.102802
29. Schuch F Walger L Schmitz M An open presurgery MRI dataset of people with epilepsy and focal cortical dysplasia type II Sci Data 2023 10 475 10.1038/s41597-023-02386-7 37474522
Schuch F, Walger L, Schmitz M et al (2023) An open presurgery MRI dataset of people with epilepsy and focal cortical dysplasia type II. Sci Data 10:47537474522 10.1038/s41597-023-02386-7
30. Hatamizadeh A, Tang Y, Nath V et al (2022) Unetr: Transformers for 3d medical image segmentation. Proceedings of the IEEE/CVF winter conference on applications of computer vision. IEEE. pp. 574–584
31. Shaker A Maaz M Rasheed H UNETR + +: delving into efficient and accurate 3D medical image segmentation. arXiv preprint arXiv 2022 2212 04497
Shaker A, Maaz M, Rasheed H et al. (2022) UNETR + +: delving into efficient and accurate 3D medical image segmentation. arXiv preprint arXiv 2212:04497
