Giter VIP home page Giter VIP logo

artifact_removal_gan's Introduction

Artifact removal GAN

In this work, we devise a neural network to remove from an image the artefacts of the most used compression format: JPEG. The structure of the model is based on the Generative Adversarial Network (GAN) design. This particular architecture is composed of two elements that are competing with each other: the Generator and the Discriminator.

U-net is used as the Generator of the model. This component takes a JPEG image as input and it outputs the same image without the artefacts.

To train the model we use the NoGAN technique. Thanks this method, the training of the neural network is more stable and the model can reach better results.

The key feature of the development of the model is the usage of the perceptual loss function: Learned Perceptual Image Patch Similarity (LPIPS). This function was created to mimic human vision judgements and it is used to measure the similarity between two images.

For more details: ACM publication


Architecture

original

The neural net is based on the DeOldify model.

We used MobileNet as the U-Net encoder, LPIPS as loss function and DIV2k as dataset.

The metrics used are:

Installation

conda env create --file environment.yml
conda activate arnet_env

create_images.ipynb to test


Results

Original:

original

GAN:

GAN

Crop

JPEG GAN

Original:

original

GAN:

GAN

JPEG GAN

Comparison to the ground truth

High resolution JPEG GAN

Video Demo

Video demo gan youtube

artifact_removal_gan's People

Contributors

mameli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

artifact_removal_gan's Issues

Problem loading the "standard" model

Hi @mameli,

I was trying to use your model and reproduce results, but I can't load the "standard" model due to the perceptual_similarity module not being found.

Traceback (most recent call last):

File "C:\Users\apili\Downloads\Artifact_Removal_GAN-1.0\inference.py", line 14, in <module>
  learner = load_learner(path=root_model_path, file=exported_model)

File "C:\Users\apili\anaconda3\envs\fastai\lib\site-packages\fastai\basic_train.py", line 621, in load_learner
  state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source)

File "C:\Users\apili\anaconda3\envs\fastai\lib\site-packages\torch\serialization.py", line 367, in load
  return _load(f, map_location, pickle_module)

File "C:\Users\apili\anaconda3\envs\fastai\lib\site-packages\torch\serialization.py", line 538, in _load
  result = unpickler.load()

ModuleNotFoundError: No module named 'perceptual_similarity'

However, I have this module installed and can't seem to solve it on my own. Any help is welcome.

Thanks in advance,
Marta Marques

artefacts

I try to restore old film 1978
And i get artifacts (small squares and some time green-yellow fragments) on frames. Please help me how to avoid this.
It take so much time to calc and after that i see artifacts...
frame_3026
frame_10237
frame_15055

Could not Find the Datasets

Greeting!

First of all, thanks for sharing your amazing work. I was trying to recreate the results that you have created but I'm having difficulties finding out those datasets. Would you able to guide me on this? It seems path given based on your workstation directory.
Hope to hear from you soon!
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.