Professional Documents
Culture Documents
Report
SENTHILNATHAN K
02/06/2019
Goal of the Project
The generator, generates new data instances, while the other, the
discriminator, evaluates them for authenticity.
The discriminator takes as input a set of data, either real (x) or generated (G(z)), and produces a probability
of that data being real (P(x)).
The generator is then optimized in order to increase the probability of the generated data being rated
highly.
Gradient ascent expression for the discriminator:
By alternating gradient optimization between the two networks using these expressions on new batches of
real and generated data each time, the GAN will slowly converge to producing data that is as realistic as the
network is capable of modeling.
This was done as an experiment to learn the working of GANs and see how this simple architecture
works on the present dataset.
Discriminator :
The Stage-I GAN sketches the primitive shape and colors of the
object based on the input image, yielding Stage-I low-resolution
images.
The Stage-II GAN takes Stage-I results and the input image as
inputs, and generates high-resolution images with better details. It is
able to rectify defects in Stage-I results and add compelling details
with the refinement process.
Architecture of Stack GAN
Generator :
Input shape : 512 noise points -> fully connected (4x4x512 units) -> batch normalization
-> relu activation -> reshaping to [-1, 4, 4, 512] , 2d upsampling -> convolution (256
feature maps, kernel size 5, tanh activation) -> 2d upsampling -> convolution (128
feature maps, kernel size 5, tanh activation) -> 2d upsampling -> Output layer :
convolution (3 feature maps, kernel size 5, tanh activation)
Discriminator :
Input size : 32x32x3 images -> convolution layer (512 feature maps, kernel size 5),
average pooling layer -> convolutional layer (256 feature maps, kernel size 5) ->
average pooling -> convolutional layer (128 feature maps, kernel size 5) -> average
pooling -> fully connected layer (1024 units, tanh activation) -> Output layer : fully
connected layer (2 units, activation = softmax)
Results of Stack GAN
• The size of the input images were resized to 32x32 images.
• Though the generator was able to learn the difference between the
background and the well, the Generator was not able to learn any good
features that constituted the embryo.
• This is primarily because of the dataset being very small. Training was
done on embryo images at hpi.
Input noise points -> fully connected layer -> reshaping layer ->
(convolutional layer -> convolutional layer -> upscaling layer)x3 -> Output
convolutional layer
Discriminator :
Encoder: input layer -> (convolutional layer)x6 -> max pooling layer ->
reshaping layer -> fully connected layer
Decode : fully connected layer -> reshaping layer -> (convolutional layer ->
convolutional layer -> upscaling 2d)x3 -> output convolutional layer
Results for dataset containing all embryos from all 5 days
INFERENCE
• After 342000 steps, the generator suffered from Mode Collapse.
• Since there were empty wells, it realised that it could fool the
discriminator just by generating empty wells without any features.
• After this, all of the iterations produced mostly empty wells and it
started forgetting all the features.
• The best set for generator was at step 193000, with generator loss
of 0.1380 and discriminator accuracy of 0.4788.
Further Pre-processing
The individual classes of all the 5 days have very less number of images.
The number of training images for the 68 hpi class 5 embryos was 492 images.
As we see from the images, even though the generator is able to learn from the
discriminator, the discriminator is itself not able to learn the training data due to
insufficient images.
Final conclusions made from all the performed
experiments
After 105000 steps, the discriminator reaches an accuracy of
0.487 which is near to optimal value (0.5) but the loss stops
decreasing. This validates the point.