Unofficial pytorch implementation of 'Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization'

Overview

pytorch-AdaIN

This is an unofficial pytorch implementation of a paper, Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization [Huang+, ICCV2017]. I'm really grateful to the original implementation in Torch by the authors, which is very useful.

Results

Requirements

Please install requirements by pip install -r requirements.txt

  • Python 3.5+
  • PyTorch 0.4+
  • TorchVision
  • Pillow

(optional, for training)

  • tqdm
  • TensorboardX

Usage

Download models

Download decoder.pth/vgg_normalized.pth and put them under models/.

Test

Use --content and --style to provide the respective path to the content and style image.

CUDA_VISIBLE_DEVICES=
   
     python test.py --content input/content/cornell.jpg --style input/style/woman_with_hat_matisse.jpg

   

You can also run the code on directories of content and style images using --content_dir and --style_dir. It will save every possible combination of content and styles to the output directory.

CUDA_VISIBLE_DEVICES=
   
     python test.py --content_dir input/content --style_dir input/style

   

This is an example of mixing four styles by specifying --style and --style_interpolation_weights option.

CUDA_VISIBLE_DEVICES=
   
     python test.py --content input/content/avril.jpg --style input/style/picasso_self_portrait.jpg,input/style/impronte_d_artista.jpg,input/style/trial.jpg,input/style/antimonocromatismo.jpg --style_interpolation_weights 1,1,1,1 --content_size 512 --style_size 512 --crop

   

Some other options:

  • --content_size: New (minimum) size for the content image. Keeping the original size if set to 0.
  • --style_size: New (minimum) size for the content image. Keeping the original size if set to 0.
  • --alpha: Adjust the degree of stylization. It should be a value between 0.0 and 1.0 (default).
  • --preserve_color: Preserve the color of the content image.

Train

Use --content_dir and --style_dir to provide the respective directory to the content and style images.

CUDA_VISIBLE_DEVICES=
   
     python train.py --content_dir 
    
      --style_dir 
     

     
    
   

For more details and parameters, please refer to --help option.

I share the model trained by this code here

References

  • [1]: X. Huang and S. Belongie. "Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization.", in ICCV, 2017.
  • [2]: Original implementation in Torch
Comments
  • About converting the models for Torch to the models for PyTorch

    About converting the models for Torch to the models for PyTorch

    When I type this command, python torch_to_pytorch.py --model models/vgg_normalised.t7

    It produces errors as below.

    Traceback (most recent call last):
      File "torch_to_pytorch.py", line 321, in <module>
        torch_to_pytorch(args.model, args.output)
      File "torch_to_pytorch.py", line 266, in torch_to_pytorch
        model = load_lua(t7_filename, unknown_classes=True)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 608, in load_lua
        return reader.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 593, in read
        return self.read_object()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 546, in read_object
        return reader_registry[cls_name](self, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 243, in read_nn_class
        attributes = reader.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 595, in read
        return self.read_table()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 571, in read_table
        k = self.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 595, in read
        return self.read_table()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 572, in read_table
        v = self.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 593, in read
        return self.read_object()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 546, in read_object
        return reader_registry[cls_name](self, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 318, in wrapper
        obj = build_fn(reader, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 318, in wrapper
        obj = build_fn(reader, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 243, in read_nn_class
        attributes = reader.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 595, in read
        return self.read_table()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 573, in read_table
        table[k] = v
    TypeError: unhashable type: 'list'
    

    Also If I type the next line, python torch_to_pytorch.py --model models/decoder.t7

    It shows like this.

    Traceback (most recent call last):
      File "torch_to_pytorch.py", line 321, in <module>
        torch_to_pytorch(args.model, args.output)
      File "torch_to_pytorch.py", line 266, in torch_to_pytorch
        model = load_lua(t7_filename, unknown_classes=True)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 608, in load_lua
        return reader.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 593, in read
        return self.read_object()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 546, in read_object
        return reader_registry[cls_name](self, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 243, in read_nn_class
        attributes = reader.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 595, in read
        return self.read_table()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 571, in read_table
        k = self.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 595, in read
        return self.read_table()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 572, in read_table
        v = self.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 593, in read
        return self.read_object()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 546, in read_object
        return reader_registry[cls_name](self, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 318, in wrapper
        obj = build_fn(reader, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 318, in wrapper
        obj = build_fn(reader, version)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 243, in read_nn_class
        attributes = reader.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 595, in read
        return self.read_table()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 523, in wrapper
        result = fn(self, *args, **kwargs)
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 572, in read_table
        v = self.read()
      File "C:\Users\a\Anaconda3\envs\AdaIN_env\lib\site-packages\torch\utils\serialization\read_lua_file.py", line 598, in read
        "corrupted.".format(typeidx))
    torch.utils.serialization.read_lua_file.T7ReaderException: unknown type id -1050704824. The file may be corrupted.
    
    

    It will be so thankful if you reply to the issue. :)

    opened by SuhyeonHa 17
  • testing performance

    testing performance

    Hello,Did you train according to your train.py file? The total number of iterations is 100,000.I found that you trained according to your train.py file, and the final test effect failed to reach the result of the paper. How was your test effect? Thank!

    opened by InstantWindy 16
  • License

    License

    Thanks for this implementation, very cool! I'm using it for my research, and I was wondering whether you could indicate which license applies to the repo?

    I would like to make my code openly available on github, and since it is based on your implementation, I would obviously give you credit in the README but I'm not sure whether any license (e.g. MIT) applies to your code.

    opened by rgeirhos 8
  • vgg_normalized.pth vs torchvision pretrained vgg

    vgg_normalized.pth vs torchvision pretrained vgg

    Hi.

    I wonder the difference between 'vgg_normalized.pth' you uploaded and pretrained vgg19 from torchvision.

    I tried to train AdaIN with pretrained vgg19 from torchvision many times, but I've failed. (I've succeed with 'vgg_normalized.pth')

    Sample of my AdaIN inferences that trained with torchvision vgg19 for so many epochs looking so bad... epoch_761

    Thank you : )

    opened by ZeroAct 4
  • convert torch to pytorch

    convert torch to pytorch

    running the commands:

    python torch_to_pytorch.py --model models/vgg_normalised.t7 python torch_to_pytorch.py --model models/decoder.t7

    produces the following error: Traceback (most recent call last): File "torch_to_pytorch.py", line 9, in <module> from torch.utils.serialization import load_lua ModuleNotFoundError: No module named 'torch.utils.serialization'

    Please refer to this issue: https://github.com/pytorch/pytorch/issues/14630

    opened by omar-araboghli 4
  • Using vgg_normalised.pth on Windows platform

    Using vgg_normalised.pth on Windows platform

    Hello, there. ^_^ I am trying to perform your code on my laptop which is equipped with the Windows 10 operating system. However, it cannot successfully load the pre-trained model "vgg_normalised.pth". I guess it is probably because that your pre-trained model is obtained under Linux. Could you please provide a version that can be used under Windows 10 or give me some instruction on how to train the "vgg_normalise.pth" under Windows?

    opened by yuxijin 2
  • pre-trained vgg encoder

    pre-trained vgg encoder

    Hi thanks for your great effort.

    I am curious where the weight of the pre-trained vgg encoder are from. I trained the whole model with your pre-traiend vgg encoder, and the style-transfered result seems to have some portrait effect even the train set (both style source and content source) is not composed of portraits.

    So I am suspicious that the pre-trained vgg encoder weight is trained on portraits such as WikiArt. Could you clarify about the vgg encoder pre-training?

    Thank you

    opened by hongsukchoi 2
  • Added file to testing on video and updated requirements.txt

    Added file to testing on video and updated requirements.txt

    With test_video.py on can style transfer on content video with style image/video. Added conditions to verify length of content and style video is same if one is testing with style video. Updated requirements.txt with opencv-python and imageio used in test_video.py.

    opened by levindabhi 2
  • No module named 'torch.utils.serialization'

    No module named 'torch.utils.serialization'

    python torch_to_pytorch.py --model models/vgg_normalised.t7
    Traceback (most recent call last):
      File "torch_to_pytorch.py", line 9, in <module>
        from torch.utils.serialization import load_lua
    ModuleNotFoundError: No module named 'torch.utils.serialization'
    

    It seems like the function is long removed by pytorch: https://stackoverflow.com/questions/54107156/modulenotfounderror-no-module-named-torch-utils-serialization

    We should use https://github.com/bshillingford/python-torchfile instead.

    opened by KokeCacao 2
  • Why add a 3*3*1*1 conv layer on top of official vgg-19 structure?

    Why add a 3*3*1*1 conv layer on top of official vgg-19 structure?

    Hi, I found that different from official vgg-19, in this project you added a conv layer of 3*3*1*1 to the input of vgg-19. Could you please tell me the reason? Besides, how did you train this new version of vgg-19 and get the pretrained feature extractor?

    opened by CharlesNord 2
  • Bump pillow from 8.2.0 to 8.3.2

    Bump pillow from 8.2.0 to 8.3.2

    Bumps pillow from 8.2.0 to 8.3.2.

    Release notes

    Sourced from pillow's releases.

    8.3.2

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.2.html

    Security

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    Python 3.10 wheels

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    Fixed regressions

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    8.3.1

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.1.html

    Changes

    8.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    8.3.2 (2021-09-02)

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    8.3.1 (2021-07-06)

    • Catch OSError when checking if fp is sys.stdout #5585 [radarhere]

    • Handle removing orientation from alternate types of EXIF data #5584 [radarhere]

    • Make Image.array take optional dtype argument #5572 [t-vi, radarhere]

    8.3.0 (2021-07-01)

    • Use snprintf instead of sprintf. CVE-2021-34552 #5567 [radarhere]

    • Limit TIFF strip size when saving with LibTIFF #5514 [kmilos]

    • Allow ICNS save on all operating systems #4526 [baletu, radarhere, newpanjing, hugovk]

    • De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables #4989 [gofr, radarhere]

    • Replaced xml.etree.ElementTree #5565 [radarhere]

    ... (truncated)

    Commits
    • 8013f13 8.3.2 version bump
    • 23c7ca8 Update CHANGES.rst
    • 8450366 Update release notes
    • a0afe89 Update test case
    • 9e08eb8 Raise ValueError if color specifier is too long
    • bd5cf7d FLI tests for Oss-fuzz crash.
    • 94a0cf1 Fix 6-byte OOB read in FliDecode
    • cece64f Add 8.3.2 (2021-09-02) [CI skip]
    • e422386 Add release notes for Pillow 8.3.2
    • 08dcbb8 Pillow 8.3.2 supports Python 3.10 [ci skip]
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • How to change the number of channels from 3 to 1

    How to change the number of channels from 3 to 1

    Hello, thank you for the code. I trained the model on my on dataset of FONTS which are black and white means the channel is 1, so now where can I set the channel size also can I use same vgg encoder or I have to change the encoder according to my channel size because while training on the images I didn't get the error but while the testing on I got the error I am using the decoder after training from experiments.

    (test1) D:\Coding\AdaIN_Code\AdaIN_exp1>python test.py --content_dir input/content4 --style_dir input/style4 Traceback (most recent call last): File "D:\Coding\AdaIN_Code\AdaIN_exp1\test.py", line 155, in output = style_transfer(vgg, decoder, content, style, File "D:\Coding\AdaIN_Code\AdaIN_exp1\test.py", line 28, in style_transfer content_f = vgg(content) File "C:\Users\ak874\anaconda3\envs\test1\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "C:\Users\ak874\anaconda3\envs\test1\lib\site-packages\torch\nn\modules\container.py", line 139, in forward input = module(input) File "C:\Users\ak874\anaconda3\envs\test1\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "C:\Users\ak874\anaconda3\envs\test1\lib\site-packages\torch\nn\modules\conv.py", line 457, in forward return self._conv_forward(input, self.weight, self.bias) File "C:\Users\ak874\anaconda3\envs\test1\lib\site-packages\torch\nn\modules\conv.py", line 453, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Given groups=1, weight of size [3, 3, 1, 1], expected input[1, 1, 128, 128] to have 3 channels, but got 1 channels instead

    opened by avinash2022skipq 0
  • Bump pillow from 9.0.1 to 9.3.0

    Bump pillow from 9.0.1 to 9.3.0

    Bumps pillow from 9.0.1 to 9.3.0.

    Release notes

    Sourced from pillow's releases.

    9.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.3.0 (2022-10-29)

    • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

    • Initialize libtiff buffer when saving #6699 [radarhere]

    • Inline fname2char to fix memory leak #6329 [nulano]

    • Fix memory leaks related to text features #6330 [nulano]

    • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

    • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

    • Fixed set_variation_by_name offset #6445 [radarhere]

    • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

    • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

    • Added ExifTags enums #6630 [radarhere]

    • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

    • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

    • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

    • Added GPS TIFF tag info #6661 [radarhere]

    • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

    • Do not attempt normalization if mode is already normal #6644 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump protobuf from 3.15.0 to 3.18.3

    Bump protobuf from 3.15.0 to 3.18.3

    Bumps protobuf from 3.15.0 to 3.18.3.

    Release notes

    Sourced from protobuf's releases.

    Protocol Buffers v3.18.3

    C++

    Protocol Buffers v3.16.1

    Java

    • Improve performance characteristics of UnknownFieldSet parsing (#9371)

    Protocol Buffers v3.18.2

    Java

    • Improve performance characteristics of UnknownFieldSet parsing (#9371)

    Protocol Buffers v3.18.1

    Python

    • Update setup.py to reflect that we now require at least Python 3.5 (#8989)
    • Performance fix for DynamicMessage: force GetRaw() to be inlined (#9023)

    Ruby

    • Update ruby_generator.cc to allow proto2 imports in proto3 (#9003)

    Protocol Buffers v3.18.0

    C++

    • Fix warnings raised by clang 11 (#8664)
    • Make StringPiece constructible from std::string_view (#8707)
    • Add missing capability attributes for LLVM 12 (#8714)
    • Stop using std::iterator (deprecated in C++17). (#8741)
    • Move field_access_listener from libprotobuf-lite to libprotobuf (#8775)
    • Fix #7047 Safely handle setlocale (#8735)
    • Remove deprecated version of SetTotalBytesLimit() (#8794)
    • Support arena allocation of google::protobuf::AnyMetadata (#8758)
    • Fix undefined symbol error around SharedCtor() (#8827)
    • Fix default value of enum(int) in json_util with proto2 (#8835)
    • Better Smaller ByteSizeLong
    • Introduce event filters for inject_field_listener_events
    • Reduce memory usage of DescriptorPool
    • For lazy fields copy serialized form when allowed.
    • Re-introduce the InlinedStringField class
    • v2 access listener
    • Reduce padding in the proto's ExtensionRegistry map.
    • GetExtension performance optimizations
    • Make tracker a static variable rather than call static functions
    • Support extensions in field access listener
    • Annotate MergeFrom for field access listener
    • Fix incomplete types for field access listener
    • Add map_entry/new_map_entry to SpecificField in MessageDifferencer. They record the map items which are different in MessageDifferencer's reporter.
    • Reduce binary size due to fieldless proto messages
    • TextFormat: ParseInfoTree supports getting field end location in addition to start.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Naoto Inoue
Research Scientist at CyberAgent Inc. AILab
Naoto Inoue
Towards Ultra-Resolution Neural Style Transfer via Thumbnail Instance Normalization

Towards Ultra-Resolution Neural Style Transfer via Thumbnail Instance Normalization Official PyTorch implementation for our URST (Ultra-Resolution Sty

czczup 148 Dec 27, 2022
Pytorch implementation of the paper "Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization"

Pytorch implementation of the paper "Enhancing Content Preservation in Text Style Transfer Using Reverse Attention and Conditional Layer Normalization"

Dongkyu Lee 4 Sep 18, 2022
Official implementation of "One-Shot Voice Conversion with Weight Adaptive Instance Normalization".

One-Shot Voice Conversion with Weight Adaptive Instance Normalization By Shengjie Huang, Yanyan Xu*, Dengfeng Ke*, Mingjie Chen, Thomas Hain. This rep

null 31 Dec 7, 2022
PyTorch implementation of paper: AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer, ICCV 2021.

AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer [Paper] [PyTorch Implementation] [Paddle Implementation] Overview This reposit

null 148 Dec 30, 2022
[CVPR 2021] Region-aware Adaptive Instance Normalization for Image Harmonization

RainNet — Official Pytorch Implementation Region-aware Adaptive Instance Normalization for Image Harmonization Jun Ling, Han Xue, Li Song*, Rong Xie,

null 130 Dec 11, 2022
Two-Stage Peer-Regularized Feature Recombination for Arbitrary Image Style Transfer

Two-Stage Peer-Regularized Feature Recombination for Arbitrary Image Style Transfer Paper on arXiv Public PyTorch implementation of two-stage peer-reg

NNAISENSE 38 Oct 14, 2022
Simple Tensorflow implementation of "Adaptive Convolutions for Structure-Aware Style Transfer" (CVPR 2021)

AdaConv — Simple TensorFlow Implementation [Paper] : Adaptive Convolutions for Structure-Aware Style Transfer (CVPR 2021) Note This repository does no

Junho Kim 26 Nov 18, 2022
Instant Real-Time Example-Based Style Transfer to Facial Videos

FaceBlit: Instant Real-Time Example-Based Style Transfer to Facial Videos The official implementation of FaceBlit: Instant Real-Time Example-Based Sty

Aneta Texler 131 Dec 19, 2022
A unofficial pytorch implementation of PAN(PSENet2): Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network

Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network Requirements pytorch 1.1+ torchvision 0.3+ pyclipper opencv3 gcc

zhoujun 400 Dec 26, 2022
Unofficial PyTorch implementation of "RTM3D: Real-time Monocular 3D Detection from Object Keypoints for Autonomous Driving" (ECCV 2020)

RTM3D-PyTorch The PyTorch Implementation of the paper: RTM3D: Real-time Monocular 3D Detection from Object Keypoints for Autonomous Driving (ECCV 2020

Nguyen Mau Dzung 271 Nov 29, 2022
HINet: Half Instance Normalization Network for Image Restoration

HINet: Half Instance Normalization Network for Image Restoration Liangyu Chen, Xin Lu, Jie Zhang, Xiaojie Chu, Chengpeng Chen Paper: https://arxiv.org

null 303 Dec 31, 2022
Half Instance Normalization Network for Image Restoration

HINet Half Instance Normalization Network for Image Restoration, based on https://github.com/megvii-model/HINet. Dependencies NumPy PyTorch, preferabl

Holy Wu 4 Jun 6, 2022
Real-Time-Student-Attendence-System - Real Time Student Attendence System

Real-Time-Student-Attendence-System The Student Attendance Management System Pro

Rounak Das 1 Feb 15, 2022
The repo for the paper "I3CL: Intra- and Inter-Instance Collaborative Learning for Arbitrary-shaped Scene Text Detection".

I3CL: Intra- and Inter-Instance Collaborative Learning for Arbitrary-shaped Scene Text Detection Updates | Introduction | Results | Usage | Citation |

null 33 Jan 5, 2023
Unofficial implementation of "TTNet: Real-time temporal and spatial video analysis of table tennis" (CVPR 2020)

TTNet-Pytorch The implementation for the paper "TTNet: Real-time temporal and spatial video analysis of table tennis" An introduction of the project c

Nguyen Mau Dung 438 Dec 29, 2022
PyTorch implementation of neural style transfer algorithm

neural-style-pt This is a PyTorch implementation of the paper A Neural Algorithm of Artistic Style by Leon A. Gatys, Alexander S. Ecker, and Matthias

null 770 Jan 2, 2023
Official PyTorch implementation of "ArtFlow: Unbiased Image Style Transfer via Reversible Neural Flows"

ArtFlow Official PyTorch implementation of the paper: ArtFlow: Unbiased Image Style Transfer via Reversible Neural Flows Jie An*, Siyu Huang*, Yibing

null 123 Dec 27, 2022
Pytorch implementation of Nueral Style transfer

Nueral Style Transfer Pytorch implementation of Nueral style transfer algorithm , it is used to apply artistic styles to content images . Content is t

Abhinav 9 Oct 15, 2022
Official PyTorch implementation of Retrieve in Style: Unsupervised Facial Feature Transfer and Retrieval.

Retrieve in Style: Unsupervised Facial Feature Transfer and Retrieval PyTorch This is the PyTorch implementation of Retrieve in Style: Unsupervised Fa

null 60 Oct 12, 2022