An open API service indexing awesome lists of open source software.

https://github.com/dros1986/filter_removal

CNN-based photo-filter removal
https://github.com/dros1986/filter_removal

cnn convolutional-neural-networks filter-removal image-enhancement image-processing machine-learning photo-filter photo-repair photography pytorch unfilering

Last synced: about 2 months ago
JSON representation

CNN-based photo-filter removal

Awesome Lists containing this project

README

        

[![DOI](https://zenodo.org/badge/94990376.svg)](https://zenodo.org/badge/latestdoi/94990376)

Pytorch implementation of the paper:

**Artistic Photo Filter Removal Using CNNs**
Journal of Electronic Imaging, SPIE
[F. Piccoli](http://www.ivl.disco.unimib.it/people/flavio-piccoli/ "Flavio Piccoli"), [C. Cusano](http://www.ivl.disco.unimib.it/people/claudio-cusano/ "Claudio Cusano"), [S. Bianco](http://www.ivl.disco.unimib.it/people/simone-bianco/ "Simone Bianco"), [R. Schettini](http://www.ivl.disco.unimib.it/people/raimondo-schettini/ "Raimondo Schettini")

Usage:

```bash
# clone this repository
git clone --recursive https://github.com/dros1986/filter_removal.git
# download the dataset
wget https://drive.google.com/a/campus.unimib.it/uc?export=download&confirm=XAOn&id=1vvLAO__opCjgLfRjAjW3WPWJHNiiVLbs
# unzip the file
unzip file.zip -d ./datasets/
# start training
python main.py -degin 3 degout 3
# start test
python main.py -degin 3 degout 3 --regen ./checkpoint.pth
```

Input images
![input](https://github.com/dros1986/filter_removal/blob/master/images/input.png)

Output images
![output](https://github.com/dros1986/filter_removal/blob/master/images/output.png)

## Parameters
| Name | Description | Default |
| ---- | ----------- | ------- |
| degin | Degree of the polynomial onto which the color transform will be estimated | 3 |
| degout | Degree of the polynomial onto which the color transform will be applied | 3 |
| patchsize | patchsize*patchsize is the number of pixels involved in each color transform | 8 |
| nrow | Batch size will be nrow*nrow | 5 |
| indir | Folder containing filtered images | ./datasets/places-instagram/images/ |
| gtdir | Folder containing original images | ./datasets/places-instagram/images_orig/ |
| train_list | txt containing train set filenames | ./datasets/places-instagram/train-list.txt |
| validation_list | txt containing validation set filenames | ./datasets/places-instagram/smallvalidation-list.txt |
| test_list | txt containing test set filenames | ./datasets/places-instagram/test-list.txt |