Unbalanced Feature Transport for Exemplar-based Image Translation (CVPR 2021)

Related tags

Deep Learning UNITE
Overview

UNITE and UNITE+

Unbalanced Feature Transport for Exemplar-based Image Translation (CVPR 2021)
Unbalanced Intrinsic Feature Transport for Exemplar-based Image Translation (Extension)

Pre-trained Models

Pre-trained models will be released soon with the extended version.

Citation

If you use this code for your research, please cite our papers.

@inproceedings{zhan2021unite,
  title={Unbalanced Feature Transport for Exemplar-based Image Translation},
  author={Zhan, Fangneng and Yu, Yingchen and Cui, Kaiwen and Zhang, Gongjie and Lu, Shijian and Pan, Jianxiong and Zhang, Changgong and Ma, Feiying and Xie, Xuansong and Miao, Chunyan},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year={2021}
}
Comments
  • Question about the implementation of log_sinkhorn function

    Question about the implementation of log_sinkhorn function

    Thanks for sharing such a great work and releasing the codes.

    I have a question about the implementation of log_sinkhorn function in sinkhorn.py. Is it should be v = eps * (a + min_eps(u, v, dim=1)) + v instead of v = eps * min_eps(u, v, dim=1) + v in Line 57?

    It would be better if you can give a link to the official implementation for this part.

    Thanks.

    opened by XiaoqiangZhou 4
  • Pretrained Model

    Pretrained Model

    Hi,

    Thank you for your impressive work. It seems that there is something wrong with the link of pre-trained models. Could you please share them again? Thanks for your efforts a lot.

    opened by Huage001 2
  • 关于MCL-Net warp阶段生成尺寸问题

    关于MCL-Net warp阶段生成尺寸问题

    您好!最近拜读了MCL-Net这篇文章,有两处疑问: 1、文中Correspondence尺寸是64X64,请问是通过对比学习中seg和real_img二者采样的64个patch来计算的么?还是二者encoder的特征经过下采样来计算呢? 2、请问warp阶段生成的图像尺寸是多少?如果与Correspondence尺寸对应的话,warp应该是3X8X8吗?如果是这样,那么参考图像的尺寸应该从256X256到8X8,这是直接通过下采样实现吗?

    期待您的回复,谢谢您!

    opened by venture990309 0
  • Training is very slow, is that normal?

    Training is very slow, is that normal?

    Hi! I'm training UNITE using 4 3090 GPUs with the following settings: python3 train.py
    --name test
    --dataset_mode my_custom
    --dataroot 'train/'
    --correspondence 'ot'
    --display_freq 500
    --niter 25
    --niter_decay 25
    --maskmix
    --use_attention
    --warp_mask_losstype direct
    --weight_mask 100.0
    --PONO
    --PONO_C
    --use_coordconv
    --adaptor_nonlocal
    --ctx_w 1.0
    --gpu_ids 0,1,2,3
    --batchSize 8
    --label_nc 29
    --ndf 64
    --ngf 64
    --mcl
    --nce_w 1.0
    Yet it seems that the speed is extremely slow, when I print some message each iter like this: for i, data_i in enumerate(dataloader, start=iter_counter.epoch_iter): print("iter", I) And it turns out that each iteration takes about 3 seconds, which maybe abnormally slow. I have trained CoCosNetv1 with 16 batch_size, and it performs well. Maybe I doing something wrong? Could you give me some advice? Thanks!

    opened by 22TonyFStark 0
  • FID score

    FID score

    Do you calculate fid score by comparing the training set and the generated images ? I cannot reproduce the same fid in the paper. And which fid git repo you choose to evaluate the results.

    opened by mlyarthur 11
  • Problems with replication on the ADE20K dataset

    Problems with replication on the ADE20K dataset

    Hello I am trying to reproduce UNITE on the ADE20K dataset, but after training up to about 3 epochs, the learned correspondences start to converge to constant. May I ask if this is as expected? Will it learn the correct correspondence if I continue training? And how many epochs do I need to train?

    opened by zyq-lucky 1
  • 512 input size error occurs

    512 input size error occurs

    Hi, I am thankful for being shared your code. I succeed in executing code with custom dataset. but, when I use large input size(from 256 to 512), I get this error

    File "UNITE\models\networks\correspondence.py", line 312, in forward y1 = torch.matmul(f_div_C, ref_) RuntimeError: batch1 dim 2 must match batch2 dim 1

    f_div_C size is doubled for width and height. if I change the tensor size, then next code makes error due to size unmatched.

    I use loadsize=512 crop_size=512 label_nc = 2

    please help me.

    thank you.

    opened by peterkim333 2
  • About data inputs

    About data inputs

    Hi @fnzhan !

    Thank you for providing your nice implementation.

    I have a question about inputs for networks, especially for a celeba edge case.

    Correspondence predictor is given RGB images and seg_map (https://github.com/fnzhan/UNITE/blob/main/models/networks/correspondence.py#L200).

    Celeb segmaps (15 channel) are created via a get_label_tensor function(https://github.com/fnzhan/UNITE/blob/main/data/celebahqedge_dataset.py#L77). It seems that celeba segmaps include not only an edge but also distanceTransformed images.

    Why did you use additional information such as semantic maps? Do your work not work well for a dataset having no additional labels e.g. AFHQ -- animal face dataset?

    Thanks.

    opened by UdonDa 2
  • Queries

    Queries

    @fnzhan hi thanks for open-sourcing the code base , its really great work i have few queries

    1. can we train the code for other semantic datasets like bdd100k / cityscapes? if so what changes have to be made
    2. can we train the code for custom fashion dataset for region wise dressing ? if so what is the procedure

    Thanks in advance

    opened by abhigoku10 1
  • 关于论文中UOT的问题

    关于论文中UOT的问题

    您好,我仔细阅读你的论文后有两个疑问:1. 论文中Figure2处,是把 原始特征X 向Z传输对齐后的特征X_new 继续输出进绿色网络吗?还是说依然把X输入绿色网络。我暂时没有在论文中找到这个问题的解释。 2. 如果是把对齐后的特征X_new输入进绿色网络,那么请问是怎么得到的X_new的呢?我理解的UOT是可以得到transport plan T 和 distance,但是还不清楚怎么得到映射后的特征,求解答?十分感谢

    opened by mr6737 4
Owner
Fangneng Zhan
Computer Vision, Deep Learning.
Fangneng Zhan
Transport Mode detection - can detect the mode of transport with the help of features such as acceeration,jerk etc

title emoji colorFrom colorTo sdk app_file pinned Transport_Mode_Detector ?? purple yellow gradio app.py false Configuration title: string Display tit

Nishant Rajadhyaksha 3 Jan 16, 2022
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".

Deep Exemplar-based Video Colorization (Pytorch Implementation) Paper | Pretrained Model | Youtube video ?? | Colab demo Deep Exemplar-based Video Col

Bo Zhang 253 Dec 27, 2022
[ACM MM 2021] Yes, "Attention is All You Need", for Exemplar based Colorization

Transformer for Image Colorization This is an implemention for Yes, "Attention Is All You Need", for Exemplar based Colorization, and the current soft

Wang Yin 30 Dec 7, 2022
CPT: A Pre-Trained Unbalanced Transformer for Both Chinese Language Understanding and Generation

CPT This repository contains code and checkpoints for CPT. CPT: A Pre-Trained Unbalanced Transformer for Both Chinese Language Understanding and Gener

fastNLP 341 Dec 29, 2022
Code for paper "Vocabulary Learning via Optimal Transport for Neural Machine Translation"

**Codebase and data are uploaded in progress. ** VOLT(-py) is a vocabulary learning codebase that allows researchers and developers to automaticaly ge

null 416 Jan 9, 2023
Official code for paper Exemplar Based 3D Portrait Stylization.

3D-Portrait-Stylization This is the official code for the paper "Exemplar Based 3D Portrait Stylization". You can check the paper on our project websi

null 60 Dec 7, 2022
Pytorch Implementation of "Contrastive Representation Learning for Exemplar-Guided Paraphrase Generation"

CRL_EGPG Pytorch Implementation of Contrastive Representation Learning for Exemplar-Guided Paraphrase Generation We use contrastive loss implemented b

YHR 25 Nov 14, 2022
CVPR 2021: "The Spatially-Correlative Loss for Various Image Translation Tasks"

Spatially-Correlative Loss arXiv | website We provide the Pytorch implementation of "The Spatially-Correlative Loss for Various Image Translation Task

Chuanxia Zheng 89 Jan 4, 2023
Spatially-Adaptive Pixelwise Networks for Fast Image Translation, CVPR 2021

Image Translation with ASAPNets Spatially-Adaptive Pixelwise Networks for Fast Image Translation, CVPR 2021 Webpage | Paper | Video Installation insta

Tamar Rott Shaham 100 Dec 28, 2022
This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models are Pix2Pix, Pix2PixHD, CycleGAN and PointWise.

RGB2NIR_Experimental This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models

null 5 Jan 4, 2023
Code for Dual Contrastive Learning for Unsupervised Image-to-Image Translation, NTIRE, CVPRW 2021.

arXiv Dual Contrastive Learning Adversarial Generative Networks (DCLGAN) We provide our PyTorch implementation of DCLGAN, which is a simple yet powerf

null 119 Dec 4, 2022
git git《Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking》(CVPR 2021) GitHub:git2] 《Masksembles for Uncertainty Estimation》(CVPR 2021) GitHub:git3]

Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking Ning Wang, Wengang Zhou, Jie Wang, and Houqiang Li Accepted by CVPR

NingWang 236 Dec 22, 2022
Back to the Feature: Learning Robust Camera Localization from Pixels to Pose (CVPR 2021)

Back to the Feature with PixLoc We introduce PixLoc, a neural network for end-to-end learning of camera localization from an image and a 3D model via

Computer Vision and Geometry Lab 610 Jan 5, 2023
Official implementation for (Refine Myself by Teaching Myself : Feature Refinement via Self-Knowledge Distillation, CVPR-2021)

FRSKD Official implementation for Refine Myself by Teaching Myself : Feature Refinement via Self-Knowledge Distillation (CVPR-2021) Requirements Pytho

null 75 Dec 28, 2022
Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021

LoFTR: Detector-Free Local Feature Matching with Transformers Project Page | Paper LoFTR: Detector-Free Local Feature Matching with Transformers Jiami

ZJU3DV 1.4k Jan 4, 2023
Code for the CVPR 2021 paper: Understanding Failures of Deep Networks via Robust Feature Extraction

Welcome to Barlow Barlow is a tool for identifying the failure modes for a given neural network. To achieve this, Barlow first creates a group of imag

Sahil Singla 33 Dec 5, 2022
Tensorflow implementation of the paper "HumanGPS: Geodesic PreServing Feature for Dense Human Correspondences", CVPR 2021.

HumanGPS: Geodesic PreServing Feature for Dense Human Correspondences Tensorflow implementation of the paper "HumanGPS: Geodesic PreServing Feature fo

Google Interns 50 Dec 21, 2022
LoFTR:Detector-Free Local Feature Matching with Transformers CVPR 2021

LoFTR-with-train-script LoFTR:Detector-Free Local Feature Matching with Transformers CVPR 2021 (with train script --- unofficial ---). About Megadepth

Nan Xiaohu 15 Nov 4, 2022