Add first biology example: segmentation of human cells with mitosis.#4648
Add first biology example: segmentation of human cells with mitosis.#4648jni merged 28 commits intoscikit-image:masterfrom
Conversation
|
Hello @mkcor! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-06-14 20:11:40 UTC |
| from skimage import feature, filters, io, morphology, util | ||
|
|
||
|
|
||
| image = io.imread('https://github.com/CellProfiler/examples/blob/master/ExampleHuman/images/AS_09125_050116030001_D03f00d0.tif?raw=true') |
There was a problem hiding this comment.
To be safe, I would suggest to host our own copy. Any comment on this @scikit-image/core ?
There was a problem hiding this comment.
I agree but I would host it in gitlab.com/scikit-image, or a new github repo, rather than here.
There was a problem hiding this comment.
@sciunto thanks for reviewing! In the PR description, I wrote: "At the moment, I'm fetching the example data from a public GitHub repo; I'm happy to discuss whether we should include the image in the (newly available) pooch registry." <-- Do you have an opinion on the latter?
There was a problem hiding this comment.
This was my thought, ie include it in pooch. @emmanuelle Do you agree?
There was a problem hiding this comment.
ok, let's host in https://gitlab.com/scikit-image/data as suggested by @jni. That will be our first image in this repo :-). When you do this @mkcor please add the origin of this image in the Readme of the repo. Then for adding the image to the registry you can copy what's done for the cells.tif dataset.
There was a problem hiding this comment.
Ok, great! PR submitted over at: https://gitlab.com/scikit-image/data/-/merge_requests/2
|
I'm not a biologist, but the example looks really cool :) After we make our decision on the image hosting, this is ready for me. |
|
CI arror: |
|
@sciunto thanks for pointing to the specific error in the CI build; I just looked up the Sphinx docs
|
| ##################################################################### | ||
| # To find suitable values for thresholds and filtering parameters, we proceed | ||
| # by dichotomy, visually and manually. | ||
|
|
There was a problem hiding this comment.
Here an alternative solution would be to use Hysteresis thresholding to keep connected components with values higher than the high multi-otsu threshold, but only if they also have pixels of higher value than an other (higher) threshold. This is a classical method to remove small spurious objects but have instead large smooth objects
divinding = filters.apply_hysteresis_threshold(image, thresholds[1], 1.4 * thresholds[1]), [0.5], colors="yellow"
The results are not completely the same as with the current method, but not being a biologist I would not know which result is the best.
|
I think one of the figures could use |
|
Thank you very much @mkcor for this very nice tutorial! You're right that it'd be great to have a review of the approach and the text by someone from life or medical sciences. Pinging @ThomasWalter and @JDWarner, and also the friends from CellProfiler who are kind enough to let us use their image @0x00b1 @AnneCarpenter |
Co-authored-by: Emmanuelle Gouillart <[email protected]>
Co-authored-by: Emmanuelle Gouillart <[email protected]>
|
It's certainly fine with the CellProfiler team to make a copy of that image if you deem that preferable. |
@jni ok, happy to leave the improvement of these colours to subsequent iterations! I just wanted to acknowledge @alexdesiqueira's suggestion
explicitly: I guess that, if the background is fully transparent -- as conventionally done, as @jni pointed out -- it may appear either black or white, depending on a convention(?) and/or the overlay situation. |
|
@emmanuelle I was about to update the changelog to acknowledge the reviewers on the biology side; just to make sure, is https://github.com/scikit-image/scikit-image/blob/master/doc/release/release_dev.rst the right file for me to update? |
@emmanuelle done 6819653. I thought that the segment counts would be a nice transition into the mitotic index discussion. PS: By 'binary array' I understand that you mean mono-channel image, right? |
Yes exactly! As you're editing this file you can also add an entry about your tutorial (see for example the changelog of 0.17 as an example) |
|
In the gallery the thumbnail is very dark (as in the attached picture) |
|
The CI failure has nothing to do with this PR (I'm working on it BTW). |
The way you've used contours is cool, indeed. I was thinking more of representing the 0.5 contour of a binary 0-1 / False-True array, so that the contour is the boundary between False and True, it can be a nice viz to superimpose such a contour over the initial image so that you can see both the image and its segmentation. But never mind it's not crucial here. |
emmanuelle
left a comment
There was a problem hiding this comment.
Approved once the warning raised by the watershed has been fixed. Thank you @mkcor!
|
Thank you for the detailed review, @emmanuelle! |
jni
left a comment
There was a problem hiding this comment.
@mkcor this is basically ready! I've made a small formatting suggestion to the release note update, as it needs to be a bullet point rather than a paragraph. I've also added another question for discussion about the dependency, but imho this can be merged without that suggestion, just wanted to flag it. Thanks! 🎉
Co-authored-by: Juan Nunez-Iglesias <[email protected]>
This reverts commit 022edae.
|
thank you all! |


Description
This addition falls under #4601 and aims at paving the way for bioimaging examples.
At the moment, I'm fetching the example data from a public GitHub repo; I'm happy to discuss whether we should include the image in the (newly available) pooch registry.
I would like to have a professional biologist proofread my content.
Anecdotally, I'm happy to share that I have used the 'flag' colormap for the first time ever:
Checklist
./doc/examples(new features only)./benchmarks, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py.doc/release/release_dev.rst.