# Thermal Image Generation for Robust Face Recognition
###### Abstract  
This article shows how to create a robust thermal face recognition system based on the FaceNet architecture. We propose a method for generating thermal images to create a thermal face database with six different attributes (from, glasses, rotation, normal, vocal, and smile) based on various deep learning models. First, we use StyleCLIP, which oversees manipulating the latent space of the input visible image to add the desired attributes to the visible face. Second, we use the GANs N' Rooses (GNR) model, a multimodal image-to-image framework. It uses maps of style and content to generate thermal imaging from visible images, using generative adversarial approaches. Using the proposed generator system, we create a database of synthetic thermal faces composed of more than 100k images corresponding to 3227 individuals. When trained and tested using the synthetic database, the Thermal-FaceNet model obtained a 99.98% accuracy. Furthermore, when tested with a real database, the accuracy was more than 98%, validating the proposed thermal images generator system. generative models; data generation; images generation; real-world applications +
Footnote †: journal: Medical Image Generation  
0000-0002-3233-2233-2333-2  
images captured in the longwave infrared spectrum (8-12 \(\upmu\)m) so that they can operate in complete darkness. e.g., from Figure 1, it is possible to observe how the thermal image remains unchanged in the scene, even when it has extreme variations in illumination (low and high light intensity, darkness) in the visible image. The use of thermal images could help to improve the performance of face recognition systems in deep learning applications. However, massive training data is necessary to build efficient models. Unfortunately, there are no extensive databases in the literature having thermal images available to train FR models with deep learning. On the other hand, within deep learning, some architectures allow the generation of synthetic data indistinguishable from the real ones, mainly based on three strategies: Variational Autoencoders (VAEs) [12; 13; 14], Generative Adversarial Networks (GANs) [15; 16; 17; 18], Denoising Diffusion Probabilistic Models (DDPM) [19; 20; 21; 22]. From the three types of architectures, GANs can generate more realistic images. VAEs, on the other hand, are good at learning latent, even though their resulting images are blurry. Finally, DDPMs are much slower due to their Markov process. In this work, we propose using thermal images to improve the performance of facial recognition systems based on deep learning approaches. The objective of the work is to enhance the performance of facial recognition systems by generating synthetic thermal images to build an extensive database of thermal images of faces and thus train face recognition systems. As an input to the system, we use visible images manipulated to obtain different characteristics. The visible image is manipulated using StyleCLIP [23] to get various characteristics in the image, such as frowns, smiles, etc. Then, we use the GANs N' Roses (GNR) [24] model to generate thermal images. This model can generate thermal images from visible images by learning a map of a content code from visible images and adding a randomly chosen style (e.g., temperature, beard, glasses, hairstyles, etc.). Thus, the model can generate very diverse outputs. To control the different styles in the thermal images, we built classifiers to obtain desired features used to create the synthetic thermal face database. We used the database to train a robust Face Recognition model called FaceNet [8]. FaceNet is a neural network to efficiently recognize faces using image embedding by optimizing the distance between embeddings. FaceNet minimizes the distance between images of the same person and maximizes it if the images are of different people, thus obtaining a robust comparator model. The contributions that we highlight from the manuscript are as follows.