
Hi everybody. I was wondering whether you are interested in having more image segmentation algorithms in skimage. As far as I can see, there is mainly watershed there at the moment. I'd like to implement mean shift, quick shift, Felsenzwalb's graph based method and a k-means based method. Some of these are particularly interesting for super pixel creation. Also: is there a strong desire do support both 2d and 3d images? (or even n-d?) I haven't been following the project to closely recently. Cheers, Andy

I think a stable of basic segmentation algorithms would be a really useful addition! I'm agnostic on whether they ought to support 3d/nd also... Zach On Jun 15, 2012, at 10:29 AM, Andreas Mueller wrote:
Hi everybody. I was wondering whether you are interested in having more image segmentation algorithms in skimage. As far as I can see, there is mainly watershed there at the moment.
I'd like to implement mean shift, quick shift, Felsenzwalb's graph based method and a k-means based method. Some of these are particularly interesting for super pixel creation.
Also: is there a strong desire do support both 2d and 3d images? (or even n-d?) I haven't been following the project to closely recently.
Cheers, Andy

Hi Andy, we would love to have more segmentation algorithms! In addition to the watershed, there is also the random walker algorithm which can be more robust for noisy images, with weak contours. Since I'm using skimage for processing mostly 3-D images (from X-ray tomography), I'm strongly biased towards 3-D support. But in fact, it's only worth implementing an algorithm for 3-D images if it's fast enough and does not have too high a memory load, since the data are much larger (nobody wants to wait one day for the segmentation of a 1000*1000*1000 image... whereas one minute for a 1000x1000 image might still be decent enough in 2-D). About n-d I don't know. The random walker, for example, works for 2-D and 3-D ndarrays. Looking forward to your new segmentation algorithms :-)! Cheers, Emmanuelle On Fri, Jun 15, 2012 at 04:29:55PM +0200, Andreas Mueller wrote:
Hi everybody. I was wondering whether you are interested in having more image segmentation algorithms in skimage. As far as I can see, there is mainly watershed there at the moment.
I'd like to implement mean shift, quick shift, Felsenzwalb's graph based method and a k-means based method. Some of these are particularly interesting for super pixel creation.
Also: is there a strong desire do support both 2d and 3d images? (or even n-d?) I haven't been following the project to closely recently.
Cheers, Andy

Hi Emanuelle and Zachary. Thanks for the positive feedback. @Emanuelle: Are there examples in scikit-image for using 3d images? I didn't find anything in the gallery. I am not very familiar with this kind of data but if I have some "typical" case, I can see how it goes. Cheers, Andy Am 15.06.2012 17:17, schrieb Emmanuelle Gouillart:
Hi Andy,
we would love to have more segmentation algorithms! In addition to the watershed, there is also the random walker algorithm which can be more robust for noisy images, with weak contours.
Since I'm using skimage for processing mostly 3-D images (from X-ray tomography), I'm strongly biased towards 3-D support. But in fact, it's only worth implementing an algorithm for 3-D images if it's fast enough and does not have too high a memory load, since the data are much larger (nobody wants to wait one day for the segmentation of a 1000*1000*1000 image... whereas one minute for a 1000x1000 image might still be decent enough in 2-D). About n-d I don't know. The random walker, for example, works for 2-D and 3-D ndarrays.
Looking forward to your new segmentation algorithms :-)!
Cheers, Emmanuelle
On Fri, Jun 15, 2012 at 04:29:55PM +0200, Andreas Mueller wrote:
Hi everybody. I was wondering whether you are interested in having more image segmentation algorithms in skimage. As far as I can see, there is mainly watershed there at the moment. I'd like to implement mean shift, quick shift, Felsenzwalb's graph based method and a k-means based method. Some of these are particularly interesting for super pixel creation. Also: is there a strong desire do support both 2d and 3d images? (or even n-d?) I haven't been following the project to closely recently. Cheers, Andy

Hi Andy,
@Emanuelle: Are there examples in scikit-image for using 3d images? I didn't find anything in the gallery.
no, there are no examples with 3-D images. The main reason why I didn't write any such 3-D example is that visualization of the result would best be done with Mayavi, and since the code of the examples is executed when the doc is built, there will be errors if mayavi is not installed. But the principle of a segmentation algorithm is often the same in 2-D and in 3-D. The example http://scikits-image.org/docs/dev/auto_examples/plot_random_walker_segmentat... could have been done on a similar 3-D image. I could, however, write a tutorial on how to deal with the processing of 3-D images with numpy/skimage/mayavi...
I am not very familiar with this kind of data but if I have some "typical" case, I can see how it goes.
3-D data that I'm aware of are mostly medical images and materials science image (MRI, CT, FIB). Compared to 2-D images, we usually do not have such things as "natural 3-D images", and images are more "homogeneous". (I hope I'm not saying too much nonsense -- what I mean is that usually you do not try to detect people or faces in 3-D images! But I might have a too limited viewpoint.). In Python/skimage, these 3-D images would be just 3-D arrays (usually 3-D images are in grayscale and not in color), with the array values corresponding to the pixel values (actually, a pixel is called voxel in 3-D). If you start working on 2-D algorithms, I can give you a hand to see whether it would be relevant to have them in 3-D as well, and how to do it. Cheers, Emmanuelle

