--- license: mit pipeline_tag: image-to-image library_name: pytorch tags: - Pix2Pix --- # Pix2Pix SAR To RGB `yuulind/pix2pix-sar2rgb` - This is a Pix2Pix CGAN implementation for translating Synthetic Aperture Radar (SAR) images to Optical (RGB) images. - For more information on code, please check [GitHub Repo](https://github.com/yuuIind/SAR2Optical) - The demo: [yuulind/sar2rgb](https://huggingface.co/spaces/yuulind/sar2rgb) - Includes checkpoints from epoch: 180, 265, 295 - Example outputs ![Example outputs](imgs/model_results.png) ## Model Details ### Model Description This is custom implementation of pix2pix architecture in PyTorch. The code can found in [GitHub Repo](https://github.com/yuuIind/SAR2Optical) The official lua implementaion: [GitHub Repo](https://github.com/phillipi/pix2pix) The official PyTorch implementation [GitHub Repo](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix) - **Model type:** Image to Image Translation - **BASELINE FID SCORE** is between **30 and 40** - Baseline score is calculated by randomly sampling two sets from real images and comparing the them. | Number | Name | Model Type | Description | Link to Model File | |--------|-------------------------|---------------|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------| | 1 | pix2pix_gen_180.pth | Generator | Pix2Pix generator with transpose convolution, 180 epochs. **FID score is 185.04** | [pix2pix_gen_180.pth](https://huggingface.co/yuulind/pix2pix-sar2rgb/resolve/main/pix2pix_gen_180.pth) | | 2 | pix2pix_gen_265.pth | Generator | Pix2Pix generator with transpose convolution, 265 epochs. **FID score is 189.81** | [pix2pix_gen_265.pth](https://huggingface.co/yuulind/pix2pix-sar2rgb/resolve/main/pix2pix_gen_265.pth) | | 3 | pix2pix_gen_295.pth | Generator | Pix2Pix generator with transpose convolution, 295 epochs. **FID score is 187.73** | [pix2pix_gen_295.pth](https://huggingface.co/yuulind/pix2pix-sar2rgb/resolve/main/pix2pix_gen_295.pth) | | 4 | pix2pix_disc_180.pth | Discriminator | Pix2Pix discriminator from epoch 180, with transpose convolution generator. | [pix2pix_disc_180.pth](https://huggingface.co/yuulind/pix2pix-sar2rgb/resolve/main/pix2pix_disc_180.pth) | | 5 | pix2pix_disc_265.pth | Discriminator | Pix2Pix discriminator from epoch 265, with transpose convolution generator. | [pix2pix_disc_265.pth](https://huggingface.co/yuulind/pix2pix-sar2rgb/resolve/main/pix2pix_disc_265.pth) | | 6 | pix2pix_disc_295.pth | Discriminator | Pix2Pix discriminator from epoch 295, with transpose convolution generator. | [pix2pix_disc_295.pth](https://huggingface.co/yuulind/pix2pix-sar2rgb/resolve/main/pix2pix_disc_295.pth) | **Loss Graphs** - Discriminator vs Epoch ![Discriminator](imgs/lossD.jpeg) - Generator Overall Loss vs Epoch ![Generator Overall Loss](imgs/lossG.jpeg) - Generator GAN Loss vs Epoch ![Generator GAN Loss](imgs/lossG_GAN.jpeg) - Generator L1 Loss vs Epoch ![Generator L1 Loss](imgs/lossG_L1.jpeg) ### Model Sources - **Repository:** [GitHub Repo](https://github.com/yuuIind/SAR2Optical) - **Paper:** [arxiv:1611.07004](https://arxiv.org/abs/1611.07004) - **Official implementation:** [GitHub Repo](https://github.com/phillipi/pix2pix) ## Uses Converts SAR images to Optical (RGB) images