This repository contains an implementation of the Super-Resolution Generative Adversarial Network (SRGAN) for enhancing the resolution of gravitational lens images. The model is trained on simulated gravitational lens images and then fine-tuned using transfer learning to super-resolve real gravitational lens images.
The SRGAN architecture consists of a generator and a discriminator network. The generator takes a low-resolution image as input and generates a high-resolution version of the image. The discriminator is trained to distinguish between real high-resolution images and generated high-resolution images. The generator and discriminator are trained adversarially, resulting in the generator producing realistic high-resolution images.
The generator network is composed of the following components:
- Initial convolutional block
- Residual blocks
- Convolutional block
- Upsampling block
- Final convolutional layer
The generator takes a low-resolution image as input and progressively upscales it to produce a high-resolution output.
The discriminator network consists of a series of convolutional blocks followed by a classification head. The convolutional blocks extract features from the input image, and the classification head predicts whether the input is a real high-resolution image or a generated one.
-
Clone the repository:
git clone https://github.com/yourusername/srgan-gravitational-lensing.git cd srgan-gravitational-lensing
-
Install the required dependencies:
pip install -r requirements.txt
The SRGAN model achieves significant improvement in the resolution and clarity of gravitational lens images. The generated high-resolution images exhibit enhanced details and structures compared to the original low-resolution images.
Here are some example results of the SRGAN model on simulated gravitational lens images:
Here are some example results of the SRGAN model with transfer learning on real gravitational lens images:
The SRGAN model achieves significant improvement in the resolution and clarity of gravitational lens images. The generated high-resolution images exhibit enhanced details and structures compared to the original low-resolution images.
If you use this code or find it helpful for your research, please cite the original SRGAN paper:
@inproceedings{ledig2017photo,
title={Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network},
author={Ledig, Christian and Theis, Lucas and Huszar, Ferenc and Caballero, Jose and Cunningham, Andrew and Acosta, Alejandro and Aitken, Andrew and Tejani, Alykhan and Totz, Johannes and Wang, Zehan and others},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={4681--4690},
year={2017}
}