MatchGAN: A Self-supervised Semi-supervised Conditional Generative Adversarial Network

Related tags

Deep LearningMatchGAN
Overview

MatchGAN: A Self-supervised Semi-supervised Conditional Generative Adversarial Network

This repository is the official implementation of MatchGAN: A Self-supervised Semi-supervised Conditional Generative Adversarial Network.

alt text

This repository is built upon the framework of StarGAN.

1. Cloning the repository

Clone the repository and navigate to it.

$ git clone https://github.com/justin941208/MatchGAN.git
$ cd MatchGAN/

2. Installing requirements

The following libraries should be separately installed. Instructions are available on their respective websites:

Additional requirements can be installed by running:

pip install -r requirements.txt

To evaluate MatchGAN using GAN-train and GAN-test, the following files should be downloaded and unzipped directly under MatchGAN/.

2. Downloading the datasets

To download the CelebA dataset:

$ bash download.sh

In addition, the partition file list_eval_partition.txt should be downloaded from the official CelebA google drive and placed immediately under the directory ./data/celeba/.

To download the RaFD dataset, one must request access to the dataset from the Radboud Faces Database website. Once all the image files are obtained, they need to be placed under the subdirectory ./data/RaFD/data. To preprocess the dataset, run the following command:

$ python preprocess_rafd.py

This will crop all images to 256x256 (centred on face) and split the data into 90% for training and 10% for testing.

3. Training

The command format for training MatchGAN is given by:

$ ./run [dataset] [mode] [labelled percentage] [device]

For example, to train MatchGAN on CelebA with 5% of the training examples labelled on GPU 0, run the following command:

$ ./run celeba train 5 0

To train on RaFD, simply replace "celeba" by "rafd".

4. Testing and evaluating

To test MatchGAN following the above example on CelebA, run the command

$ ./run celeba test 5 0

This will generate synthetic images from the test set and save them to the directory ./matchgan_celeba/results.

To evaluate the model using Frechet Inception Distance (FID), Inception Score (IS), and GAN-test, run the following command:

$ ./run celeba eval 5 0

The following commands trains an external classifier using the synthetic images generated by MatchGAN and then evaluates GAN-train.

$ ./run celeba synth 5 0
$ ./run celeba synth_test 5 0

5. Pretrained model

Pretrained models of MatchGAN (generator only) can be downloaded from this link. To test or evaluate these models, the checkpoint file 200000-G.ckpt should be placed under the directory ./matchgan_celeba/models (for CelebA) or ./matchgan_rafd/models (for RaFD) before running the relevant commands detailed above.

6. Results

Here are some of the results of our pre-trained model from the previous section.

FID

Percentage of training data labelled 1% 5% 10% 20% 50% 100%
CelebA 12.31 9.34 8.81 6.34 - 5.58
RaFD - - 22.75 9.94 6.65 5.06

IS

Percentage of training data labelled 1% 5% 10% 20% 50% 100%
CelebA 2.95 2.95 2.99 3.03 - 3.07
RaFD - - 1.64 1.61 1.59 1.58

GAN-train and GAN-test

These numbers are obtained under the 100% setup.

GAN-train GAN-test
CelebA 87.43% 82.26%
RaFD 97.78% 75.95%
Owner
Justin Sun
PhD student
Justin Sun
PyQt6 configuration in yaml format providing the most simple script.

PyamlQt(ぴゃむるきゅーと) PyQt6 configuration in yaml format providing the most simple script. Requirements yaml PyQt6, ( PyQt5 ) Installation pip install Pya

Ar-Ray 7 Aug 15, 2022
frida工具的缝合怪

fridaUiTools fridaUiTools是一个界面化整理脚本的工具。新人的练手作品。参考项目ZenTracer,觉得既然可以界面化,那么应该可以把功能做的更加完善一些。跨平台支持:win、mac、linux 功能缝合怪。把一些常用的frida的hook脚本简单统一输出方式后,整合进来。并且

diveking 997 Jan 09, 2023
Surrogate- and Invariance-Boosted Contrastive Learning (SIB-CL)

Surrogate- and Invariance-Boosted Contrastive Learning (SIB-CL) This repository contains all source code used to generate the results in the article "

Charlotte Loh 3 Jul 23, 2022
The official PyTorch code implementation of "Human Trajectory Prediction via Counterfactual Analysis" in ICCV 2021.

Human Trajectory Prediction via Counterfactual Analysis (CausalHTP) The official PyTorch code implementation of "Human Trajectory Prediction via Count

46 Dec 03, 2022
smc.covid is an R package related to the paper A sequential Monte Carlo approach to estimate a time varying reproduction number in infectious disease models: the COVID-19 case by Storvik et al

