A prior knowledge-guided convolutional neural network model for predicting fetal brain age from MRI during second and third trimesters Authors: Fangmei Zhu, Shijie Huang, Xue Tang, Kai zhang, Jian Wang, Dinggang Shen, Zhongxiang Ding Published: 2025 ABSTRACT AbstractBackgroundThis study aimed to evaluate the efficacy of a convolutional neural network (CNN) model in estimating fetal brain age from MRI scans during second and third trimesters.MethodsA total of 407 T2-weighted MRI including 2310 stacks in the axial, sagittal, and coronal planes were used. The average fetal brain age was 30.7 weeks (ranging from 22 to 39 weeks). The reference standard gestational age was based on ultrasonography measurements during the first trimester. A prior knowledge-guided CNN model was utilized for brain age prediction. The relationship between the predicted brain age and the reference standard was assessed using Lin’s concordance correlation coefficient (ρc) and determination coefficient (R2) score. The results of fetal brain age prediction were presented as mean absolute error (MAE). We combined the features extracted by the brain age prediction network, that is attention maps, with the original images as input for the brain extraction network, in order to further assess whether these features were highly correlated with brain regions. An independent t-test was used to compare our method with different age prediction and brain extraction methods reported in the existing literatures.ResultsThe model exhibited a MAE of 4.62 ± 3.31 days, aligning closely with the reference standard (ρc = 0.977) and demonstrating a robust correlation between predicted and actual brain age (R2 = 0.953). Our model achieved the lowest MAE and the highest R2, showing statistically significant difference compared to other methods (all P-values<0.001). Our proposed method, which combined the U-Net model with an input of images and attention maps, exhibited significantly superior segmentation performance compared to existing methods (all P-values < 0.001). The attention map demonstrated that our prediction model was capable of extracting features that are highly correlated with fetal central brain regions.ConclusionA prior knowledge-guided CNN model that utilized fetal brain MRI data from the second and third trimesters can accurately predict fetal brain age, which holds significant potential for optimizing pregnancy management.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12884-025-08474-3.Keywords: Fetus, Brain age, Convolutional neural network, MRI Background Accurate prediction of gestational age is fundamental to the effective management of pregnancies, the monitoring of fetal development, and the comprehensive care of premature infants [1]. Traditionally, the mother’s last menstruation and fetal ultrasonography measurements are used to predict gestational age [2, 3]. Nevertheless, the accuracy of these methods declines as gestational progresses due to the influence of various factors on menstrual regularity and the inherent limitations of ultrasound in capturing detailed fetal development [4–6]. Consequently, there is an increasing demand for alternative methods, particularly for pregnancies that are not sufficiently assessed during the first trimester. The development of fetal brain is closely linked to gestational age, especially during its rapid growth phase [7]. Artificial intelligence techniques have demonstrated exceptional accuracy in predicting brain age under various conditions, including psychiatric disorders [8], focal epilepsy [9], neurodegenerative diseases [10] and post-traumatic atrophy [11]. These studies have laid the foundation in evaluating brain development and diagnosing neurological conditions by detecting discrepancies between brain age and chronological age. Similarly, a substantial body of research utilizing artificial intelligence techniques has demonstrated the high accuracy of fetal gestational age prediction [12–16]. Shi et al. [12] developed an attention-based deep residual network using 659 fetal brain MRI scans, achieving an overall MAE of 0.767 weeks and an R2 value of 0.920 in predicting fetal brain age. Vahedifard et al. [13] developed an artificial intelligence model to predict fetal brain age using biometric measurements derived from MRI scans. The model achieved prediction intervals of 0.47 to 2.17 weeks for biparietal diameter (BPD), 0.46 to 2.26 weeks for fronto-occipital diameter, and 0.75 to 1.74 weeks for head circumference. However, the research on CNN in the domain of fetal brain age prediction remains insufficient, limited by the scarcity of available studies [17, 18]. Feng [17] et al. utilized a CNN to predict gestational age based on fetal brain MRI data from 157 subjects, achieving an overall MAE of 0.848 weeks and an R2 value of 0.904. Their CNN architecture comprised four relatively complicated components: a transformation module that performs rotation transformations for input images; a feature extraction module primarily composed of multiple repeated attention blocks; a dynamic feature fusion module that fuses the multi-scale and multi-orientation features; and a balanced mean squared error loss function for regression. Therefore, we plan to develop a CNN network featuring flexible methodologies and minimal preprocessing requirements, thereby significantly reducing resource demands and enhancing practical applicability. Our network was designed for single-axis image processing and we adopted a computationally efficient strategy by averaging predictions across multiple axes. On this basis, we hypothesize that the task of predicting gestational age can extract features highly correlated with brain regions, and by fusing these features into the segmentation network, segmentation performance can be improved. Consequently, the segmentation task serves as a rigorous validation of the gestational age prediction model. Improved segmentation performance would indicate that gestational age prediction possesses significant interpretability within the feature space. Although the objective of this study was not to develop novel brain extraction algorithm, accurate fetal brain extraction is a prerequisite and foundation for a series of studies on the fetal brain. Early researchers have proposed numerous methods for extracting fetal brain and segmenting fetal brain tissue [19–21]. Lou et al. [19] proposed a multistage 2D U-Net for automatic brain extraction utilizing deep supervision. Ebner et al. [20] leveraged an automated framework to extract fetal brains and super-resolution based on CNN. They first located the fetal brain and segmented the region of interest containing the brain, then reconstruction and visualization in standard anatomical space suitable for pathological brains. Payette et al. [21] organized the Fetal Tissue Annotation Challenge, in which 20 international teams participated and submitted a total of 21 algorithms for competition, significantly advancing the development of automatic segmentation algorithms for fetal brain tissue. Furthermore, our approach leveraged three distinct types of prior knowledge to enhance the performance of fetal brain age prediction and brain segmentation tasks using MRI scans. These types of prior knowledge included scan prior, menstrual cycle-based gestational week and attention feature maps generated by the network during the fetal age prediction stage. This approach integrated a CNN architecture with a brain age prediction network and was validated through segmentation tasks. This study aims to facilitate the precise prediction of fetal brain age for clinicians, thereby optimizing pregnancy management. Methods Study sample This retrospective study was approved by the Institutional Ethical Committees of Affiliated Hangzhou First People’s Hospital, Westlake University School of Medicine, and Tongde Hospital of Zhejiang Province, with a waiver of informed consent for participation. The study received ethical approval from the Ethics Committees of both hospitals, under approval numbers KY-2024272-01 and 2024-072-JY. Approximately 1685 consecutive fetal MRI scans conducted for diagnostic purposes at our institutions between January 2018 and October 2023 were included in the study. If a fetus had more than one MRI examination, only the first one was included. Ultrasonography measurements conducted during the first trimester by qualified practitioners were considered as the reference standard for estimating gestational age. The exclusion criteria included the absence of ultrasonography data from the first trimester, poor-quality fetal MRI unsuitable for further analysis, and fetuses diagnosed with congenital malformation by two experienced obstetric radiologists with titles above deputy director. Ultimately, our study included data from a comprehensive set of 407 fetal MRI examinations, encompassing a total of 2310 individual stacks. Adhering to a [6:2:2] allocation ratio, the dataset was segmented into distinct training, validation, and test subsets, comprising 1386, 462, and 462 stacks, respectively. A flow chart of the screening process for the enrolled patients is shown in Fig. 1. The dataset was randomly split. Supplementary materials 1 and 2 show the distribution by sequences, scanners and orientations. The data from different sequences, scanners and orientations were balanced, with no statistically significant differences (all P-values > 0.05). A flow chart of the screening process for the enrolled patients Image preprocessing MRI acquisition fetal data were collected on two scanners (1.5-tesla, avanto, Siemens Healthcare, Forchheim, Germany; 1.5-tesla, signa creator, General Electric medical system, Milwaukee, USA), all equipped with an advanced 8-channel body coil. During the 30 to 40-minute scanning, the mother lay in the head-first supine position under free-breathing conditions. The mother and her fetus were not sedated. The scan protocol consisted of T2-weighted sequences in coronal, sagittal, and axial planes, with the following parameters: (1) Haste (Half-Fourier Acquisition Single-Shot Turbo Spin-Echo) sequence: time of repetition (TR) 877ms, time of echo (TE) 96ms, thick slice 4–6 mm, flip angle 150°, field of view (FOV) 250 × 250 mm. (2) Fiesta (fast imaging employing steady state acquisition) sequence: TR 3.8ms, TE min full, thick slice 4–6 mm, flip angle 65°, FOV 360 × 360 mm. (3) SSFSE (single shot fast spin echo) sequence: TR 1047ms, TE 85ms, thick slice 4–6 mm, flip angle 65°, FOV 370 × 370 mm. Although the sample sizes for each sequence were not balanced, no significant differences in predictive performance were observed. As illustrated in the supplementary material 3. For deep learning purposes, the images were converted from Digital Imaging and Communications in Medicine (DICOM) format to Neuroimaging Informatics Technology Initiative (NIFTI) format. To ensure uniformity, we initially standardized the in-plane spacing of the images to 0.8*0.8 mm, while maintaining interlayer spacing unchanged. Subsequently, we cropped the images from their central points, adjusting each slice to a size of N*192*192, where N represented the number of slices along the scanning axis. For fetal brain segmentation, we employed MONAIfbs for initial segmentation, followed by meticulous manual corrections by two clinical experts to establish the ground truth. Model structure The model architecture consisted of two branches: the brain age prediction model and the brain extraction model, as illustrated in Fig. 2. For the fetal brain age prediction task, we utilized ResNet-50 [22], a CNN pre-trained on over a million images from the 2012 ImageNet dataset, as the backbone. Given the characteristics of fetal brain image acquisition, slices closer to the central position contained more anatomical information. We incorporated this scan-related prior knowledge, which represented the first type of prior knowledge, into the design of the brain age prediction network by introducing a scanning prior pooling (SPP) mechanism. SPP comprised a one-dimensional Gaussian-distributed weight tensor, applied to fuse features (with size of N*1024) before the final layer of the network, as depicted in Fig. 2. The fused features were then concatenated with the menstrual cycle-based gestational week, as the second known clinical prior, which was an estimate of gestational age derived from the menstrual history of pregnant women, and subsequently passed through the final fully connected layer to generate the final brain age prediction. After training the age prediction model, we generated attention maps [23] by updating gradients of the network. Since brain age was closely linked to brain structure and size, these attention maps effectively pinpointed key regions within the age-prediction network, particularly emphasizing areas within the fetal head. These attention maps, serving as the third prior derived from the attention feature maps generated by the network during the fetal age prediction stage, were combined with the original images and used as inputs to the brain extraction network which employed the widely-used U-Net architecture [24]. Overview of our proposed brain age prediction and brain extraction model for fetal brain MRI. Given a stack of MRI slices, we first extracted deep features using a pre-trained ResNet-50 model, which were then fused with prior scan information. These fused features were concatenated with the gestational week, based on the menstrual cycle, and fed into to a fully connected layer to predict fetal brain age. Subsequently, the attention map, combined with the original image, was inputted into the segmentation network to generate brain segmentation results Implementation details The proposed method was implemented in Python using PyTorch and trained on an NVIDIA RTX 3060 GPU, effectively addressing the computational demands of our deep learning tasks. We used the Adam optimizer with a learning rate of 1.0*10− 4 to optimize the parameters of both the brain age prediction and brain extraction networks. The brain age prediction model used the MAE as its loss function, while the brain extraction network adopted the Dice coefficient loss [25]. P represented the predicted segmentation, while G denoted the ground-truth mask. Both the modified ResNet-50 and U-Net models were trained with a batch size of 1 for up to 100 epochs. Each batch during training comprised a stack of input stacks with a size of N×192 × 192, and training was terminated once no further improvement in the validation loss was observed. Data augmentation techniques, including rotations (−180 to 180°), gamma adjustments (gamma ∈ [0.5, 1.5]), vertical and horizontal flipping, were applied to prevent overfitting. Subsequently, we evaluated the well-trained age prediction and brain extraction models on the test dataset. Statistical analysis The results of fetal brain age prediction were presented as MAE. Predicted brain age from the model was compared with the reference standard using ρc [13]. The R2 measured the model’s goodness of fit. The Shapiro-Wilk test was employed to verify that the quantitative independent variable (gestational weeks) had a normal distribution, and an independent t-test test was used for the independent variable. Pearson’s chi-square test or the continuity correction was applied for categorical data (the quantity of second and third trimester instances). What’s more, an independent t-test was also used to compare the metrics for brain age prediction and brain extraction generated by our method with those produced by different existing works [17, 26, 27]. Statistical significance was defined as P < 0.05. Results A total of 407 subjects, including 2310 T2-weighted MR stacks (axial, sagittal, and coronal views), were analyzed. The distribution of subjects across gestational weeks and trimesters was very similar, with no statistically significant differences (Table 1). The mean fetal brain age was 30.7 weeks (range: 22–39 weeks), with 18.7% (n = 431) and 81.3% (n = 1879) of the scans belonging to the second and third trimesters, respectively. Using a split ratio of [6:2:2], the dataset was randomly divided into a training set, validation set and test set, consisting 1386, 462, 462 stacks, respectively. A schematic representation of this data distribution is delineated in Fig. 3. The distribution of subjects across gestational weeks reflects real-world clinical data, naturally leading to class imbalance. To address this, we ensured each training batch included samples from all gestational weeks. While this may result in some data repetition, we mitigated the issue through data augmentation (i.e., random rotation, translation, and intensity adjustments) to ensure sufficient variability in input images. The specific distribution of fetal MRI scans, which encompass the full range of gestational ages in the study, is detailed in supplementary material 4. Supplementary material 4 shows that all gestational ages were adequately represented across the training, validation, and test sets. Table 1The distribution of gestational week and trimester among subjects in the training, validation, and test data. Mean ± standard deviation. Data in parentheses are percentagesCharacteristicTraining dataValidation dataTest dataχ2/F P Total number (%)1386(60%)462(20%)462(20%)//Gestational weeks30.9 ± 3.730.6 ± 3.730.5 ± 3.82.0330.131Second trimester (%)241(17.4%)94(20.3%)96(20.8%)6.000.199Third trimester (%)1145(82.6%)368(79.7%)366(79.2%)// The distribution of gestational week and trimester among subjects in the training, validation, and test data. Mean ± standard deviation. Data in parentheses are percentages Data distribution. a Distribution based on the number of scans. b Distribution based on the number of subjects Brain age prediction The ρc value and R2 score for the agreement between the predicted brain age and the reference standard are shown in Fig. 4 (a). The agreement between the model’s predictions and the reference standard was substantial (ρc = 0.977). The correlation between predicted brain age and ground truth was strong (R2 = 0.953). The MAE of model’s prediction was 4.62 ± 3.31 days. Bland-Altman plots illustrated the differences between the model’s prediction and the reference standard, as shown in Fig. 4 (b). Regression performance of the proposed age prediction model. a The strong correlation between predicted brain age and ground truth was demonstrated (R2 = 0.953), with the orange line representing the line of best fit, while the dashed line illustrated the ideal regression where predicted age matches the true age. b The differences between predictions and ground truth were visualized in a modified Bland-Altman plot. Corresponding 5th, 25th, 50th, 75th, and 95th quantile curves based on local piecewise regression analysis are drawn. GT: ground truth Furthermore, the brain age prediction network has been compared to the existing solutions [17] as shown in Table 2. The results demonstrated that our method achieved the lowest MAE and the highest R2, showing statistically significant difference compared to other methods (all P-values<0.001). Table 2The GA prediction network has been compared to the existing solutions. P-value: the corrected result of a pairwise comparison between Ours and existing methods. The results demonstrated that our method achieved the lowest MAE and the highest R2, showing statistically significant difference compared to other methods (all P-values<0.001)MethodsMAE (Days) R 2 P-valueEPSANet20.5978 ± 14.98850.1899< 0.001RepVGG20.6737 ± 15.06100.0136< 0.001SENet20.5580 ± 14.82840.2823< 0.001ResNet-5020.5612 ± 14.84300.2356< 0.001 Ours 4.6210 ± 3.3151 0.9532 / The GA prediction network has been compared to the existing solutions. P-value: the corrected result of a pairwise comparison between Ours and existing methods. The results demonstrated that our method achieved the lowest MAE and the highest R2, showing statistically significant difference compared to other methods (all P-values<0.001) To further evaluate whether the prior pooling mechanism enhances performance, we conducted additional analyses as shown in supplementary material 5. The full method with the prior pooling mechanism yielded a MAE of 4.62 ± 3.31 days for predicting fetal brain age. After eliminating the prior pooling mechanism, the MAE was 4.85 ± 3.60 days for predicting fetal brain age. Consequently, it can be concluded that the inclusion of the prior pooling mechanism can enhance the model’s predictive accuracy for gestational age estimation. Our gestational age-stratified analysis (supplementary material 6) revealed statistically consistent prediction errors across all weeks, demonstrating robust performance stability throughout the second and third trimesters. Brain extraction Surprisingly, by incorporating prior knowledge from brain age prediction into the inputs, we observed improved segmentation performance of the network. We used Dice coefficient (%), Jaccard coefficient (%), volume similarity (%), ASSD (mm), and 95% Hausdorff distance (mm) to evaluate the segmentation performance of the fetal brain. Table 3 provides a summary of these segmentation results according to the three orthogonal planes (axial, coronal, and sagittal planes). Our experiments indicated that, across the three planes, the segmentation results from all methods showed generally consistent conclusions. Specifically, the results were slightly higher in the axial view, followed by the coronal view, with the sagittal view showing the lowest, although the differences were not substantial. A potential reason for this may lie in the inherent characteristics of the 2D network architecture, where the axial view tends to yield more consistent results due to its better alignment with the network’s capacity to capture fine structural details. Table 3Quantitative analysis of brain extraction results using our proposed method (U-Net with image + attention map input) compared to existing methods, with results presented separately for the axial, coronal, and sagittal planes. The table shows that our method achieves superior performance across all metrics—Dice, Jaccard, volume similarity, ASSD, and hausdorff distance—with statistically significant improvements (all P-values < 0.001). P-value: the corrected result of a pairwise comparison between Ours and existing methodsViewMethodDice [%]Jaccard [%]Volume Similarity [%]ASSD [mm]Hausdorff [mm]AxialUNet (Image)96.41 ± 6.3393.44 ± 8.5397.27 ± 0.580.49 ± 1.023.19 ± 5.57UNet (Image + Attention map)97.02 ± 6.0194.60 ± 7.7297.56 ± 0.550.34 ± 0.892.48 ± 4.41Fetal-BET87.10 ± 14.0379.33 ± 16.8790.72 ± 1.941.92 ± 2.2510.48 ± 8.37MONAIfbs85.21 ± 18.5377.63 ± 21.5888.91 ± 2.572.52 ± 3.3812.63 ± 12.61CoronalUNet (Image)96.34 ± 6.4993.40 ± 8.8097.20 ± 0.620.51 ± 1.203.31 ± 5.66UNet (Image + Attention map)96.97 ± 6.1594.55 ± 7.8297.49 ± 0.580.37 ± 0.972.51 ± 4.50Fetal-BET87.04 ± 14.2179.09 ± 16.9190.05 ± 2.001.98 ± 2.3110.59 ± 8.78MONAIfbs85.11 ± 18.6077.47 ± 21.7188.34 ± 2.612.57 ± 3.4912.81 ± 12.72SagittalUNet (Image)96.32 ± 6.5393.37 ± 8.7197.18 ± 0.620.50 ± 1.193.26 ± 5.60UNet (Image + Attention map)96.91 ± 6.0294.52 ± 7.6997.43 ± 0.690.39 ± 0.992.55 ± 4.53Fetal-BET86.91 ± 14.8879.01 ± 17.1289.97 ± 2.072.01 ± 2.2810.67 ± 8.92MONAIfbs85.10 ± 18.5777.51 ± 21.7688.28 ± 2.642.58 ± 3.5512.84 ± 12.77 Quantitative analysis of brain extraction results using our proposed method (U-Net with image + attention map input) compared to existing methods, with results presented separately for the axial, coronal, and sagittal planes. The table shows that our method achieves superior performance across all metrics—Dice, Jaccard, volume similarity, ASSD, and hausdorff distance—with statistically significant improvements (all P-values < 0.001). P-value: the corrected result of a pairwise comparison between Ours and existing methods The above table shows that these above five metrics obtained using our method (U-Net model with image + attention map input) were superior to results from the existing works [26, 27] (all P-values<0.001). The visualization results are shown in Fig. 5. Comparing the proposed brain extraction model with existing works, it is evident that incorporating attention mechanisms plays a crucial role in enhancing segmentation accuracy, particularly in challenging regions such as brain boundaries. While the comparable methods fail to produce satisfactory results at the brain boundaries, particularly in the axial view, where noticeable under-segmentation issues are evident in both MONAIfbs and Fetal-BET. Quantitative analysis of brain extraction results using our proposed method (U-Net with image and attention map input) compared to existing methods. a Original fetal brain MR image at 21 gestational weeks in axial, sagittal, and coronal views. b Ground truth brain extraction. c Results from UNet using image as input. d Results from UNet using image and attention map as input. e Results from the MONAlfbs. f Results from the Fetal-BET These results indicated that incorporating attention maps improved performance in the fetal brain segmentation task. It should be noted that the objective of this study was not to develop a novel brain extraction algorithm, but to investigate the enhancement of segmentation performance through the integration of attention maps derived from brain age prediction models. The clear illustration of the attention maps overlay with original images has been attached as supplementary material 7. In supplementary material 7, the attention map demonstrated that the model was capable of extracting features that were highly correlated with fetal central brain regions, as highlighted by deep red coloration. Although peripheral areas (such as the top or posterior cranial fossa) may be mistakenly highlighted in the attention maps, these regions appeared in light blue or yellow, indicating low attention weights; moreover, we incorporated a Gaussian-weighted fusion module during feature fusion, which significantly reduced the influence of these peripheral slices on the final prediction. This approach further validated the robustness and efficacy of brain age prediction networks in capturing relevant anatomical characteristics. Discussion Gestational age is critical for predicting the delivery date and optimizing prenatal care [28], and it must also be considered when determining potentially risky exposures [29]. Ultrasound is generally the first choice for evaluating fetal growth and development. MRI serves as a complementary examination, particularly useful when ultrasound results are inconclusive. In this study, we excluded MRI acquired in the first trimester for following two reasons: Firstly, fetal MRI is generally not recommended during that time; Secondly, as showed in previous studies [2, 3], fetal ultrasonography measurements in the first trimester provides highly accurate prediction of fetal gestation age. However, the accuracy of ultrasonography measurements decreases as gestation progresses [17]. Our approach specifically targets pregnant women who did not receive sufficient ultrasound screening during the first trimester, providing a reliable method for assessing fetal brain age beyond the first trimester of pregnancy. Kojita et al. [16] predicted fetal brain age using a deep learning model based on MRI acquired after the first trimester, comparing the results with BPD. They found that the deep learning model had a MAE of 0.43 ± 1.47 weeks, which was significantly more accurate than the BPD prediction. However, their study had a limitation: the train images required precise localization of brain regions, and the model likely focused on assessing brain morphology rather than size to predict fetal brain age. Shen et al. [18] presented a CNN model trained on 741 fetuses that predicted brain age with an R2 score of 0.945 and a MAE of 6.7 days. A drawback of their study is that they used only portable network graphics (PNG) images for training, which resulted in the loss of valuable physical information captured during scanning. In this work, we proposed a novel and robust method for accurately predicting fetal brain age by fully leveraging prior knowledge and a large dataset of fetal brain MR scans. Furthermore, we combined the features extracted by the brain age prediction network with the original images as input to the brain extraction network to further validate the effectiveness of our approach. The experimental results demonstrated improved performance in the brain extraction network, confirming that the features extracted by the brain age prediction network were highly relevant to fetal central brain regions. Compared to traditional methods, our approach offered several advantages: (1) the brain age perdition model did not require complex image preprocessing, such as motion correction, brain localization and segmentation; (2) we made full use of known clinical prior knowledge to achieve precise prediction of fetal brain age; (3) the sample size of our study comprised 407 fetal MRI examinations, which is substantially larger than those of previous studies [16, 17]; and (4) the brain age prediction network can further aid in brain extraction tasks. Additionally, this study was limited in several ways. Firstly, there were differences in the scanning sequences employed by the two hospitals. However, the results of extended experiments demonstrated that no significant differences in predictive performance across various sequences, as detailed in supplementary material 3. Secondly, this study focused exclusively on predicting the brain age of healthy fetuses. Future research will extend to encompass fetuses with a broad spectrum of clinical conditions, including those with growth restriction and abnormal brain development, thereby assisting clinicians in achieving accurate diagnoses and selecting appropriate treatment strategies. In future studies, we will evaluate the generalizability of the model by employing a larger number of external validation datasets to further substantiate its applicability. However, there were several strengths and innovative aspects in the study. Firstly, in our study, ultrasonography measurements from the first trimester were used as the gold standard for gestational age prediction, rather than the last menstruation date used in previous studies [16, 18]. The data of the mother’s last menstruation date is not fixed, as it can be influenced by a wide range of intrinsic and extrinsic factors. Secondly, we standardized the in-plane spacing of the images and resized each slice to 192 × 192 pixels to ensure consistency across all data. It is important to note that the size and stride of convolutional kernels are not the sole factors influencing the receptive field in CNNs. Variations in image spacing, often due to scans acquired from different hospitals, can introduce significant discrepancies. Failure to standardize the in-plane spacing to consistent value results in a disordered receptive filed during convolution. As a result, object sizes in the images lose their significance, causing confusion within the network. Thirdly, we innovatively combined the U-Net architecture with a brain age prediction network to improve the segmentation performance of fetal brain MRI. This provides clear evidence that the age prediction model gives more attention to extract the brain-related features, further validating the model’s potential to extract clinically meaningful biomarkers. Conclusion In summary, this study presented a prior knowledge-guided CNN model utilizing fetal brain MRI data from the second and third trimesters, demonstrating its capability to accurately predict fetal brain age. This model offers a valuable alternative for pregnant women who may not have received optimal ultrasound screening in the first trimester, providing a reliable method to determine an accurate gestational age. Furthermore, the integration of CNN with MRI holds significant potential for optimizing pregnancy management. Supplementary Information Supplementary Material 1. Acknowledgements The authors would like to express their sincere gratitude to all participants in this study, as well as to the clinicians at the Affiliated Hangzhou First People’s Hospital, Westlake University School of Medicine, and Tongde Hospital of Zhejiang Province, for their invaluable contributions in data collection. Abbreviations convolutional neural network; ρc: Lin’s concordance correlation coefficient determination coefficient; MAE: mean absolute error; BPD: biparietal diameter average symmetric surface distance Half-Fourier Acquisition Single-Shot Turbo Spin-Echo time of repetition; TE: time of echo; FOV: field of view digital imaging and communications neuroimaging informatics technology initiative scanning prior pooling; PNG: portable network graphics Authors’ contributions Authors’ contributions: Fangmei Zhu: Conceptualization, Writing-original draft, Supervision. Shijie Huang: Writing-Review & Editing, Project administration, Visualization. Xue Tang: Data Curation, Formal analysis. Kai zhang: Visualization, Resources. Jian Wang: Investigation, Resources. Dinggang Shen: Investigation, Visualization, Resources. Zhongxiang Ding: Resources, Validation, Writing-Review & Editing. Funding This study was supported by Zhejiang Traditional Chinese Medical Science and Technology Planning Program (No. 2024ZR062) and Zhejiang Medical Health Science and Technology Planning Program (No. 2024KY874). Data availability The datasets generated and analyzed during the current study are not publicly accessible due to participant privacy concerns; however, they are available from the corresponding author upon reasonable request. Declarations Ethics approval and consent to participate This retrospective study was approved by the Institutional Ethical Committees of Affiliated Hangzhou First People’s Hospital, Westlake University School of Medicine (No. KY-2024272-01), and Tongde Hospital of Zhejiang Province (N0. 2024-072-JY), with a waiver of informed consent for participation. Consent for publication Not applicable. Competing interests The authors declare no competing interests. Footnotes Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Fangmei Zhu and Shijie Huang contributed equally to this work. Contributor Information Dinggang Shen, Email: dgshen@shanghaitech.edu.cn. Zhongxiang Ding, Email: hangzhoudzx73@126.com. References Associated Data Supplementary Materials Supplementary Material 1. Data Availability Statement The datasets generated and analyzed during the current study are not publicly accessible due to participant privacy concerns; however, they are available from the corresponding author upon reasonable request.