GANs For Data Augmentation in Healthcare
GANs For Data Augmentation in Healthcare
© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Switzerland AG 2023
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether
the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and
transmission or information storage and retrieval, electronic adaptation, computer software, or by similar
or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this book
are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the material contained herein or for any
errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
v
vi Contents
1 Introduction
Generative adversarial networks (GANs), a method for deep learning, allow com-
puters to synthesize new, artificial data from collections of pre-existing data. In
particular, a GAN can produce high-quality data with little to no labeling through
competition between the generator and discriminator networks [1, 2].
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 143
A. Solanki, M. Naved (eds.), GANs for Data Augmentation in Healthcare,
https://doi.org/10.1007/978-3-031-43205-7_9
144 P. K. Mahapatra et al.
There are two competing neural network models in GAN. Using the noise vector
(usually a low-dimensional random vector sampled from a normal or uniform dis-
tribution typically between 50 and 512 dimensions, and is randomly generated for
each sample during training) as an input, one creates samples (and so named gen-
erator). The purpose of the noise vector is to introduce randomness into the genera-
tor network and to allow it to produce a diverse set of 2 outputs. By providing
different random vectors as input to the generator network, we can generate a wide
range of new data. In order to ensure that the generated outputs are diverse and not
just copies of the training data, the noise vector is an important factor in the success
of GANs.
The second model, referred to as the discriminator, is given samples from the
generator and training data [3]. The generator has been trained to make images that
closely resemble actual data, while the discriminator has been trained to completely
distinguish between produced data and true data. The adversarial network’s genera-
tor and discriminator compete against one another until symmetry is established, at
which point the network is trained.
GANs compete two neural networks against each other to establish the probability
distribution of a dataset. GAN has two neural networks in it:
• Generator, G.
• Discriminator, D.
A generative network seeks to create artificial images that appear realistic. It
accepts a random vector as input (let us say a 100-dimensional array of numbers
from a Gaussian distribution) and produces a highly realistic image that appears to
be a part of our training set.
On the other hand, the discriminator network accurately determines if an image
is fake (i.e., created by the generator) or real (i.e., direct from the source of the
input). These processes are repeated many times, so that the generator and the
discriminator get better and better at their respective roles with each iteration. Fig. 1
will help you understand how it works.
The discriminator examines generated images and real images (i.e., training sam-
ples) separately. It determines if the discriminator’s input image is fake or real. The
probability that the input x is real is represented by the output D(x). The discrimina-
tor is trained in the same manner as a deep network classifier. We want D(x) = 1 if
the input is true, that is, image is real. It should be zero if it is a generated image.
Generative Adversarial Learning for Medical Thermal Imaging Analysis 145
The discriminator finds qualities that contribute to realistic images through this
method. On the other hand, we want the generator to produce images that are identi-
cal to the true image, with D(x) = 1. It backpropagates the desired value all the way
back to the generator in order to train the generator to generate images that are more
similar to what the discriminator recognizes as real.
The generator becomes stronger at producing realistic images that the discrimi-
nator cannot tell apart from actual ones as the training goes on. The discriminator
also grows stronger at picking up even the smallest variations between the two sorts
of images. The generator eventually creates visuals that are similar to real images as
the two models converge.
The following formula can be used to mathematically explain it [4]:
where,
x = real data,
z = noise vector,
G(z;θ_g) = The generator network operates by performing a mapping function from
the noise vector to a synthetic data point, with the parameters of the generator
network denoted as θ_g.
D(x;θ_d) = The discriminator network is a function that receives a data point as its
input and generates a scalar output that denotes whether the input is authentic or
artificial. The parameters of the discriminator network are represented by θ_d.
p_data(x) = The probability distribution of the actual data.
p_z(z) = The probability distribution function of the noise vector z.
The principal objective of GANs is to enhance the discriminative capacity of the
discriminator in discerning genuine and synthesized images. The aforementioned
146 P. K. Mahapatra et al.
Wherever new, plausible data is required, GANs can be used in a wide range of
applications. GANs are specifically used to produce new images and videos.
Image Generation: GANs are commonly used for generating realistic images. For
example, they can be used to generate realistic-looking faces, landscapes, or
even artwork.
Style Transfer: GANs have the potential to facilitate the transfer of style from one
image to another, thereby enabling the creation of an entirely new image that
incorporates the content of one image and the style of another.
Data Augmentation: GANs can be used for generating new data from existing data,
which can be useful for training machine learning models with limited datasets.
Disease Diagnosis and Prediction: GANs can be used for identifying patterns in
medical data and predicting the likelihood of a patient developing a certain
disease.
Medical Image Analysis: GANs can be used for generating synthetic medical
images, such as CT or MRI scans, which can be used for training machine learn-
ing models. GANs can also be used for image segmentation, enhancing the qual-
ity of medical images, and reducing image noise.
Medical Data Augmentation: GANs have the potential to generate synthetic medi-
cal data, thereby serving as a means of augmenting limited datasets and enhanc-
ing the precision of machine learning models.
Overall, GANs have the potential to revolutionize the field of medicine, by
improving the accuracy of disease diagnosis, speeding up drug discovery, and
enabling personalized treatment plans.
Generative Adversarial Learning for Medical Thermal Imaging Analysis 147
We will first define the term “Self-Supervised Learning” and then discuss how it
enhances GANs. Self-supervised is the most similar to unsupervised learning when
compared to the prominent families of supervised and unsupervised learning. An
effective method for learning representations from unlabeled data is self-supervised
(SS) learning [5]. Self-supervised learning algorithm learns from data itself, with no
data labeled examples. The algorithm must identify patterns within the dataset to
facilitate the process of acquiring knowledge from it [4].
With the help of pseudo-labels [5], self-supervised approaches enable the classi-
fier to learn better feature representation [6]. These methods specifically suggest
learning the model to recognize a geometric transformation that has been done to
the input image in order to learn an image feature.
There exist several approaches to the implementation of self-supervised learn-
ing. One approach to comprehending the attributes of the data is to employ a neural
network. Subsequently, the neural network can be employed to forecast the designa-
tions of novel data. The identification of data structure can also be accomplished
through the utilization of a Convolutional Neural Network (CNN). A CNN can be
utilized to forecast the outcomes of novel data.
There are some situations where self-supervised learning is superior to super-
vised learning. For example, a CNN trained just through self-supervised learning
can classify images more accurately than a CNN taught only through supervised
learning. This is due to the fact that a CNN that is learned only through supervised
learning is limited by the training set that is made accessible to it. A CNN that has
been trained only through self-supervised learning can understand the data’s struc-
ture from scratch, improving its ability to generalize to new data [6, 7].
The issues with training GANs will now be linked to self-supervised learning.
GANs are a type of unsupervised generative modelling in which you may just input
data and let the model generate false data from it. Modern GANs, on the other hand,
use a method called conditional-GANs [8], which convert the generative modelling
challenge into a supervised learning task that needs labeled data. For easier genera-
tive modelling, conditional-GANs incorporate class labels within the generator and
discriminator [9].
The term “unconditional GANs” eliminates the necessity for class labels in gen-
erative modelling. This chapter will demonstrate how self-supervised learning tasks
can do away with labeled data when using GANs.
148 P. K. Mahapatra et al.
The surface skin temperature [10] can be measured using thermal imaging devices.
These systems might contain a temperature reference source in addition to an
infrared thermal camera [11, 12].
The surface skin temperature of a subject may typically be measured reliably by
thermal imaging devices without being in immediate contact to the subject under
evaluation [13]. Thermal imaging systems [14] have advantages over other tech-
niques of measuring temperature since they require a closer proximity or touch
(Fig. 2).
Generating annotated medical imaging data is a challenging and costly task. The
creation of deep learning models that can be generalized necessitates the acquisition
of substantial amounts of data. Standard data augmentation is a commonly employed
technique aimed at enhancing the generalizability of machine learning models.
Generative adversarial networks offer a novel method for data augmentation [6, 7].
Insufficient data during the training of GANs often leads to the issue of discrimi-
nator overfitting [15] which in turn causes the training process to diverge. Our pro-
posed approach involves utilizing an adaptive discriminator augmentation technique
that effectively enhances the stability of training in scenarios where data availability
is limited [16, 17]. This approach is applicable for both initial training and does not
necessitate modifications to either loss functions or network architectures. The uti-
lization of unlabeled data holds significant value in the improvement of deep learn-
ing efficacy. GANs are a potent category of neural networks capable of generating
lifelike novel images based on unannotated source images [15, 18]. GANs have
been employed in the past to augment data, including the creation of supplementary
training images for classification purposes and the enhancement of synthetic
images [19].
In order to overcome overfitting and underfitting [2], data augmentation with
GANs was demonstrated to boost model accuracy and decrease model loss, hence
enhancing the generalizability of the model [20] (Fig. 3).
Fig. 3 Thermal image of knee osteoarthritis patient (a) and its augmented GAN-generated
images (b–e)
150 P. K. Mahapatra et al.
8 Methods
Despite the prevalence of comprehensive color image databases for diverse objects
in the public sphere, there exists a dearth of comparable databases for thermal
images, with either a lack of availability or restricted representation of object
categories. The synthesis of thermal images is of great significance due to the ardu-
ous nature and high expenses associated with obtaining authentic data. The process
of gathering and annotating extensive datasets comprising millions of images is
arduous, costly, and time-intensive [21].
GANs have demonstrated remarkable efficacy in generating diverse images
through the use of pre-existing images and stochastic noise, a widely acknowledged
fact. Currently, unconditional GANs have the ability to generate images that exhibit
a high degree of realism, diversity, and quality.
The application of thermal imaging technology [26, 27] is employed for the purpose
of diagnosing infectious skin conditions and investigating a wide range of disorders,
wherein alterations in body temperature may indicate the presence of inflammation
in injured tissues or clinical abnormalities that result in changes in blood circula-
tion [23].
The results of the current study indicate that thermal imaging has the potential to
serve as a dependable diagnostic modality for detecting measurable patterns in skin
temperatures [28]. It has been shown that changes in pain intensity associated with
arthritic, repetitive strain, muscular, and circulatory issues can be correlated with
temperature variance [29–31].
152 P. K. Mahapatra et al.
We believe that this non-intrusive method makes it possible to find the earliest
clinical features, with high reliability [32].
The GAN generated fake images from the given thermal images of Knee dataset and
comparison of generator & discriminator loss on a trained GAN architecture are
visualised (Figs. 5 and 6).
This chapter has explored various techniques for producing simulated thermal
images using the provided knee dataset. Future research in the field of data augmen-
tation will focus on various topics, including the development of a taxonomy of
augmentation methods. To improve the quality of GAN samples, researchers may
explore novel combinations of meta-learning and data augmentation techniques,
investigate the correlation between data augmentation and classifier architecture,
Fig. 5 (a) Different thermal images of knee pair and its lateral view (right and left); (b) Matrix of
input real image and the GAN-generated fake image matrix
Generative Adversarial Learning for Medical Thermal Imaging Analysis 153
Fig. 6 Comparison of the generator and discriminator loss on a GAN architecture that trained on
knee dataset
and apply these concepts to diverse data types. Furthermore, the integration of inno-
vative data augmentation techniques can enhance the variety and magnitude of the
training dataset, consequently augmenting the efficacy of the GAN model [33].
In our upcoming study, we intend to investigate performance benchmarks for
geometric and color space augmentations on numerous datasets from various image
recognition tasks. To show how well these augmentations work in situations when
there isn’t a lot of data, we are going to impose these dataset’s size restrictions. The
qualities of the temperature profile that is connected with a thermal image have not
yet been investigated while creating synthetic thermal images, which may be a
future course of action.
The GAN framework has undergone several modifications in various research
articles, utilizing diverse network designs, loss functions, evolutionary techniques,
and other methodologies. The study has led to a significant improvement in the
quality of samples generated by GANs. An important avenue for further investiga-
tion pertains to the augmentation of GANs’ sample quality, as well as the assess-
ment of their efficacy across diverse datasets. To advance the exploration of GAN
sample combinatorics, we aim to employ supplementary augmentation techniques,
including the transfer of diverse styles onto GAN-generated samples.
154 P. K. Mahapatra et al.
Future research in generative models with data augmentation should also focus
on StyleGAN2, StyleGAN2-ADA, DiffAugment, and Variational Autoencoder
(VAE). Trying to produce high-resolution outputs from GAN samples is one of the
main challenges. It will be interesting to explore how we might utilize these GAN
networks to produce high-resolution images as a result.
Acknowledgments This work is made possible by the core grant (HCP-0026-3.2) of the Medical
Mission project, which was sponsored by the Government of India, DSIR, Ministry of Science &
Technology, CSIR, India, and CSIR-Central Scientific Instruments Organization, Sector-30,
Chandigarh.
References
1. Goodfellow, I., et al. (2020). Generative adversarial networks. Communications of the ACM,
63(11), 139–144. https://doi.org/10.1145/3422622
2. Tian, L., Wang, Z., Liu, W., Cheng, Y., Alsaadi, F. E., & Liu, X. (2021). A new GAN-based
approach to data augmentation and image segmentation for crack detection in thermal imaging
tests. Cognitive Computation, 13(5), 1263–1273. https://doi.org/10.1007/s12559-021-09922-w
3. Chen, H. (2021). Challenges and corresponding solutions of Generative Adversarial Networks
(GANs): A survey study. Journal of Physics: Conference Series, 1827(1). https://doi.
org/10.1088/1742-6596/1827/1/012066
4. Treneska, S., Zdravevski, E., Pires, I. M., Lameski, P., & Gievska, S. (2022). GAN-based
image colorization for self-supervised visual feature learning. Sensors, 22(4). https://doi.
org/10.3390/s22041599
5. Taherkhani, F., Dabouei, A., Soleymani, S., Dawson, J., & Nasrabadi, N. M. (2021). Self-
supervised Wasserstein pseudo-labeling for semi-supervised image classification. In
Proceedings of the IEEE/CVF conference on computer vision and pattern recognition
(pp. 12267–12277).
6. Araslanov, N., & Roth, S. (2021). Self-supervised augmentation consistency for adapting
semantic segmentation. In Proceedings of the IEEE/CVF conference on computer vision and
pattern recognition (pp. 15384–15394). Available: https://github.com/visinf/da-sac.
7. Song, J., Li, P., Fang, Q., Xia, H., & Guo, R. (2022). Data augmentation by an additional self-
supervised CycleGAN-based for shadowed pavement detection. Sustain., 14(21). https://doi.
org/10.3390/su142114304
8. Elaraby, N., Barakat, S., & Rezk, A. (2022). A conditional GAN-based approach for enhanc-
ing transfer learning performance in few-shot HCR tasks. Scientific Reports, 12(1). https://doi.
org/10.1038/s41598-022-20654-1
9. Gauthier, J. (2014). Conditional generative adversarial nets for convolutional face generation.
Class project for Stanford CS231N: Convolutional neural networks for visual recognition.
Winter Semester, 2014(5), 2.
10. Ludwig, N., Formenti, D., Gargano, M., & Alberti, G. (2014). Skin temperature evalua-
tion by infrared thermography: Comparison of image analysis methods. Infrared Physics &
Technology, 62, 1–6. https://doi.org/10.1016/j.infrared.2013.09.011
11. Snekhalatha, U., Rajalakshmi, T., & Gobikrishnan, M. (2018). Automated segmentation of
knee thermal imaging and X-ray in evaluation of rheumatoid arthritis. International Journal of
Engineering & Technology, 7, 326–330.
12. GiziĔska, M., Rutkowski, R., Szymczak-Bartz, L., Romanowski, W., & StraburzyĔska-
Lupa, A. (2021). Thermal imaging for detecting temperature changes within the rheumatoid
foot. Journal of Thermal Analysis and Calorimetry, 145(1), 77–85. https://doi.org/10.1007/
s10973-020-09665-0
Generative Adversarial Learning for Medical Thermal Imaging Analysis 155
13. Fernández-Cuevas, I., et al. (2015). Classification of factors influencing the use of infrared
thermography in humans: A review. Infrared Physics and Technology, 71, 28–55. https://doi.
org/10.1016/j.infrared.2015.02.007
14. Mishra, P., & Pathak, K. (2019). A research paper on thermal imaging system. [Online].
Available: www.jetir.org.
15. Zhao, S., Liu, Z., Lin, J., Zhu, J. Y., & Han, S. (2020). Differentiable augmentation for data-
efficient GAN training. Advances in Neural Information Processing Systems, 33, 7559–7570.
16. Zhang, X., Wang, Z., Liu, D., & Ling, Q. (2018). Dada: Deep adversarial data augmentation
for extremely low data regime classification. In IEEE International Conference on Acoustics,
Speech and Signal Processing (ICASSP) (pp. 2807–2811). IEEE.
17. Maack, L., Holstein, L., & Schlaefer, A. (2022). GANs for generation of synthetic ultrasound
images from small datasets. Current Directions in Biomedical Engineering, 8(1), 17–20.
https://doi.org/10.1515/cdbme-2022-0005
18. Patel, M., Wang, X., & Mao, S. (2020). Data augmentation with conditional GAN for automatic
modulation classification. In WiseML 2020 – Proceedings of the 2nd ACM workshop on wire-
less security and machine learning (pp. 31–36), doi: https://doi.org/10.1145/3395352.3402622.
19. Mizginov, V. A., Kniaz, V. V., & Fomin, N. A. (2021). A method for synthesizing thermal
images using GAN multi-layered approach. The International Archives of the Photogrammetry,
Remote Sensing and Spatial Information Sciences, 44, 155–162.
20. Shin, H. C., Tenenholtz, N. A., Rogers, J. K., Schwarz, C. G., Senjem, M. L., Gunter, J. L., …
& Michalski, M. (2018). Medical image synthesis for data augmentation and anonymization
using generative adversarial networks. In Simulation and synthesis in medical imaging: Third
international workshop, SASHIMI 2018, Held in Conjunction with MICCAI 2018, Granada,
Spain (pp. 1–11). Springer International Publishing.
21. Selfe, J., Hardaker, N., Thewlis, D., & Karki, A. (2006). An accurate and reliable method
of thermal data analysis in thermal imaging of the anterior knee for use in cryotherapy
research. Archives of Physical Medicine and Rehabilitation, 87(12), 1630–1635. https://doi.
org/10.1016/j.apmr.2006.08.346
22. Cueva, J. H., Castillo, D., Espinós-Morató, H., Durán, D., Díaz, P., & Lakshminarayanan,
V. (2022). Detection and classification of knee osteoarthritis. Diagnostics, 12(10). https://doi.
org/10.3390/diagnostics12102362
23. Bardhan, S., Nath, S., Debnath, T., Bhattacharjee, D., & Bhowmik, M. K. (2022). Designing of
an inflammatory knee joint thermogram dataset for arthritis classification using deep convolu-
tion neural network. Quantitative InfraRed Thermography Journal, 19(3), 145–171. https://
doi.org/10.1080/17686733.2020.1855390
24. Lubkowska, A., & Pluta, W. (2022). Infrared thermography as a non-invasive tool in muscu-
loskeletal disease rehabilitation – The control variables in applicability – A systematic review.
Applied Sciences (Switzerland), 12(9). https://doi.org/10.3390/app12094302
25. Jin, C., Yang, Y., Xue, Z. J., Liu, K. M., & Liu, J. (2013). Automated analysis method for
screening knee osteoarthritis using medical infrared thermography. Journal of Medical and
Biological Engineering, 33(5), 471–477. https://doi.org/10.5405/jmbe.1054
26. Frize, M., Adéa, C., Payeur, P., Gina Di Primio, M. D., Karsh, J., & Ogungbemile, A. (2011).
Detection of rheumatoid arthritis using infrared imaging. In Medical imaging 2011: Image
processing (Vol. 7962, pp. 205–215). SPIE.
27. Umapathy, S., Vasu, S., & Gupta, N. (2018). Computer aided diagnosis based hand thermal
image analysis: A potential tool for the evaluation of rheumatoid arthritis. Journal of Medical
and Biological Engineering, 38(4), 666–677. https://doi.org/10.1007/s40846-017-0338-x
28. Fokam, D., & Lehmann, C. (2019). Clinical assessment of arthritic knee pain by infrared
thermography. Journal of Basic and Clinical Physiology and Pharmacology, 30(3). https://doi.
org/10.1515/jbcpp-2017-0218
29. Snekhalatha, U., Anburajan, M., Sowmiya, V., Venkatraman, B., & Menaka, M. (2015).
Automated hand thermal image segmentation and feature extraction in the evaluation of rheu-
matoid arthritis. Proceedings of the Institution of Mechanical Engineers, Part H: Journal of
Engineering in Medicine, 229(4), 319–331. https://doi.org/10.1177/0954411915580809
156 P. K. Mahapatra et al.
30. Snekhalatha, U., Rajalakshmi, T., Gopikrishnan, M., & Gupta, N. (2017). Computer-based
automated analysis of X-ray and thermal imaging of knee region in evaluation of rheuma-
toid arthritis. Proceedings of the Institution of Mechanical Engineers, Part H: Journal of
Engineering in Medicine, 231(12), 1178–1187. https://doi.org/10.1177/0954411917737329
31. Suma, A. B., Snekhalatha, U., & Rajalakshmi, T. (2016). Automated thermal image segmenta-
tion of knee rheumatoid arthritis. In 2016 International Conference on Communication and
Signal Processing (ICCSP) (pp. 0535–0539). IEEE.
32. Denoble, A. E., Hall, N., Pieper, C. F., & Kraus, V. B. (2010). Patellar skin surface temperature
by thermography reflects knee osteoarthritis severity. Clinical Medicine Insights: Arthritis and
Musculoskeletal Disorders, 3, 69–75. https://doi.org/10.4137/CMAMD.S5916
33. Shorten, C., & Khoshgoftaar, T. M. (2019). A survey on image data augmentation for deep
learning. Journal of Big Data, 6(1). https://doi.org/10.1186/s40537-019-0197-0