├── images ├── im1.PNG ├── table.PNG ├── dncnres.PNG ├── dnnarc.PNG ├── redres.PNG ├── simres.PNG └── rednet30_arc.PNG └── README.md /images/im1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/im1.PNG -------------------------------------------------------------------------------- /images/table.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/table.PNG -------------------------------------------------------------------------------- /images/dncnres.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/dncnres.PNG -------------------------------------------------------------------------------- /images/dnnarc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/dnnarc.PNG -------------------------------------------------------------------------------- /images/redres.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/redres.PNG -------------------------------------------------------------------------------- /images/simres.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/simres.PNG -------------------------------------------------------------------------------- /images/rednet30_arc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anushkayadav/Denoising_cifar10/HEAD/images/rednet30_arc.PNG -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Implementation of Denoising Algorithms on CIFAR-10 Dataset 2 | 3 | - Applied Various Unsupervised Machine Learning algorithms on ciar-10 data to denoise the images. 4 | - Focused on CNN based approaches which do unsupervised pre-training and can learn good representations via reconstruction 5 | - To prevent the auto-encoders from merely copying inputs during training, denoising auto-encoders were proposed to learn representations from corrupted data 6 | 7 |
11 | 12 | ## Algorithms Used : 13 | There are broadly two types of deep learning algorithms which may be used for denoising : 14 | 15 | - Discriminative Learning-Based using CNNs 16 | - Generative Learning-Based using GANs 17 | 18 | For the denoising problem of known noise like **Gaussian noise**, using **CNNs based approaches** it is possible to form paired training data and leverage these methods to achieve state-of-the-art performance. They could fully exploit the great capability of the network architecture to learn from data, which breaks through the limitations of prior based methods and further improves the performance whereas **GANs** are used where there are more **complex real noises** and dataset is small.[[1]](#1) 19 | 20 | Since, in our experiment we used **simple Gaussian noise** and CIFAR-10 dataset has **considerable amount of data**(60000 examples), I preferred to use Discriminative Learning-Based such as: 21 | 1. Simple Denoising Autoencoders (DAE)[Reference Paper](https://www.researchgate.net/publication/330382260_Image_Denoising_with_Color_Scheme_by_Using_Autoencoders)[[2]](#2) 22 | 2. Convolutional Auto-encoders with Symmetric Skip Connections[Reference Paper](https://arxiv.org/pdf/1611.09119.pdf)[[3]](#3) 23 | 3. Feed-forward denoising convolutional neural networks (DnCNNs)[Reference Paper](https://arxiv.org/pdf/1608.03981.pdf)[[4]](#4) 24 | 25 | ## Dataset and Noise 26 | The dataset used comprises of 60000 color pictures in 10 classes with 6000 picture per class. 27 | Dimension of each image is 32 x 32. 28 | 29 | I have introduced External Noise i.e. **Pixel-level Gaussian noise** to all the input images which would be fed into our models. 30 | 31 | We add Gaussian noise matrix on both training and testing with noise factor 0.1 and clip images between 0 and 1. 32 | ``` 33 | noisy_imgs = images + noise_factor * torch.randn(*images.shape) 34 | noisy_imgs = np.clip(noisy_imgs, 0., 1.) 35 | ``` 36 |  37 | ## Simple Denoising Autoencoder (DAE) 38 | 39 | ### **MODEL ARCHITECTURE** 40 | - Encoder : 3x3 convolutional layers and downsamping done using 2x2 maxpooling layers 41 | - Decoder : Upsampling done and layers are symmetric to the encoder. 42 | 43 | Each convolutional/deconvolutional layer is followed by a **ReLU** non-linearity layer 44 | 45 | ``` 46 | ConvDenoiser( 47 | (conv1): Conv2d(3, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)) 48 | (conv2): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)) 49 | (pool): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False) 50 | (t_conv1): ConvTranspose2d(32, 32, kernel_size=(2, 2), stride=(2, 2)) 51 | (t_conv2): ConvTranspose2d(32, 32, kernel_size=(2, 2), stride=(2, 2)) 52 | (convout): Conv2d(32, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)) 53 | ) 54 | ``` 55 | **Hyperparameters** : 56 | Batch Size = 20 **.** 57 | no. of epochs = 40 **.** 58 | Learning rate =0.001 **.** 59 | 60 | ### **RESULTS** 61 |  62 | 63 | ### **EVALUATION** 64 | On Test data of 10000 examples: 65 | - Average **PSNR**:24.830 66 | - Average **SSIM**: 0.868 67 | 68 | ## Convolutional Auto-encoders with Symmetric Skip Connections 69 | 70 | ### **MODEL ARCHITECTURE** 71 | - Encoder : 3x3 convolutional layers and downsamping done using stride of 2 instead of pooling, which can be harmful to image restoration tasks 72 | - Decoder : Upsampling done and layers are symmetric to the encoder. 73 | - The corresponding encoder and decoder layers are connected by **shortcut connections**. 74 | - Each convolutional/deconvolutional layer is followed by a **Batch Normalization** layer and a 75 | **ReLU non-linearity** layer 76 | - Number of encoder/decoder layers : 15 77 |