Skip to content

manishankarbalu/ConvAE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Convolutional-Auto Encoder using Pytorch

We use the Convolutional AutoEncoder Network model to train animated faces πŸ‘« and test from a random noise added to the original image as input (to check if it performs on noised inputs).

Refrence:Pytorch
REF paper

Requirements

 1. Pytorch
 2. torchsummary

Usage

Prepare Training Dataset

Create folder named data . Then create folders according to your class-label names(n folders for n classes).Then place all images into the corresponding folder(class-label).

Folder structure
Root
β”‚
β”œβ”€β”€ data
β”‚    └── train
β”‚          β”œβ”€β”€ Man
β”‚          β”‚    β”œβ”€β”€ ONE_0.png 
β”‚    	   β”‚	β”œβ”€β”€ ONE_1.png
β”‚    	   β”‚	└── ...
β”‚    	   β”œβ”€β”€ Woman
β”‚          β”‚    β”‚ 
β”‚    	   β”‚	β”œβ”€β”€ TWO_0.png
β”‚    	   β”‚	└── TWO_1.png
β”‚    	   β”œβ”€β”€	.
β”‚    	   └── 	.
β”‚
β”‚ 
β”‚
β”œβ”€β”€ ConvAE.ipynb
β”œβ”€β”€ encoder.pkl
└── decoder.pkl

Larger the number and variation in images, larger the accuracy of classification.

Conv AE Architecture

Encoder Network

----------------------------------------------------------------
        Layer (type)               Output Shape         Param #
================================================================
            Conv2d-1        [-1, 32L, 66L, 66L]             896
              ReLU-2        [-1, 32L, 66L, 66L]               0
         MaxPool2d-3        [-1, 32L, 33L, 33L]               0
            Conv2d-4        [-1, 64L, 35L, 35L]           18496
              ReLU-5        [-1, 64L, 35L, 35L]               0
         MaxPool2d-6        [-1, 64L, 17L, 17L]               0
================================================================
Total params: 19392
Trainable params: 19392
Non-trainable params: 0
----------------------------------------------------------------
None

Decoder Network

----------------------------------------------------------------
        Layer (type)               Output Shape         Param #
================================================================
   ConvTranspose2d-1       [-1, 128L, 16L, 16L]          131200
              ReLU-2       [-1, 128L, 16L, 16L]               0
   ConvTranspose2d-3        [-1, 64L, 32L, 32L]          131136
              ReLU-4        [-1, 64L, 32L, 32L]               0
   ConvTranspose2d-5         [-1, 3L, 64L, 64L]            3075
================================================================
Total params: 265411
Trainable params: 265411
Non-trainable params: 0
----------------------------------------------------------------
None

Training

Run the ConvAE.ipynb jupyter notebook to start the Training.

Once the training is completed the result is stored the main folder as encoder.pkl and decoder.pkl

Input-data

Screenshot Screenshot

Training phase images

Screenshot

Final Generated Images on noised input

Screenshot
Screenshot

ToDo

  • Train.
  • Save/Load checkpoint.
  • check for noisy input.
  • UI for input, output and to download checkpoint.
Credits
@inproceedings{aneja2016modeling,
  title={Modeling Stylized Character Expressions via Deep Learning},
  author={Aneja, Deepali and Colburn, Alex and Faigin, Gary and Shapiro, Linda and Mones, Barbara},
  booktitle={Asian Conference on Computer Vision},
  pages={136--153},
  year={2016},
  organization={Springer}
}

About

We use the Convolutional AutoEncoder Network model to train animated faces πŸ‘« and test from a random noise added to the original image as input (to check if it performs on noised inputs).

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors