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

Related tags

Text Data & NLPtunit
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
Segmenter - Transformer for Semantic Segmentation

Segmenter - Transformer for Semantic Segmentation

592 Dec 27, 2022
Official PyTorch implementation of Time-aware Large Kernel (TaLK) Convolutions (ICML 2020)

Time-aware Large Kernel (TaLK) Convolutions (Lioutas et al., 2020) This repository contains the source code, pre-trained models, as well as instructio

Vasileios Lioutas 28 Dec 07, 2022
An open collection of annotated voices in Japanese language

声庭 (Koniwa): オープンな日本語音声とアノテーションのコレクション Koniwa (声庭): An open collection of annotated voices in Japanese language 概要 Koniwa(声庭)は利用・修正・再配布が自由でオープンな音声とアノテ

Koniwa project 32 Dec 14, 2022
Multilingual Emotion classification using BERT (fine-tuning). Published at the WASSA workshop (ACL2022).

XLM-EMO: Multilingual Emotion Prediction in Social Media Text Abstract Detecting emotion in text allows social and computational scientists to study h

MilaNLP 35 Sep 17, 2022
fastai ulmfit - Pretraining the Language Model, Fine-Tuning and training a Classifier

fast.ai ULMFiT with SentencePiece from pretraining to deployment Motivation: Why even bother with a non-BERT / Transformer language model? Short answe

Florian Leuerer 26 May 27, 2022
BROS: A Pre-trained Language Model Focusing on Text and Layout for Better Key Information Extraction from Documents

BROS (BERT Relying On Spatiality) is a pre-trained language model focusing on text and layout for better key information extraction from documents. Given the OCR results of the document image, which

Clova AI Research 94 Dec 30, 2022
Download videos from YouTube/Twitch/Twitter right in the Windows Explorer, without installing any shady shareware apps

youtube-dl and ffmpeg Windows Explorer Integration Download videos from YouTube/Twitch/Twitter and more (any platform that is supported by youtube-dl)

Wolfgang 226 Dec 30, 2022
The model is designed to train a single and large neural network in order to predict correct translation by reading the given sentence.

Neural Machine Translation communication system The model is basically direct to convert one source language to another targeted language using encode

Nishant Banjade 7 Sep 22, 2022
Unsupervised Language Model Pre-training for French

FlauBERT and FLUE FlauBERT is a French BERT trained on a very large and heterogeneous French corpus. Models of different sizes are trained using the n

GETALP 212 Dec 10, 2022
Code for the paper "Are Sixteen Heads Really Better than One?"

Are Sixteen Heads Really Better than One? This repository contains code to reproduce the experiments in our paper Are Sixteen Heads Really Better than

Paul Michel 143 Dec 14, 2022
Python library to make development of portfolio analysis faster and easier

Trafalgar Python library to make development of portfolio analysis faster and easier Installation 🔥 For the moment, Trafalgar is still in beta develo

Santosh Passoubady 641 Jan 01, 2023
The (extremely) naive sentiment classification function based on NBSVM trained on wisesight_sentiment

thai_sentiment The naive sentiment classification function based on NBSVM trained on wisesight_sentiment วิธีติดตั้ง pip install thai_sentiment==0.1.3

Charin 7 Dec 08, 2022
String Gen + Word Checker

Creates random strings and checks if any of them are a real words. Mostly a waste of time ngl but it is cool to see it work and the fact that it can generate a real random word within10sec

1 Jan 06, 2022
hashily is a Python module that provides a variety of text decoding and encoding operations.

hashily is a python module that performs a variety of text decoding and encoding functions. It also various functions for encrypting and decrypting text using various ciphers.

DevMysT 5 Jul 17, 2022
Sequence Modeling with Structured State Spaces

Structured State Spaces for Sequence Modeling This repository provides implementations and experiments for the following papers. S4 Efficiently Modeli

HazyResearch 902 Jan 06, 2023
100+ Chinese Word Vectors 上百种预训练中文词向量

Chinese Word Vectors 中文词向量 中文 This project provides 100+ Chinese Word Vectors (embeddings) trained with different representations (dense and sparse),

embedding 10.4k Jan 09, 2023
Snips Python library to extract meaning from text

Snips NLU Snips NLU (Natural Language Understanding) is a Python library that allows to extract structured information from sentences written in natur

Snips 3.7k Dec 30, 2022
GPT-2 Model for Leetcode Questions in python

Leetcode using AI 🤖 GPT-2 Model for Leetcode Questions in python New demo here: https://huggingface.co/spaces/gagan3012/project-code-py Note: the Ans

Gagan Bhatia 100 Dec 12, 2022
Exploring dimension-reduced embeddings

sleepwalk Exploring dimension-reduced embeddings This is the code repository. See here for the Sleepwalk web page. License and disclaimer This program

S. Anders's research group at ZMBH 91 Nov 29, 2022
EdiTTS: Score-based Editing for Controllable Text-to-Speech

Official implementation of EdiTTS: Score-based Editing for Controllable Text-to-Speech

Neosapience 99 Jan 02, 2023