Created
July 29, 2019 18:07
-
-
Save ducha-aiki/85afbefa8dd603a26a0ac5f1ef822e75 to your computer and use it in GitHub Desktop.
kornia spatial grad bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.image.AxesImage at 0x7fb0f3971a20>" | |
] | |
}, | |
"execution_count": 1, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAI6ElEQVR4nO3dz4uchR3H8c+n2zXxR8FDPZhsaDyINAhdYUmF3FIh8Qd6VdCTsJcKEQTRo/+AePESVCwoiqAHEUsIVRHBRlddxXQVglgMEdIiohYajX56mDmkdjfzzOzzzDPz7fsFCzs7y8yHZd/7zD67zDiJANTxi74HAGgXUQPFEDVQDFEDxRA1UMwvu7jRS7wjO3V5FzcNQNK/9S99n3Pe7LpOot6py/V7/6GLmwYg6UT+suV1PPwGiiFqoBiiBoohaqAYogaKIWqgGKIGiiFqoBiiBoohaqAYogaKIWqgGKIGiiFqoBiiBoohaqAYogaKaRS17cO2P7V9yvZDXY8CMLmRUdtekPS4pJsl7ZN0l+19XQ8DMJkmR+r9kk4l+SzJ95Kel3RHt7MATKpJ1LslfXHB5dPDj/0X26u212yv/aBzbe0DMKYmUW/2NKT/86p6SY4mWUmysqgd218GYCJNoj4tac8Fl5cknelmDoDtahL1u5KutX2N7Usk3Snp5W5nAZjUyCfzT3Le9n2S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KyS9KOn+JN/0vWcrSX5MsixpSdJ+29f3vWkrtm+TdDbJe9O+73mI+rSkPRdcXpJ0pqct5dhe1CDoZ5O81PeeJpJ8rcGrr87yuYsDkm63/bkGvzIetP3MNO54HqJ+V9K1tq+xfYkGL3z/cs+bSrBtSU9K2kjyaN97Lsb2VbavHL5/qaSbJH3S76qtJXk4yVKSvRp8z76W5O5p3PfMR53kvKT7JB3T4ETOC0lO9rtqa7afk/S2pOtsn7Z9b9+bLuKApHs0OIqsD99u6XvUFq6W9LrtjzT4QX88ydT+TDRP+DdRoJiZP1IDGA9RA8UQNVAMUQPFEDVQDFEDxRA1UMx/AP4G1bMMPd8yAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJl0lEQVR4nO3dT4ichR3G8efJJGk0USTWg80mjQcrTaVVWFIhtyAS/6A9KuhJyKVChIAoPXnoseLFS1CxoCiC0opYbEBFBKuuGsU0CkFsjAppGyTZSEyzeXrYPaQ2m31n8r7z7vz4fmBhJxPeeVj2u+/M7DLjJAJQx4q+BwBoF1EDxRA1UAxRA8UQNVDMyi4OOli3NivXr+/i0K1bsXqu7wlDOXNq0PeEoaw41feC5s6s7ntBc6ePHtXc7Amf67pOol65fr1+svv+Lg7dujWbjvc9YSgnD13S94ShrDs0OXcGZzed6XtCY1//4dFFr5ucrziARogaKIaogWKIGiiGqIFiiBoohqiBYogaKIaogWKIGiiGqIFiiBoohqiBYogaKIaogWKIGiiGqIFiGkVte4ftz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PKYG0MwknakBNEDUQDETEbXtHbY/s33Q9oN97zkf20/aPmL7k763LMX2Rtuv2z5ge7/tXX1vWoztNbbftf3RwtaH+97UhO2B7Q9tvzyu21z2UdseSHpM0s2Stki6y/aWfled11OSdvQ9oqHTknYn+bmkGyT9dhl/bb+XtD3JryRdJ2mH7Rt63tTELkkHxnmDyz5qSVslHUzyeZJTmn/nzTt63rSoJG9KOtr3jiaSfJPkg4XPj2v+m29Dv6vOLfNmFy6uWvhY1s/y2p6SdKukx8d5u5MQ9QZJX551+bCW6TfeJLO9WdL1kt7pd8niFu7K7pN0RNLeJMt264JHJT0g6cw4b3QSovY5/m1Z/4SeNLbXSXpB0v1JjvW9ZzFJ5pJcJ2lK0lbb1/a9aTG2b5N0JMn7477tSYj6sKSNZ12ekvR1T1vKsb1K80E/k+TFvvc0keRbzb/76nJ+7mKbpNttf6H5h4zbbT89jhuehKjfk3S17atsr9b8G9+/1POmEmxb0hOSDiR5pO8952P7CtuXLXx+kaQbJX3a76rFJXkoyVSSzZr/nn0tyd3juO1lH3WS05Luk/Sq5p/IeT7J/n5XLc72s5LelnSN7cO27+1703lsk3SP5s8i+xY+bul71CKulPS67Y81/4N+b5Kx/ZpokvBnokAxy/5MDWA4RA0UQ9RAMUQNFEPUQDFEDRRD1EAx/wXk1gG0fJngjgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJk0lEQVR4nO3dT4ichR3G8efJJCG6q0isB5tNGg9WmkqrsK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I87iAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"%matplotlib inline\n", | |
"import matplotlib.pyplot as plt\n", | |
"import torch\n", | |
"import kornia\n", | |
"import numpy as np\n", | |
"\n", | |
"inp = torch.tensor([[[\n", | |
" [0., 0., 0., 0., 0.],\n", | |
" [0., 0., 1., 0., 0.],\n", | |
" [0., 1., 1., 1., 0.],\n", | |
" [0., 0., 1., 0., 0.],\n", | |
" [0., 0., 0., 0., 0.],\n", | |
"]]])\n", | |
"plt.imshow(kornia.utils.tensor_to_image(inp.squeeze()))\n", | |
"grad = kornia.filters.spatial_gradient(inp)\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad[0,0,0].squeeze()))\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad[0,0,1].squeeze()))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.image.AxesImage at 0x7fb0f3837a90>" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAI7klEQVR4nO3dz2ucBR7H8c9nZyMKLsjWHLQpWw8iW4StEIrQWxFaf6BXBT0JvaxQQRA9+g+IFy9FiwuKIuhBxCUUVERw1ahR7EahSJeWCq0tol50Gz97mDl03aTzzGSeeWa++35BIMmEmQ8h7zwz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3P0GiiFqoJh5ivpo1wNGNE9752mrNF97p751bh5TA2hmno7UABogaqCYuYja9iHbX9s+afuJrvdcie1jts/Z/rLrLcPY3mX7Hdvrtk/YPtL1pq3Yvtr2R7Y/H2x9qutNTdju2f7M9pvTus2Zj9p2T9Kzku6UtEfSA7b3dLvqil6QdKjrEQ1dkvRYkj9Lul3SX2f4e/uzpANJ/iJpr6RDtm/veFMTRyStT/MGZz5qSfsknUzyTZJf1H/lzfs63rSlJO9Jutj1jiaSfJvk08H7P6r/w7ez21WbS99Pgw8XBm8z/Syv7SVJd0t6bpq3Ow9R75R0+rKPz2hGf/Dmme3dkm6T9GG3S7Y2uCu7JumcpONJZnbrwDOSHpf06zRvdB6i9iafm+nf0PPG9rWSXpP0aJIfut6zlSQbSfZKWpK0z/atXW/aiu17JJ1L8sm0b3seoj4jaddlHy9JOtvRlnJsL6gf9EtJXu96TxNJvlf/1Vdn+bmL/ZLutX1K/YeMB2y/OI0bnoeoP5Z0s+2bbF+l/gvfv9HxphJsW9LzktaTPN31niuxvWj7usH710i6Q9JX3a7aWpInkywl2a3+z+zbSR6cxm3PfNRJLkl6RNKK+k/kvJrkRLertmb7ZUkfSLrF9hnbD3e96Qr2S3pI/aPI2uDtrq5HbeEGSe/Y/kL9X/THk0ztz0TzhH8TBYqZ+SM1gNEQNVAMUQPFEDVQDFEDxRA1UAxRA8X8Bx0R4/DSHn+SAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJ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VORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJiElEQVR4nO3dT4ichR3G8edxk8XEqKlWqWRjI2hDU2kNLMGSW5AS/2A8Kq0nSy4VIhVE6clDLz2IFy9BxYKiCIqKWGxARQSrrhrFNKYEsRi1pDXEJEYMu3l62C2kupt9ZzLvvDs/vx9Y2MkM7zyE/e47M7vMOokA1HFW1wMADBZRA8UQNVAMUQPFEDVQzLI2DnreBcty8ZrxNg79vXd4emXXE3qyetnxrieUdPDTEzpyaNrzXddK1BevGdefnlnfxqG/9579YmPXE3qy7cJ3u55Q0l037VvwOh5+A8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxTSK2vZW2/ts77d9d9ujAPRv0ahtj0l6QNK1kjZIusX2hraHAehPkzP1Jkn7k3yU5ISkJyRta3cWgH41iXqNpE9OuXxg7t/+j+3ttqdsT315aHpQ+wD0qEnU870N6Xf+ql6SnUkmk0yef0Erb1IKoIEmUR+QtPaUyxOSPmtnDoAz1STqtyRdYfsy2+OSbpb0XLuzAPRr0cfJSaZt3y7pRUljkh5Osqf1ZQD60ujJb5IXJL3Q8hYAA8BvlAHFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UIyT77yH4Blb8aO1ufzXvx/4cduw5q9fdD2hJzN79nU9oSdjP1vf9YTGPv3VhV1PaGz/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WN7laSnJN2R5EjXexaSZCbJVZImJG2yfWXXmxZi+wZJB5O8Pez7HoWoD0hae8rlCUmfdbSlHNvLNRv0Y0me7npPE0kOa/avry7l1y42S7rR9seafcq4xfajw7jjUYj6LUlX2L7M9rhm//D9cx1vKsG2JT0kaW+S+7reczq2L7K9eu7zFZKukfRht6sWluSeJBNJ1mn2a/alJL8Zxn0v+aiTTEu6XdKLmn0h58kke7pdtTDbj0t6XdJ62wds39b1ptPYLOlWzZ5Fds99XNf1qAVcIull2+9r9hv9riRD+zHRKOHXRIFilvyZGkBviBoohqiBYogaKIaogWKIGiiGqIFi/gtJaAg4q3wZOQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"inv_inp = 1 - inp\n", | |
"plt.imshow(kornia.utils.tensor_to_image(inv_inp.squeeze()))\n", | |
"inv_grad = kornia.filters.spatial_gradient(inv_inp)\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(inv_grad[0,0,0].squeeze()))\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(inv_grad[0,0,1].squeeze()))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.image.AxesImage at 0x7fb0f370a668>" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJBU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sYNRJnkgyn2SrpPslvZ3kwdaXARgJv6cGihnqwW+SdyW928oSAGPBmRoohqiBYogaKIaogWKIGiiGqIFiiBoohqiBYogaKIaogWKIGiiGqIFiiBoohqiBYogaKIaogWKcZPwHtU9J+tuYD/trSX8f8zHbNEt7Z2mrNFt729r6mySbVrqilajbYHsxyULXO5qapb2ztFWarb1dbOXuN1AMUQPFzFLU+7seMKRZ2jtLW6XZ2jvxrTPzmBpAM7N0pgbQAFEDxcxE1LZ32z5q+5jtx7veczm2n7N90vaXXW8ZxPYW2+/YXrJ9xPberjetxvZ62x/Z/ry/9cmuNzVhe872Z7YPTuo2pz5q23OSnpF0p6Ttkh6wvb3bVZf1vKTdXY9oaFnSviS/lXS7pD9M8f/tOUm7kvxO0q2Sdtu+veNNTeyVtDTJG5z6qCXtkHQsyddJzqv3zpv3dbxpVUnek3S66x1NJPkuyaf9z39S75tvc7erVpaes/2La/sfU/0sr+15SXdLenaStzsLUW+WdPySyyc0pd94s8z2Vkm3Sfqw2yWr69+VPSzppKRDSaZ2a9/Tkh6TdHGSNzoLUXuFf5vqn9CzxvY1kl6V9GiSH7ves5okF5LcKmle0g7bt3S9aTW275F0Msknk77tWYj6hKQtl1yel/RtR1vKsb1WvaBfTPJa13uaSPKDeu++Os3PXeyUdK/tb9R7yLjL9guTuOFZiPpjSTfZvtH2OvXe+P6NjjeVYNuSDkhaSvJU13sux/Ym29f1P79a0h2Svup21eqSPJFkPslW9b5n307y4CRue+qjTrIs6RFJb6n3RM4rSY50u2p1tl+S9IGkbbZP2H64602XsVPSQ+qdRQ73P+7qetQqbpD0ju0v1PtBfyjJxH5NNEv4M1GgmKk/UwMYDlEDxRA1UAxRA8UQNVAMUQPFEDVQzH8B9irrU8ZvhGkAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVB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HN5uss2ayeFgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"#The gradients of (image) and (inverted image) are not inverted versions of each other\n", | |
"# because of border effects of zero-padding\n", | |
"grad_sum = grad + inv_grad\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad_sum[0,0,0].squeeze()))\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad_sum[0,0,1].squeeze()))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#To fix:\n", | |
"import torch.nn as nn\n", | |
"import torch.nn.functional as F\n", | |
"\n", | |
"def _get_sobel_kernel_3x3() -> torch.Tensor:\n", | |
" \"\"\"Utility function that returns a sobel kernel of 3x3\"\"\"\n", | |
" return torch.tensor([\n", | |
" [-1., 0., 1.],\n", | |
" [-2., 0., 2.],\n", | |
" [-1., 0., 1.],\n", | |
" ])\n", | |
"\n", | |
"class SpatialGradientFix(nn.Module):\n", | |
" r\"\"\"Computes the first order image derivative in both x and y using a Sobel\n", | |
" operator.\n", | |
" Return:\n", | |
" torch.Tensor: the sobel edges of the input feature map.\n", | |
" Shape:\n", | |
" - Input: :math:`(B, C, H, W)`\n", | |
" - Output: :math:`(B, C, 2, H, W)`\n", | |
" Examples:\n", | |
" >>> input = torch.rand(1, 3, 4, 4)\n", | |
" >>> output = kornia.filters.SpatialGradient()(input) # 1x3x2x4x4\n", | |
" \"\"\"\n", | |
"\n", | |
" def __init__(self) -> None:\n", | |
" super(SpatialGradientFix, self).__init__()\n", | |
" self.kernel: torch.Tensor = self.get_sobel_kernel()\n", | |
"\n", | |
" @staticmethod\n", | |
" def get_sobel_kernel() -> torch.Tensor:\n", | |
" kernel_x: torch.Tensor = _get_sobel_kernel_3x3()\n", | |
" kernel_y: torch.Tensor = kernel_x.transpose(0, 1)\n", | |
" return torch.stack([kernel_x, kernel_y])\n", | |
"\n", | |
" def forward(self, input: torch.Tensor) -> torch.Tensor: # type: ignore\n", | |
" if not torch.is_tensor(input):\n", | |
" raise TypeError(\"Input type is not a torch.Tensor. Got {}\"\n", | |
" .format(type(input)))\n", | |
" if not len(input.shape) == 4:\n", | |
" raise ValueError(\"Invalid input shape, we expect BxCxHxW. Got: {}\"\n", | |
" .format(input.shape))\n", | |
" # prepare kernel\n", | |
" b, c, h, w = input.shape\n", | |
" tmp_kernel: torch.Tensor = self.kernel.to(input.device).to(input.dtype)\n", | |
" kernel: torch.Tensor = tmp_kernel.repeat(c, 1, 1, 1, 1)\n", | |
"\n", | |
" # convolve input tensor with sobel kernel\n", | |
" kernel_flip: torch.Tensor = kernel.flip(-3)\n", | |
" padded_inp = F.pad(F.pad(input,(1,1,1,1),'replicate')[:,:,None], \n", | |
" (0,0,0,0,1,1), 'constant')\n", | |
" return F.conv3d(padded_inp, kernel_flip, padding=0, groups=c)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.image.AxesImage at 0x7fb0f2e68cf8>" | |
] | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJl0lEQVR4nO3dT4ichR3G8efJJGk0USTWg80mjQcrTaVVWFIhtyAS/6A9KuhJyKVChIAoPXnoseLFS1CxoCiC0opYbEBFBKuuGsU0CkFsjAppGyTZSEyze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1rY2EMBwmpypt0m63fYXkp6TtN32052uAjCyJaNO8lCSqSSbJd0p6bUkd3e+DMBI+D01UMxQb7uT5A1Jb3SyBEArOFMDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVCMk7R/UPufkv7R8mF/LOlfLR+zS5O0d5K2SpO1t6utP01yxbmu6CTqLtieSTLd946mJmnvJG2VJmtvH1u5+w0UQ9RAMZMU9Z6+BwxpkvZO0lZpsvaOfevEPKYG0MwknakBNEDUQDETEbXtHbY/s33Q9oN97zkf20/aPmL7k763LMX2Rtuv2z5ge7/tXX1vWoztNbbftf3RwtaH+97UhO2B7Q9tvzyu21z2UdseSHpM0s2Stki6y/aWfled11OSdvQ9oqHTknYn+bmkGyT9dhl/bb+XtD3JryRdJ2mH7Rt63tTELkkHxnmDyz5qSVslHUzyeZJTmn/nzTt63rSoJG9KOtr3jiaSfJPkg4XPj2v+m29Dv6vOLfNmFy6uWvhY1s/y2p6SdKukx8d5u5MQ9QZJX551+bCW6TfeJLO9WdL1kt7pd8niFu7K7pN0RNLeJMt264JHJT0g6cw4b3QSovY5/m1Z/4SeNLbXSXpB0v1JjvW9ZzFJ5pJcJ2lK0lbb1/a9aTG2b5N0JMn7477tSYj6sKSNZ12ekvR1T1vKsb1K80E/k+TFvvc0keRbzb/76nJ+7mKbpNttf6H5h4zbbT89jhuehKjfk3S17atsr9b8G9+/1POmEmxb0hOSDiR5pO8952P7CtuXLXx+kaQbJX3a76rFJXkoyVSSzZr/nn0tyd3juO1lH3WS05Luk/Sq5p/IeT7J/n5XLc72s5LelnSN7cO27+1703lsk3SP5s8i+xY+bul71CKulPS67Y81/4N+b5Kx/ZpokvBnokAxy/5MDWA4RA0UQ9RAMUQNFEPUQDFEDRRD1EAx/wXk1gG0fJngjgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background":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0lcdbSnH9gYtBP10khe63tNEkm+08O6ra/m5i12Sbrf9uRYeMu62/dQobngcon5X0tW2r7K9UQtvfP9ix5tKsG1Jj0s6kuThrvdciO0rbF+2+PlFkm6U9Em3q5aX5MEkU0m2a+F79tUkd4/ittd81EnOSvqtpFe08ETOc0kOd7tqebafkfSWpGtsH7d9b9ebLmCXpHu0cBY5tPhxS9ejlnGlpNdsf6SFH/QHk4zs10TjhD8TBYpZ82dqAP0haqAYogaKIWqgGKIGiiFqoBiiBor5L0y1ArQDI87iAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJmUlEQVR4nO3dT4ichR3G8efJmPVPNsWm9WCzSeNBpKm0CksQcgtS4h+0RwU9WXKpEEEQxZOHHitevAQVC4oiKFXEYgMqIlh11SimMRDExhghtkF0I5pm9+lht5DabOadybzz7vz4fmBhJxPeeVj2u+/u7PKOkwhAHWu6HgBgtIgaKIaogWKIGiiGqIFizmvjoL3pdTlvw4Y2Dj1ya052vWAwi1NdLxjMmqmFric0tniy1/WExk4dP66F+RM+032tRH3ehg362d13tXHokZs+PFnfrMxvXux6wkAu2PxN1xMa++7w+q4nNHb0jw+teN9kfUYD6IuogWKIGiiGqIFiiBoohqiBYogaKIaogWKIGiiGqIFiiBoohqiBYogaKIaogWKIGiiGqIFiiBooplHUtnfaPmj7kO172x4FYHh9o7bdk/SwpOskbZV0q+2tbQ8DMJwmZ+ptkg4l+STJSUlPS7q53VkAhtUk6o2SPjvt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/OK7HXPVR2+5JeljSdZK2SrrV9tZuV53V45J2dj2ioVOS7k7yC0nXSPr9Kv7Yfi9pR5JfS7pK0k7b13S8qYndkg6M8wFXfdSStkk6lOSTJCe19MqbN3e8aUVJXpd0vOsdTST5Isl7y+9/o6VPvo3drjqzLJlfvrl2+W1VP8tre0bSDZIeGefjTkLUGyV9dtrtI1qln3iTzPYWSVdLeqvbJStb/lZ2n6RjkvYmWbVblz0k6R5Ji+N80EmI2mf4t1X9FXrS2J6W9Kyku5J83fWelSRZSHKVpBlJ22xf2fWmldi+UdKxJO+O+7EnIeojkjaddntG0tGOtpRje62Wgn4yyXNd72kiyVdaevXV1fzcxXZJN9n+VEs/Mu6w/cQ4HngSon5H0uW2L7M9paUXvn+h400l2LakRyUdSPJg13vOxvYlti9efv9CSddK+rjbVStLcl+SmSRbtPQ5+0qS28bx2Ks+6iSnJN0p6WUtPZHzTJL93a5ame2nJL0p6QrbR2zf0fWms9gu6XYtnUX2Lb9d3/WoFVwq6VXbH2rpC/3eJGP7NdEk4c9EgWJW/ZkawGCIGiiGqIFiiBoohqiBYogaKIaogWL+A5bKAhGUAHUkAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAJkklEQVR4nO3dT4ichR3G8efJJKmaVWxaDzabNB5EmkqrsAQhtyAl/sH0qKAnSy4VIgiiePLQY8WLl6BiQVEEpYpYbEBFBKuuGsU0BoLYGBViGyRupIZsnh5mC6nNZt6ZzDvvzo/vBxZ2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DhNztTbJN1i+zNJz0jabvvJVlcBGNnAqJPcn2Q2yWZJt0p6NcntrS8DMBJ+Tw0UM9Tb7iR5XdLrrSwBMBacqYFiiBoohqiBYogaKIaogWKIGiiGqIFiiBoohqiBYogaKIaogWKIGiiGqIFiiBoohqiBYogaKMZJxn9Q+2tJ/xjzYX8q6Z9jPmabpmnvNG2VpmtvW1t/nuSys13QStRtsD2fZK7rHU1N095p2ipN194utnL3GyiGqIFipinqPV0PGNI07Z2mrdJ07Z341ql5TA2gmWk6UwNogKiBYqYiats7bB+0fcj2fV3vORfbj9s+avvjrrcMYnuj7ddsH7C93/burjctx/YFtt+x/eHS1ge73tSE7Z7tD2y/NKnrXPFR2+5JekTSDZK2SLrN9pZuV53TE5J2dD2ioVOS7knyC0nXSfr9Cv6//V7S9iS/lnSNpB22r+t4UxO7JR2Y5BWu+KglbZV0KMmnSU6q/86bOzvetKwkb0g61vWOJpJ8leT9pc+/Vf/Gt6HbVWeXvoWlL9csfazoZ3ltz0q6SdKjk7zeaYh6g6TPz/j6iFboDW+a2d4s6VpJb3e7ZHlLd2X3SToqaW+SFbt1ycOS7pV0epJXOg1R+yz/tqJ/Qk8b2zOSnpN0d5LjXe9ZTpLFJNdImpW01fbVXW9aju2bJR1N8t6kr3saoj4iaeMZX89K+rKjLeXYXqN+0E8leb7rPU0k+Ub9d19dyc9dbJN0i+3P1H/IuN32k5O44mmI+l1JV9q+wvZa9d/4/sWON5Vg25Iek3QgyUNd7zkX25fZvnTp8wslXS/pk25XLS/J/Ulmk2xW/zb7apLbJ3HdKz7qJKck3SXpFfWfyHk2yf5uVy3P9tOS3pJ0le0jtu/setM5bJN0h/pnkX1LHzd2PWoZl0t6zfZH6v+g35tkYr8mmib8mShQzIo/UwMYDlEDxRA1UAxRA8UQNVAMUQPFEDVQzH8AL+QEMMAfPDgAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"grad = SpatialGradientFix()(inp)\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad[0,0,0].squeeze()))\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad[0,0,1].squeeze()))\n", | |
"\n", | |
"\n", | |
"inv_grad = SpatialGradientFix()(inv_inp)\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(inv_grad[0,0,0].squeeze()))\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(inv_grad[0,0,1].squeeze()))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.image.AxesImage at 0x7fb0f33a55c0>" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAIoklEQVR4nO3dz2ucBR7H8c9n09j4Y8HD9iBN2XoQ2SJsC6Er9Nb1EH+gVwt6EnJZoYIgevQfEC9eghYXFEXQgxQXKWuLCG41rVXsRqGIi0Ehu4hoFzZt9eNhhqXrJp0nk3nmyXx5vyCQ6QwzH0reeWaehIyTCEAdv+p6AIDRImqgGKIGiiFqoBiiBorZ0cadXuedmdGNbdw1AEn/0b91KWte77pWop7RjfqD/9jGXQOQdDp/3fA6nn4DxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFNIra9rztz21f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nJd0r6flxPu4kRL1b0ldXXV7RNv3Cm2S290o6IOl0t0s21n8qe07SqqQTSbbt1r5nJT0h6adxPugkRO11/m1bf4eeNLZvkvS6pMeSfN/1no0k+THJfkmzkg7avqPrTRuxfZ+k1SRnxv3YkxD1iqQ9V12elfR1R1vKsT2tXtAvJ3mj6z1NJPlOvXdf3c7nLg5Jut/2l+q9ZDxs+6VxPPAkRP2hpNts32r7OvXe+P7NjjeVYNuSXpC0nOSZrvdci+1dtm/uf369pLskfdbtqo0leSrJbJK96n3NvpPkoXE89raPOskVSY9Kelu9EzmvJTnf7aqN2X5F0vuSbre9YvuRrjddwyFJD6t3FDnX/7in61EbuEXSSdufqPeN/kSSsf2YaJLwa6JAMdv+SA1gc4gaKIaogWKIGiiGqIFiiBoohqiBYn4GtxjJGujraSIAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAAD4CAYAAAA0L6C7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAIoklEQVR4nO3dz2ucBR7H8c9n09j4Y8HD9iBN2XoQ2SJsC6Er9Nb1EH+gVwt6EnJZoYIgevQfEC9eghYXFEXQgxQXKWuLCG41rVXsRqGIi0Ehu4hoFzZt9eNhhqXrJp0nk3nmyXx5vyCQ6QwzH0reeWaehIyTCEAdv+p6AIDRImqgGKIGiiFqoBiiBorZ0cadXuedmdGNbdw1AEn/0b91KWte77pWop7RjfqD/9jGXQOQdDp/3fA6nn4DxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA8UQNVAMUQPFEDVQDFEDxRA1UAxRA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tdtb70XOxfnO5/bOuzvLZnJd0r6flxPu4kRL1b0ldXXV7RNv3Cm2S290o6IOl0t0s21n8qe07SqqQTSbbt1r5nJT0h6adxPugkRO11/m1bf4eeNLZvkvS6pMeSfN/1no0k+THJfkmzkg7avqPrTRuxfZ+k1SRnxv3YkxD1iqQ9V12elfR1R1vKsT2tXtAvJ3mj6z1NJPlOvXdf3c7nLg5Jut/2l+q9ZDxs+6VxPPAkRP2hpNts32r7OvXe+P7NjjeVYNuSXpC0nOSZrvdci+1dtm/uf369pLskfdbtqo0leSrJbJK96n3NvpPkoXE89raPOskVSY9Kelu9EzmvJTnf7aqN2X5F0vuSbre9YvuRrjddwyFJD6t3FDnX/7in61EbuEXSSdufqPeN/kSSsf2YaJLwa6JAMdv+SA1gc4gaKIaogWKIGiiGqIFiiBoohqiBYn4GtxjJGujraSIAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"#Now there is no such problem\n", | |
"grad_sum = grad + inv_grad\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad_sum[0,0,0].squeeze()))\n", | |
"plt.figure()\n", | |
"plt.imshow(kornia.utils.tensor_to_image(grad_sum[0,0,1].squeeze()))" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment