PConv-Keras - Unofficial implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions". Try at: www.fixmyphoto.ai

Overview

Partial Convolutions for Image Inpainting using Keras

Keras implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions", https://arxiv.org/abs/1804.07723. A huge shoutout the authors Guilin Liu, Fitsum A. Reda, Kevin J. Shih, Ting-Chun Wang, Andrew Tao and Bryan Catanzaro from NVIDIA corporation for releasing this awesome paper, it's been a great learning experience for me to implement the architecture, the partial convolutional layer, and the loss functions.

Dependencies

  • Python 3.6
  • Keras 2.2.4
  • Tensorflow 1.12

How to use this repository

The easiest way to try a few predictions with this algorithm is to go to www.fixmyphoto.ai, where I've deployed it on a serverless React application with AWS lambda functions handling inference.

If you want to dig into the code, the primary implementations of the new PConv2D keras layer as well as the UNet-like architecture using these partial convolutional layers can be found in libs/pconv_layer.py and libs/pconv_model.py, respectively - this is where the bulk of the implementation can be found. Beyond this I've set up four jupyter notebooks, which details the several steps I went through while implementing the network, namely:

Step 1: Creating random irregular masks
Step 2: Implementing and testing the implementation of the PConv2D layer
Step 3: Implementing and testing the UNet architecture with PConv2D layers
Step 4: Training & testing the final architecture on ImageNet
Step 5: Simplistic attempt at predicting arbitrary image sizes through image chunking

Pre-trained weights

I've ported the VGG16 weights from PyTorch to keras; this means the 1/255. pixel scaling can be used for the VGG16 network similarly to PyTorch.

Training on your own dataset

You can either go directly to step 4 notebook, or alternatively use the CLI (make sure to download the converted VGG16 weights):

python main.py \
    --name MyDataset \
    --train TRAINING_PATH \
    --validation VALIDATION_PATH \
    --test TEST_PATH \
    --vgg_path './data/logs/pytorch_to_keras_vgg16.h5'

Implementation details

Details of the implementation are in the paper itself, however I'll try to summarize some details here.

Mask Creation

In the paper they use a technique based on occlusion/dis-occlusion between two consecutive frames in videos for creating random irregular masks - instead I've opted for simply creating a simple mask-generator function which uses OpenCV to draw some random irregular shapes which I then use for masks. Plugging in a new mask generation technique later should not be a problem though, and I think the end results are pretty decent using this method as well.

Partial Convolution Layer

A key element in this implementation is the partial convolutional layer. Basically, given the convolutional filter W and the corresponding bias b, the following partial convolution is applied instead of a normal convolution:

where ⊙ is element-wise multiplication and M is a binary mask of 0s and 1s. Importantly, after each partial convolution, the mask is also updated, so that if the convolution was able to condition its output on at least one valid input, then the mask is removed at that location, i.e.

The result of this is that with a sufficiently deep network, the mask will eventually be all ones (i.e. disappear)

UNet Architecture

Specific details of the architecture can be found in the paper, but essentially it's based on a UNet-like structure, where all normal convolutional layers are replace with partial convolutional layers, such that in all cases the image is passed through the network alongside the mask. The following provides an overview of the architecture.

Loss Function(s)

The loss function used in the paper is kinda intense, and can be reviewed in the paper. In short it includes:

  • Per-pixel losses both for maskes and un-masked regions
  • Perceptual loss based on ImageNet pre-trained VGG-16 (pool1, pool2 and pool3 layers)
  • Style loss on VGG-16 features both for predicted image and for computed image (non-hole pixel set to ground truth)
  • Total variation loss for a 1-pixel dilation of the hole region

The weighting of all these loss terms are as follows:

Training Procedure

Network was trained on ImageNet with a batch size of 1, and each epoch was specified to be 10,000 batches long. Training was furthermore performed using the Adam optimizer in two stages since batch normalization presents an issue for the masked convolutions (since mean and variance is calculated for hole pixels).

