Skip to content

Commit

Permalink
Merge pull request #82 from wzever/main
Browse files Browse the repository at this point in the history
Update images in multi-graph matching examples
  • Loading branch information
ziao-guo authored Nov 3, 2023
2 parents 762eee8 + 2ff55a1 commit cc3f147
Show file tree
Hide file tree
Showing 55 changed files with 44 additions and 44 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in jt.nonzero(A):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(4 * n_images, 4))\nfor i in range(n_images):\n plt.subplot(1, n_images, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in jt.nonzero(A):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(20, 18))\nfor i in range(n_images):\n plt.subplot(5, n_images // 5, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
]
},
{
Expand Down Expand Up @@ -251,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d48ef520bd61129c42b6c0d8a51b831e
b91b4dc840d3fa5e0328a1cb68af1d04
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Visualize the images and keypoints
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')
plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down Expand Up @@ -722,7 +722,7 @@ See :func:`~pygmtools.multi_graph_solvers.mgm_floyd` for the API reference.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 1 minutes 25.270 seconds)
**Total running time of the script:** (5 minutes 51.393 seconds)


.. _sphx_glr_download_auto_examples_4.multi-graph_matching_plot_multi_graph_match_jittor.py:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in np.nonzero(A):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(4 * n_images, 4))\nfor i in range(n_images):\n plt.subplot(1, n_images, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in np.nonzero(A):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(20, 18))\nfor i in range(n_images):\n plt.subplot(5, n_images // 5, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
]
},
{
Expand Down Expand Up @@ -251,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e5c0b27bad407c4b33ae23d7caa4103d
9ebd5c9928f368c71ae157def099aab1
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Visualize the images and keypoints
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')
plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down Expand Up @@ -721,7 +721,7 @@ See :func:`~pygmtools.multi_graph_solvers.mgm_floyd` for the API reference.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 1 minutes 11.797 seconds)
**Total running time of the script:** (1 minutes 49.312 seconds)


.. _sphx_glr_download_auto_examples_4.multi-graph_matching_plot_multi_graph_match_numpy.py:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in pd.nonzero(A, as_tuple=False):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(4 * n_images, 4))\nfor i in range(n_images):\n plt.subplot(1, n_images, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in pd.nonzero(A, as_tuple=False):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(20, 18))\nfor i in range(n_images):\n plt.subplot(5, n_images // 5, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
]
},
{
Expand Down Expand Up @@ -251,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c5f81b06d760fcd7a8113a93652144a3
310c7026d5ff484fb86747dd0f1357e0
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Visualize the images and keypoints
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')
plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down Expand Up @@ -540,9 +540,9 @@ See :func:`~pygmtools.classic_solvers.rrwm` for the API reference.

.. code-block:: none
/home/wzever/miniconda3/envs/pygm/lib/python3.9/site-packages/paddle/fluid/variable_index.py:292: UserWarning: 1-D Tensor will be treat as advanced indexing in future version. Currently, 1-D Tensor means a scalar, not vector, and please modify it to 0-D Tensor. If advanced indexing is needed, please use `export FLAGS_set_to_1d=False` to set the flag.
/home/wzever/miniconda3/envs/pygmtools/lib/python3.10/site-packages/paddle/fluid/variable_index.py:292: UserWarning: 1-D Tensor will be treat as advanced indexing in future version. Currently, 1-D Tensor means a scalar, not vector, and please modify it to 0-D Tensor. If advanced indexing is needed, please use `export FLAGS_set_to_1d=False` to set the flag.
warnings.warn(
/home/wzever/miniconda3/envs/pygm/lib/python3.9/site-packages/paddle/fluid/variable_index.py:591: UserWarning: Warning: In Tensor '__getitem__', if the number of scalar elements in the index is equal to the rank of the Tensor, the output should be 0-D. In order to be consistent with the behavior of previous versions, it will be processed to 1-D. But it is not correct and will be removed in release 2.6. If 1-D is still wanted, please modify the index element from scalar to slice (e.g. 'x[i]' => 'x[i:i+1]').
/home/wzever/miniconda3/envs/pygmtools/lib/python3.10/site-packages/paddle/fluid/variable_index.py:591: UserWarning: Warning: In Tensor '__getitem__', if the number of scalar elements in the index is equal to the rank of the Tensor, the output should be 0-D. In order to be consistent with the behavior of previous versions, it will be processed to 1-D. But it is not correct and will be removed in release 2.6. If 1-D is still wanted, please modify the index element from scalar to slice (e.g. 'x[i]' => 'x[i:i+1]').
warnings.warn(
Expand Down Expand Up @@ -731,7 +731,7 @@ See :func:`~pygmtools.multi_graph_solvers.mgm_floyd` for the API reference.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 2 minutes 9.460 seconds)
**Total running time of the script:** (0 minutes 50.203 seconds)


.. _sphx_glr_download_auto_examples_4.multi-graph_matching_plot_multi_graph_match_paddle.py:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in torch.nonzero(A, as_tuple=False):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(4 * n_images, 4))\nfor i in range(n_images):\n plt.subplot(1, n_images, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
"def plot_image_with_graph(img, kpt, A=None):\n plt.imshow(img)\n plt.scatter(kpt[0], kpt[1], c='w', edgecolors='k')\n if A is not None:\n for idx in torch.nonzero(A, as_tuple=False):\n plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')\n\n\nplt.figure(figsize=(20, 18))\nfor i in range(n_images):\n plt.subplot(5, n_images // 5, i + 1)\n plt.title('Image {}'.format(i + 1))\n plot_image_with_graph(img_list[i], kpts_list[i])\n# plt.savefig('image')\n# plt.close()"
]
},
{
Expand Down Expand Up @@ -251,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a0d8d675740b603dedb910fa1e92f521
df6b31ae110d445a633822533bb5e297
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Visualize the images and keypoints
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')
plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down Expand Up @@ -722,7 +722,7 @@ See :func:`~pygmtools.multi_graph_solvers.mgm_floyd` for the API reference.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 25.334 seconds)
**Total running time of the script:** (0 minutes 21.335 seconds)


.. _sphx_glr_download_auto_examples_4.multi-graph_matching_plot_multi_graph_match_pytorch.py:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

Computation times
=================
**01:25.270** total execution time for **auto_examples_4.multi-graph_matching** files:
**05:51.393** total execution time for **auto_examples_4.multi-graph_matching** files:

+--------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_4.multi-graph_matching_plot_multi_graph_match_jittor.py` (``plot_multi_graph_match_jittor.py``) | 01:25.270 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_4.multi-graph_matching_plot_multi_graph_match_jittor.py` (``plot_multi_graph_match_jittor.py``) | 05:51.393 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_4.multi-graph_matching_plot_multi_graph_match_numpy.py` (``plot_multi_graph_match_numpy.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------------------------------------------+-----------+--------+
Expand Down
Binary file added docs/auto_examples/auto_examples_jupyter.zip
Binary file not shown.
Binary file added docs/auto_examples/auto_examples_python.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def plot_image_with_graph(img, kpt, A=None):
plt.plot((kpt[0, idx[0]], kpt[0, idx[1]]), (kpt[1, idx[0]], kpt[1, idx[1]]), 'k-')


plt.figure(figsize=(4 * n_images, 4))
plt.figure(figsize=(20, 18))
for i in range(n_images):
plt.subplot(1, n_images, i + 1)
plt.subplot(5, n_images // 5, i + 1)
plt.title('Image {}'.format(i + 1))
plot_image_with_graph(img_list[i], kpts_list[i])
# plt.savefig('image')
Expand Down

0 comments on commit cc3f147

Please sign in to comment.