Nothing Special   »   [go: up one dir, main page]

Skip to main content

MRI Scan Synthesis Methods Based on Clustering and Pix2Pix

  • Conference paper
  • First Online:
Artificial Intelligence in Medicine (AIME 2024)

Abstract

We consider a missing data problem in the context of automatic segmentation methods for Magnetic Resonance Imaging (MRI) brain scans. Usually, automated MRI scan segmentation is based on multiple scans (e.g., T1-weighted, T2-weighted, T1CE, FLAIR). However, quite often a scan is blurry, missing or otherwise unusable. We investigate the question whether a missing scan can be synthesized. We exemplify that this is in principle possible by synthesizing a T2-weighted scan from a given T1-weighted scan.

Our first aim is to compute a picture that resembles the missing scan closely, measured by average mean squared error (MSE). We develop/use several methods for this, including a random baseline approach, a clustering based method and pixel-to-pixel translation method by Isola et al. [15] (Pix2Pix) which is based on conditional GANs. The lowest MSE is achieved by our clustering-based method.

Our second aim is to compare the methods with respect to the effect that using the synthesized scan has on the segmentation process. For this, we use a DeepMedic model trained with the four input scan modalities named above. We replace the T2-weighted scan by the synthesized picture and evaluate the segmentations with respect to the tumor identification, using Dice scores as numerical evaluation. The evaluation shows that the segmentation works well with synthesized scans (in particular, with Pix2Pix methods) in many cases.

L. L. Caldeira and M. Schmidt—have jointly supervised this project.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Note, however, that our work was mostly done before that challenge was posed, so in particular, we are using the BraTS 2019 data set for our experiments.

References

  1. Abdelmotaal, H., Abdou, A.A., Omar, A.F., El-Sebaity, D.M., Abdelazeem, K.: Pix2pix conditional generative adversarial networks for scheimpflug camera color-coded corneal tomography image generation. Transl. Vis. Sci. Technol. 10(7), 21 (2021)

    Article  Google Scholar 

  2. Abrahams, D., Seefeld, S.: Boost.Python. https://www.boost.org/doc/libs/1_75_0/libs/python/doc/html/index.html. Accessed 6 Aug 2023

  3. Al-Dmour, H., Al-Ani, A.: MR brain image segmentation based on unsupervised and semi-supervised fuzzy clustering methods. In: Proc. IEEE DICTA, pp. 1–7. Gold Coast, QLD, Australia (Nov 2016). https://doi.org/10.1109/DICTA.2016.7797066

  4. Bakas, S., Akbari, H., Sotiras, A., Bilello, M., Rozycki, M., et al.: Advancing the cancer genome atlas glioma MRI collections with expert segmentation labels and radiomic features. Sci. Data 4(170117) (Sep 2017)

    Google Scholar 

  5. Bakas, S., Reyes, M., Jakab, A., Bauer, S., Rempfler, M., et al.: Identifying the best machine learning algorithms for brain tumor segmentation, progression assessment, and overall survival prediction in the BraTS challenge (2018). https://doi.org/10.48550/arXiv.1811.02629

  6. Baldini, G., Schmidt, M., Zäske, C., Caldeira, L.L.: MRI scan synthesis methods based on clustering and Pix2Pix (2023). https://doi.org/10.48550/arXiv.2312.05176

  7. Bazangani, F., Richard, F.J.P., Ghattas, B., Guedj, E.: Alzheimer’s Disease Neuroimaging Initiative: FDG-PET to T1 weighted MRI translation with 3D elicit generative adversarial network (E-GAN). Sensors (Basel) 22(12), 4640 (2022)

    Article  Google Scholar 

  8. Bertels, J., Eelbode, T., Berman, M., Vandermeulen, D., Maes, F., et al.: Optimizing the dice score and jaccard index for medical image segmentation: Theory & practice (2019). https://doi.org/10.48550/arXiv.1911.01685

  9. Bradski, G.: The OpenCV Library (2000). https://opencv.org/, Dr. Dobb’s Journal of Software Tools

  10. Caldeira, L., Almeida, P., Seabra, J.: MR brain tumor segmentation using clustering. In: Proc. ESMRMB Congress, pp. 48–49. Antalya, Turkey (Sep 2009). https://doi.org/10.1007/s10334-009-0175-1

  11. Grønlund, A., Larsen, K.G., Mathiasen, A., Nielsen, J.S., Schneider, S., et al.: Fast exact k-means, k-medians and bregman divergence clustering in 1D (2018). https://doi.org/10.48550/arXiv.1701.07204

  12. Haubold, J., Hosch, R., Umutlu, L., Wetter, A., Haubold, P., et al.: Contrast agent dose reduction in computed tomography with deep learning using a conditional generative adversarial network. Eur. Radiol. (2021). https://doi.org/10.1007/s00330-021-07714-2

    Article  Google Scholar 

  13. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition (2015). https://doi.org/10.48550/arXiv.1512.03385

  14. Isensee, F., Jaeger, P.F., Kohl, S.A.A., Petersen, J., Maier-Hein, K.H.: nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nat. Methods 18, 203–211 (2020). https://doi.org/10.1038/s41592-020-01008-z

    Article  Google Scholar 

  15. Isola, P., Zhu, J.Y., Zhou, T., Efros, A.A.: Image-to-image translation with conditional adversarial networks. In: Proc. IEEE CVPR, pp. 5967–5976. Honolulu, HI, USA (Jul 2017). https://doi.org/10.1109/CVPR.2017.632

  16. Jonker, R., Volgenant, A.: A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing 38, 325–340 (1987). https://doi.org/10.1007/BF02278710

    Article  MathSciNet  Google Scholar 

  17. Kamnitsas, K., Ledig, C., Newcombe, V.F.J., Simpson, J.P., Kane, A.D., et al.: Efficient multi-scale 3D CNN with fully connected CRF for accurate brain lesion segmentation. Med. Image Anal. 36, 61–78 (2016). https://doi.org/10.1016/j.media.2016.10.004

    Article  Google Scholar 

  18. Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization (2017). https://doi.org/10.48550/arXiv.1412.6980

  19. Li, H.B., Conte, G.M., Anwar, S.M., Kofler, F., Leemput, K.V., et al.: The brain tumor segmentation (BraTS) challenge 2023: Brain MR image synthesis for tumor segmentation (BraSyn) (2023). https://doi.org/10.48550/arXiv.2305.09011

  20. Li, M., Zhou, J., Wang, D., Peng, P., Yu, Y.: Application of clustering-based analysis in MRI brain tissue segmentation. Comput. Math. Methods Med. 2022, 7401184 (2022)

    Google Scholar 

  21. Malathi, M., Sinthia, P.: MRI brain Tumour segmentation using hybrid clustering and classification by back propagation algorithm. Asian Pacific J. Cancer Prevent. 19(11), 3257–3263 (Nov 2018). https://doi.org/10.31557/APJCP.2018.19.11.3257

  22. Menze, B.H., Jakab, A., Bauer, S., Kalpathy-Cramer, J., Farahani, K., et al.: The multimodal brain tumor image segmentation benchmark (BRATS). IEEE Trans. Med. Imaging 34(10), 1993–2024 (2015). https://doi.org/10.1109/TMI.2014.2377694

    Article  Google Scholar 

  23. Mirza, M., Osindero, S.: Conditional generative adversarial nets (2014). https://doi.org/10.48550/arXiv.1411.1784

  24. Mirzaei, G., Adeli, H.: Segmentation and clustering in brain MRI imaging. Rev. Neurosci. 30(1), 31–44 (2018). https://doi.org/10.1515/revneuro-2018-0050

    Article  Google Scholar 

  25. Odena, A., Dumoulin, V., Olah, C.: Deconvolution and checkerboard artifacts. Distill (2016). https://doi.org/10.23915/distill.00003

  26. Padmapriya, T., Sriramakrishnan, P., Kalaiselvi, T., Somasundaram, K.: Advancements of MRI-based brain tumor segmentation from traditional to recent trends: a review. Curr. Med. Imaging Rev. 18(12), 1261–1275 (2022)

    Article  Google Scholar 

  27. Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., et al.: Pytorch: An imperative style, high-performance deep learning library (2019). https://doi.org/10.48550/arXiv.1912.01703

  28. Pérez-García, F., Sparks, R., Ourselin, S.: TorchIO: a Python library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning (2020). https://doi.org/10.48550/arXiv.2003.04696

  29. Perkuhn, M., Stavrinou, P., Thiele, F., Shakirin, G., Mohan, M., et al.: Clinical evaluation of a multiparametric deep learning model for glioblastoma segmentation using heterogeneous magnetic resonance imaging data from clinical routine. Invest. Radiol. 53(11), 647–654 (2018). https://doi.org/10.1097/RLI.0000000000000484

    Article  Google Scholar 

  30. Ranjbarzadeh, R., Caputo, A., Tirkolaee, E.B., Jafarzadeh Ghoushchi, S., Bendechache, M.: Brain tumor segmentation of MRI images: a comprehensive review on the application of artificial intelligence tools. Comput. Biol. Med. 152(106405), 106405 (2023)

    Article  Google Scholar 

  31. Raut, P., Baldini, G., Schöneck, M., Caldeira, L.: Using a generative adversarial network to generate synthetic MRI images for multi-class automatic segmentation of brain tumors. Front. Radiol. 3 (2024). https://doi.org/10.3389/fradi.2023.1336902

  32. Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation (2015). https://doi.org/10.48550/arXiv.1505.04597

  33. Sharp, G., Wu, Z., Peroni, M., Lee, J., Li, R., et al.: Plastimatch (2011). http://plastimatch.org/

  34. Steinberg, D.: kmeans1d (2020). https://github.com/dstein64/kmeans1d

  35. Wang, T.C., Liu, M.Y., Zhu, J.Y., Tao, A., Kautz, J., et al.: High-resolution image synthesis and semantic manipulation with conditional gans. In: Proc. IEEE CVPR, pp. 8798–8807. Salt Lake City, UT, USA (Jun 2018). https://doi.org/10.1109/CVPR.2018.00917

  36. Wojna, Z., Ferrari, V., Guadarrama, S., Silberman, N., Chen, L.C., et al.: The devil is in the decoder: Classification, regression and GANs (2019). https://doi.org/10.48550/arXiv.1707.05847

  37. Wu, X.: Optimal quantization by matrix searching. J. Algorithms 12, 663–673 (1991). https://doi.org/10.1016/0196-6774(91)90039-2

    Article  MathSciNet  Google Scholar 

  38. Yan, B., Cao, M., Gong, W., Wei, B.: Multi-scale brain tumor segmentation combined with deep supervision. Int. J. Comput. Assist. Radiol. Surg. 17(3), 561–568 (2022)

    Article  Google Scholar 

  39. Yang, Q., Li, N., Zhao, Z., Fan, X., Chang, E.I.C., et al.: MRI cross-modality image-to-image translation. Sci. Rep. 10(1), 3753 (2020)

    Google Scholar 

Download references

Acknowledgement

This work was partly funded by the German Research Foundation (DFG), project numbers 416767905 and 456558332.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Giulia Baldini or Melanie Schmidt .

Editor information

Editors and Affiliations

Ethics declarations

Ethics Approval

Ethical approval was not required for this study, as it exclusively utilizes data made available during the BraTS segmentation challenge.

Appendices

Appendix

A Detailed Description of BrainClustering

Figure 2 gives an overview of the BrainClustering process, which can be divided into multiple steps.

Training Step 1: Both images are segmented into macro clusters. The segmentation is done by solving a one-dimensional k-means problem optimally by dynamic programming with the implementation \( k \)-means1d  [11, 34, 37]. In the example, the number of macro clusters k is 3. Since the macro clusters are supposed to correspond to the different tissues, they should intuitively be equal to the number of different tissues. However, the process works better if we allow a little more macro clusters to account for varieties of tissues. Empirically, a good range is between three and six clusters.

Training Step 1b: As an intermediate step after finding the macro clusters, we need to identify which cluster represents what tissue. The tissues in T1W can be identified by ordering the clusters according to the average intensity value of their pixels. We could do a similar approach to finding the tissues in T2W, but we instead find them by matching them to the found clusters in T1W as described below in Step 2b (cluster label matching).

