All Projects → giddyyupp → AdvSegLoss

giddyyupp / AdvSegLoss

Licence: other
Official Pytorch implementation of Adversarial Segmentation Loss for Sketch Colorization [ICIP 2021]

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
matlab
3953 projects

Projects that are alternatives of or similar to AdvSegLoss

srgan
Pytorch implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"
Stars: ✭ 39 (+62.5%)
Mutual labels:  generative-adversarial-network, gan
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+68554.17%)
Mutual labels:  generative-adversarial-network, gan
Ranksrgan
ICCV 2019 (oral) RankSRGAN: Generative Adversarial Networks with Ranker for Image Super-Resolution. PyTorch implementation
Stars: ✭ 213 (+787.5%)
Mutual labels:  generative-adversarial-network, gan
Artgan
ArtGAN: This work presents a series of new approaches to improve Generative Adversarial Network (GAN) for conditional image synthesis and we name the proposed model as “ArtGAN”. Implementations are in Caffe/Tensorflow.
Stars: ✭ 210 (+775%)
Mutual labels:  generative-adversarial-network, gan
Video prediction
Stochastic Adversarial Video Prediction
Stars: ✭ 247 (+929.17%)
Mutual labels:  generative-adversarial-network, gan
StyleGANCpp
Unofficial implementation of StyleGAN's generator
Stars: ✭ 25 (+4.17%)
Mutual labels:  generative-adversarial-network, gan
Gan steerability
On the "steerability" of generative adversarial networks
Stars: ✭ 225 (+837.5%)
Mutual labels:  generative-adversarial-network, gan
Iseebetter
iSeeBetter: Spatio-Temporal Video Super Resolution using Recurrent-Generative Back-Projection Networks | Python3 | PyTorch | GANs | CNNs | ResNets | RNNs | Published in Springer Journal of Computational Visual Media, September 2020, Tsinghua University Press
Stars: ✭ 202 (+741.67%)
Mutual labels:  generative-adversarial-network, gan
The Gan World
Everything about Generative Adversarial Networks
Stars: ✭ 243 (+912.5%)
Mutual labels:  generative-adversarial-network, gan
Adgan
The Implementation of paper "Controllable Person Image Synthesis with Attribute-Decomposed GAN"
Stars: ✭ 239 (+895.83%)
Mutual labels:  generative-adversarial-network, gan
Adventures-with-GANS
Showcasing various fun adventures with GANs
Stars: ✭ 13 (-45.83%)
Mutual labels:  generative-adversarial-network, gan
IrwGAN
Official pytorch implementation of the IrwGAN for unaligned image-to-image translation
Stars: ✭ 33 (+37.5%)
Mutual labels:  generative-adversarial-network, gan
Gan Sandbox
Vanilla GAN implemented on top of keras/tensorflow enabling rapid experimentation & research. Branches correspond to implementations of stable GAN variations (i.e. ACGan, InfoGAN) and other promising variations of GANs like conditional and Wasserstein.
Stars: ✭ 210 (+775%)
Mutual labels:  generative-adversarial-network, gan
catgan pytorch
Unsupervised and Semi-supervised Learning with Categorical Generative Adversarial Networks
Stars: ✭ 50 (+108.33%)
Mutual labels:  generative-adversarial-network, gan
Triple Gan
See Triple-GAN-V2 in PyTorch: https://github.com/taufikxu/Triple-GAN
Stars: ✭ 203 (+745.83%)
Mutual labels:  generative-adversarial-network, gan
Anogan Tf
Unofficial Tensorflow Implementation of AnoGAN (Anomaly GAN)
Stars: ✭ 218 (+808.33%)
Mutual labels:  generative-adversarial-network, gan
Freezed
Freeze the Discriminator: a Simple Baseline for Fine-Tuning GANs (CVPRW 2020)
Stars: ✭ 195 (+712.5%)
Mutual labels:  generative-adversarial-network, gan
Arbitrary Text To Image Papers
A collection of arbitrary text to image papers with code (constantly updating)
Stars: ✭ 196 (+716.67%)
Mutual labels:  generative-adversarial-network, gan
Gif
GIF is a photorealistic generative face model with explicit 3D geometric and photometric control.
Stars: ✭ 233 (+870.83%)
Mutual labels:  generative-adversarial-network, gan
Semantic Pyramid for Image Generation
PyTorch reimplementation of the paper: "Semantic Pyramid for Image Generation" [CVPR 2020].
Stars: ✭ 45 (+87.5%)
Mutual labels:  generative-adversarial-network, gan

AdvSegLoss

We provide PyTorch implementation for:

Adversarial Segmentation Loss for Sketch Colorization [ICIP 2021]

Arxiv

AdvSegLoss:

Visual comparison with other methods:

comparison

FID score comparison with other methods:

fid_comparison

Prerequisites

  • Linux, macOS or Windows
  • Python 3.7
  • CPU or NVIDIA GPU + CUDA CuDNN

Getting Started

Downloading Datasets

Please refer to datasets.md for details.

Installation

  • Clone this repo:
git clone https://github.com/giddyyupp/AdvSegLoss.git
cd AdvSegLoss
conda install pytorch=1.7.0 torchvision cudatoolkit=11.0 -c pytorch

Or install all deps using pip:

pip install -r requirements.txt

Download panoptic segmentation model from detectron model zoo, and put it under models/segmentation/detectron2.

After installations completed, you need to change two files in detectron2. These changes are shared in the ./models/segmentation/detectron2/changes.diff file.

AdvSegLoss train/test

  • Download a dataset (e.g. bedroom) and generate edge maps:

Follow steps in the datasets.md to download, and prepare datasets.

  • Train a model with unpaired training:
#!./scripts/train_advsegloss.sh
python train.py --checkpoints_dir ./checkpoints --name ade20k_hed_advsegloss_both --dataroot ./datasets/ade20k_hed --model cycle_gan --segmentation --segmentation_output "both" --direction "AtoB" --dataset_mode "unaligned"
  • To view training results and loss plots, run python -m visdom.server and click the URL http://localhost:8097. To see more intermediate results, check out ./checkpoints/maps_cyclegan/web/index.html
  • Test the model:
#!./scripts/test_advsegloss.sh
python test.py --checkpoints_dir ./checkpoints --name ade20k_hed_advsegloss_both --dataroot ./datasets/ade20k_hed --model test --segmentation --segmentation_output "both" --direction "AtoB" --dataset_mode "unaligned"

The test results will be saved to a html file here: ./results/ade20k_hed_advsegloss_both/latest_test/index.html.

You can find more scripts at scripts directory.

Apply a pre-trained model

  • You can download pretrained models using following link

Put a pretrained model under ./checkpoints/{name}_pretrained/100_net_G.pth.

  • Then generate the results using
python test.py --dataroot datasets/ade20k_hed/testB --name {name}_pretrained --model test --segmentation --segmentation_output "both" --direction "AtoB" --dataset_mode "unaligned"

The results will be saved at ./results/. Use --results_dir {directory_path_to_save_result} to specify the results directory.

Training/Test Tips

Best practice for training and testing your models.

Frequently Asked Questions

Before you post a new question, please first look at the above Q & A and existing GitHub issues.

Acknowledgments

Our code is based on Ganilla.

The numerical calculations reported in this work were fully performed at TUBITAK ULAKBIM, High Performance and Grid Computing Center (TRUBA resources).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].