Rethinking the Truly Unsupervised Image-to-Image Translation - Official PyTorch Implementation (ICCV 2021)

Overview

Rethinking the Truly Unsupervised Image-to-Image Translation
(ICCV 2021)

teaser

Each image is generated with the source image in the left and the average style vector of each cluster. The network is trained under fully unsupervised manner.

Official pytorch implementation of "Rethinking the Truly Unsupervised Image-to-Image Translation"

Rethinking the Truly Unsupervised Image-to-Image Translation
Kyungjune Baek1*, Yunjey Choi2, Youngjung Uh1, Jaejun Yoo3, Hyunjung Shim1
* Work done during his internship at Clova AI Research
1 Yonsei University
2 NAVER AI Lab.
3 UNIST

Absract Every recent image-to-image translation model inherently requires either image-level (i.e. input-output pairs) or set-level (i.e. domain labels) supervision. However, even set-level supervision can be a severe bottleneck for data collection in practice. In this paper, we tackle image-to-image translation in a fully unsupervised setting, i.e., neither paired images nor domain labels. To this end, we propose a truly unsupervised image-to-image translation model (TUNIT) that simultaneously learns to separate image domains and translates input images into the estimated domains. Experimental results show that our model achieves comparable or even better performance than the set-level supervised model trained with full labels, generalizes well on various datasets, and is robust against the choice of hyperparameters (e.g. the preset number of pseudo domains). Furthermore, TUNIT can be easily extended to semi-supervised learning with a few labeled data.

Requirement

Library

pip install -r requirements.txt

* pytorch==1.1.0 or 1.2.0  
* tqdm  
* opencv-python  
* scipy  
* sklearn
* matplotlib  
* pillow  
* tensorboardX 

Dataset

Project
|--- tunit
|          |--- main.py
|          |--- train
|                 |--- train_unsupervised.py
|                 |--- ...
|
|--- data
       |--- afhq
             |--- train
             |--- test
       |--- animal_faces
             |--- n02085620
             |--- n02085782
             |--- ...
       |--- ffhq
             |--- images
                    |--- 000001.jpg
                    |--- ...
       |--- lsun_car
             |--- images
                    |--- 000001.jpg
                    |--- ...

Then, call --data_path='../data'

Hardware

  • This source code is mainly tested on V100 and P40.

How to Run (Quick Start)

After setting the dataset directory, the code can be easily run by the scripts below.

Train on local

Supervised
python main.py --gpu $GPU_TO_USE --p_semi 1.0 --dataset animal_faces --data_path='../data'

Semi-supervised
python main.py --gpu $GPU_TO_USE --p_semi 0.5 --dataset animal_faces --data_path='../data'

Unsupervised
python main.py --gpu $GPU_TO_USE --p_semi 0.0 --dataset animal_faces --data_path='../data'

Test on local

python main.py --gpu $GPU_TO_USE --validation --load_model $DIR_TO_LOAD --dataset animal_faces

Monitoring

tensorboard --logdir=$DIR/events --port=$PORT

Actual example

Train
python main.py --gpu 0 --dataset animal_faces --output_k 10 --data_path '../data' --p_semi 0.0
python main.py --gpu 0 --dataset animal_faces --output_k 10 --data_path '../data' --p_semi 0.2
python main.py --gpu 0 --dataset afhq_cat --output_k 10 --data_path '../data' --p_semi 0.0
python main.py --gpu 1 --dataset animal_faces --data_path '../data' --p_semi 1.0
python main.py --gpu 0,1 --dataset summer2winter --output_k 2 --data_path '../data' --p_semi 0.0 --img_size 256 --batch_size 16 --ddp

Test
python main.py --gpu 0 --dataset animal_faces --output_k 10 --data_path '../data' --validation --load_model GAN_20190101_101010
python main.py --gpu 1 --dataset afhq_cat --output_k 10 --data_path '../data' --validation --load_model GAN_20190101_101010
python main.py --gpu 2 --dataset summer2winter --output_k 2 --data_path '../data' --validation --load_model GAN_20190101_101010

Monitoring - open terminal at ./tunit/logs
tensorboard --logdir=./GAN_20200101_101010/events

Pretrained Model

Download

Google Drive

  • Download folders to load, then place the folder under 'logs'.
Project
|--- tunit
|          |--- main.py
|          |--- logs
|                 |--- animalFaces10_0_00
|                               |--- checkpoint.txt
|                               |--- model_4568.ckpt
|          |--- train
|                 |--- train_unsupervised.py
|                 |--- ...

Then, RUN
python main.py --gpu 0 --dataset animal_faces --output_k 10 --img_size 128 --data_path $DATAPATH --validation --load_model animalFaces10_0_00 --p_semi 0.0

How to run

AFHQ Cat
python main.py --gpu 0 --dataset afhq_cat --output_k 10 --img_size 128 --data_path $DATAPATH --validation --load_model afhq_cat_128
python main.py --gpu 0 --dataset afhq_cat --output_k 10 --img_size 256 --data_path $DATAPATH --validation --load_model afhq_cat_256
AFHQ Dog
python main.py --gpu 0 --dataset afhq_dog --output_k 10 --img_size 128 --data_path $DATAPATH --validation --load_model afhq_dog_128
python main.py --gpu 0 --dataset afhq_dog --output_k 10 --img_size 256 --data_path $DATAPATH --validation --load_model afhq_dog_256

AFHQ Wild
python main.py --gpu 0 --dataset afhq_wild --output_k 10 --img_size 128 --data_path $DATAPATH --validation --load_model afhq_wild_128
python main.py --gpu 0 --dataset afhq_wild --output_k 10 --img_size 256 --data_path $DATAPATH --validation --load_model afhq_wild_256
AnimalFaces-10
python main.py --gpu 0 --dataset animal_faces --output_k 10 --img_size 128 --data_path $DATAPATH --validation --load_model animalFaces10_0_00 --p_semi 0.0
python main.py --gpu 0 --dataset animal_faces --output_k 10 --img_size 128 --data_path $DATAPATH --validation --load_model animalFaces10_0_20 --p_semi 0.2

Explanation for codes

The validation generates 200 images per args.iters iterations. To reduce the number of images, please adjust the validation frequency. The checkpoint file is saved per ((args.epochs//10) * args.iters) iterations. Or comment out validation.py#L81 to validation.py#L162.

  • For more classes on AnimalFaces, change the list at main.py#L227 then, set args.output_k to len(args.att_to_use)
    • ex) args.att_to_use = [i for i in range(100)] then, run: python main.py --output_k 100 ...

Arguments

  • batch_size, img_size, data_path and p_semi are frequently speified.
  • Please refer "help" of the arguments in main.py.

Code Structure

  • main.py
    • Execute main.py to run the codes.
    • The script builds networks, optimizers and data loaders, and manages the checkpoint files.
  • datasets
    • custom_dataset.py
      • Basically, it is the same as ImageFolder but contains remap procedure of class numbers.
    • datasetgetter.py
      • Returns dataset instance of the dataset specified by args.dataset.
      • The instance returns original image, transformed image and its ground truth label.
  • models
    • blocks.py
      • Blocks for building networks.
      • This code is based on FUNIT repos.
    • guidingNet.py
      • Definition of guiding network.
    • discriminator.py
      • Definition of discriminator.
      • The architecture is based on StarGANv2, but it contains two residual blocks for each resolution.
    • generator.py
      • Definition of generator.
      • It consists of decoder, content encoder and MLP for AdaIN.
      • This code is from FUNIT repos.
  • train
    • train_unsupervised.py
      • It is called by setting --p_semi to 0.0
      • This mode does not utilize the labels at all.
    • train_supervised.py
      • It is called by setting --p_semi to 1.0
      • This mode fully utilizes the labels.
    • train_semisupervised.py
      • It is called by setting --p_semi between 0.0 to 1.0.
      • This mode utilizes (--p_semi * 100)% labels.
  • validation
    • cluster_eval.py
    • eval_metrics.py
      • These two scripts contain the functions for evaluating the classification performance.
      • These are from IIC repos.
    • plot_tsne.py (can be removed)
      • For plotting t-SNE.
    • validation.py
      • Generate fake samples and calculate FID.
  • tools
    • utils.py
      • Functions and class for logger, make folders, averageMeter and add logs.
    • ops.py
      • Queue operation and loss functions.
  • resrc
    • For image files of README.md

You can change the adversarial loss by modifying calc_adv_loss in ops.py. For the different strategy of training, please refer the files in train.

Results

afhq_cat afhq_dog afhq_wild ffhq lsun

Each image is generated with the source image in left and the average vector of reference images. The network is trained under fully unsupervised manner.

License

TUNIT is distributed under MIT unless the header specifies another license.

Copyright (c) 2020-present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORTd OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

The pretrained models is covered by Creative Commons BY-NC 4.0 license by NAVER Corporation. You can use, copy, tranform and build upon the material for non-commercial purposes as long as you give appropriate credit by citing our paper, and indicate if changes were made.

Citation

If you find this work useful for your research, please cite our paper:

@InProceedings{Baek_2021_ICCV,
    author    = {Baek, Kyungjune and Choi, Yunjey and Uh, Youngjung and Yoo, Jaejun and Shim, Hyunjung},
    title     = {Rethinking the Truly Unsupervised Image-to-Image Translation},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2021},
    pages     = {14154-14163}
}
Comments
  • Any TensorFlow implementation?

    Any TensorFlow implementation?

    Hi.

    This paper is simply great!

    I was actually looking for a TensorFlow implementation, specifically TensorFlow-compatible checkpoints/frozengraphs/SavedModel. My plan is to convert it to a TensorFlow Lite model and create a demo mobile application it.

    Looking forward to hearing from you.

    opened by sayakpaul 23
  • afhq dataset error

    afhq dataset error

    Hi,when I use your actual example in Train: python main.py --gpu 0 --dataset afhq_cat --output_k 10 --data_path '../data' --p_semi 0.2

    will have error.

    Traceback (most recent call last): File "main.py", line 524, in main() File "main.py", line 201, in main main_worker(args.gpu, ngpus_per_node, args) File "main.py", line 257, in main_worker train_loader, val_loader, train_sampler = get_loader(args, {'train': train_dataset, 'val': val_dataset}) File "main.py", line 448, in get_loader train_sup_dataset = train_dataset['SUP'] KeyError: 'SUP'

    Is the code fit for all the dataset? and What's the reason you deal different dataset with different way? Thanks

    opened by ZYJ-JMF 11
  • Validation Error?

    Validation Error?

    Hi,sorry to bother you But I use the validation coda to validate my training model "python main.py --gpu 3 --validation --load_model GAN_20210928-031155 --dataset animal_faces --data_path 'data'" but it get totally error result.

    It gather the all 50 val dataset to one class I draw the TSNE,it seems like that 微信图片_20211004165459 and print " (i, len(cluster_grid[i]), cluster_map[i]) " it shows that: 0 0 0 1 500 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7 0 0 8 0 0 9 0 0

    and the results are nothing changed. Do you know the reason?

    微信图片_20211004165607

    opened by ZYJ-JMF 8
  • training on own dataset

    training on own dataset

    how can we train in on custom domains??? when i try i am getting error Traceback (most recent call last): File "main.py", line 524, in <module> main() File "main.py", line 201, in main main_worker(args.gpu, ngpus_per_node, args) File "main.py", line 257, in main_worker train_loader, val_loader, train_sampler = get_loader(args, {'train': train_dataset, 'val': val_dataset}) File "main.py", line 478, in get_loader pin_memory=True, sampler=train_sampler, drop_last=False) File "/home/mia/anish/experiments/tunit/tunitenv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 213, in __init__ sampler = RandomSampler(dataset) File "/home/mia/anish/experiments/tunit/tunitenv/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 94, in __init__ "value, but got num_samples={}".format(self.num_samples)) ValueError: num_samples should be a positive integer value, but got num_samples=0

    opened by anish9 8
  • Error while training afhq_wild; RuntimeError: unsupported operation: more than one element of the written-to tensor refers to a single memory (assert_no_internal_overlap at /pytorch/aten/src/ATen/MemoryOverlap.cpp:36)

    Error while training afhq_wild; RuntimeError: unsupported operation: more than one element of the written-to tensor refers to a single memory (assert_no_internal_overlap at /pytorch/aten/src/ATen/MemoryOverlap.cpp:36)

    Please find the stacktrace below. Can you let me know what I am doing wrong?

    >>> python main.py --dataset afhq_wild --output_k 10 --data_path '/home/yyr/data/' --p_semi 0.0 --img_size 64 --batch_size 32   
    PYTORCH VERSION 1.5.0
    main.py:146: UserWarning: You have chosen a specific GPU. This will completely disable data parallelism.
      warnings.warn('You have chosen a specific GPU. This will completely '
    False
    False
    MULTIPROCESSING DISTRIBUTED :  False
    Use GPU: 0 for training
    Init Generator
    GENERATOR NF :  64
    Init ContentEncoder
    Init Decoder
    Init Generator
    GENERATOR NF :  64
    Init ContentEncoder
    Init Decoder
    USE CLASSES [2]
    LABEL MAP: {2: 0}
    USE AFHQ dataset [FOR IIC]
    LABEL MAP: {2: 0}
    500
    dataset                            afhq_wild           
    
    data_path                          /home/yyr/data/     
    
    workers                            4                   
    
    model_name                         GAN_20200617-194923 
    
    epochs                             200                 
    
    iters                              1000                
    
    batch_size                         32                  
    
    val_batch                          10                  
    
    log_step                           100                 
    
    sty_dim                            128                 
    
    output_k                           10                  
    
    img_size                           64                  
    
    dims                               2048                
    
    p_semi                             0.0                 
    
    load_model                         None                
    
    validation                         False               
    
    world_size                         1                   
    
    rank                               0                   
    
    gpu                                0                   
    
    ddp                                False               
    
    port                               8989                
    
    iid_mode                           iid+                
    
    w_gp                               10.0                
    
    w_rec                              0.1                 
    
    w_adv                              1.0                 
    
    w_vec                              0.01                
    
    data_dir                           /home/yyr/data/     
    
    start_epoch                        0                   
    
    train_mode                         GAN_UNSUP           
    
    unsup_start                        0                   
    
    separated                          65                  
    
    ema_start                          66                  
    
    fid_start                          66                  
    
    multiprocessing_distributed        False               
    
    distributed                        False               
    
    ngpus_per_node                     1                   
    
    log_dir                            ./logs/GAN_20200617-194923
    
    event_dir                          ./logs/GAN_20200617-194923/events
    
    res_dir                            ./results/GAN_20200617-194923
    
    num_cls                            10                  
    
    att_to_use                         [2]                 
    
    epoch_acc                          []                  
    
    epoch_avg_subhead_acc              []                  
    
    epoch_stats                        []                  
    
    to_train                           CDGI                
    
    min_data                           4738                
    
    max_data                           4738                
    
    START EPOCH[1]
      0%|                                                  | 0/1000 [00:00<?, ?it/s]Traceback (most recent call last):
      File "main.py", line 524, in <module>
        main()
      File "main.py", line 201, in main
        main_worker(args.gpu, ngpus_per_node, args)
      File "main.py", line 305, in main_worker
        trainFunc(train_loader, networks, opts, epoch, args, {'logger': logger, 'queue': queue})
      File "/home/yyr/Documents/github/tunit/train/train_unsupervised.py", line 103, in trainGAN_UNSUP
        c_loss.backward()
      File "/home/yyr/anaconda3/lib/python3.7/site-packages/torch/tensor.py", line 198, in backward
        torch.autograd.backward(self, gradient, retain_graph, create_graph)
      File "/home/yyr/anaconda3/lib/python3.7/site-packages/torch/autograd/__init__.py", line 100, in backward
        allow_unreachable=True)  # allow_unreachable flag
    RuntimeError: unsupported operation: more than one element of the written-to tensor refers to a single memory location. Please clone() the tensor before performing the operation. (assert_no_internal_overlap at /pytorch/aten/src/ATen/MemoryOverlap.cpp:36)
    frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x46 (0x7fc7ed454536 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libc10.so)
    frame #1: at::assert_no_internal_overlap(c10::TensorImpl*) + 0xc5 (0x7fc82a771d55 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #2: at::TensorIterator::check_mem_overlaps() + 0x71 (0x7fc82ab6e8a1 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #3: at::TensorIterator::build() + 0x2c (0x7fc82ab77b4c in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #4: <unknown function> + 0xbb3718 (0x7fc82a8ed718 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #5: at::native::copy_(at::Tensor&, at::Tensor const&, bool) + 0x44 (0x7fc82a8ef224 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #6: <unknown function> + 0x316ec4d (0x7fc82cea8c4d in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #7: torch::autograd::CopySlices::apply(std::vector<at::Tensor, std::allocator<at::Tensor> >&&) + 0xb35 (0x7fc82caced65 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #8: <unknown function> + 0x2d89c05 (0x7fc82cac3c05 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #9: torch::autograd::Engine::evaluate_function(std::shared_ptr<torch::autograd::GraphTask>&, torch::autograd::Node*, torch::autograd::InputBuffer&) + 0x16f3 (0x7fc82cac0f03 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #10: torch::autograd::Engine::thread_main(std::shared_ptr<torch::autograd::GraphTask> const&, bool) + 0x3d2 (0x7fc82cac1ce2 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #11: torch::autograd::Engine::thread_init(int) + 0x39 (0x7fc82caba359 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
    frame #12: torch::autograd::python::PythonEngine::thread_init(int) + 0x38 (0x7fc8391f9998 in /home/yyr/anaconda3/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
    frame #13: <unknown function> + 0xd6cb4 (0x7fc83a0e7cb4 in /lib/x86_64-linux-gnu/libstdc++.so.6)
    frame #14: <unknown function> + 0x9609 (0x7fc83c549609 in /lib/x86_64-linux-gnu/libpthread.so.0)
    frame #15: clone + 0x43 (0x7fc83c470103 in /lib/x86_64-linux-gnu/libc.so.6)
    
      0%|                                                  | 0/1000 [00:00<?, ?it/s]
    
    opened by sizhky 8
  • Why the style encoder maps all the images to the same style code?

    Why the style encoder maps all the images to the same style code?

    Hello. Could you please give some explanation and advise for the scenario explained below.

    I am not using TUNIT but a very similar architecture where I have a GAN jointly trained with a style encoder. The style encoder is trained as a classifier in a supervised setting and its middle layer features are injected as a style code in the generator. During training the validation results are pretty good (which I assume is down to the L1 loss I am using because of the paired supervision). During inference the style encoder maps all images to a same style code.

    The exact same scenario is mentioned in section 3.3. of your paper where you define the style contrastive loss for the generator. Quoting from your paper "This loss guides the generated image G(x, ˜s) to have a style similar to the reference image x˜ and dissimilar to negative (other) samples. By doing so, we avoid the degenerated solution where the encoder maps all the images to the same style code of the reconstruction loss [5] based on L1 or L2 norm." Where reference [5] is the starGAN-v2.

    In my case I am also using a style classification loss on the style image for the generator however it seems to completely ignore it during inference.

    Could you please explain

    1. Why your referred to StarGAN-v2 for this particular scenario?
    2. Can you give an advise so that my style encoder doesn't ignore the style code at inference?
    opened by ammar-deep 7
  • Why the argumentation transform of the orginal image contains colorjitter

    Why the argumentation transform of the orginal image contains colorjitter

    Hi, thanks for sharing your code. I have several questions about your design choice and looking forward to your reply.

    1. Data augmentation: I find the augmentation operation contains

    transforms.ColorJitter(0.4, 0.4, 0.4, 0.125) operation.

    Since the style information always includes the color, why you involve the ColorJitter operation and regard this transformation sample as the positive sample of the original image?
    Will that influence the final results?

    1. queue samples use the transformed image You use x_k = data[1]
 in def initialize_queue(model_k, device, train_loader, feat_size=128) This means you use a transformed image to extract style vector rather than the original image, why?

    Looking forward to your reply, thanks!

    opened by HelenMao 6
  • OOM of training summer2winter

    OOM of training summer2winter

    Hi ,

    I was trying to train summer2winter and utilize the command as below

    python main.py --gpu 0 --dataset summer2winter --output_k 2 --data_path '../data/ob_1001id_paired_images' --p_semi 0 --img_size 128 --batch_size 32
    

    I have encountered an issue relating to OOM and you can see the log as below.

    Traceback (most recent call last):
      File "main.py", line 524, in <module>
        main()
      File "main.py", line 201, in main
        main_worker(args.gpu, ngpus_per_node, args)
      File "main.py", line 305, in main_worker
        trainFunc(train_loader, networks, opts, epoch, args, {'logger': logger, 'queue': queue})
      File "/workspace/tunit/train/train_unsupervised.py", line 135, in trainGAN_UNSUP
        d_gp = args.w_gp * compute_grad_gp(d_real_logit, x_ref, is_patch=False)
      File "/workspace/tunit/tools/ops.py", line 16, in compute_grad_gp
        create_graph=True, retain_graph=True, only_inputs=True)[0]
      File "/usr/local/lib/python3.6/dist-packages/torch/autograd/__init__.py", line 158, in grad
        inputs, allow_unused)
    RuntimeError: CUDA out of memory. Tried to allocate 180.00 MiB
    

    Any suggestion for this ?? Thanks

    opened by jackytu256 6
  • I'm not sure why summer2winter CUDA out of memory.

    I'm not sure why summer2winter CUDA out of memory.

    Thank you for the awesome work.

    I am now learning custom data in an unsupervised way. But there was a problem. The cuda out of memory occurs the moment you move to epoch 69->70.

    'RuntimeError: CUDA out of memory. Tried to allocate 20.61 GiB (GPU 0; 23.65 GiB total capacity; 3.54 GiB already allocated; 17.74 GiB free; 1.55 GiB cached)'

    The command I executed is:'python main.py --gpu 0 --dataset summer2winter --output_k 2 --data_path'../data' --p_semi 0.0 --img_size 256 --batch_size 1 --ddp'

    Also, my gpu is TITAN RTX 1.

    Thanks for letting me know about this issue.

    opened by kimtaehyeong 6
  • pretarined food10 weights

    pretarined food10 weights

    Hello.

    Do you have any plan to upload other pre-trained weights of another setting that were used in your paper?

    Unless can you upload only trained food10 weights of which the number of domain is 10.

    Thanks.

    opened by sunwoo76 5
  • About Food-10 dataset settings

    About Food-10 dataset settings

    HI,sorry to bother you. But I have some questions when I try to reproduce the quantitive result in Food -10 dataset. I add the food-10 dataset in code and use the same settings as 'animal faces' dataset.

    When I run the code of 'animal faces'.I can get the best mFID:49.1 when paper gave the mFID as 47.7. But when I run the code of 'food-10'.I can get the best mFID:69.50 when paper gave the mFID as 52.2 I use pytorch 1.9.0. I think the difference mFID between animal faces is reasonable.But the 'food-10' is strange. So I am wondering that if you use different settings in 'food-10' dataset? Thanks

    opened by ZYJ-JMF 5
