
Hi, Recently I implemented and presented (with Ed Schofield) the grow-cut algorithm at the Melbourne Python Users Group (MPUG). Grow-cut is a nice approach to *supervised* image segmentation and should be of interest to scikit-image. The github repository is available here: https://github.com/nfaggian/growcut The algorithm works well on complex images and there are some nice examples in the repository - including a rudimentary GUI. As a part of a submission to scikit-image I believe we need to transform my "vectorized" numpy into some sensible Cython. Is anyone keen to help Ed and I make this our first contribution to scikit-image. Cheers, Nathan.

I can probably help out, though I don't know the algorithm. And happy to hear about MPUG. =) On Wed, Feb 20, 2013 at 8:23 AM, Nathan Faggian <nathan.faggian@gmail.com>wrote:
Hi,
Recently I implemented and presented (with Ed Schofield) the grow-cut algorithm at the Melbourne Python Users Group (MPUG). Grow-cut is a nice approach to *supervised* image segmentation and should be of interest to scikit-image. The github repository is available here:
https://github.com/nfaggian/growcut
The algorithm works well on complex images and there are some nice examples in the repository - including a rudimentary GUI. As a part of a submission to scikit-image I believe we need to transform my "vectorized" numpy into some sensible Cython.
Is anyone keen to help Ed and I make this our first contribution to scikit-image.
Cheers,
Nathan.
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

If the pure Python/numpy implementation is reasonably efficient I think Cython is not a strict requirement. For example, our random walker supervised segmentation algorithm does not have a Cython version... and Cython-izing would not greatly help it, as the vast majority of the execution time is spent solving the sparse system using one of several solvers. Using pyamg gives orders of magnitude more speed than Cython would. Thanks for making this available! I will take a look at your github examples and do some profiling. It all depends on the implementation and where the bottlenecks are. On Tuesday, February 19, 2013 3:23:05 PM UTC-6, Nathan Faggian wrote:
Hi,
Recently I implemented and presented (with Ed Schofield) the grow-cut algorithm at the Melbourne Python Users Group (MPUG). Grow-cut is a nice approach to *supervised* image segmentation and should be of interest to scikit-image. The github repository is available here:
https://github.com/nfaggian/growcut
The algorithm works well on complex images and there are some nice examples in the repository - including a rudimentary GUI. As a part of a submission to scikit-image I believe we need to transform my "vectorized" numpy into some sensible Cython.
Is anyone keen to help Ed and I make this our first contribution to scikit-image.
Cheers,
Nathan.

Hi Josh, If you can make the algorithm faster through better numpy vectorization I would be really keen to find out how. I suggested Cython because I was (mostly) wondering if the slower (automate) function was pushed to Cython how it would compare to fast (but memory hungry) numpy (numpyAutomate) function. Hopefully making this algorithm more suitable for large images or volumes. Any improvements that you can contribute to repository will be welcomed with open arms. Cheers, Nathan.

Hi Nathan, I just submitted a PR to your `growcut` repository which includes a Cython version of the non-vectorized `automate` function and a benchmark based on the flower example. On my laptop, it runs slightly faster than the vectorized Numpy implementation. It's as optimized as I can get it, though there is probably still some room for improvement. In my opinion, this would definitely be attractive to have in scikit-image, and I also like your interactive GUI example. Regards, Josh On Wednesday, February 20, 2013 6:47:09 PM UTC-6, Nathan Faggian wrote:
Hi Josh,
If you can make the algorithm faster through better numpy vectorization I would be really keen to find out how.
I suggested Cython because I was (mostly) wondering if the slower (automate) function was pushed to Cython how it would compare to fast (but memory hungry) numpy (numpyAutomate) function. Hopefully making this algorithm more suitable for large images or volumes.
Any improvements that you can contribute to repository will be welcomed with open arms.
Cheers,
Nathan.

Thanks Josh! This is fantastic, hopefully before the end of the day I will be able to review the changes. I will try and get a scikit image pull request going soon. Cheers, Nathan. On Tuesday, 26 February 2013 08:09:53 UTC+11, Josh Warner wrote:
Hi Nathan,
I just submitted a PR to your `growcut` repository which includes a Cython version of the non-vectorized `automate` function and a benchmark based on the flower example. On my laptop, it runs slightly faster than the vectorized Numpy implementation. It's as optimized as I can get it, though there is probably still some room for improvement.
In my opinion, this would definitely be attractive to have in scikit-image, and I also like your interactive GUI example.
Regards, Josh
On Wednesday, February 20, 2013 6:47:09 PM UTC-6, Nathan Faggian wrote:
Hi Josh,
If you can make the algorithm faster through better numpy vectorization I would be really keen to find out how.
I suggested Cython because I was (mostly) wondering if the slower (automate) function was pushed to Cython how it would compare to fast (but memory hungry) numpy (numpyAutomate) function. Hopefully making this algorithm more suitable for large images or volumes.
Any improvements that you can contribute to repository will be welcomed with open arms.
Cheers,
Nathan.
participants (3)
-
Josh Warner
-
Juan Nunez-Iglesias
-
Nathan Faggian