Skip to content

pss1207/image_harmonization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Harmonization

PyTorch implementation for image harmonization. alt text

Prerequisites

Getting Started

Installation

  • Install PyTorch and dependencies from http://pytorch.org
  • Install Torch vision from the source.
git clone https://github.com/pytorch/vision
cd vision
python setup.py install
pip install visdom
pip install dominate

Harmonization Dataset

  • To train the model, generate a harmonization dataset with MS COCO
  • The harmonization dataset will be randomly generated by converting brightness, contrast, and gamma value of masked region.
cd data_gen
python data_gen.py --image_dir coco_dataset_path --save_dir directory_for_saving_images 

Train

  • Train a model:
python train.py --dataroot ./datasets 
  • To view training results, run python -m visdom.server and click the URL http://localhost:8097. To see more intermediate results, check out ./checkpoints/web/index.html

Test

  • Test the model:
python test.py --dataroot ./datasets

The test results will be saved to a html file here: ./results/test_latest/index.html.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages