xiezhy6 / pasta-gan Goto Github PK
View Code? Open in Web Editor NEWOfficial code for NeurIPS 2021 paper "Towards Scalable Unpaired Virtual Try-On via Patch-Routed Spatially-Adaptive GAN"
Official code for NeurIPS 2021 paper "Towards Scalable Unpaired Virtual Try-On via Patch-Routed Spatially-Adaptive GAN"
Hi, Thanks for sharing your work. Will you plan to release the pretrained model?
FROM nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu18.04 as base
FROM base as base-amd64
FROM base-amd64
FROM pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install gcc -y
RUN pip3 install cython --use-feature=2020-resolver
RUN pip3 install torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html --use-feature=2020-resolver
RUN pip3 install scikit-build click requests tqdm pyspng ninja imageio-ffmpeg==0.4.3 --use-feature=2020-resolver
RUN pip3 install psutil scipy matplotlib opencv-python scikit-image pycocotools --use-feature=2020-resolver
RUN pip3 install pillow --use-feature=2020-resolver
RUN apt-get install openssh-server -y
RUN service ssh start
EXPOSE 22
Hi, Thanks for sharing your work,How long does it take to train to get a good model
some websites do not exist or have been moved, e.g. https://www.zalora.com.my/kasih-plus-size-fishtail-cotton-shirt-brown-1016119.html, can you provide your downloaded UPT dataset?
When I try to run the inference it gives the following error:
Loading networks from "data/network-snapshot-004000.pkl"...
Loading custom kernel...
Traceback (most recent call last):
File "test.py", line 159, in
generate_images() # pylint: disable=no-value-for-parameter
File "g:\c-vton\pfafn\lib\site-packages\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "g:\c-vton\pfafn\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "g:\c-vton\pfafn\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "g:\c-vton\pfafn\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "g:\c-vton\pfafn\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "test.py", line 93, in generate_images
G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
File "G:\c-vton\PASTA-GAN\legacy.py", line 21, in load_network_pkl
data = _LegacyUnpickler(f).load()
File "G:\c-vton\PASTA-GAN\torch_utils\persistence.py", line 191, in _reconstruct_persistent_obj
module = _src_to_module(meta.module_src)
File "G:\c-vton\PASTA-GAN\torch_utils\persistence.py", line 227, in _src_to_module
exec(src, module.dict) # pylint: disable=exec-used
File "", line 2243, in
NameError: name 'os' is not defined
Now os module is obviously installed and importable in python
Hi,
Thank you so much for your work. Is testing inference pipeline works without Cuda, run on cpu machine?
It seems this files only use for test dataset.
MPV and UPT dataset doesn't include that files.
Can you provide that ?
i use 'bash train.sh 1' to get a model, and 'bash test.sh 1' to inference. @xiezhy6
Traceback (most recent call last):
File "test.py", line 160, in
generate_images() # pylint: disable=no-value-for-parameter
File "/usr/local/miniconda3/lib/python3.8/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/local/miniconda3/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/miniconda3/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/miniconda3/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/miniconda3/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "test.py", line 122, in generate_images
gen_c, cat_feat_list = G.style_encoding(norm_img_c_tensor, retain_tensor)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/codes/PASTA-GAN-main/training/networks.py", line 4880, in forward
x = module(x)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/data1/codes/PASTA-GAN-main/training/networks.py", line 174, in forward
x = conv2d_resample.conv2d_resample(x=x, w=w.to(x.dtype), f=self.resample_filter, up=self.up, down=self.down, padding=self.padding, flip_weight=flip_weight)
File "/data1/codes/PASTA-GAN-main/torch_utils/misc.py", line 107, in decorator
return fn(*args, **kwargs)
File "/data1/codes/PASTA-GAN-main/torch_utils/ops/conv2d_resample.py", line 147, in conv2d_resample
return _conv2d_wrapper(x=x, w=w, padding=[py0,px0], groups=groups, flip_weight=flip_weight)
File "/data1/codes/PASTA-GAN-main/torch_utils/ops/conv2d_resample.py", line 54, in _conv2d_wrapper
return op(x, w, stride=stride, padding=padding, groups=groups)
File "/data1/codes/PASTA-GAN-main/torch_utils/ops/conv2d_gradfix.py", line 38, in conv2d
return torch.nn.functional.conv2d(input=input, weight=weight, bias=bias, stride=stride, padding=padding, dilation=dilation, groups=groups)
RuntimeError: Given groups=1, weight of size [64, 42, 1, 1], expected input[1, 60, 64, 64] to have 42 channels, but got 60 channels instead
First, thank you for sharing great works!
I downloaded the UPT dataset, and the folder structures are as follows:
I want to train PASTA-GAN with 256x192 UPT-dataset.
However, the class "UvitonDatasetFull(Dataset)" was not implemented to train the PASTA-GAN.
Specifically, (1) I found that the aforementioned class accessed to the following folder list:
['Zalando_256_192', 'Zalora_256_192', 'Deepfashion_256_192', 'MPV_256_192'].
Furthermore, (2) there were no folders named "train_img_vis" and "train_random_mask_acgpn" in the UPT_256_192 folder.
Would you have any plan to update the training codes?
Thank you.
like above
I have attempted to reproduce high levels of quality shown in your pretrained model through training on a substantively expanded dataset. However, I have encountered a number of divergences between your dedicated training and testing dataset classes (UvitonDatasetFull and UvitonDatasetV19_test). Notably, training dataset, network architecture and, consequently, all new models trained through the provided script use two arrays of normalized body part images (norm_img and norm_img_lower, with their corresponding shapes at 30x64x64 and 12x64x64) as style encoding inputs, while testing dataset and pretrained model use only one array of normalized body part images, concatenated with a normalized pose representation (norm_img and norm_pose or ‘stickman’, with shapes at 30x64x64 and 30x64x64).
My approach to resolving these differences so far was based on bringing the training dataset class into closer alignment with the testing dataset through modification of its normalize() function. After these dataset adjustments and slight changes to the training script to accommodate the new input flow, I was able to train a network model with style encoding input shape (norm_img and norm_pose) at 60x64x64, fully in line with the pretrained model. However, as attached images show, the resulting level of visual quality is far removed from yours, even at relatively advanced stages of training (8000-12000 iterations). Notably, shoulder area and general body shape experience unexpected deformations relative to the original pose, while use of full-body images as either person or garment causes severe distortion.
Given this disappointing outcome, would it be possible for you to provide some feedback to the general direction of my efforts? Is there something I might have overlooked in my attempts to bring two dataset classes in line? Were there any additional parameters in the training script that should have received more of my attention?
It seems this part is missing when training PASTA-GAN by using UPT dataset. Would you release these images or share the generation code of them? Thank you.
When i run test.py, the error is as following:
Anyone could run the test.py successfully?
module: <module '_imported_module_65d04ead8c1241548c4d30a4fe7a76b7'>
Loading custom kernel...
Traceback (most recent call last):
File "/data_superbig/znn/CODE/NIPS2021_PASTA_GAN/PASTA_GAN_main/test.py", line 162, in
generate_images() # pylint: disable=no-value-for-parameter
File "/data_superbig/znn/Anaconda3/envs/Try_On37/lib/python3.7/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/data_superbig/znn/Anaconda3/envs/Try_On37/lib/python3.7/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/data_superbig/znn/Anaconda3/envs/Try_On37/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/data_superbig/znn/Anaconda3/envs/Try_On37/lib/python3.7/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/data_superbig/znn/Anaconda3/envs/Try_On37/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/data_superbig/znn/CODE/NIPS2021_PASTA_GAN/PASTA_GAN_main/test.py", line 96, in generate_images
G = legacy.load_network_pkl(f)['G_ema'].to(device) # type: ignore
File "/data_superbig/znn/CODE/NIPS2021_PASTA_GAN/PASTA_GAN_main/legacy.py", line 21, in load_network_pkl
data = _LegacyUnpickler(f).load()
File "/data_superbig/znn/CODE/NIPS2021_PASTA_GAN/PASTA_GAN_main/torch_utils/persistence.py", line 191, in _reconstruct_persistent_obj
module = _src_to_module(meta.module_src)
File "/data_superbig/znn/CODE/NIPS2021_PASTA_GAN/PASTA_GAN_main/torch_utils/persistence.py", line 231, in _src_to_module
exec(src, module.dict) # pylint: disable=exec-used
File "", line 2243, in
NameError: name 'os' is not defined
Process finished with exit code 1
Like the paper, I want to test upper/lower garments
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.