https://github.com/pd-mera/bw-anime-arts-colorization
Using gray image and user's input colors colorize black & white Anime Arts
https://github.com/pd-mera/bw-anime-arts-colorization
Last synced: 3 months ago
JSON representation
Using gray image and user's input colors colorize black & white Anime Arts
- Host: GitHub
- URL: https://github.com/pd-mera/bw-anime-arts-colorization
- Owner: PD-Mera
- Created: 2022-12-08T01:54:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T14:35:28.000Z (over 2 years ago)
- Last Synced: 2025-01-08T19:46:57.012Z (5 months ago)
- Language: Python
- Homepage:
- Size: 3.33 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Colorize Black & White Anime Arts with User's input colors
Colorize Black & White Anime Arts with user's input colors
*I try to add Global Hint Networks but results is not good as I imagine*
**No Hint**
| Gray | Fake | Real |
| --- | --- | --- |
|  |  |  |**Local Hint**
| Gray | Local Hint | Fake | Real |
| --- | --- | --- | --- |
|  |  |  |  |**Global Hint**
| Gray | Global Hint | Fake | Real |
| --- | --- | --- | --- |
|  |  |  |  |## Environments and Dependencies
- Python 3.8.16
Install requirements
``` bash
pip install -r requirements.txt
```## Data
Prepare a `./data/` directory contain all subfolder of images used for training in format
``` folder
data/
|-- train/
| |-- class 1/
| | |-- img 1
| | |-- img 2
| | `-- ...
| |-- class 2/
| | |-- img 1
| | |-- img 2
| | `-- ...
| `-- ...
|-- train_small/
| `-- small_set/
| |-- img 1
| |-- img 2
| `-- ...
`-- val/
`-- classname/
|-- img 1
|-- img 2
`-- ...```
## Easy Use
For easy use, simply download pretrained weight from [here](https://drive.google.com/file/d/1HrMR3Holk2TSKQUCbmYHCZL5rDqu2Iag/view?usp=share_link) (10 * loss for global) or [here](https://drive.google.com/file/d/1XjLuJLB4ydWMvQq5-hhocO6DIy8vJH8F/view?usp=sharing) (100 * loss for global), modify config in `config.py` and run
``` bash
python infer.py
```## Training
You can update hyperparameter in `train.sh` and training a model from scratch using
``` bash
bash train.sh
```## Valid
Update hyperparameter in `test.sh` and valid a model using
``` bash
bash test.sh
```## TODO
- [x] Add Global Hints
- [ ] Improve Global Hints## Acknowledgments
This coding is heavily followed by [colorization-pytorch](https://github.com/richzhang/colorization-pytorch)'s repo.