Skip to content

Image (3D RGB data) segmentation by spectral clustering with 3D illustrations - #7040

Merged
MridulS merged 29 commits into
networkx:mainfrom
lobpcg:patch-1
Dec 5, 2023
Merged

MridulS merged 29 commits into
networkx:mainfrom
lobpcg:patch-1

Conversation

@lobpcg

@lobpcg lobpcg commented Oct 22, 2023 •

Copy link
Copy Markdown
Contributor

Motivated by #4643

If #7025 is merged first, I could add animation by rotating the 3D graphs.

@lobpcg
lobpcg marked this pull request as draft October 22, 2023 04:07
@lobpcg lobpcg changed the title Image (#D RGB data) segmentation by spectral clustering with 3D illustrations Image (3D RGB data) segmentation by spectral clustering with 3D illustrations Oct 22, 2023
@dschult

dschult commented Oct 22, 2023

Copy link
Copy Markdown
Member

The doc build is failing silently. I'm not sure why it isn't failing loudly.
The problem is that the extendability.rst file has the wrong function name in it. My mistake in #4890
Will fix that soon. I don't know why that would affect animation, but who knows at this point.

@lobpcg

lobpcg commented Oct 23, 2023

Copy link
Copy Markdown
Contributor Author

The doc build is failing silently. I'm not sure why it isn't failing loudly. The problem is that the extendability.rst file has the wrong function name in it. My mistake in #4890 Will fix that soon. I don't know why that would affect animation, but who knows at this point.

This PR has no animation, still fails to generate any new static images. Please ping me after you fix the issue.

@dschult my silly mistake - a module must be named plot_ to be processed for plotting.

@dschult

dschult commented Oct 23, 2023

Copy link
Copy Markdown
Member

You will need to add the package scikit-learn to the requirements file requirements/example.txt.

@lobpcg

lobpcg commented Oct 25, 2023

Copy link
Copy Markdown
Contributor Author

Ready for review/merge, please

@lobpcg

lobpcg commented Nov 2, 2023 •

Copy link
Copy Markdown
Contributor Author

Pics from the in-line documentation auto-created by Sphynx:
image
image

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Other than turning on animations in the docs, are there other code changes you would need to make the animations turn on?

I'm going to approve this -- but it'd be nice to get the animations going before it is merged. If turning them on globally is all that is needed, you could add that same line to the doc/conf.py file that the other PR has. So long as they are identical they won't conflict.

@lobpcg

lobpcg commented Nov 7, 2023

Copy link
Copy Markdown
Contributor Author

I think it's better to move to Algorithms from 3d plots, so will do next.

@lobpcg

lobpcg commented Nov 7, 2023

Copy link
Copy Markdown
Contributor Author

While waiting for the second review, I have added two 3D animations: of the clustered data and of the partitioned graph. Ready for final review/merge, please

@MridulS

MridulS commented Dec 5, 2023

Copy link
Copy Markdown
Member

This looks great! Thanks @lobpcg :)

@MridulS
MridulS merged commit 862b0e9 into networkx:main Dec 5, 2023
@MridulS MridulS added this to the 3.3 milestone Dec 5, 2023
@lobpcg
lobpcg deleted the patch-1 branch December 5, 2023 13:26
padath314 pushed a commit to padath314/networkx that referenced this pull request Dec 5, 2023
…trations (networkx#7040)

* Initial Create 3d_rotation_anime.py

Check how it appears in the docs

* remove text 3d_rotation_anime.py

[skip active]

* complete image_segmentation_spectral_graph_partiion.py.py

* plot directly image_segmentation_spectral_graph_partiion.py.py

* format + sample known plot image_segmentation_spectral_graph_partiion.py.py

* errors fixed image_segmentation_spectral_graph_partiion.py.py

* Rename image_segmentation_spectral_graph_partiion.py.py to plot_image_segmentation_spectral_graph_partiion.py.py

* sklearn>=1.2 example.txt

* sklearn>=1.3.1 example.txt

* scikit-learn>=1.3.1 example.txt

* error sc name plot_image_segmentation_spectral_graph_partiion.py.py

* error + enumerate plot_image_segmentation_spectral_graph_partiion.py.py

* last enumerate plot_image_segmentation_spectral_graph_partiion.py.py

* matplotlib 3.8.0 example.txt

* minor plot_image_segmentation_spectral_graph_partiion.py.py

* color=tuple(X[i] / 255)  plot_image_segmentation_spectral_graph_partiion.py.py

matplotlib/matplotlib#26821

* error, style, comments plot_image_segmentation_spectral_graph_partiion.py.py

* remove matplotlib example.txt

* added Plot the RGB dataset as an image.

* style/comment edits plot_image_segmentation_spectral_graph_partiion.py.py

* lint " plot_image_segmentation_spectral_graph_partiion.py.py

* thumbnail networkx#3 plot_image_segmentation_spectral_graph_partiion.py.py

* move to Algorithms plot_image_segmentation_spectral_graph_partiion.py

* Delete examples/3d_drawing/plot_image_segmentation_spectral_graph_partiion.py.py

* data animation added plot_image_segmentation_spectral_graph_partiion.py

* anime fix + lint plot_image_segmentation_spectral_graph_partiion.py

* add graph animation plot_image_segmentation_spectral_graph_partiion.py
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
…trations (networkx#7040)

* Initial Create 3d_rotation_anime.py

Check how it appears in the docs

* remove text 3d_rotation_anime.py

[skip active]

* complete image_segmentation_spectral_graph_partiion.py.py

* plot directly image_segmentation_spectral_graph_partiion.py.py

* format + sample known plot image_segmentation_spectral_graph_partiion.py.py

* errors fixed image_segmentation_spectral_graph_partiion.py.py

* Rename image_segmentation_spectral_graph_partiion.py.py to plot_image_segmentation_spectral_graph_partiion.py.py

* sklearn>=1.2 example.txt

* sklearn>=1.3.1 example.txt

* scikit-learn>=1.3.1 example.txt

* error sc name plot_image_segmentation_spectral_graph_partiion.py.py

* error + enumerate plot_image_segmentation_spectral_graph_partiion.py.py

* last enumerate plot_image_segmentation_spectral_graph_partiion.py.py

* matplotlib 3.8.0 example.txt

* minor plot_image_segmentation_spectral_graph_partiion.py.py

* color=tuple(X[i] / 255)  plot_image_segmentation_spectral_graph_partiion.py.py

matplotlib/matplotlib#26821

* error, style, comments plot_image_segmentation_spectral_graph_partiion.py.py

* remove matplotlib example.txt

* added Plot the RGB dataset as an image.

* style/comment edits plot_image_segmentation_spectral_graph_partiion.py.py

* lint " plot_image_segmentation_spectral_graph_partiion.py.py

* thumbnail networkx#3 plot_image_segmentation_spectral_graph_partiion.py.py

* move to Algorithms plot_image_segmentation_spectral_graph_partiion.py

* Delete examples/3d_drawing/plot_image_segmentation_spectral_graph_partiion.py.py

* data animation added plot_image_segmentation_spectral_graph_partiion.py

* anime fix + lint plot_image_segmentation_spectral_graph_partiion.py

* add graph animation plot_image_segmentation_spectral_graph_partiion.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants