Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show me the solution #1 #11

Open
victorcmoura opened this issue Dec 7, 2019 · 0 comments
Open

Show me the solution #1 #11

victorcmoura opened this issue Dec 7, 2019 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@victorcmoura
Copy link
Contributor

victorcmoura commented Dec 7, 2019

Problem: Colorizing black and white images

  • Default solution: Colorize by hand, with photo editors
  • Proposed solution: Colorize automatically by previous experiences (based on a tutorial by Emil Wallner)

Techincal explanation

  1. Getting the dataset
    • Public image dataset made available by Emil
  2. Convert colored images from RGB to Lab
    • L: Lightness (Black and white picture)
    • a: green-red
    • b: blue-yellow

image

This way, instead of predicting 3 channels (red, green, blue), there remains only two.

image

  1. Max-pooling
    • Technique used to increase detail density.

image

  1. Fusion architecture

    • Encoder (Smaller image patches)
    • Decoder (Global priors)
    • Fusion
  2. Software Engineering improvements

    • Instead of a jupyter notebook, the code has been transformed into a Python package
    • Pipenv has been used as a configuration manager
    • Trained models have been saved in .h5 files, to save time
    • A CLI has been implemented to enhance the usability

Results

Test training (i7 8750H, 6 cores, 16GB RAM)

Dataset size: 999 images
Epochs: 10
Step: 2 (500 images per batch)

image

Time elapsed: ~40m

Local training (i7 4500U, 4 cores, 16GB RAM)

Dataset size: 20 images
Epochs: 50
Step: 2 (10 images per batch)

image

Time elapsed: ~10h

Google Cloud 8 cores, 30GB RAM

Dataset size: 5000 images
Epochs: 1000
Step: 20

image

Time elapsed: 50h

Google Cloud 8 cores, 30GB RAM

Dataset size: 400 images
Epochs: 1000
Step: 20

image

Time elapsed: 48h12min

Lessons learned

  • Deep learning is $$$$$
  • General networks are harder to achieve
  • Dependencies errors or mismatch
  • Difficulty to use GPU to train the model

Future Works

  • Find better parameters from training
  • Use GPU for Training
  • Use GAN (Generative Adversarial Network) for better results
  • Create CI/CD for releases
@victorcmoura victorcmoura added the documentation Improvements or additions to documentation label Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant