Skip to content

ragvri/Fundus_image_generation

Repository files navigation

CS551 Project

Creating a new dataset requires the presence of a large amount of skilled manpower, time and money. Generative Adversarial Network (GAN) can help mitigate this problem as it can be used to generate new data from Random noise and given small dataset. In this project, we shall use GAN to generate a dataset of images of fundus manifesting diabetic retinopathy. Diabetic retinopathy is a diabetic eye disease, which is a leading cause of blindness all over the world. The dataset thus generated form our modle will be immensely useful to classify the diseases present in fundus at a later stage.

Fundus

Fundus images are the images of the interior surface of the eye opposite the lens and includes retina, optic disc etc. Diabetic retinopathy is a diabetes complication that affects eyes and caused by damage to the blood vessels of the light-sensitive tissue at the back of the eye (retina). It can be detected with the help of fundus images.

![](image1.png = 200px)

Method

  1. Implement DCGAN
  2. Train our model on the dataset
  3. Generate new images

NB: We tried to classify the images using a simple VGG16 based architecutre. (700 examples for fundus containing diabetic retinopathy manifestation and 700 for normal fundus images). However, we got accuracy only of about 50% which is just as good as coin tossing. Thus we our hypothesis is that we should be able to get better classification if we have more data available. So,

Dataset

Any GAN requires small real world data to train the discriminator. For our project, this dataset was taken from kaggle. We made use of about 709 images level 4 diabetic retinopathy images from this dataset.

Dependencies

pytorch-gpu
matplotlib
sklearn
numpy

Code Description

The code contains 4 main files

generate.py
utils.py
dcgan.py
train.py

Descriptions of files

  1. dcgan.py : This contains the code for implementing the model of Deep Convolutional GANs. Paper: Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
  2. generate.py: Contains the code to generate images from the trained model
  3. utils.py: Utility file to give dataset location, dataloader etc.
  4. train.py : Contains the code to train the GAN model, this contains the provision to generate and print the tranining progression over the period of time.

Training Progress

Training Progression

About

Using DCGan to generate fundus images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages