Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Armour/Automatic-Image-Colorization
🎨 Automatic Image Colorization using TensorFlow based on Residual Encoder Network
https://github.com/Armour/Automatic-Image-Colorization
auto-colorization colorization gpu image-colorization jarvis python3 residual-encoder-network tensorflow
Last synced: 3 months ago
JSON representation
🎨 Automatic Image Colorization using TensorFlow based on Residual Encoder Network
- Host: GitHub
- URL: https://github.com/Armour/Automatic-Image-Colorization
- Owner: Armour
- License: gpl-3.0
- Created: 2016-12-08T23:10:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T21:58:21.000Z (about 2 years ago)
- Last Synced: 2024-05-09T11:31:52.850Z (6 months ago)
- Topics: auto-colorization, colorization, gpu, image-colorization, jarvis, python3, residual-encoder-network, tensorflow
- Language: Python
- Homepage: http://tinyclouds.org/colorize/
- Size: 38.8 MB
- Stars: 169
- Watchers: 11
- Forks: 45
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Automatic Image Colorization
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Template from jarvis](https://img.shields.io/badge/Hi-Jarvis-ff69b4.svg)](https://github.com/Armour/Jarvis)## Overview
This is a TensorFlow implementation of the Residual Encoder Network based on [Automatic Colorization](http://tinyclouds.org/colorize/) and the pre-trained VGG16 model from [https://github.com/machrisaa/tensorflow-vgg](https://github.com/machrisaa/tensorflow-vgg)
**For latest TensorFlow with [estimator](https://www.tensorflow.org/guide/estimators) support, check [tf-1.12](https://github.com/Armour/Automatic-Image-Colorization/tree/tf-1.12) branch. (still under development, the training code is working now)**
## Structure
* `config.py`: config variables like batch size, training_iters and so on
* `image_helper.py`: all functions related to image manipulation
* `read_input.py`: all functions related to input
* `residual_encoder.py`: the residual encoder model
* `common.py`: the common part for training and testing, which is mainly the workflow for this model
* `train.py`: train the residual encoder model using TensorFlow built-in AdamOptimizer
* `test.py`: test your own images and save the output images## TensorFlow graph
![residual_encoder](images/residual_encoder.png)
## How to use
* Download pre-trained VGG16 model [vgg16.npy](https://mega.nz/#!YU1FWJrA!O1ywiCS2IiOlUCtCpI6HTJOMrneN-Qdv3ywQP5poecM) to vgg folder
* Option 1: Use pre-trained residual encoder model
* Download model [here](https://github.com/Armour/Automatic-Image-Colorization/releases/tag/2.0)
* Unzip all files to `summary_path` (you can change this path in `config.py`)* Option 2: Train your own model!
1. Change the `batch_size` and `training_iters` if you want.
2. Change `training_dir` to your directory that has all your training jpg images
3. Run `python train.py`* Test
1. Change `testing_dir` to your directory that has all your testing jpg images
2. Run `python test.py`## Examples
* ![1](images/1.png)
* ![2](images/2.png)
* ![3](images/3.png)
* ![4](images/4.png)
* ![5](images/5.png)
* ![6](images/6.png)
* ![7](images/7.png)
* ![8](images/8.png)
* ![9](images/9.png)
* ![10](images/10.png)
* ![11](images/11.png)
* ![12](images/12.png)* More example output images can be found in [sample_output_images](https://github.com/Armour/Automatic-Image-Colorization/blob/master/sample_output_images) folder.
## References
* [Automatic Colorization](http://tinyclouds.org/colorize/)
* [pavelgonchar/colornet](https://github.com/pavelgonchar/colornet)
* [raghavgupta0296/ColourNet](https://github.com/raghavgupta0296/ColourNet)
* [pretrained VGG16 npy file](https://github.com/machrisaa/tensorflow-vgg)## Contributing
See [CONTRIBUTING.md](https://github.com/Armour/Automatic-Image-Colorization/blob/master/.github/CONTRIBUTING.md)
## License
[GNU GPL 3.0](https://github.com/Armour/Automatic-Image-Colorization/blob/master/LICENSE) for personal or research use. COMMERCIAL USE PROHIBITED.