Stage 1 Learning rate of 0.0001 for 50 epochs with batch normalization enabled in all layers

Stage 2 Learning rate of 0.00005 for 50 epochs where batch normalization in all encoding layers is disabled.

Training time for shown images was absolutely crazy long, but that is likely because of my poor personal setup. The few tests I've tried on a 1080Ti (with batch size of 4) indicates that training time could be around 10 days, as specified in the paper.

Comments
  • Could you provide the pretrained weights?

    Could you provide the pretrained weights?

    Hi MathiasGruber, Firstly I am kindly to thank you for your awesome contribution, especially making them as step by step process. I have went through the source code, and as you have said that it is going to take time to train the model, could you provide your pretrained weights such as these files:

    50_weights_2018-06-01-16-41-43.h5 150_weights_2018-06-26-22-19-32.h5 170_weights_2018-06-28-15-00-38.h5

    in "Step4 - Imagenet Training" file Thank you again 👍 🥇

    opened by TrinhQuocNguyen 21
  • Prediction image  becomes abnormal

    Prediction image becomes abnormal

    I use pconv_imagenet as pretrained model

    The result abnormally contains blue as shown below.

    Koci1t.png KoccMP.png

    Why does it become like that and how to fix it?

    opened by Skydddoogg 7
  • ValueError: expects 3 weights, but the saved weights have 2 elements.

    ValueError: expects 3 weights, but the saved weights have 2 elements.

    I ran the code successfully on my laptop with 1 GPU, however, while I try to try on remote workstaton with NVIDIA Tesla P100 GPU . it does not work. anyone can help me? thanks.

    Traceback (most recent call last): File "/home/irlts/nianyi/PConv-Keras-master/main.py", line 210, in model.load(args.checkpoint) File "/home/irlts/nianyi/PConv-Keras-master/libs/pconv_model.py", line 271, in load self.model.load_weights(filepath)
    File "/localscratch/irlts.21223938.0/env/lib/python3.7/site-packages/keras/engine/saving.py", line 492, in load_wrapper return load_function(*args, **kwargs) File "/localscratch/irlts.21223938.0/env/lib/python3.7/site-packages/keras/engine/network.py", line 1230, in load_weights f, self.layers, reshape=reshape) File "/localscratch/irlts.21223938.0/env/lib/python3.7/site-packages/keras/engine/saving.py", line 1235, in load_weights_from_hdf5_group ' elements.') ValueError: Layer #0 (named "p_conv2d_17" in the current model) was found to correspond to layer p_conv2d_49 in the save file. However the new layer p_conv2d_17 expects 3 weights, but the saved weights have 2 elements.

    opened by nywang2019 6
  • ValueError: invalid literal for int() with base 10: 'h5'

    ValueError: invalid literal for int() with base 10: 'h5'

    I'm trying to run (from step 5 ipynb):

    from libs.pconv_model import PConvUnet
    model = PConvUnet(vgg_weights=None, inference_only=True)
    model.load(r"/media/user/PConv-Keras/pconv_imagenet.h5", train_bn=False)
    

    But it fails with ValueError: invalid literal for int() with base 10: 'h5' error:

    ValueError                                Traceback (most recent call last)
    <ipython-input-11-adc04f0f404a> in <module>
          1 from libs.pconv_model import PConvUnet
          2 model = PConvUnet(vgg_weights=None, inference_only=True)
    ----> 3 model.load(r"/media/user/PConv-Keras//pconv_imagenet.h5", train_bn=False)
    
    /media/user/PConv-Keras/libs/pconv_model.py in load(self, filepath, train_bn, lr)
        266 
        267         # Load weights into model
    --> 268         epoch = int(os.path.basename(filepath).split('.')[1].split('-')[0])
        269         assert epoch > 0, "Could not parse weight file. Should include the epoch"
        270         self.current_epoch = epoch
    
    ValueError: invalid literal for int() with base 10: 'h5'
    
    opened by anonym24 6
  • How to test on free size of images?

    How to test on free size of images?

    Hi MathiasGruber, (and Hello guys) At the training step, you have used 512x512 pixels images. How can we test free size images ( lets say 640x640 pixels images)?

    Thank you.

    opened by TrinhQuocNguyen 6
  • Question about the PConv Layer

    Question about the PConv Layer

    In the Paper, authors use the sum(M) means the sum of the conv slide window binary mask to make sure that do not use the hole pixels. But i read your code , do you use the mean value of the whole mask? If so , you use the hole pixels' values

    opened by chudonezen 3
  • question about the partial convolutional layer

    question about the partial convolutional layer

    hey, thanks for your codes. Do you know about the partial convolutional layer in the paper? I have seen your architecture image showed in Readme, but I can't explain that an image which size is 5125123, and is input into a partial layer ,and the output's size is 25625664.The kernel is 77,and the strides is 2.I don't get why 512512 comes to 256*256? Do you have any idea? Thanks!

    opened by yuzehui1996 3
  • AttributeError: 'Node' object has no attribute 'output_masks'

    AttributeError: 'Node' object has no attribute 'output_masks'

    Hello! When Step2 - Partial Convolution Layer.ipynb is executed, I got below error.

    Let me know how to solve it. Environment: Windows 11 64 bit


    AttributeError Traceback (most recent call last)

    in 4 input_img = Input(shape=(shape[0], shape[1], shape[2],)) 5 input_mask = Input(shape=(shape[0], shape[1], shape[2],)) ----> 6 output_img, output_mask1 = PConv2D(8, kernel_size=(7,7), strides=(2,2))([input_img, input_mask]) 7 output_img, output_mask2 = PConv2D(16, kernel_size=(5,5), strides=(2,2))([output_img, output_mask1]) 8 output_img, output_mask3 = PConv2D(32, kernel_size=(5,5), strides=(2,2))([output_img, output_mask2])

    ~\scoop\apps\anaconda3\2020.11\envs\Py36_PConv-Keras\lib\site-packages\keras\engine\base_layer.py in call(self, inputs, **kwargs) 441 442 # Handle mask propagation. --> 443 previous_mask = _collect_previous_mask(inputs) 444 user_kwargs = copy.copy(kwargs) 445 if not is_all_none(previous_mask):

    ~\scoop\apps\anaconda3\2020.11\envs\Py36_PConv-Keras\lib\site-packages\keras\engine\base_layer.py in _collect_previous_mask(input_tensors) 1309 inbound_layer, node_index, tensor_index = x._keras_history 1310 node = inbound_layer._inbound_nodes[node_index] -> 1311 mask = node.output_masks[tensor_index] 1312 masks.append(mask) 1313 else:

    AttributeError: 'Node' object has no attribute 'output_masks'

    opened by yoshiyama 2
  • The predicted image is in almost null (all pixels are the same in grey)

    The predicted image is in almost null (all pixels are the same in grey)

    Hi, everyone. I am tring to train the model on my own datasets and wanna know if everything is going well. So, after few steps, I use the model like this: "model = PConvUnet(vgg_weights=None, inference_only=True) model.load(r"D:\projects_test\PConv-Keras-master\data\logs\myDataset_phase1\weights.01-7.00.h5", train_bn=False)" and weights.01-7.00.h5 the midresult of the training. However, it seems the prediction does not work well as the title depicted. Does anyone know what is going wrong or not? Thank you.

    opened by bytemani 2
  • Bump tensorflow from 1.12.0 to 1.15.4

    Bump tensorflow from 1.12.0 to 1.15.4

    Bumps tensorflow from 1.12.0 to 1.15.4.

    Release notes

    Sourced from tensorflow's releases.

    TensorFlow 1.15.4

    Release 1.15.4

    Bug Fixes and Other Changes

    TensorFlow 1.15.3

    Bug Fixes and Other Changes

    TensorFlow 1.15.2

    Release 1.15.2

    Note that this release no longer has a single pip package for GPU and CPU. Please see #36347 for history and details

    Bug Fixes and Other Changes

    TensorFlow 1.15.0

    Release 1.15.0

    This is the last 1.x release for TensorFlow. We do not expect to update the 1.x branch with features, although we will issue patch releases to fix vulnerabilities for at least one year.

    Major Features and Improvements

    • As announced, tensorflow pip package will by default include GPU support (same as tensorflow-gpu now) for the platforms we currently have GPU support (Linux and Windows). It will work on machines with and without Nvidia GPUs. tensorflow-gpu will still be available, and CPU-only packages can be downloaded at tensorflow-cpu for users who are concerned about package size.
    • TensorFlow 1.15 contains a complete implementation of the 2.0 API in its compat.v2 module. It contains a copy of the 1.15 main module (without contrib) in the compat.v1 module. TensorFlow 1.15 is able to emulate 2.0 behavior using the enable_v2_behavior() function. This enables writing forward compatible code: by explicitly importing either tensorflow.compat.v1 or tensorflow.compat.v2, you can ensure that your code works without modifications against an installation of 1.15 or 2.0.
    • EagerTensor now supports numpy buffer interface for tensors.
    • Add toggles tf.enable_control_flow_v2() and tf.disable_control_flow_v2() for enabling/disabling v2 control flow.
    • Enable v2 control flow as part of tf.enable_v2_behavior() and TF2_BEHAVIOR=1.
    • AutoGraph translates Python control flow into TensorFlow expressions, allowing users to write regular Python inside tf.function-decorated functions. AutoGraph is also applied in functions used with tf.data, tf.distribute and tf.keras APIS.
    • Adds enable_tensor_equality(), which switches the behavior such that:
      • Tensors are no longer hashable.

    ... (truncated)

    Changelog

    Sourced from tensorflow's changelog.

    Release 1.15.4

    Bug Fixes and Other Changes

    Release 2.3.0

    Major Features and Improvements

    • tf.data adds two new mechanisms to solve input pipeline bottlenecks and save resources:

    ... (truncated)

    Commits
    • df8c55c Merge pull request #43442 from tensorflow-jenkins/version-numbers-1.15.4-31571
    • 0e8cbcb Update version numbers to 1.15.4
    • 5b65bf2 Merge pull request #43437 from tensorflow-jenkins/relnotes-1.15.4-10691
    • 814e8d8 Update RELEASE.md
    • 757085e Insert release notes place-fill
    • e99e53d Merge pull request #43410 from tensorflow/mm-fix-1.15
    • bad36df Add missing import
    • f3f1835 No disable_tfrt present on this branch
    • 7ef5c62 Merge pull request #43406 from tensorflow/mihaimaruseac-patch-1
    • abbf34a Remove import that is not needed
    • 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] 2
  • how did you found out what U-net to use?

    how did you found out what U-net to use?

    image

    When I was reading the paper reference 11 is Isola, P., Zhu, J.Y., Zhou, T., Efros, A.A.: Image-to-image translation with conditional adversarial networks. arXiv preprint (2017).

    Are you using a conditional adversarial network?

    opened by cuevas1208 2
  • Bump tensorflow from 1.12.0 to 2.9.3

    Bump tensorflow from 1.12.0 to 2.9.3

    Bumps tensorflow from 1.12.0 to 2.9.3.

    Release notes

    Sourced from tensorflow's releases.

    TensorFlow 2.9.3

    Release 2.9.3

    This release introduces several vulnerability fixes:

    TensorFlow 2.9.2

    Release 2.9.2

    This releases introduces several vulnerability fixes:

    ... (truncated)

    Changelog

    Sourced from tensorflow's changelog.

    Release 2.9.3

    This release introduces several vulnerability fixes:

    Release 2.8.4

    This release introduces several vulnerability fixes:

    ... (truncated)

    Commits
    • a5ed5f3 Merge pull request #58584 from tensorflow/vinila21-patch-2
    • 258f9a1 Update py_func.cc
    • cd27cfb Merge pull request #58580 from tensorflow-jenkins/version-numbers-2.9.3-24474
    • 3e75385 Update version numbers to 2.9.3
    • bc72c39 Merge pull request #58482 from tensorflow-jenkins/relnotes-2.9.3-25695
    • 3506c90 Update RELEASE.md
    • 8dcb48e Update RELEASE.md
    • 4f34ec8 Merge pull request #58576 from pak-laura/c2.99f03a9d3bafe902c1e6beb105b2f2417...
    • 6fc67e4 Replace CHECK with returning an InternalError on failing to create python tuple
    • 5dbe90a Merge pull request #58570 from tensorflow/r2.9-7b174a0f2e4
    • 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] 0
  • Bump numpy from 1.15.4 to 1.22.0

    Bump numpy from 1.15.4 to 1.22.0

    Bumps numpy from 1.15.4 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (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
  • Exception encountered when calling layer

    Exception encountered when calling layer "vgg16" (type Functional).

    Exception encountered when calling layer "vgg16" (type Functional).

    pop from empty list

    Call arguments received: • inputs=tf.Tensor(shape=(None, 512, 512, 3), dtype=float32) • training=None • mask=None

    anyone help me to solve this why this happening

    opened by Jennyfer5364 6
  • Im sorry writing this to issues but i have to ask.

    Im sorry writing this to issues but i have to ask.

    I am trying to understand how Training and Convolution works in deep learning., based on my researches I understand this : First, as input, there are 2 things that are coming: raw mask, and input image that has been masked. Applying a partial convolutional layer to those two is producing 2 things: A reduced mask, and a feature image. But I really couldn't understand what is happening in partial convolution to produce a feature image. I wanna learn that. My second question is concatenation. I mean there is concat going on in UNET but.. why? what is its purpose?

    opened by muhammedcanpirincci-sudo 0
  • Convert kernel_mask into a constant tensor

    Convert kernel_mask into a constant tensor

    When I use the given implementation for training, I always get NaN values at the output. Sometimes this happens after a few training steps and sometimes after a few epochs (depending on the training data used).

    While debugging, I noticed that the kernel_mask was updated. I think this is because K.ones(shape=...) returns a trainable variable if all entries in the passed shape are >0. In the original PyTorch implementation the kernel_mask is initialized using weight_maskUpdater = torch.ones(...), which by default creates a non-trainable tensor (since requires_grad=False).

    After replacing K.ones(...) with K.constant(...) the NaN values no longer occur.

    opened by Larst0 0
  • Is it normal to run 1 iteration for about 5s on gpu platform?

    Is it normal to run 1 iteration for about 5s on gpu platform?

    I have 3k images for train, 1k for val and 1k for test. And I'm running the model on a cloud platform using Tesla V100, doesn't it take too much time for running? Since there are 10k iterations to run.

    opened by wlz2887 0
Owner
Mathias Gruber
Chief Data Scientist
Mathias Gruber
Convnext-tf - Unofficial tensorflow keras implementation of ConvNeXt

ConvNeXt Tensorflow This is unofficial tensorflow keras implementation of ConvNe

null 29 Oct 6, 2022
This is an implementation of Googles Yogi-Optimizer in Keras (tf.keras)

Yogi-Optimizer_Keras This is an implementation of Googles Yogi-Optimizer in Keras (tf.keras) The NeurIPS-Paper can be found here: http://papers.nips.c

null 14 Sep 13, 2022
Keras udrl - Keras implementation of Upside Down Reinforcement Learning

keras_udrl Keras implementation of Upside Down Reinforcement Learning This is me

Eder Santana 7 Jan 24, 2022
Example-custom-ml-block-keras - Custom Keras ML block example for Edge Impulse

Custom Keras ML block example for Edge Impulse This repository is an example on

Edge Impulse 8 Nov 2, 2022
Classification models 1D Zoo - Keras and TF.Keras

Classification models 1D Zoo - Keras and TF.Keras This repository contains 1D variants of popular CNN models for classification like ResNets, DenseNet

Roman Solovyev 12 Jan 6, 2023
Official PyTorch implementation of "VITON-HD: High-Resolution Virtual Try-On via Misalignment-Aware Normalization" (CVPR 2021)

VITON-HD — Official PyTorch Implementation VITON-HD: High-Resolution Virtual Try-On via Misalignment-Aware Normalization Seunghwan Choi*1, Sunghyun Pa

Seunghwan Choi 250 Jan 6, 2023
Official PyTorch implementation of "RMGN: A Regional Mask Guided Network for Parser-free Virtual Try-on" (IJCAI-ECAI 2022)

RMGN-VITON RMGN: A Regional Mask Guided Network for Parser-free Virtual Try-on In IJCAI-ECAI 2022(short oral). [Paper] [Supplementary Material] Abstra

null 27 Dec 1, 2022
Checkout some cool self-projects you can try your hands on to curb your boredom this December!

SoC-Winter Checkout some cool self-projects you can try your hands on to curb your boredom this December! These are short projects that you can do you

Web and Coding Club, IIT Bombay 29 Nov 8, 2022
Try out deep learning models online on Google Colab

Try out deep learning models online on Google Colab

Erdene-Ochir Tuguldur 1.5k Dec 27, 2022
Disentangled Cycle Consistency for Highly-realistic Virtual Try-On, CVPR 2021

Disentangled Cycle Consistency for Highly-realistic Virtual Try-On, CVPR 2021 [WIP] The code for CVPR 2021 paper 'Disentangled Cycle Consistency for H

ChongjianGE 94 Dec 11, 2022
Code for "ShineOn: Illuminating Design Choices for Practical Video-based Virtual Clothing Try-on", accepted at WACV 2021 Generation of Human Behavior Workshop.

ShineOn: Illuminating Design Choices for Practical Video-based Virtual Clothing Try-on [ Paper ] [ Project Page ] This repository contains the code fo

Andrew Jong 97 Dec 13, 2022
VOGUE: Try-On by StyleGAN Interpolation Optimization

VOGUE is a StyleGAN interpolation optimization algorithm for photo-realistic try-on. Top: shirt try-on automatically synthesized by our method in two different examples.

Wei ZHANG 66 Dec 9, 2022
Official code for ICCV2021 paper "M3D-VTON: A Monocular-to-3D Virtual Try-on Network"

M3D-VTON: A Monocular-to-3D Virtual Try-On Network Official code for ICCV2021 paper "M3D-VTON: A Monocular-to-3D Virtual Try-on Network" Paper | Suppl

null 109 Dec 29, 2022
(ICCV 2021) Official code of "Dressing in Order: Recurrent Person Image Generation for Pose Transfer, Virtual Try-on and Outfit Editing."

Dressing in Order (DiOr) ?? [Paper] ?? [Webpage] ?? [Running this code] The official implementation of "Dressing in Order: Recurrent Person Image Gene

Aiyu Cui 277 Dec 28, 2022
Simulated garment dataset for virtual try-on

Simulated garment dataset for virtual try-on This repository contains the dataset used in the following papers: Self-Supervised Collision Handling via

null 33 Dec 20, 2022
Users can free try their models on SIDD dataset based on this code

SIDD benchmark 1 Train python train.py If you want to train your network, just modify the yaml in the options folder. 2 Validation python validation.p

Yuzhi ZHAO 2 May 20, 2022
This is an unofficial PyTorch implementation of Meta Pseudo Labels

This is an unofficial PyTorch implementation of Meta Pseudo Labels. The official Tensorflow implementation is here.

Jungdae Kim 320 Jan 8, 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
Unofficial & improved implementation of NeRF--: Neural Radiance Fields Without Known Camera Parameters

[Unofficial code-base] NeRF--: Neural Radiance Fields Without Known Camera Parameters [ Project | Paper | Official code base ] ⬅️ Thanks the original

Jianfei Guo 239 Dec 22, 2022