Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codeslake/Color_Transfer_Histogram_Analogy
[CGI 2020] Official PyTorch Implementation for "Deep Color Transfer using Histogram Analogy"
https://github.com/codeslake/Color_Transfer_Histogram_Analogy
color-transfer deep-learning histogram-analogy pytorch
Last synced: 3 months ago
JSON representation
[CGI 2020] Official PyTorch Implementation for "Deep Color Transfer using Histogram Analogy"
- Host: GitHub
- URL: https://github.com/codeslake/Color_Transfer_Histogram_Analogy
- Owner: codeslake
- License: agpl-3.0
- Created: 2020-08-19T00:33:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T21:46:22.000Z (11 months ago)
- Last Synced: 2024-08-04T03:12:07.455Z (7 months ago)
- Topics: color-transfer, deep-learning, histogram-analogy, pytorch
- Language: Python
- Homepage:
- Size: 13.6 MB
- Stars: 161
- Watchers: 5
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Deep Color Transfer using Histogram Analogy
Official PyTorch Implementation of the CGI 2020 Paper
[Project](https://junyonglee.me/projects/CTHA) | [Paper](https://link.springer.com/epdf/10.1007/s00371-020-01921-6?sharing_token=m2UzXwVlSCP8CbRYNrEcnve4RwlQNchNByi7wbcMAY5_mQV2iPdNT8_ORizvbX3p8mina4UHEjoKsvegf0S_FwC3Yo3cBRV6mlx1mdbvv3CiiREpz3ZqyJuRGmHbygkNL_7X-3hd2CMGSxgPtF22LPsyjpEfhG1R_bNHSSVNvbc%3D) | [Supp](https://www.dropbox.com/s/jxvg6ize41g43vj/Additional_Result.pdf?raw=1) | [Slide](https://www.dropbox.com/s/jbnp7omqre2pu9b/2020_junyonglee.pdf?raw=1)This repo contains the evaluation code for the following paper:
> [**Deep Color Transfer using Histogram Analogy**](https://junyonglee.me/projects/CTHA)
> [Junyong Lee](https://junyonglee.me)1, [Hyeongseok Son](https://sites.google.com/site/sonhspostech/)1, Gunhee Lee2, Jonghyeop Lee1, [Sunghyun Cho](https://www.scho.pe.kr/)1, and [Seungyong Lee](http://cg.postech.ac.kr/leesy/)1
> 1POSTECH, 2NCSOFT
> *The Visual Computer (special issue on CGI 2020) 2020*
>
![]()
**Figure:** *Color transfer results on various source and reference image pairs. For visualization, the reference image is cropped to make a same size with other images.*
## Getting Started
### Prerequisites
*Tested environment*


1. **Install requirements**
* `pip install -r requirements.txt`
*
2. **Pre-trained models**
* Download and unzip pretrained weights ([OneDrive](https://onedrive.live.com/download?resid=94530B7E5F49D254%21484&authkey=!AIw6wh6Vjo-IFWs) | [Dropbox](https://www.dropbox.com/s/lkwo9xg168e650i/checkpoints.zip?dl=1)) under `[CHECKPOINT_ROOT]`:```
├── [CHECKPOINT_ROOT]
│ ├── *.pth
```> **NOTE:**
>
> `[CHECKPOINT_ROOT]` can be specified with the option `--checkpoints_dir`.## Testing the network
* To test the network:```bash
python test.py --dataroot [test folder path] --checkpoints_dir [CHECKPOINT_ROOT]
# e.g., python test.py --dataroot test --checkpoints_dir checkpoints
```> **Note:**
>
> * Input images and their segment maps should be placed under `./test/input` and `./test/seg_in`, respectively.
> * Target images and their segment maps should be placed under `./test/target` and `./test/seg_tar`, respectively.
> * The test results will be saved under `./results/`.* To turn on *semantic replacement*, add `--is_SR`:
```bash
python test.py --dataroot [test folder path] --checkpoints_dir [ckpt path] --is_SR
```## Contact
Open an issue for any inquiries.
You may also have contact with [[email protected]](mailto:[email protected])## Resources
All material related to our paper is available via the following links:
## License

This software is being made available under the terms in the [LICENSE](LICENSE) file.
Any exemptions to these terms require a license from the Pohang University of Science and Technology.## Citation
If you find this code useful, please consider citing:
```
@Article{Lee2020CTHA,
author = {Junyong Lee and Hyeongseok Son and Gunhee Lee and Jonghyeop Lee and Sunghyun Cho and Seungyong Lee},
title = {Deep Color Transfer using Histogram Analogy},
journal = {The Visual Computer},
volume = {36},
number = {10},
pages = {2129--2143},
year = {2020},
}
```