Training Step 2: Next, we compute a micro clustering for each tissue which captures the shadings of the tissues and the relation between the shading in T1W and T2W. We again implement this step by optimally solving a one-dimensional k-means problem. The number of micro clusters corresponds to the number of different shades that we allow. In Fig. 2, we use 3 micro clusters per tissue for visualization purposes, while in practice, we use at least 100 micro clusters.

Training Step 2b: Now, there are micro clusters for every tissue, both in T1W and in T2W. They are small patches of the same shading, and we aim to identify how such a patch in T1W is mapped to T2W. For this, we need to match the clusters in T1W and T2W. We call this process cluster label matching. The matching is done by first excluding voxels that are only present in one of the scans (since the scans are registered to the same template, these are only a few voxels), and then finding the label that maximizes the number of voxels that the matched clusters have in common. The problem reduces to maximum weighted matching problem, which we solve with the Hungarian method [16].

After this step, we have a macro clustering and every macro clustering is subdivided into small patches, and every small patch in T1W has its specified counter part in T2W.

Training Step 3: The next step is to capture the relationship between the shadings in T1W and T2W. The idea behind this is that we assume that it is possible to map the shading of a specific tissue in T1W to the shading of the same tissue in T2W. We model this by using a function \( f_{t}\) for every tissue which is supposed to translate intensity values from T1W to intensity values in T2W. We later want to use the function \( f_{{t}}({i}_1) = {i}_2 \) to predict the T2W intensities of a patient whose T2W scan is missing.

For every tissue type t, we have computed a micro clustering and matched the micro clusters between the two scans. Now we compute the average of the points in each micro cluster of T1W, which we call \( a_1 \). Then, we compute the average for each corresponding micro cluster of T2W, which we call \( a_2 \). Finally, we add a new entry \( (a_1, a_2) \) to \( f_{{t}} \), which is the map corresponding to the current macro cluster/tissue type. It may happen that there already is an entry with key \(a_1\) stored in the map. In this case, we compute the average with the moving average formula:

$$\begin{aligned} f_{{t}}(a_1) \leftarrow f_{{t}}(a_1) + \frac{a_2 - f_{{t}}(a_1)}{\#_{t}(a_1)}, \end{aligned}$$
(4)

where \(\#_{t}(a_1)\) is the number of times we tried to add an entry with key \(a_1\) to the map \(f_{{t}}\). Note that consequently we have to keep track of \(\#_{t}(a_1)\), i.e., we have to annotate each entry of the map with the corresponding cardinality.

Training Step 1-3: are done for all T1W/T2W scan pairs available in the training data set, and the values found in Step 3 are always inserted into the same tables. So we get as many tables as we have macro clusters, and up to as many rows as we have micro clusters for all training images. Since we process many scans, the full tables get too large, and in reality, we only store a meaningful subset of the rows. When querying for a T2W, we can compute missing values by interpolation.

What is left to describe is how we now synthesize images based on our mapping tables. We implemented two options (the second one is faster).

Synthesizing T2W : For a patient whose T2W is missing, we preprocess the T1W scan and then cluster it with \( k \)-means1d to obtain a macro clustering. We load all tables \(f_{{t}}\) into the memory which were computed with the same number of macro clusters. Let \( {t}\) be one of the macro clusters. We consider each point p belonging to cluster \( {t}\). We find the two rows of \(f_{{t}}\) with the closest intensity values to p and interpolate \(f_{{t}}(p)\) from these two rows. The resulting intensities form a synthesized scan. Once it is computed, it is postprocessed using a \( 3\times 3 \) median filter [9] to remove salt-and-pepper noise which was present in the synthesized images.

Synthesizing T2W in Search Mode: We noticed that having large tables computed by training on many images (e.g. 200) produces noise in the results. Thus, we propose an additional method that does not precompute a large model before querying, but instead computes a small model every time we want to answer a query, which we call Search. Given a T1W query image, we first search in the training data set for the w patients whose T1W has the smallest mean squared error to the query T1W (where w is a small constant, e.g. \( w = 5 \)). Then, we create a small model by performing the training process only on these w patients, and produce the synthesized T2W with this model. This approach has the downside that we have to create a new model for every single query, thus significantly increasing the query time. However, since we choose small values for w, a synthesized T2W image for one input can be computed in around ten minutes, without the need of computing a model beforehand.

Fig. 3.
figure 3

BrainClustering (BC), Pix2Pix (P2P) and original T2W scans and corresponding superimposed segmentation generated with DeepMedic (together with the real T1W, T1CE and FLAIR), shown for all cases from the testOUR data set. In the last column, the ground truth segmentation is superimposed on the T1W scan.

Fig. 4.
figure 4

Continuation of Fig. 3.

Fig. 5.
figure 5

The segmentations in the second and in the fourth row have been created using the respective T2W and the three original T1W, T1CE, FLAIR. The rightmost image in the “Real T1W” column shows the real T1W image and the ground truth segmentation.

Fig. 6.
figure 6

[Best viewed in color] Comparison of different approaches with respect to MSE in the brain mask and (if available) in the tumor areas. The scores represent the distribution of the patients. A lower value indicates a better score. The crosses represent the averages, the thick bars are the medians and the dots are the outliers.

Fig. 7.
figure 7

[Best viewed in color] Comparison with respect to the true tumor segmentation (for testBraTS and testOUR) and the original tumor segmentation (for testNoTruth) using Dice and undirected \( 95^{\text {th}} \) Hausdorff distance (HD95). For testBraTS and testOUR, we also include the segmentation which is produced by using the real T2W as Original to give a positive baseline as to what scores are achievable if T2W was reproduced perfectly. We compute the Dice score and the undirected 95% percent Hausdorff distance on three different regions and average the scores. The box plots represent the distribution of the patients. For the Dice score a higher value indicates a better value whereas for the Hausdorff distance the opposite holds. The crosses represent the averages, whereas the thick bars are the means and the dots are the outliers.

We compare the classic Train &Test mode and Search mode with \( w \in \{5, 10\} \) and using 3, 4, 5 and 6 macro clusters, for a total of 12 different models.

B Additional Modifications to Pix2Pix

We implement some modifications to Pix2Pix:

  1. 1.

    We modify the loading functionality to accept three-dimensional NIfTI images.

  2. 2.

    We extend the data augmentation process with an additional library, TorchIO [28], which implements useful preprocessing and data augmentation routines for medical imaging.

  3. 3.

    We add the mixed precision training functionality from NVIDIA APEX (available at https://github.com/NVIDIA/apex). Operations like matrix to matrix multiplication and convolution are then performed in half-precision floating-point format, which results in a speed-up at training time.

  4. 4.

    Since a big portion of our scans is background, the L1 loss is only computed on the actual brain voxels.

  5. 5.

    Recent studies have shown that the transpose convolution operation during upsampling creates checkerboard artifacts [25, 36]. We implement the solution of Wojna et al. [36]: linear additive upsampling. This method has been successfully used for the generator of Pix2PixHD  [35] and applied on CT scans [12]. We substitute the transpose convolution operation with a two-factor upsampling followed by a 4-factor reduction of the number of channels, and finally by a \( 3\times 3 \) convolution with stride 1. We use bilinear upsampling if the scans are two-dimensional, and trilinear upsampling for the three-dimensional case.

C Additional Figures, Diagrams and Tables

(See Figs. 3, 4, 5, 6, 7 and Table 2).

Table 2. Mean and standard deviation of (Method-Dice - Original-Dice) and (Original-HD95 - Method-HD95). Negative values indicate a decrease in quality.

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Baldini, G., Schmidt, M., Zäske, C., Caldeira, L.L. (2024). MRI Scan Synthesis Methods Based on Clustering and Pix2Pix. In: Finkelstein, J., Moskovitch, R., Parimbelli, E. (eds) Artificial Intelligence in Medicine. AIME 2024. Lecture Notes in Computer Science(), vol 14845. Springer, Cham. https://doi.org/10.1007/978-3-031-66535-6_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-66535-6_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-66534-9

  • Online ISBN: 978-3-031-66535-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics