Skip to content

[MRG] Change image in segmentation example #10647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jotasi
Copy link

@jotasi jotasi commented Feb 16, 2018

Reference Issues/PRs

Fixes #10607

What does this implement/fix? Explain your changes.

This replaces the racoon face used in the image segmentation examples. It does not have sharp boundaries and thus the resulting segmentation is not very instructive (see #10607 for images). As scikit-image is already a dependency for these two examples, skimage.data.coins is used instead. Due to the sharper boundaries the results correctness can be judged much more intuitively. (I'll add the links to the images as soon as the build is done.)

@agramfort
Copy link
Member

did we agree on requiring skimage to build the doc?

@jotasi
Copy link
Author

jotasi commented Feb 17, 2018

The dependency on scikit-image was introduced in #10527 after the discussion in #10502. As imresize in SciPy was deprecated, it had to be replaced. Internally, this was solved by adding the SciPy code as a _pilutil module to externals. But as pointed out by @jnothman in #10502 using a private module in an example is somewhat of a bad idea and thus in #10527 the replacement suggested by SciPy in their deprecation (namely the functionality in skimage.transform) was used instead.

@agramfort
Copy link
Member

agramfort commented Feb 17, 2018 via email

@jotasi
Copy link
Author

jotasi commented Feb 17, 2018

@agramfort Sure, no problem :)

As the doc-build is finished now, here are the new images (see #10607 for the old ones):

plot_coin_segmentation:
image
image

plot_coin_ward_segmentation:
image

@jotasi jotasi changed the title [WIP] Change image in segmentation example [MRG] Change image in segmentation example Feb 17, 2018
@jnothman jnothman merged commit cf9c67e into scikit-learn:master Feb 18, 2018
wdevazelhes added a commit to wdevazelhes/scikit-learn that referenced this pull request Feb 20, 2018
@amueller
Copy link
Member

The skimage doc dependency is not documented, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choose a better image in the examples demonstrating clustering on images
4 participants