Releases(v0.1.0-alpha)
Owner
Clova AI Research
Open source repository of Clova AI Research, NAVER & LINE
Clova AI Research
Implementaion of our ACL 2022 paper Bridging the Data Gap between Training and Inference for Unsupervised Neural Machine Translation

Bridging the Data Gap between Training and Inference for Unsupervised Neural Machine Translation This is the implementaion of our paper: Bridging the

hezw.tkcw 20 Dec 12, 2022
A PyTorch implementation of paper "Learning Shared Semantic Space for Speech-to-Text Translation", ACL (Findings) 2021

Chimera: Learning Shared Semantic Space for Speech-to-Text Translation This is a Pytorch implementation for the "Chimera" paper Learning Shared Semant

Chi Han 43 Dec 28, 2022
A PyTorch implementation of paper "Learning Shared Semantic Space for Speech-to-Text Translation", ACL (Findings) 2021

Chimera: Learning Shared Semantic Space for Speech-to-Text Translation This is a Pytorch implementation for the "Chimera" paper Learning Shared Semant

Chi Han 43 Dec 28, 2022
Implementation of the Hybrid Perception Block and Dual-Pruned Self-Attention block from the ITTR paper for Image to Image Translation using Transformers

ITTR - Pytorch Implementation of the Hybrid Perception Block (HPB) and Dual-Pruned Self-Attention (DPSA) block from the ITTR paper for Image to Image

Phil Wang 17 Dec 23, 2022
PyTorch Implementation of "Non-Autoregressive Neural Machine Translation"

Non-Autoregressive Transformer Code release for Non-Autoregressive Neural Machine Translation by Jiatao Gu, James Bradbury, Caiming Xiong, Victor O.K.

Salesforce 261 Nov 12, 2022
PyTorch Implementation of "Bridging Pre-trained Language Models and Hand-crafted Features for Unsupervised POS Tagging" (Findings of ACL 2022)

Feature_CRF_AE Feature_CRF_AE provides a implementation of Bridging Pre-trained Language Models and Hand-crafted Features for Unsupervised POS Tagging

Jacob Zhou 6 Apr 29, 2022
Repository for Graph2Pix: A Graph-Based Image to Image Translation Framework

Graph2Pix: A Graph-Based Image to Image Translation Framework Installation Install the dependencies in env.yml $ conda env create -f env.yml $ conda a

null 18 Nov 17, 2022
[ICCV 2021] Instance-level Image Retrieval using Reranking Transformers

Instance-level Image Retrieval using Reranking Transformers Fuwen Tan, Jiangbo Yuan, Vicente Ordonez, ICCV 2021. Abstract Instance-level image retriev

UVA Computer Vision 86 Dec 28, 2022
[EMNLP 2021] LM-Critic: Language Models for Unsupervised Grammatical Error Correction

