Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
SRCHIANG 054cae8896 | 2 years ago | |
---|---|---|
.. | ||
dataloader | 2 years ago | |
evaluations | 2 years ago | |
gui | 2 years ago | |
images | 2 years ago | |
model | 2 years ago | |
options | 2 years ago | |
util | 2 years ago | |
README.md | 2 years ago | |
config.bird.yml | 2 years ago | |
config.coco.yml | 2 years ago | |
evaluation.py | 2 years ago | |
test.py | 2 years ago | |
train.py | 2 years ago | |
ui_main.py | 2 years ago |
This repository implements the paper "Text-Guided Neural Image Inpainting"
by Lisai Zhang, Qingcai Chen, Baotian Hu and Shuoran Jiang. Given one masked image, the proposed
TDANet generates diverse plausible results according to guidance text.
This code was tested with Pytoch 1.2.0, CUDA 10.1, Python 3.6 and Ubuntu 16.04 with a 2080Ti GPU
pip install visdom dominate
git clone https://github.com/idealwhite/tdanet --depth 1
cd tdanet
CUB_200
: dataset from Caltech-UCSD Birds 200.COCO
: object detection 2014 datset from MS COCO.pre-processed datafiles
: train/test split, caption-image mapping, image samplingpython train.py --name tda_bird --gpu_ids 0 --model tdanet --mask_type 0 1 2 3 --img_file ./datasets/CUB_200_2011/train.flist --mask_file ./datasets/CUB_200_2011/train_mask.flist --text_config config.bird.yml
--mask_type
in options/base_options.py for different training masks. --mask_file
path is needed for object mask, use train_mask.flist for CUB and image_mask_coco_all.json for COCO. --text_config
refer to the yml configuration file for text setup, --img_file
is the image file dir or file list.python -m visdom.server
and copy the URL http://localhost:8097.Test
python test.py --name tda_bird --img_file datasets/CUB_200_2011/test.flist --results_dir results/tda_bird --mask_file datasets/CUB_200_2011/test_mask.flist --mask_type 3 --no_shuffle --gpu_ids 0 --nsampling 1 --no_variance
Note:
--no_variance
option to get better performance.A eval_tda_bird.flist
will be generated after the test. Then in the evaluation, this file is used as the ground truth file list:
python evaluation.py --batch_test 60 --ground_truth_path eval_tda_bird.flist --save_path results/tda_bird
--ground_truth_path
to the dir of ground truth image path or list. --save_path
as the result dir.Download the pre-trained models bird inpainting or coco inpainting and put them undercheckpoints/
directory.
pip install PyQt5
The GUI could now only avaliable in debug mode, please refer to this issues for detailed instructions. The author is not good at solving PyQt5 problems, wellcome contrbutions.
This software is for educational and academic research purpose only. If you wish to obtain a commercial royalty bearing license to
this software, please contact us at lisaizhang@foxmail.com.
We would like to thanks Zheng et al. for providing their source code. This project is fit from their great Pluralistic Image Completion Project.
If you use this code for your research, please cite our paper.
@inproceedings{10.1145/3394171.3414017,
author = {Zhang, Lisai and Chen, Qingcai and Hu, Baotian and Jiang, Shuoran},
title = {Text-Guided Neural Image Inpainting},
year = {2020},
booktitle = {Proceedings of the 28th ACM International Conference on Multimedia},
pages = {1302–1310},
location = {Seattle, WA, USA},
}
Multi-Label Image Classification and Text-Guided Neural Image Inpainting
Jupyter Notebook Python Perl Text other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》