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
A very simple framework for state-of-the-art Natural Language Processing (NLP)

A very simple framework for state-of-the-art NLP. Developed by Humboldt University of Berlin and friends. Flair is: A powerful NLP library. Flair allo

flair 12.3k Jan 02, 2023
voice2json is a collection of command-line tools for offline speech/intent recognition on Linux

Command-line tools for speech and intent recognition on Linux

Michael Hansen 988 Jan 04, 2023
[Preprint] Escaping the Big Data Paradigm with Compact Transformers, 2021

Compact Transformers Preprint Link: Escaping the Big Data Paradigm with Compact Transformers By Ali Hassani[1]*, Steven Walton[1]*, Nikhil Shah[1], Ab

SHI Lab 367 Dec 31, 2022
Anomaly Detection 이상치 탐지 전처리 모듈

Anomaly Detection 시계열 데이터에 대한 이상치 탐지 1. Kernel Density Estimation을 활용한 이상치 탐지 train_data_path와 test_data_path에 존재하는 시점 정보를 포함하고 있는 csv 형태의 train data와

CLUST-consortium 43 Nov 28, 2022
Espial is an engine for automated organization and discovery of personal knowledge

Live Demo (currently not running, on it) Espial is an engine for automated organization and discovery in knowledge bases. It can be adapted to run wit

Uzay-G 159 Dec 30, 2022
A Flask Sentiment Analysis API, with visual implementation

The Sentiment Analysis Api was created using python flask module,it allows users to parse a text or sentence throught the (?text) arguement, then view the sentiment analysis of that sentence. It can

Ifechukwudeni Oweh 10 Jul 17, 2022
The training code for the 4th place model at MDX 2021 leaderboard A.

The training code for the 4th place model at MDX 2021 leaderboard A.

Chin-Yun Yu 32 Dec 18, 2022
Official code for "Parser-Free Virtual Try-on via Distilling Appearance Flows", CVPR 2021

Parser-Free Virtual Try-on via Distilling Appearance Flows, CVPR 2021 Official code for CVPR 2021 paper 'Parser-Free Virtual Try-on via Distilling App

395 Jan 03, 2023
NLP-Project - Used an API to scrape 2000 reddit posts, then used NLP analysis and created a classification model to mixed succcess

Project 3: Web APIs & NLP Problem Statement How do r/Libertarian and r/Neoliberal differ on Biden post-inaguration? The goal of the project is to see

Adam Muhammad Klesc 2 Mar 29, 2022
CMeEE 数据集医学实体抽取

医学实体抽取_GlobalPointer_torch 介绍 思想来自于苏神 GlobalPointer,原始版本是基于keras实现的,模型结构实现参考现有 pytorch 复现代码【感谢!】,基于torch百分百复现苏神原始效果。 数据集 中文医学命名实体数据集 点这里申请,很简单,共包含九类医学

85 Dec 28, 2022
Idea is to build a model which will take keywords as inputs and generate sentences as outputs.

keytotext Idea is to build a model which will take keywords as inputs and generate sentences as outputs. Potential use case can include: Marketing Sea

Gagan Bhatia 364 Jan 03, 2023
Machine translation models released by the Gourmet project

Gourmet Models Overview The Gourmet project has released several machine translation models to translate low-resource languages. This repository conta

Edinburgh NLP 5 Dec 08, 2021
A Telegram bot to add notes to Flomo.

flomo bot 使用 Telegram 机器人发送笔记到你的 Flomo. 你需要有一台可访问 Telegram 的服务器。 Steps @BotFather 新建机器人,获取 token Flomo 官网获取 API,链接 https://flomoapp.com/mine?source=in

Zhen 44 Dec 30, 2022
PyTorch implementation of NATSpeech: A Non-Autoregressive Text-to-Speech Framework

A Non-Autoregressive Text-to-Speech (NAR-TTS) framework, including official PyTorch implementation of PortaSpeech (NeurIPS 2021) and DiffSpeech (AAAI 2022)

760 Jan 03, 2023
Code for text augmentation method leveraging large-scale language models

HyperMix Code for our paper GPT3Mix and conducting classification experiments using GPT-3 prompt-based data augmentation. Getting Started Installing P

NAVER AI 47 Dec 20, 2022
Transformers4Rec is a flexible and efficient library for sequential and session-based recommendation, available for both PyTorch and Tensorflow.

Transformers4Rec is a flexible and efficient library for sequential and session-based recommendation, available for both PyTorch and Tensorflow.

730 Jan 09, 2023
Semantic search through a vectorized Wikipedia (SentenceBERT) with the Weaviate vector search engine

Semantic search through Wikipedia with the Weaviate vector search engine Weaviate is an open source vector search engine with build-in vectorization a

SeMI Technologies 191 Dec 26, 2022
pkuseg多领域中文分词工具; The pkuseg toolkit for multi-domain Chinese word segmentation

pkuseg:一个多领域中文分词工具包 (English Version) pkuseg 是基于论文[Luo et. al, 2019]的工具包。其简单易用,支持细分领域分词,有效提升了分词准确度。 目录 主要亮点 编译和安装 各类分词工具包的性能对比 使用方式 论文引用 作者 常见问题及解答 主要

LancoPKU 6k Dec 29, 2022
NLP tool to extract emotional phrase from tweets 🤩

Emotional phrase extractor Extract phrase in the given text that is used to express the sentiment. Capturing sentiment in language is important in the

Shahul ES 38 Oct 17, 2022
Blazing fast language detection using fastText model

Luga A blazing fast language detection using fastText's language models Luga is a Swahili word for language. fastText provides a blazing fast language

Prayson Wilfred Daniel 18 Dec 20, 2022