【文件属性】:
文件名称:image_harmonization
文件大小:7.25MB
文件格式:ZIP
更新时间:2021-05-17 09:20:50
Python
图像协调
PyTorch实施以实现图像协调。
先决条件
火炬
入门
安装
从安装PyTorch和依赖项
从源头安装Torch视觉。
git clone https://github.com/pytorch/vision
cd vision
python setup.py install
安装python库并。
pip install visdom
pip install dominate
协调数据集
要训练模型,请使用MS COCO生成协调数据集
统一数据集将通过转换遮罩区域的亮度,对比度和伽玛值来随机生成。
cd data_gen
python data_gen.py --image_dir coco_dataset_path --save_dir directory_for_saving_images
火车
训练模型:
python train.py --dataroot
【文件预览】:
image_harmonization-master
----test_results.png(7.2MB)
----models()
--------__pycache__()
--------networks.py(6KB)
--------__init__.py(165B)
--------model.py(4KB)
--------base_model.py(3KB)
----main.py(2KB)
----environment.yml(249B)
----data()
--------__pycache__()
--------dataset.py(3KB)
--------__init__.py(1KB)
--------base_data_loader.py(171B)
--------base_dataset.py(4KB)
----test.py(1KB)
----train.py(2KB)
----data_gen()
--------data_gen.py(12KB)
--------utils.py(9KB)
--------__pycache__()
----LICENSE(3KB)
----options()
--------__pycache__()
--------__init__.py(0B)
--------train_options.py(2KB)
--------base_options.py(4KB)
--------test_options.py(846B)
----README.md(1KB)
----util()
--------__pycache__()
--------visualizer.py(6KB)
--------util.py(2KB)
--------__init__.py(0B)
--------html.py(2KB)
--------image_pool.py(1KB)