smc.covid smc.covid is an R package related to the paper A sequential Monte Carlo approach to estimate a time varying reproduction number in infectiou

0 Oct 15, 2021
Official PyTorch implementation of our AAAI22 paper: TransMEF: A Transformer-Based Multi-Exposure Image Fusion Framework via Self-Supervised Multi-Task Learning. Code will be available soon.

Official-PyTorch-Implementation-of-TransMEF Official PyTorch implementation of our AAAI22 paper: TransMEF: A Transformer-Based Multi-Exposure Image Fu

117 Dec 27, 2022
Cross-lingual Transfer for Speech Processing using Acoustic Language Similarity

Cross-lingual Transfer for Speech Processing using Acoustic Language Similarity Indic TTS Samples can be found at https://peter-yh-wu.github.io/cross-

Peter Wu 1 Nov 12, 2022
Bayesian Deep Learning and Deep Reinforcement Learning for Object Shape Error Response and Correction of Manufacturing Systems

Bayesian Deep Learning for Manufacturing 2.0 (dlmfg) Object Shape Error Response (OSER) Digital Lifecycle Management - In Process Quality Improvement

Sumit Sinha 30 Oct 31, 2022
Python scripts for performing stereo depth estimation using the MobileStereoNet model in Tensorflow Lite.

TFLite-MobileStereoNet Python scripts for performing stereo depth estimation using the MobileStereoNet model in Tensorflow Lite. Stereo depth estimati

Ibai Gorordo 4 Feb 14, 2022
SwinTrack: A Simple and Strong Baseline for Transformer Tracking

SwinTrack This is the official repo for SwinTrack. A Simple and Strong Baseline Prerequisites Environment conda (recommended) conda create -y -n SwinT

LitingLin 196 Jan 04, 2023
An implementation of an abstract algebra for music tones (pitches).

nbdev template Use this template to more easily create your nbdev project. If you are using an older version of this template, and want to upgrade to

Open Music Kit 0 Oct 10, 2022
Code accompanying the NeurIPS 2021 paper "Generating High-Quality Explanations for Navigation in Partially-Revealed Environments"

Generating High-Quality Explanations for Navigation in Partially-Revealed Environments This work presents an approach to explainable navigation under

RAIL Group @ George Mason University 1 Oct 28, 2022
Code release for NeX: Real-time View Synthesis with Neural Basis Expansion

NeX: Real-time View Synthesis with Neural Basis Expansion Project Page | Video | Paper | COLAB | Shiny Dataset We present NeX, a new approach to novel

538 Jan 09, 2023
Multiview 3D object detection on MultiviewC dataset through moft3d.

Multiview Orthographic Feature Transformation for 3D Object Detection Multiview 3D object detection on MultiviewC dataset through moft3d. Introduction

Jiahao Ma 20 Dec 21, 2022
Self-Supervised Pre-Training for Transformer-Based Person Re-Identification

Self-Supervised Pre-Training for Transformer-Based Person Re-Identification [pdf] The official repository for Self-Supervised Pre-Training for Transfo

Hao Luo 116 Jan 04, 2023
Pre-trained Deep Learning models and demos (high quality and extremely fast)

OpenVINO™ Toolkit - Open Model Zoo repository This repository includes optimized deep learning models and a set of demos to expedite development of hi

OpenVINO Toolkit 3.4k Dec 31, 2022
Solving Zero-Shot Learning in Named Entity Recognition with Common Sense Knowledge

Zero-Shot Learning in Named Entity Recognition with Common Sense Knowledge Associated code for the paper Zero-Shot Learning in Named Entity Recognitio

Søren Hougaard Mulvad 13 Dec 25, 2022
Meta Self-learning for Multi-Source Domain Adaptation: A Benchmark

Meta Self-Learning for Multi-Source Domain Adaptation: A Benchmark Project | Arxiv | YouTube | | Abstract In recent years, deep learning-based methods

CVSM Group - email: <a href=[email protected]"> 188 Dec 12, 2022
Official implementation of the PICASO: Permutation-Invariant Cascaded Attentional Set Operator

PICASO Official PyTorch implemetation for the paper PICASO:Permutation-Invariant Cascaded Attentive Set Operator. Requirements Python 3 torch = 1.0 n

Samira Zare 0 Dec 23, 2021
FS2KToolbox FS2K Dataset Towards the translation between Face

FS2KToolbox FS2K Dataset Towards the translation between Face -- Sketch. Download (photo+sketch+annotation): Google-drive, Baidu-disk, pw: FS2K. For

Deng-Ping Fan 5 Jan 03, 2023