sagiebenaim / oneshottranslation Goto Github PK
View Code? Open in Web Editor NEWPytorch implementation of "One-Shot Unsupervised Cross Domain Translation" NIPS 2018
License: Other
Pytorch implementation of "One-Shot Unsupervised Cross Domain Translation" NIPS 2018
License: Other
hello,
I went through implementation of meta learning, where they compute second order derivative, I saw a paper where they combined meta learning with gans to achieve good results on one shot image generation, they generated different facial expressions from one image.
does meta learning apply to this repository also?
thanks
Hi very interesting work!
I would like to clarify one point on the model generalization. Does the trained model only work on the training example x from domain A or could it be tested on any images in A?
E:\Users\Raytine\Anaconda3\python.exe F:/zhaiyao/OneShotTranslation-master/drawing_and_style_transfer/ptest.py --dataroot=./datasets/facades/ --name=facades_ost --model=ost --no_dropout --n_downsampling=2 --num_unshared=2 --start=0 --max_items_A=1
------------ Options -------------
A: A
B: B
aspect_ratio: 1.0
batchSize: 1
checkpoints_dir: ./checkpoints
dataroot: ./datasets/facades/
dataset_mode: unaligned
display_id: 1
display_port: 8097
display_server: http://localhost
display_winsize: 256
fineSize: 256
gpu_ids: [0]
how_many: 50
init_type: normal
input_nc: 3
isTrain: False
loadSize: 286
load_dir: ./checkpoints
max_items_A: 1
max_items_B: -1
model: ost
nThreads: 2
n_downsampling: 2
n_layers_D: 3
name: facades_ost
ndf: 64
ngf: 64
no_dropout: True
no_flip_and_rotation: False
norm: instance
ntest: inf
num_res_blocks_shared: 6
num_res_blocks_unshared: 0
num_unshared: 2
output_nc: 3
phase: train
resize_or_crop: resize_and_crop
results_dir: ./results/
rotation_degree: 7
serial_batches: False
start: 0
which_direction: AtoB
which_epoch: latest
which_model_netD: basic
which_model_netG: resnet_9blocks
-------------- End ----------------
CustomDatasetDataLoader
dataset [UnalignedDataset] was created
ost
E:\Users\Raytine\Anaconda3\lib\site-packages\torchvision\transforms\transforms.py:188: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
initialization method [normal]
initialization method [normal]
F:\zhaiyao\OneShotTranslation-master\drawing_and_style_transfer\models\networks.py:22: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(m.weight.data, 0.0, 0.02)
initialization method [normal]
initialization method [normal]
initialization method [normal]
initialization method [normal]
Traceback (most recent call last):
File "F:/zhaiyao/OneShotTranslation-master/drawing_and_style_transfer/ptest.py", line 24, in
model = create_model(opt)
File "F:\zhaiyao\OneShotTranslation-master\drawing_and_style_transfer\models_init_.py", line 17, in create_model
model.initialize(opt)
File "F:\zhaiyao\OneShotTranslation-master\drawing_and_style_transfer\models\ost.py", line 89, in initialize
self.load_network(self.netEnc_a, 'Enc_a', which_epoch)
File "F:\zhaiyao\OneShotTranslation-master\drawing_and_style_transfer\models\base_model.py", line 54, in load_network
network.load_state_dict(torch.load(save_path))
File "E:\Users\Raytine\Anaconda3\lib\site-packages\torch\serialization.py", line 356, in load
f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: './checkpoints\./checkpoints\latest_net_Enc_a.pth'
The readme instructions give parameters for the dataset locations (e.g) --dataroot=./datasets/facades/trainB but folder ./datasets does not exist. Could you add it, or provide instructions on how to set it up?
Hi, thanks for your wonderful work.
In your code, you directly use 'mu_2 = torch.pow(mu, 2)' to compute the KL loss between encoded feature and N(0, 1).
However, in traditional, we first compute 'mu' and 'logvar' by the encoder, and compute the KL loss by 'KL = -0.5 * torch.sum(1 + logvar - mu.pow(2) - logvar.exp())'.
Can you explain the difference between these two ways for computing the KL loss?
Thank you very much!
Hi, I have been working on another image translation task and I am interested in the metrics in your paper: perceptual distance & style distance. Can you provide some details about the evaluation? Cause if I use the popular vgg16 model on github, then the input will be in range [0, 255], so the style distance will be around 10k -20k, I am wandering did you use a customized vgg whose input is in range [0, 1] so that the distance could be around 1-10?
Thanks
test.py --dataroot=./datasets/facades/ --name=facades_ost --model=ost --load_dir=facades_ost --no_dropout --n_downsampling=2 --num_unshared=2 --start=0 --max_items_A=12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.