Re: Multispectral random walker segmentation
Hi Josh, extending the random walker algorithm to multichannel images sounds like a very nice idea, and I'm sure that it would be useful for other people (including myself!). In fact, I had started working on some improvements of the random walker code but didn't go as far as proposing the pull request. I have a branch for that on https://github.com/emmanuelle/scikits.image/tree/fix_random_walker, maybe you can include these changes when you contribute your changes? Cheers, Emmanuelle On Mon, Aug 20, 2012 at 10:03:53AM -0700, Josh Warner wrote:
I have modified the existing random walker algorithm into a fully backwards-compatible version which allows inclusion of multispectral data, e.g. RGBA channels or different (registered) image modalities. �I really liked the existing algorithm, so I just extended it rather than write one from scratch for my own purposes. �The overhead is minimal; multispectral processing is triggered if data is passed as an iterable of arrays rather than just an array. � This amounts to combining image gradients as sqrt(sum-of-squares) and dividing by sqrt(#channels). �For obvious reasons, the several channels must be pre-processed to have data on similar ranges by whitening or a similar method. �Not usually a problem for RGB, but in medical imaging this rears its head. Would this be of interest to the community? �I'd be happy to contribute the changes if there is interest.
I'd be happy to include your suggested changes, if it's simpler to go that route than have two separate pull requests. I don't want to step on any toes regarding attribution, though. Having the 'soft' probabilities available is definitely a useful improvement (cleanup, fuzzy post-processing), and I'm glad you implemented that! Josh On Monday, August 20, 2012 4:11:45 PM UTC-5, Emmanuelle Gouillart wrote:
Hi Josh,
extending the random walker algorithm to multichannel images sounds like a very nice idea, and I'm sure that it would be useful for other people (including myself!).
In fact, I had started working on some improvements of the random walker code but didn't go as far as proposing the pull request. I have a branch for that on https://github.com/emmanuelle/scikits.image/tree/fix_random_walker, maybe you can include these changes when you contribute your changes?
Cheers, Emmanuelle
On Mon, Aug 20, 2012 at 10:03:53AM -0700, Josh Warner wrote:
I have modified the existing random walker algorithm into a fully backwards-compatible version which allows inclusion of multispectral data, e.g. RGBA channels or different (registered) image modalities. �I really liked the existing algorithm, so I just extended it rather than write one from scratch for my own purposes. �The overhead is minimal; multispectral processing is triggered if data is passed as an iterable of arrays rather than just an array. � This amounts to combining image gradients as sqrt(sum-of-squares) and dividing by sqrt(#channels). �For obvious reasons, the several channels must be pre-processed to have data on similar ranges by whitening or a similar method. �Not usually a problem for RGB, but in medical imaging this rears its head. Would this be of interest to the community? �I'd be happy to contribute the changes if there is interest.
Hi Josh, my changes have been merged, so if you pull from github they are in the master branch now, you can add your changes and make a pull request! Cheers, Emmanuelle On Thu, Aug 23, 2012 at 02:50:05PM -0700, Josh Warner wrote:
I'd be happy to include your suggested changes, if it's simpler to go that route than have two separate pull requests. �I don't want to step on any toes regarding attribution, though. � Having the 'soft' probabilities available is definitely a useful improvement (cleanup, fuzzy post-processing), and I'm glad you implemented that! � Josh
On Monday, August 20, 2012 4:11:45 PM UTC-5, Emmanuelle Gouillart wrote:
Hi Josh,
extending the random walker algorithm to multichannel images sounds like a very nice idea, and I'm sure that it would be useful for other people (including myself!).
In fact, I had started working on some improvements of the random walker code but didn't go as far as proposing the pull request. I have a branch for that on [1]https://github.com/emmanuelle/scikits.image/tree/fix_random_walker, maybe you can include these changes when you contribute your changes?
Cheers, Emmanuelle
On Mon, Aug 20, 2012 at 10:03:53AM -0700, Josh Warner wrote: > � �I have modified the existing random walker algorithm into a fully > � �backwards-compatible version which allows inclusion of multispectral data, > � �e.g. RGBA channels or different (registered) image modalities. �I really > � �liked the existing algorithm, so I just extended it rather than write one > � �from scratch for my own purposes. �The overhead is minimal; multispectral > � �processing is triggered if data is passed as an iterable of arrays rather > � �than just an array. � > � �This amounts to combining image gradients as sqrt(sum-of-squares) and > � �dividing by sqrt(#channels). �For obvious reasons, the several channels > � �must be pre-processed to have data on similar ranges by whitening or a > � �similar method. �Not usually a problem for RGB, but in medical imaging > � �this rears its head. > � �Would this be of interest to the community? �I'd be happy to contribute > � �the changes if there is interest.
References
Visible links 1. https://github.com/emmanuelle/scikits.image/tree/fix_random_walker
Pull request is up! I also fixed a bug in the fallback call of _solve_cg() if pyamg is not installed. Comments appreciated. Josh On Monday, August 27, 2012 7:55:11 AM UTC-5, Emmanuelle Gouillart wrote:
Hi Josh,
my changes have been merged, so if you pull from github they are in the master branch now, you can add your changes and make a pull request!
Cheers, Emmanuelle
I'd be happy to include your suggested changes, if it's simpler to go
On Thu, Aug 23, 2012 at 02:50:05PM -0700, Josh Warner wrote: that
route than have two separate pull requests. �I don't want to step on any toes regarding attribution, though. � Having the 'soft' probabilities available is definitely a useful improvement (cleanup, fuzzy post-processing), and I'm glad you implemented that! � Josh
On Monday, August 20, 2012 4:11:45 PM UTC-5, Emmanuelle Gouillart wrote:
Hi Josh,
extending the random walker algorithm to multichannel images sounds
like
a very nice idea, and I'm sure that it would be useful for other
people
(including myself!).
In fact, I had started working on some improvements of the random
walker
code but didn't go as far as proposing the pull request. I have a
branch
for that on [1]
https://github.com/emmanuelle/scikits.image/tree/fix_random_walker,
maybe you can include these changes when you contribute your changes?
Cheers, Emmanuelle
On Mon, Aug 20, 2012 at 10:03:53AM -0700, Josh Warner wrote: > � �I have modified the existing random walker algorithm into
a fully
> � �backwards-compatible version which allows inclusion of multispectral data, > � �e.g. RGBA channels or different (registered) image
modalities. �I
really > � �liked the existing algorithm, so I just extended it rather
than
write one > � �from scratch for my own purposes. �The overhead is
minimal;
multispectral > � �processing is triggered if data is passed as an iterable
of arrays
rather > � �than just an array. � > � �This amounts to combining image gradients as
sqrt(sum-of-squares)
and > � �dividing by sqrt(#channels). �For obvious reasons, the
several
channels > � �must be pre-processed to have data on similar ranges by
whitening
or a > � �similar method. �Not usually a problem for RGB, but in
medical
imaging > � �this rears its head. > � �Would this be of interest to the community? �I'd be
happy to
contribute > � �the changes if there is interest.
References
Visible links 1. https://github.com/emmanuelle/scikits.image/tree/fix_random_walker
Wow, that was quick :-), thanks! I'll have a look tomorrow, I'm just back from Brussels and Euroscipy! Emmanuelle On Mon, Aug 27, 2012 at 02:18:22PM -0700, Josh Warner wrote:
Pull request is up! �I also fixed a bug in the fallback call of _solve_cg() if pyamg is not installed. �Comments appreciated. Josh On Monday, August 27, 2012 7:55:11 AM UTC-5, Emmanuelle Gouillart wrote:
Hi Josh,
my changes have been merged, so if you pull from github they are in the master branch now, you can add your changes and make a pull request!
Cheers, Emmanuelle
On Thu, Aug 23, 2012 at 02:50:05PM -0700, Josh Warner wrote: > � �I'd be happy to include your suggested changes, if it's simpler to go that > � �route than have two separate pull requests. �I don't want to step on any > � �toes regarding attribution, though. � > � �Having the 'soft' probabilities available is definitely a useful > � �improvement (cleanup, fuzzy post-processing), and I'm glad you implemented > � �that! � > � �Josh
> � �On Monday, August 20, 2012 4:11:45 PM UTC-5, Emmanuelle Gouillart wrote:
> � � �Hi Josh,
> � � �extending the random walker algorithm to multichannel images sounds like > � � �a very nice idea, and I'm sure that it would be useful for other people > � � �(including myself!).
> � � �In fact, I had started working on some improvements of the random walker > � � �code but didn't go as far as proposing the pull request. I have a branch > � � �for that on > � � �[1][1]https://github.com/emmanuelle/scikits.image/tree/fix_random_walker, > � � �maybe > � � �you can include these changes when you contribute your changes?
> � � �Cheers, > � � �Emmanuelle
> � � �On Mon, Aug 20, 2012 at 10:03:53AM -0700, Josh Warner wrote: > � � �> � �I have modified the existing random walker algorithm into a fully > � � �> � �backwards-compatible version which allows inclusion of > � � �multispectral data, > � � �> � �e.g. RGBA channels or different (registered) image modalities. �I > � � �really > � � �> � �liked the existing algorithm, so I just extended it rather than > � � �write one > � � �> � �from scratch for my own purposes. �The overhead is minimal; > � � �multispectral > � � �> � �processing is triggered if data is passed as an iterable of arrays > � � �rather > � � �> � �than just an array. � > � � �> � �This amounts to combining image gradients as sqrt(sum-of-squares) > � � �and > � � �> � �dividing by sqrt(#channels). �For obvious reasons, the several > � � �channels > � � �> � �must be pre-processed to have data on similar ranges by whitening > � � �or a > � � �> � �similar method. �Not usually a problem for RGB, but in medical > � � �imaging > � � �> � �this rears its head. > � � �> � �Would this be of interest to the community? �I'd be happy to > � � �contribute > � � �> � �the changes if there is interest.
> References
> � �Visible links > � �1. [2]https://github.com/emmanuelle/scikits.image/tree/fix_random_walker
References
Visible links 1. https://github.com/emmanuelle/scikits.image/tree/fix_random_walker 2. https://github.com/emmanuelle/scikits.image/tree/fix_random_walker
I noticed a documentation inconsistency in `labels` for random_walker; it hadn't been updated with the rest of the file and still said `labels` should be the same shape as `data`. This is true for the single-channel case, but for multichannel input `labels` should look like a single channel (missing the final dimension in `data`). Proposed docfix is submitted in a PR. Josh On Monday, August 27, 2012 4:27:33 PM UTC-5, Emmanuelle Gouillart wrote:
Wow, that was quick :-), thanks!
I'll have a look tomorrow, I'm just back from Brussels and Euroscipy!
Emmanuelle
On Mon, Aug 27, 2012 at 02:18:22PM -0700, Josh Warner wrote:
Pull request is up! �I also fixed a bug in the fallback call of _solve_cg() if pyamg is not installed. �Comments appreciated. Josh On Monday, August 27, 2012 7:55:11 AM UTC-5, Emmanuelle Gouillart wrote:
Hi Josh,
my changes have been merged, so if you pull from github they are in the master branch now, you can add your changes and make a pull
request!
Cheers, Emmanuelle
On Thu, Aug 23, 2012 at 02:50:05PM -0700, Josh Warner wrote: > � �I'd be happy to include your suggested changes, if it's
simpler to
go that > � �route than have two separate pull requests. �I don't
want to step
on any > � �toes regarding attribution, though. � > � �Having the 'soft' probabilities available is definitely a
useful
> � �improvement (cleanup, fuzzy post-processing), and I'm glad
you
implemented > � �that! � > � �Josh
> � �On Monday, August 20, 2012 4:11:45 PM UTC-5, Emmanuelle
Gouillart
wrote:
> � � �Hi Josh,
> � � �extending the random walker algorithm to multichannel
images
sounds like > � � �a very nice idea, and I'm sure that it would be useful
for other
people > � � �(including myself!).
> � � �In fact, I had started working on some improvements of
the random
walker > � � �code but didn't go as far as proposing the pull
request. I have a
branch > � � �for that on > � � �[1][1]
https://github.com/emmanuelle/scikits.image/tree/fix_random_walker,
> � � �maybe > � � �you can include these changes when you contribute your
changes?
> � � �Cheers, > � � �Emmanuelle
> � � �On Mon, Aug 20, 2012 at 10:03:53AM -0700, Josh Warner
wrote:
> � � �> � �I have modified the existing random walker
algorithm
into a fully > � � �> � �backwards-compatible version which allows
inclusion of
> � � �multispectral data, > � � �> � �e.g. RGBA channels or different (registered)
image
modalities. �I > � � �really > � � �> � �liked the existing algorithm, so I just
extended it
rather than > � � �write one > � � �> � �from scratch for my own purposes. �The
overhead is
minimal; > � � �multispectral > � � �> � �processing is triggered if data is passed as
an iterable
of arrays > � � �rather > � � �> � �than just an array. � > � � �> � �This amounts to combining image gradients as sqrt(sum-of-squares) > � � �and > � � �> � �dividing by sqrt(#channels). �For obvious
reasons, the
several > � � �channels > � � �> � �must be pre-processed to have data on similar
ranges by
whitening > � � �or a > � � �> � �similar method. �Not usually a problem for
RGB, but in
medical > � � �imaging > � � �> � �this rears its head. > � � �> � �Would this be of interest to the community?
�I'd be
happy to > � � �contribute > � � �> � �the changes if there is interest.
> References
> � �Visible links > � �1. [2]
https://github.com/emmanuelle/scikits.image/tree/fix_random_walker
References
Visible links 1. https://github.com/emmanuelle/scikits.image/tree/fix_random_walker 2. https://github.com/emmanuelle/scikits.image/tree/fix_random_walker
On Mon, Sep 17, 2012 at 3:09 PM, Josh Warner <silvertrumpet999@gmail.com> wrote:
I noticed a documentation inconsistency in `labels` for random_walker; it hadn't been updated with the rest of the file and still said `labels` should be the same shape as `data`. This is true for the single-channel case, but for multichannel input `labels` should look like a single channel (missing the final dimension in `data`). Proposed docfix is submitted in a PR.
Thanks, Josh! I merged your PR. Stéfan
participants (3)
-
Emmanuelle Gouillart
-
Josh Warner
-
Stéfan van der Walt