Giter Site home page Giter Site logo

swapping-autoencoder-pytorch's Introduction

Swapping Autoencoder for Deep Image Manipulation

Taesung Park, Jun-Yan Zhu, Oliver Wang, Jingwan Lu, Eli Shechtman, Alexei A. Efros, Richard Zhang

UC Berkeley and Adobe Research

NeurIPS 2020

teaser

Overview

Swapping Autoencoder consists of autoencoding (top) and swapping (bottom) operation. Top: An encoder E embeds an input (Notre-Dame) into two codes. The structure code is a tensor with spatial dimensions; the texture code is a 2048-dimensional vector. Decoding with generator G should produce a realistic image (enforced by discriminator D matching the input (reconstruction loss). Bottom: Decoding with the texture code from a second image (Saint Basil's Cathedral) should look realistic (via D) and match the texture of the image, by training with a patch co-occurrence discriminator Dpatch that enforces the output and reference patches look indistinguishable.

Installation / Requirements

  • CUDA 10.1 or newer is required because it uses a custom CUDA kernel of StyleGAN2, ported by @rosinality
  • The author used PyTorch 1.7.1 on Python 3.6
  • Install dependencies with pip install dominate torchgeometry func-timeout tqdm matplotlib opencv_python lmdb numpy GPUtil Pillow scikit-learn visdom ninja

Testing and Evaluation.

We provide the pretrained models and also several images that reproduce the figures of the paper. Please download and unzip them here (2.1GB) (Note: this is a http (not https) address, and you may need to paste in the link URL directly in the address bar for some browsers like Chrome, or download the dataset using wget). The scripts assume that the checkpoints are at ./checkpoints/, and the test images at ./testphotos/, but they can be changed by modifying --checkpoints_dir and --dataroot options.

UPDATE: The pretrained model for the AFHQ dataset was added. Please download the models and samples images here (256MB) (Note: again, you may need to paste in the link URL directly in the address bar).

Swapping and Interpolation of the mountain model using sample images

To run simple swapping and interpolation, specify the two input reference images, change input_structure_image and input_texture_image fields of experiments/mountain_pretrained_launcher.py, and run

python -m experiments mountain_pretrained test simple_swapping
python -m experiments mountain_pretrained test simple_interpolation

The provided script, opt.tag("simple_swapping") and opt.tag("simple_interpolation") in particular of experiments/mountain_pretrained_launcher.py, invokes a terminal command that looks similar to the following one.

python test.py --evaluation_metrics simple_swapping \
--preprocess scale_shortside --load_size 512 \
--name mountain_pretrained  \
--input_structure_image [path_to_sample_image] \
--input_texture_image [path_to_sample_image] \
--texture_mix_alpha 0.0 0.25 0.5 0.75 1.0

In other words, feel free to use this command if that feels more straightforward.

The output images are saved at ./results/mountain_pretrained/simpleswapping/.

Texture Swapping

Our Swapping Autoencoder learns to disentangle texture from structure for image editing tasks such as texture swapping. Each row shows the result of combining the structure code of the leftmost image with the texture code of the top image.

To reproduce this image (Figure 4) as well as Figures 9 and 12 of the paper, run the following command:

# Reads options from ./experiments/church_pretrained_launcher.py
python -m experiments church_pretrained test swapping_grid

# Reads options from ./experiments/bedroom_pretrained_launcher.py
python -m experiments bedroom_pretrained test swapping_grid

# Reads options from ./experiments/mountain_pretrained_launcher.py
python -m experiments mountain_pretrained test swapping_grid

# Reads options from ./experiments/ffhq512_pretrained_launcher.py
python -m experiments ffhq512_pretrained test swapping_grid

Make sure the dataroot and checkpoints_dir paths are correctly set in the respective ./experiments/xx_pretrained_launcher.py script.

Quantitative Evaluations

To perform quantitative evaluation such as FID in Table 1, Fig 5, and Table 2, we first need to prepare image pairs of input structure and texture references images.

The reference images are randomly selected from the val set of LSUN, FFHQ, and the Waterfalls dataset. The pairs of input structure and texture images should be located at input_structure/ and input_style/ directory, with the same file name. For example, input_structure/001.png and input_style/001.png will be loaded together for swapping.

Replace the path to the test images at dataroot="./testphotos/church/fig5_tab2/" field of the script experiments/church_pretrained_launcher.py, and run

python -m experiments church_pretrained test swapping_for_eval
python -m experiments ffhq1024_pretrained test swapping_for_eval

The results can be viewed at ./results (that can be changed using --result_dir option).

The FID is then computed between the swapped images and the original structure images, using https://github.com/mseitzer/pytorch-fid.

Model Training.

Datasets

  • LSUN Church and Bedroom datasets can be downloaded here. Once downloaded and unzipped, the directories should contain [category]_[train/val]_lmdb/.
  • FFHQ datasets can be downloaded using this link. This is the zip file of 70,000 images at 1024x1024 resolution. Unzip the files, and we will load the image files directly.
  • The Flickr Mountains dataset and the Flickr Waterfall dataset are not sharable due to license issues. But the images were scraped from Mountains Anywhere and Waterfalls Around the World, using the Python wrapper for the Flickr API. Please contact Taesung Park with title "Flickr Dataset for Swapping Autoencoder" for more details.
  • AFHQ dataset can be downloaded here.

Training Scripts

The training configurations are specified using the scripts in experiments/*_launcher.py. Use the following commands to launch various trainings.

# Modify |dataroot| and |checkpoints_dir| at
# experiments/[church,bedroom,ffhq,mountain]_launcher.py
python -m experiments church train church_default
python -m experiments bedroom train bedroom_default
python -m experiments ffhq train ffhq512_default
python -m experiments ffhq train ffhq1024_default

# By default, the script uses GPUtil to look at available GPUs
# on the machine and sets appropriate GPU IDs. To specify specific set of GPUs,
# use the |--gpu| option. Be sure to also change |num_gpus| option in the corresponding script.
python -m experiments church train church_default --gpu 01234567

The training progress can be monitored using visdom at the port number specified by --display_port. The default is https://localhost:2004. For reference, the training takes 14 days on LSUN Church 256px, using 4 V100 GPUs.

Additionally, a few swapping grids are generated using random samples of the training set. They are saved as webpages at [checkpoints_dir]/[expr_name]/snapshots/. The frequency of the grid generation is controlled using --evaluation_freq.

All configurable parameters are printed at the beginning of training. These configurations are spreaded throughout the codes in def modify_commandline_options of relevant classes, such as models/swapping_autoencoder_model.py, util/iter_counter.py, or models/networks/encoder.py. To change these configuration, simply modify the corresponding option in opt.specify of the training script.

The code for parsing and configurations are at experiments/__init__.py, experiments/__main__.py, experiments/tmux_launcher.py.

Continuing training.

The training continues by default from the last checkpoint, because the --continue_train option is set True by default. To start from scratch, remove the checkpoint, or specify continue_train=False in the training script (e.g. experiments/church_launcher.py).

Code Structure (Main Functions)

  • models/swapping_autoencoder_model.py: The core file that defines losses, produces visuals.
  • optimizers/swapping_autoencoder_optimizer.py: Defines the optimizers and alternating training of GAN.
  • models/networks/: contains the model architectures generator.py, discriminator.py, encoder.py, patch_discrimiantor.py, stylegan2_layers.py.
  • options/__init__.py: contains basic option flags. BUT many important flags are spread out over files, such as swapping_autoencoder_model.py or generator.py. When the program starts, these options are all parsed together. The best way to check the used option list is to run the training script, and look at the console output of the configured options.
  • util/iter_counter.py: contains iteration counting.

Change Log

  • 4/14/2021: The configuration to train the pretrained model on the Mountains dataset had not been set correctly, and was updated accordingly.
  • 10/14/2021: The 256x256 pretrained model for the AFHQ dataset was added. Please use experiments/afhq_pretrained_launcher.py.

Bibtex

If you use this code for your research, please cite our paper:

@inproceedings{park2020swapping,
  title={Swapping Autoencoder for Deep Image Manipulation},
  author={Park, Taesung and Zhu, Jun-Yan and Wang, Oliver and Lu, Jingwan and Shechtman, Eli and Efros, Alexei A. and Zhang, Richard},
  booktitle={Advances in Neural Information Processing Systems},
  year={2020}
}

Acknowledgment

The StyleGAN2 layers heavily borrows (or rather, directly copies!) the PyTorch implementation of @rosinality. We thank Nicholas Kolkin for the helpful discussion on the automated content and style evaluation, Jeongo Seo and Yoseob Kim for advice on the user interface, and William T. Peebles, Tongzhou Wang, and Yu Sun for the discussion on disentanglement.

swapping-autoencoder-pytorch's People

Contributors

junyanz avatar taesungp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swapping-autoencoder-pytorch's Issues

Training issue

Thanks for the awesome work.
I have used church dataset to train the model on a single RTX2080ti with batchsize of 4 over 1,850,000 iterations. But the result still has many artifacts in some complex places. Whether this is because the batch size is too small or simply because the number of iterations is not enough.
0002
image

how to keep the structure and extract feature?

Your work is so amazing. When I use the interpolation in the texture code, it will change the structure of source picture slightly. In the mountain dataset, for example, we can see the obvious change of mountain`s structure. But in this amazing picture:

The structure of tree and land can be remained unchanged. I try to add a freqency domain loss to constrain the structure, but the results are still not so good. So may I ask you how to keep the structure well and how to extract the green summer feature, winter snow feature or some other features just like in the above picture?
thank you for your reply!

Driving scenes hyperparameters

Hi, amazing work.
I would be pretty interested in editing driving scenes, so highly unstructured scenarios, of resolution 512x256. I need strong pixel consistency, and I'm in general interested in modifying just global characteristics as the weather or the lighting conditions. Do you have any recommendations for the best hyperparameters in my case? Thanks in advance.

About Finetune

Hi,great work! I just finetuned the officially mountain checkpoints you provided,but there were many artifacts.So may I ask you about your train setting or some training details?

Python model translation in to torch.jit.trace model

Hello! I'm try to convert this Swapping GAN model in to C/C++ form using just in time compilation and i have some trouble.
I use this approach.
I try to compilate class BaseModel() from base_model.py and try to apply torch.jit.trace(model) translation, but in this model there are no standard forward method, as
for other models. Something like this:

      class MyRNNLoop(torch.nn.Module):
          def __init__(self):
              super(MyRNNLoop, self).__init__()
              self.cell = torch.jit.trace(MyCell(scripted_gate), (x, h))
      
          def forward(self, xs):
              h, y = torch.zeros(3, 4), torch.zeros(3, 4)
              for i in range(xs.size(0)):
                  y, h = self.cell(xs[i], h)
              return y, h
      
      rnn_loop = torch.jit.script(MyRNNLoop())
      print(rnn_loop.code)

traced_script_module = torch.jit.trace(BaseModel, example_inputs =imgCuda) # used GPU tensor

In base_model.py there is code:

 def forward(self, *args, command=None, **kwargs):
        """ wrapper for multigpu training. BaseModel is expected to be
        wrapped in nn.parallel.DataParallel, which distributes its call to
        the BaseModel instance on each GPU """
        if command is not None:
            method = getattr(self, command)
            assert callable(method), "[%s] is not a method of %s" % (command, type(self).__name__)
            return method(*args, **kwargs)
        else:
            raise ValueError(command)            

with prams like this: command=None,** kwargs

Any ideas, how can i use torch.jit.trace(model) method with directly conversion for swapping-autoencoder-pytorch
How can I use this method ( def forward(self, *args, command=None, **kwargs):) similar to typical models, to get traced model for C / C ++.
You can check standard approach for model tracing here:
https://pytorch.org/tutorials/advanced/cpp_export.html
Do you have non-gpu or more simple realization swapping-autoencoder-pytorch?

Texture Sticking Artifacts

I am seeing very impressive results when applying this to single images, but for videos it often produces "texture sticking" artifacts similar to those noted in Alias-Free GAN (StyleGAN3).

I am looking into porting the SG3 layers to substitute for SG2, but this seems like a non-trivial project. Do you have any suggestions for simpler ways to maybe mitigate this type of artifact?

Thanks!

The outputs are not correct.

Hello, I load the checkpoints and testphotos, and run the command
python -m experiments ffhq512_pretrained test swapping_grid
and get the output

WechatIMG148

The same as other commands. I didn't modified the code. Is there something wrong?

My environment:
python 3.7.3
pytorch 1.8.0

Dpatch

I was looking through the code and I can't find where the optimizer for the dpatch network is being created. I also don't see where the parameters are being updated for dpatch. Are you somehow combining the dpatch parameters with those of the discriminator network?

Questions regarding some design choices

Really impressive work and high-quality code release!
I found several intriguing design choices while digging into the codebase, and looking for some clarifications or explanations of them:

  1. Blur in the encoder
    The encoder architecture seems partially borrow the StyleGAN2 designs with blur operations in the conv layers (I suppose is for anti-aliasing). However, the blur operations also wipe out some of the high-frequency information, which should be crucial for detail reconstruction. Despite the high-frequency information is later infused with randomized noise injection in the decoder, it can never be a faithful reconstruction of the input. It seems to me that the reconstruction should be more important than anti-aliasing. Could you clarify a bit on this design choice?

  2. Randomized noises in the decoder
    Similar to 1., the randomized noises injection in the decoder has no information from the input image, thus it should negatively affect the reconstruction quality. It seems a bit counter-intuitive to me in terms of image reconstruction.

  3. I found you slightly tweaked the weight demodulation, which I suppose is for style fusion in the spatial dimension. Have you ablated the performance-wise (e.g., FID or reconstruction) differences caused by the modification? This was difficult in the original weight demodulation design, which forced us to derive a slower but equivalent fusion function in our InfinityGAN (Figure 20). Thus it would be a great change if such a modification in weight demodulation does not degrade the generator performance.

Sincerely sorry for the excessively long questions and looking forward to your answers!

Conv2d in stylegan2_layers.py

Hi, Thanks for sharing your code. Could I ask the reason that why you change the batch size to 1 and make the batch size as the number of groups in your ModulatedConv2d function? Repeating the weights will increase the memory request, can you let me know the advantage of doing that?

Does the algorithm work with providing texture images for swapping?

Hello! Congratulations for your very impressive work! I was wondering if the same results may be achieved in the case when we provide images of different kinds of textures that are not related to the original image? for example, in the swapping of building textures, both content and texture images are of buildings? what if the texture image is not of that of a building, but of a simple texture? Thanks a lot!

Possibility to run on Python > 3.6?

Hi, I find the work of this repo very interesting and I would like to try it, but the version of Python 3.6 referred to in the README is currently very outdated. Is it possible to run it on higher versions, such as 3.10 or 3.11? I have tried but I can't get it to work, has anyone tried it?

Region editing

Hi @taesungp , great project ! I have a question that in your paper and demo video you show that the model can change the region in the object using PCA collaborate with the mask user draw. Can you explain more detail. Thank you!

pretrained links

Hi,

The links for pretrained models are not working, can you update them?

Thanks

Mixed precision training?

I'm trying to add mixed precision training support. I'm newbie at this~
What I have figured out so far is the upfirdn2d & fused modules are compiled at runtime.

I figured out that the compiler is called by this line
which creates a build.ninja file like below:

cuda_cflags = -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\"
 -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/ceyda/.local/lib/python3.8/site-packages/torch/include -isystem /home/ceyda/.local/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem 
/home/ceyda/.local/lib/python3.8/site-packages/torch/include/TH -isystem /home/ceyda/.local/lib/python3.8/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /usr/include/python3.8
 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14

more importantly it adds these flags:

-D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__

which I'm assuming disables mixed precision for these modules (?not sure)
The question is how can I remove those flags& enable mixed precision?
Probably also need to upgrade to cuda 11?

Generator output

I just want to ask why there's no sigmoid or tanh in the output of the generator

I can't start the "python -m experiments mountain_pretrained test simple_swapping"

Hello I want to try the code and get the errors:

C:\Users\Nero\AppData\Local\Programs\Python\Python36\lib\runpy.py:125: RuntimeWarning: 'experiments.main' found in sys.modules after import of package 'experiments', but prior to execution of 'experiments.main'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
Traceback (most recent call last):
File "C:\Users\Nero\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Nero\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Nero\Desktop\autoencoder\swapping-autoencoder-pytorch-main\experiments_main
.py", line 96, in
gpu_id=opt.gpu_id)
File "C:\Users\Nero\Desktop\autoencoder\swapping-autoencoder-pytorch-main\experiments\tmux_launcher.py", line 174, in run_command
refined_command = self.refine_command(this_command, resume_iter, continue_train=continue_train, gpu_id=gpu_id)
File "C:\Users\Nero\Desktop\autoencoder\swapping-autoencoder-pytorch-main\experiments\tmux_launcher.py", line 137, in refine_command
raise ValueError("{} GPU(s) required for the command {} is not available".format(num_gpus, command))
ValueError: 1 GPU(s) required for the command python test.py --dataroot . --dataset_mode imagefolder --checkpoints_dir ./checkpoints/ --num_gpus 1 --batch_size 1 --preprocess scale_shortside --load_size 512 --crop_size 512 --name mountain_pretrained --lambda_patch_R1 10.0 --result_dir ./results/ --evaluation_metrics simple_swapping --input_structure_image ./testphotos/mountain/fig12/structure/AdobeStock_104191871.jpeg --input_texture_image ./testphotos/mountain/fig12/style/AdobeStock_312564332.jpeg --texture_mix_alpha 0.0 0.25 0.5 0.75 1.0 is not available

i install all required packages:

Package Version


certifi 2021.5.30
charset-normalizer 2.0.4
colorama 0.4.4
cycler 0.10.0
dataclasses 0.8
dominate 2.6.0
func-timeout 4.3.5
GPUtil 1.4.0
idna 3.2
importlib-metadata 4.6.3
joblib 1.0.1
jsonpatch 1.32
jsonpointer 2.1
kiwisolver 1.3.1
lmdb 1.2.1
matplotlib 3.3.4
ninja 1.10.2
numpy 1.19.5
opencv-python 4.5.3.56
Pillow 8.3.1
pip 21.2.2
plotter 1.3.19
pyparsing 2.4.7
python-dateutil 2.8.2
pyzmq 22.1.0
requests 2.26.0
scikit-learn 0.24.2
scipy 1.5.4
setuptools 40.6.2
six 1.16.0
threadpoolctl 2.2.0
tikzplotlib 0.9.9
torch 1.7.1+cu101
torchaudio 0.7.2
torchfile 0.1.0
torchgeometry 0.1.2
torchvision 0.8.2+cu101
tornado 6.1
tqdm 4.62.0
typing-extensions 3.10.0.0
urllib3 1.26.6
visdom 0.1.8.9
websocket-client 1.1.0
zipp 3.5.0

and cuda of course:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243

GTX 1050

Thank you for helping.

some details about the paper and project

Hi,it`s a amazing work!But there are some details i want to know.
In the paper:"A manipulation vector for snow is discovered by taking mean difference between 10 user-collected photos of snowy and summer mountain. The vector is simply added to the texture code of the input image (red) with some gain." and may I know more detail about the value of gain and how to get the Continuous interpolation from "winter“ to "summer"?

Question about the code

Thank you very much for the code! It's really great!

In the compute_generator_losses function, one can read:

if self.opt.lambda_PatchGAN > 0.0:
    real_feat = self.Dpatch.extract_features(
        self.get_random_crops(real),
        aggregate=self.opt.patch_use_aggregation).detach()
    mix_feat = self.Dpatch.extract_features(self.get_random_crops(mix))

    losses["G_mix"] = loss.gan_loss(
        self.Dpatch.discriminate_features(real_feat, mix_feat),
        should_be_classified_as_real=True,
    ) * self.opt.lambda_PatchGAN

and in the compute_patch_discriminator_losses function, one can read:

real_feat = self.Dpatch.extract_features(
            self.get_random_crops(real),
            aggregate=self.opt.patch_use_aggregation
        )
target_feat = self.Dpatch.extract_features(self.get_random_crops(real))
mix_feat = self.Dpatch.extract_features(self.get_random_crops(mix))
losses["PatchD_mix"] = loss.gan_loss(
    self.Dpatch.discriminate_features(real_feat, mix_feat),
    should_be_classified_as_real=False,
) * self.opt.lambda_PatchGAN

Why is should_be_classified_as_real set to True for G_mix and not for PatchD_mix?

When it comes to patches, shouldn't the gan_loss receive True when patches come from images with the same texture and False when they come from images with different textures?

some questions about 1024 resolution

Hi, great work!
But I have some questions about 1024 resolution. In the paper:
image
could you provide the detail about the implemention of smaller network capacity?
image
And In Appendix B B.3 Datasets: the model is initially trained at 512 x 512 resolution,and finetuned at 1024 resolution. Is the model with smaller network capacity?

error in stylegan2_layers.py

Hello,Thank you for your work.I hope others can notice that when you want dim>2, please make corresponding modifications
style = self.modulation(style) if self.demodulate: style = style * torch.rsqrt(style.pow(2).mean([1], keepdim=True) + 1e-8)

reflection padding

Thanks for your awesome work. I have a little question about the paper. In the paper mentioned:
"To prevent the texture code from encoding positional information, we apply reflection padding for the residual blocks, and then no padding for the conv blocks. ". Hope you will explain.

structure not being retained

hi @taesungp great piece of work, I trained it on my dataset of 50k images for 50 Mil iterations as you suggested, on testing time the results are quite impressive but in some cases, the structure is not being correctly reconstructed, I would like that the shapes be generated almost the same(full swapping). What can be the problem will training further help?
image

Training time on FFHQ

Thanks for sharing your awesome work. I'm trying to reproduce the results of FFHQ and I want to know how long it takes to train the pretrained models of FFHQ.
Thanks~

Training freezes at the same iteration with no error

Hi! I'm trying to run your code on the Church dataset with the command:

python -m experiments church train church_default with batch_size=16, num_gpus=4

The training freezes at the 888000-th iteration with the following message:

(iters: 888000, data: 0.000, train: 0.050, maintenance: 0.000) D_R1: 0.089 D_mix: 0.292 D_real: 0.597 D_rec: 0.290 D_total: 2.495 G_GAN_mix: 0.934 G_GAN_rec: 0.467 G_L1: 0.211 G_mix: 0.805 L1_dist: 0.211 PatchD_mix: 0.652 PatchD_real: 0.659

Training doesn’t go further after this iteration and just freezes with no error. I’ve also tried to run training on the Bedrooms dataset with batch_size=32, num_gpus=8. In addition, I’ve tried to run training in the single gpu setup on both datasets. In all cases the 888000-th number of «freezing» iteration and behavior were the same. Checkpoints and shapshots aren’t saved after this iteration as well. This justifies that the script doesn’t continue training.

What could be the possible reason for such behavior?
Thank you in advance.

Train own data set

Hello, thank you very much for your work, which has inspired me a lot. I would like to train my own data set based on your model training, but I don’t know much about some files in the data. If I If I want to train my own data set, should I copy cifar100_dataset.py or follow the way of unaligned.py? Also, the entry point for training is experiments, but I haven’t found any experiments package calling data package. What is going on, I hope I can answer it, thank you very much

Interactive UI

Hi,

This is really inspiring work!

Do you have any plans to publish the interactive UI?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.