NVlabs / FUNIT
- суббота, 11 мая 2019 г. в 00:17:41
Translate images to unseen domains in the test time with few example images.
Few-shot Unsueprvised Image-to-Image Translation
Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, and Jan Kautz.
In arXiv 2019.
Copyright (C) 2019 NVIDIA Corporation.
All rights reserved. Licensed under the CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International)
The code is released for academic research use only. For commercial use, please contact researchinquiries@nvidia.com.
git clone https://github.com/NVlabs/FUNIT.gitconda install -y pytorch torchvision cudatoolkit=10.0 -c pytorchTo reproduce the results reported in the paper, you would need an NVIDIA DGX1 machine with 8 V100 GPUs.
We are releasing the Animal Face dataset. If you use this dataset in your publication, please cite the FUNIT paper.
cd dataset
wget http://www.image-net.org/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_train.tar
tar xvf ILSVRC2012_img_train.tar
datasets/ILSVRC/Data/CLS-LOC/train. Now, extract the animal face images by runningpython tools/extract_animal_faces.py datasets/ILSVRC/Data/CLS-LOC/train --output_folder datasets/animals --coor_file datasets/animal_face_coordinates.txt
datasets/animals. Note there are 149 folders. Each folder contains images of one animal kind. The number of images of the dataset is 117,484.Once the animal face dataset is prepared, you can train an animal face translation model by running
python train.py --config configs/funit_animals.yamlFor training a model for a different task, please create a new config file based on the example config.
If you use this code for your research, please cite our papers.
@inproceedings{liu2019few,
title={Few-shot Unsueprvised Image-to-Image Translation},
author={Ming-Yu Liu and Xun Huang and Arun Mallya and Tero Karras and Timo Aila and Jaakko Lehtinen and Jan Kautz.},
booktitle={arxiv},
year={2019}
}