LM-Critic: Language Models for Unsupervised Grammatical Error Correction This repo provides the source code & data of our paper: LM-Critic: Language M

Michihiro Yasunaga 98 Nov 24, 2022
Open Source Neural Machine Translation in PyTorch

OpenNMT-py: Open-Source Neural Machine Translation OpenNMT-py is the PyTorch version of the OpenNMT project, an open-source (MIT) neural machine trans

OpenNMT 5.8k Jan 4, 2023
Open Source Neural Machine Translation in PyTorch

OpenNMT-py: Open-Source Neural Machine Translation OpenNMT-py is the PyTorch version of the OpenNMT project, an open-source (MIT) neural machine trans

OpenNMT 4.8k Feb 18, 2021
The implementation of Parameter Differentiation based Multilingual Neural Machine Translation

The implementation of Parameter Differentiation based Multilingual Neural Machin

Qian Wang 21 Dec 17, 2022
[ICCV 2021] Counterfactual Attention Learning for Fine-Grained Visual Categorization and Re-identification

Counterfactual Attention Learning Created by Yongming Rao*, Guangyi Chen*, Jiwen Lu, Jie Zhou This repository contains PyTorch implementation for ICCV

Yongming Rao 89 Dec 18, 2022
Easy to use, state-of-the-art Neural Machine Translation for 100+ languages

EasyNMT - Easy to use, state-of-the-art Neural Machine Translation This package provides easy to use, state-of-the-art machine translation for more th

Ubiquitous Knowledge Processing Lab 748 Jan 6, 2023
Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.

TextBlob: Simplified Text Processing Homepage: https://textblob.readthedocs.io/ TextBlob is a Python (2 and 3) library for processing textual data. It

Steven Loria 8.4k Dec 26, 2022
Sequence-to-sequence framework with a focus on Neural Machine Translation based on Apache MXNet

Sockeye This package contains the Sockeye project, an open-source sequence-to-sequence framework for Neural Machine Translation based on Apache MXNet

Amazon Web Services - Labs 1.1k Dec 27, 2022
An Analysis Toolkit for Natural Language Generation (Translation, Captioning, Summarization, etc.)

VizSeq is a Python toolkit for visual analysis on text generation tasks like machine translation, summarization, image captioning, speech translation

Facebook Research 409 Oct 28, 2022
Summarization, translation, sentiment-analysis, text-generation and more at blazing speed using a T5 version implemented in ONNX.

Summarization, translation, Q&A, text generation and more at blazing speed using a T5 version implemented in ONNX. This package is still in alpha stag

Abel 211 Dec 28, 2022
Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.

TextBlob: Simplified Text Processing Homepage: https://textblob.readthedocs.io/ TextBlob is a Python (2 and 3) library for processing textual data. It

Steven Loria 7.5k Feb 17, 2021