xiefan-guo/ctsdg
소개
[ICCV 2021] Image Inpainting via Conditional Texture and Structure Dual Generation
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalCTSDG

Paper | Pre-trained Models | BibTex
Image Inpainting via Conditional Texture and Structure Dual Generation
Xiefan Guo, Hongyu Yang, Di Huang
In ICCV'2021
Introduction
Generator. Image inpainting is cast into two subtasks, i.e., structure-constrained texture synthesis (left, blue) and texture-guided structure reconstruction (right, red), and the two parallel-coupled streams borrow encoded deep features from each other. The Bi-GFF module and CFA module are stacked at the end of the generator to further refine the results.
Discriminator. The texture branch estimates the generated texture, while the structure branch guides structure reconstruction.

Prerequisites
- Python >= 3.6
- PyTorch >= 1.0
- NVIDIA GPU + CUDA cuDNN
Getting Started
Installation
- Clone this repo:
git clone https://github.com/Xiefan-Guo/CTSDG.git
cd CTSDG
- Install PyTorch and dependencies from http://pytorch.org
- Install python requirements:
pip install -r requirements.txt
Datasets
Image Dataset. We evaluate the proposed method on the CelebA, Paris StreetView, and Places2 datasets, which are widely adopted in the literature.
Mask Dataset. Irregular masks are obtained from Irregular Masks and classified based on their hole sizes relative to the entire image with an increment of 10%.
Training
Analogous to PConv by Liu et.al, initial training followed by finetuning are performed.
python train.py \
--image_root [path to image directory] \
--mask_root [path mask directory]
python train.py \
--image_root [path to image directory] \
--mask_root [path to mask directory] \
--pre_trained [path to checkpoints] \
--finetune True
Distributed training support. You can train model in distributed settings.
python -m torch.distributed.launch --nproc_per_node=N_GPU train.py
Testing
To test the model, you run the following code.
python test.py \
--pre_trained [path to checkpoints] \
--image_root [path to image directory] \
--mask_root [path to mask directory] \
--result_root [path to output directory] \
--number_eval [number of images to test]
Citation
If any part of our paper and repository is helpful to your work, please generously cite with:
@InProceedings{Guo_2021_ICCV,
author = {Guo, Xiefan and Yang, Hongyu and Huang, Di},
title = {Image Inpainting via Conditional Texture and Structure Dual Generation},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {14134-14143}
}
관련 프로젝트 살펴보기
불러오는 중…