Hi, I have a very simple algorithm for segmenting images, based on gaussian blurring and could be made available in skimage (implies a change of licence but it's not an issue on my side). This algorithm is probably not new and has probably a name that I don't know. It uses small pieces of Cython for speed and fftw if possible (scipy.ndimage.filters.gaussian_filter if not) Segmenting a 1kx1k image is done in 1s, larger images are usually binned to 1kx1k then unbinned to the original size. Beside the input image, the code needs a "typical valley size" to isolate groups of peaks form each other. Cheers, -- Jérôme Kieffer <google@terre-adelie.org> PS: see Massif in https://github.com/kif/pyFAI/blob/master/pyFAI-src/peakPicker.py

Hi J�r�me, for which kind of images / objects to be segmented is this algorithm suited for? Do you have an example script? Cheers, Emmanuelle off-topic PS: I'll be at the ESRF synchrotron next week, from Tuesday 26th to the end of the week. See you there next week, maybe! On Sat, Jun 16, 2012 at 10:33:08AM +0200, J�r�me Kieffer wrote:
Hi,
I have a very simple algorithm for segmenting images, based on gaussian blurring and could be made available in skimage (implies a change of licence but it's not an issue on my side).
This algorithm is probably not new and has probably a name that I don't know. It uses small pieces of Cython for speed and fftw if possible (scipy.ndimage.filters.gaussian_filter if not)
Segmenting a 1kx1k image is done in 1s, larger images are usually binned to 1kx1k then unbinned to the original size.
Beside the input image, the code needs a "typical valley size" to isolate groups of peaks form each other.
Cheers,

On Mon, 18 Jun 2012 13:18:06 +0200 Emmanuelle Gouillart <emmanuelle.gouillart@nsup.org> wrote:
Hi Jérôme,
for which kind of images / objects to be segmented is this algorithm suited for? Do you have an example script?
I tweeked a bit the original image to have something showing up (np.log(a.clip(1,1000)). Then I run the segmenting
off-topic PS: I'll be at the ESRF synchrotron next week, from Tuesday 26th to the end of the week. See you there next week, maybe!
If you can manage to come earlyer: we are organizing a workshop of the deployment of Debian in science facilities on monday+tuesday... See you. -- Jérôme Kieffer <google@terre-adelie.org>

Hi everybody. One more question before I dig into the code: What is your stance on pep8? I saw that it is not followed everywhere in the code. Should new code adhere to pep8? In scikit-learn, I'm a bit of a nazi when it comes to that ;) Cheers, Andy

On Fri, Jun 15, 2012 at 1:53 PM, Andreas Mueller <amueller@ais.uni-bonn.de>wrote:
Hi everybody. One more question before I dig into the code: What is your stance on pep8? I saw that it is not followed everywhere in the code. Should new code adhere to pep8? In scikit-learn, I'm a bit of a nazi when it comes to that ;)
Cheers, Andy
Hi Andy, We definitely try to follow PEP8 and the numpy docstring standard<https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>. Sometimes that gets overlooked in code review, but it's usually best to follow these conventions. Looking forward to seeing some pull requests :) Cheers, -Tony

Hi Andreas On Fri, Jun 15, 2012 at 10:53 AM, Andreas Mueller <amueller@ais.uni-bonn.de> wrote:
One more question before I dig into the code: What is your stance on pep8? I saw that it is not followed everywhere in the code. Should new code adhere to pep8? In scikit-learn, I'm a bit of a nazi when it comes to that ;)
We encourage the use of PEP08, but also to use good judgement with the aim of writing well readable code. I.e., some parts of PEP08 are more important than others (personally, I don't care all that much about two blank lines between functions and even prefer the exponent to be close to the base, a**2). That said, any PEP08 cleanups are welcome. Stéfan

Hi Andreas On Fri, Jun 15, 2012 at 7:29 AM, Andreas Mueller <amueller@ais.uni-bonn.de> wrote:
I was wondering whether you are interested in having more image segmentation algorithms in skimage.
I am also very interested in matting algorithms and graph cuts, e.g.: http://www.inf.ufrgs.br/~eslgastal/SharedMatting/ Stéfan
participants (7)
-
Andreas Mueller
-
Emmanuelle Gouillart
-
Jaidev Deshpande
-
Jérôme Kieffer
-
Stéfan van der Walt
-
Tony Yu
-
Zachary Pincus