kdominiaq / Denoising-image

Denoising an image by deep learning - comparison of neural network architectures.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Denoising an image by deep learning - comparison of neural network architectures

Results

You can check the results of the neural network here.

Introduction

The environment in which the project will be run must support cuda, otherwise the program will throw an error. Project contains three types of structures which are used in machine learning for denoising images, which are:

  • Autoencoder,
  • UNet,
  • Resnet

Conda environment for this project can be downloaded from here.

Setup

Parameters

You can change all parameters of learning in Params.py file, like:

  • learning rate,
  • numbers of epochs,
  • number of test and train images.

You can also decide to save an image during training or after the test.

Dataset

First, you must decide which dataset you will use in your session. It is posible by changing:

  • Line 53 in Train.py:
        train_load = Dataset.CIFAR_train_loader()
  • Line 44 in Test.py
         for i, data in enumerate(Dataset.CIFAR_test_loader()):

Train

Second, you must decide which module you will use to train:

  • Line 49 in Train.py
        model = Resnet().cuda()

also you have to remember to change the path to save the model:

  • Line 81 in Train.py
        torch.save(model, self.Resnet_model_save_PATH)

Test

Finally you can observe the results from net. Remember to configure path of saving images if you decided to save it:

  • Line 63 in Test.py:
        image_save(combined_img, f"./test_image/Resnet/test_img_{i + 1}.png")

About

Denoising an image by deep learning - comparison of neural network architectures.


Languages

Language:Python 100.0%