This repository contains all source code, pre-trained models related to the paper "An Empirical Study on GANs with Margin Cosine Loss and Relativistic Discriminator"

Overview

An Empirical Study on GANs with Margin Cosine Loss and Relativistic Discriminator

This is a Pytorch implementation for the paper "An Empirical Study on GANs with Margin Cosine Loss and Relativistic Discriminator".

Requirement

  • python 3.7.3
  • pytorch 1.2.0
  • tensorflow 2.0.0
  • torchtext 0.4.0
  • torchvision 0.4.0
  • mnist

Data preparation

Training

  • Run 1_train.sh to train our proposed loss function RMCosGAN along with other loss functions on four datasets.

Appendix

Network Architectures

DCGAN Architecture for CIFAR-10, MNIST and STL-10 datasets

Operation Filter Units Non Linearity Normalization
Generator G(z)
Linear 512 None None
Trans.Conv2D 256 ReLU Batch
Trans.Conv2D 128 ReLU Batch
Trans.Conv2D 64 ReLU Batch
Trans.Conv2D 3 Tanh None
Discriminator D(x)
Conv2D 64 Leaky-ReLU Spectral
Conv2D 64 Leaky-ReLU Spectral
Conv2D 128 Leaky-ReLU Spectral
Conv2D 128 Leaky-ReLU Spectral
Conv2D 256 Leaky-ReLU Spectral
Conv2D 256 Leaky-ReLU Spectral
Conv2D 512 Leaky-ReLU Spectral

DCGAN Architecture for CAT dataset

Operation Filter Units Non Linearity Normalization
Generator G(z)
Trans.Conv2D 1024 ReLU Batch
Trans.Conv2D 512 ReLU Batch
Trans.Conv2D 256 ReLU Batch
Trans.Conv2D 128 ReLU Batch
Trans.Conv2D 3 Tanh None
Discriminator D(x)
Conv2D 128 Leaky-ReLU Spectral
Conv2D 256 Leaky-ReLU Spectral
Conv2D 512 Leaky-ReLU Spectral
Conv2D 1024 Leaky-ReLU Spectral

Experimental results

60 randomly-generated images with RMCosGAN at FID=31.34 trained on CIFAR-10 dataset

60 randomly-generated images with RMCosGAN at FID=13.17 trained on MNIST dataset

60 randomly-generated images with RMCosGAN FID=52.16 trained on STL-10 dataset

60 randomly-generated images with RMCosGAN at FID=9.48 trained on CAT dataset

Citation

Please cite our paper if RMCosGAN is used:

@article{RMCosGAN,
  title={An Empirical Study on GANs with Margin Cosine Loss and Relativistic Discriminator},
  author={Cuong Nguyen, Tien-Dung Cao, Tram Truong-Huu, Binh T.Nguyen},
  journal={},
  year={}
}

If this implementation is useful, please cite or acknowledge this repository on your work.

Contact

Cuong Nguyen ([email protected]),

Tien-Dung Cao ([email protected]),

Tram Truong-Huu ([email protected]),

Binh T.Nguyen ([email protected])

Owner
Cuong Nguyen
AI/DL researcher
Cuong Nguyen
Minimal But Practical Image Classifier Pipline Using Pytorch, Finetune on ResNet18, Got 99% Accuracy on Own Small Datasets.

PyTorch Image Classifier Updates As for many users request, I released a new version of standared pytorch immage classification example at here: http:

JinTian 106 Nov 06, 2022
PyTorch Implementation of Sparse DETR

Sparse DETR By Byungseok Roh*, Jaewoong Shin*, Wuhyun Shin*, and Saehoon Kim at Kakao Brain. (*: Equal contribution) This repository is an official im

Kakao Brain 113 Dec 28, 2022
Lepard: Learning Partial point cloud matching in Rigid and Deformable scenes

Lepard: Learning Partial point cloud matching in Rigid and Deformable scenes [Paper] Method overview 4DMatch Benchmark 4DMatch is a benchmark for matc

103 Jan 06, 2023
Pytorch re-implementation of Paper: SwinTextSpotter: Scene Text Spotting via Better Synergy between Text Detection and Text Recognition (CVPR 2022)

SwinTextSpotter This is the pytorch implementation of Paper: SwinTextSpotter: Scene Text Spotting via Better Synergy between Text Detection and Text R

mxin262 183 Jan 03, 2023
Python lib to talk to pylontech lithium batteries (US2000, US3000, ...) using RS485

python-pylontech Python lib to talk to pylontech lithium batteries (US2000, US3000, ...) using RS485 What is this lib ? This lib is meant to talk to P

Frank 26 Dec 28, 2022
KITTI-360 Annotation Tool is a framework that developed based on python(cherrypy + jinja2 + sqlite3) as the server end and javascript + WebGL as the front end.

KITTI-360 Annotation Tool is a framework that developed based on python(cherrypy + jinja2 + sqlite3) as the server end and javascript + WebGL as the front end.

86 Dec 12, 2022
Collection of tasks for fast prototyping, baselining, finetuning and solving problems with deep learning.

Collection of tasks for fast prototyping, baselining, finetuning and solving problems with deep learning Installation

Pytorch Lightning 1.6k Jan 08, 2023
PyExplainer: A Local Rule-Based Model-Agnostic Technique (Explainable AI)

PyExplainer PyExplainer is a local rule-based model-agnostic technique for generating explanations (i.e., why a commit is predicted as defective) of J

AI Wizards for Software Management (AWSM) Research Group 14 Nov 13, 2022
code for paper "Not All Unlabeled Data are Equal: Learning to Weight Data in Semi-supervised Learning" by Zhongzheng Ren*, Raymond A. Yeh*, Alexander G. Schwing.

Not All Unlabeled Data are Equal: Learning to Weight Data in Semi-supervised Learning Overview This code is for paper: Not All Unlabeled Data are Equa

Jason Ren 22 Nov 23, 2022
A curated list of awesome Machine Learning frameworks, libraries and software.

Awesome Machine Learning A curated list of awesome machine learning frameworks, libraries and software (by language). Inspired by awesome-php. If you

Joseph Misiti 57.1k Jan 03, 2023
GLIP: Grounded Language-Image Pre-training

GLIP: Grounded Language-Image Pre-training Updates 12/06/2021: GLIP paper on arxiv https://arxiv.org/abs/2112.03857. Code and Model are under internal

Microsoft 862 Jan 01, 2023
Adversarial Self-Defense for Cycle-Consistent GANs

Adversarial Self-Defense for Cycle-Consistent GANs This is the official implementation of the CycleGAN robust to self-adversarial attacks used in pape

Dina Bashkirova 10 Oct 10, 2022
Vanilla and Prototypical Networks with Random Weights for image classification on Omniglot and mini-ImageNet. Made with Python3.

vanilla-rw-protonets-project Vanilla Prototypical Networks and PNs with Random Weights for image classification on Omniglot and mini-ImageNet. Made wi

Giovani Candido 8 Aug 31, 2022
CLEAR algorithm for multi-view data association

CLEAR: Consistent Lifting, Embedding, and Alignment Rectification Algorithm The Matlab, Python, and C++ implementation of the CLEAR algorithm, as desc

MIT Aerospace Controls Laboratory 30 Jan 02, 2023
[NeurIPS 2021] A weak-shot object detection approach by transferring semantic similarity and mask prior.

TransMaS This repository is the official pytorch implementation of the following paper: NIPS2021 Mixed Supervised Object Detection by TransferringMask

BCMI 49 Jul 27, 2022
Exploring the Dual-task Correlation for Pose Guided Person Image Generation

Dual-task Pose Transformer Network The source code for our paper "Exploring Dual-task Correlation for Pose Guided Person Image Generation“ (CVPR2022)

63 Dec 15, 2022
Supervised & unsupervised machine-learning techniques are applied to the database of weighted P4s which admit Calabi-Yau hypersurfaces.

Weighted Projective Spaces ML Description: The database of 5-vectors describing 4d weighted projective spaces which admit Calabi-Yau hypersurfaces are

Ed Hirst 3 Sep 08, 2022
Code for EMNLP2020 long paper: BERT-Attack: Adversarial Attack Against BERT Using BERT

BERT-ATTACK Code for our EMNLP2020 long paper: BERT-ATTACK: Adversarial Attack Against BERT Using BERT Dependencies Python 3.7 PyTorch 1.4.0 transform

Linyang Li 142 Jan 04, 2023
Pytorch implementation of the paper: "SAPNet: Segmentation-Aware Progressive Network for Perceptual Contrastive Image Deraining"

SAPNet This repository contains the official Pytorch implementation of the paper: "SAPNet: Segmentation-Aware Progressive Network for Perceptual Contr

11 Oct 17, 2022
Tracking code for the winner of track 1 in the MMP-Tracking Challenge at ICCV 2021 Workshop.

Tracking Code for the winner of track1 in MMP-Trakcing challenge This repository contains our tracking code for the Multi-camera Multiple People Track

DamoCV 29 Nov 13, 2022