Skip to content

Repository implementing the nosing removal model proposed in DeepErase: Weakly Supervised Ink Artifact Removal in Document Text Images (https://arxiv.org/abs/1910.07070)

License

Notifications You must be signed in to change notification settings

Guillem96/deep-erase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepErase - Ink Artifact Removal

This repository contains the implementation of the de-noising model described in DeepErase: Weakly Supervised Ink Artifact Removal in Document Text Images .

Our implementation also has the ability to work with Generative Adversarial Networks (GAN) framework to improve the noise removal.

Training

import deeperase

input_pattern = "data/noised/*.jpg"
target_pattern = "data/clean/*.jpg"

image_size = (64, 256)

train_ds, test_ds = deeperase.data.build_dataset(
    input_pattern, target_pattern, image_size=image_size,
    do_crop=True, do_hflip=True) # Also with image augmentation 😲

generator = deeperase.build_unet(image_size + (3,), 
                                 backbone='mobilenetv2', # See deeperase/backbones.py
                                 n_channels=3) # rgb

discriminator = deeperase.build_discriminator(image_size + (3,))
# If discriminator is not None the noise removal model will also use an 
# adversarial loss

de = deeperase.DeepErase(generator, discriminator)
de.compile(optimizer=tf.optimizers.Adam(learning_rate=2e-4, beta_1=.5), 
           discriminator_optimizer=tf.optimizers.Adam(learning_rate=2e-4, 
                                                      beta_1=.5))

de.fit(train_ds.batch(64), epochs=50, 
       callbacks=[deeperase.callbacks.TensorBoard(logdir='logs,
                                                  images_dataset=test_ds)])
# Take a look at Tensorboard to visualize how predictions evolve 📈

Prediction examples

Authors

About

Repository implementing the nosing removal model proposed in DeepErase: Weakly Supervised Ink Artifact Removal in Document Text Images (https://arxiv.org/abs/1910.07070)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages