A controlling method of an electronic apparatus, the method comprising: training a generative adversarial network, GAN, to generate an image based on a target data set as a first training data set by a processor of the electronic apparatus; based on a second training data set including a respective feature value corresponding to a respective generated image that is obtained from the at least one intermediate layer of a generator of the trained GAN according to inputting the target data set to the trained GAN, and a plurality semantic segmentation mask that is added to the respective generated image, training a decoder to output a first semantic segmentation mask corresponding to a first feature value by inputting the first feature value by the processor of the electronic apparatus; storing the trained GAN and the trained decoder to a memory of the electronic apparatus by the processor of the electronic apparatus; and generating a synthetic dataset by using the trained GAN and the trained decoder of the processor of the electronic apparatus, wherein the generating a synthetic dataset comprises: by inputting data to the trained GAN, obtaining a second image from the GAN by the processor of the electronic apparatus; inputting, to the trained decoder, a second feature value that is obtained from at least one intermediate layer of the generator of the trained GAN according to the inputting of the data to the trained GAN by the processor of the electronic apparatus; obtaining a second semantic segmentation mask corresponding to the second image from the decoder according to the inputting of the second feature value to the trained decoder by the processor of the electronic apparatus; and generating the synthetic dataset including the second image and the second semantic segmentation mask corresponding to the second image by the processor of the electronic apparatus, wherein the trained decoder is a light-weight decoder that has a smaller number of parameters than the trained GAN. training a generative adversarial network, GAN, to generate an image based on a target data set as a first training data set by a processor of the electronic apparatus; based on a second training data set including a respective feature value corresponding to a respective generated image that is obtained from the at least one intermediate layer of a generator of the trained GAN according to inputting the target data set to the trained GAN, and a plurality semantic segmentation mask that is added to the respective generated image, training a decoder to output a first semantic segmentation mask corresponding to a first feature value by inputting the first feature value by the processor of the electronic apparatus; storing the trained GAN and the trained decoder to a memory of the electronic apparatus by the processor of the electronic apparatus; and generating a synthetic dataset by using the trained GAN and the trained decoder of the processor of the electronic apparatus, wherein the generating a synthetic dataset comprises: by inputting data to the trained GAN, obtaining a second image from the GAN by the processor of the electronic apparatus; inputting, to the trained decoder, a second feature value that is obtained from at least one intermediate layer of the generator of the trained GAN according to the inputting of the data to the trained GAN by the processor of the electronic apparatus; obtaining a second semantic segmentation mask corresponding to the second image from the decoder according to the inputting of the second feature value to the trained decoder by the processor of the electronic apparatus; and generating the synthetic dataset including the second image and the second semantic segmentation mask corresponding to the second image by the processor of the electronic apparatus, wherein the trained decoder is a light-weight decoder that has a smaller number of parameters than the trained GAN. by inputting data to the trained GAN, obtaining a second image from the GAN by the processor of the electronic apparatus; inputting, to the trained decoder, a second feature value that is obtained from at least one intermediate layer of the generator of the trained GAN according to the inputting of the data to the trained GAN by the processor of the electronic apparatus; obtaining a second semantic segmentation mask corresponding to the second image from the decoder according to the inputting of the second feature value to the trained decoder by the processor of the electronic apparatus; and generating the synthetic dataset including the second image and the second semantic segmentation mask corresponding to the second image by the processor of the electronic apparatus, wherein the trained decoder is a light-weight decoder that has a smaller number of parameters than the trained GAN.