Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Timing comparisons between mahotas & scikits-image
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Luis Pedro Coelho  
View profile  
 More options Aug 30 2012, 12:52 pm
From: Luis Pedro Coelho <l...@luispedro.org>
Date: Thu, 30 Aug 2012 17:46:46 +0100
Local: Thurs, Aug 30 2012 12:46 pm
Subject: Timing comparisons between mahotas & scikits-image

Hello,

In the context of my previous email to pythonvision

https://groups.google.com/d/topic/pythonvision/SSCF4LUlRKQ/discussion

I made a timing comparison between mahotas & scikits-image.

operation   | mahotas  | pymorph  | skimage
------------+----------+----------+---------
erode       |    10.80 |    14.33 |    80.17
dilate      |    11.44 |     8.93 |    41.59
open        |    22.45 |    23.20 |    80.18
center mass |     7.05 |       NA |       NA
sobel       |    75.03 |       NA |   105.72
cwatershed  |   201.03 | 56586.50 |   290.41
daubechies  |    19.05 |       NA |       NA
haralick    |   306.48 |       NA |  7391.37

(Best viewed with fixed-width fonts)

The unit of measurement is the time it takes to run ``numpy.max(image)``
Mahotas is always faster than skimage (although pymorph is better for certain
morphological basic operations). I used GCLM in skimage to stand for Haralick,
which is a rough approximation.

I attach the script that generates these (against github skimage). If you
think that I have used skimage incorrectly, please let me know.

Best,
--
Luis Pedro Coelho | Institute for Molecular Medicine | http://luispedro.org

  timethings.py
2K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anthony Oliver  
View profile  
 More options Aug 30 2012, 1:47 pm
From: Anthony Oliver <anth...@sightmachine.com>
Date: Thu, 30 Aug 2012 13:46:17 -0400
Local: Thurs, Aug 30 2012 1:46 pm
Subject: Re: Timing comparisons between mahotas & scikits-image

Very impressive.   Would it be possible to integrate numba as well with
mahotas?  I haven't tested it much but seems to get quite a bit of speed up
using it.

https://github.com/numba/numba

You should put the speed test results on a website or blog somewhere.  I
checked pythonvision.org but it looks like it is broken at the moment.

CTO
Sight Machine
Anthony Oliver
www.sightmachine.com
906-289-8169

On Thu, Aug 30, 2012 at 1:44 PM, Anthony Oliver <anth...@sightmachine.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Pedro Coelho  
View profile  
 More options Aug 30 2012, 6:53 pm
From: Luis Pedro Coelho <l...@luispedro.org>
Date: Thu, 30 Aug 2012 23:53:00 +0100
Subject: Re: Timing comparisons between mahotas & scikits-image

I have not yet tried numba. I tend to be a bit behind the curve on these
things.

I updated the table with openCV, which is ridiculously fast, but only
supports C-Arrays (otherwise, you get an interpreter crash). Check Table
1 on page 7 on the new version of the paper (attached).

Stéfan: I have not yet fixed your reference, but I will have to redo all
of the references for the final manuscript.

Best,
Luis

PS: Since updating that server, I have had problems with configuration
on pythonvision.org. I will figure it out when I decide to lose a few
hours on nginx/apache configuration.

On 08/30/2012 06:46 PM, Anthony Oliver wrote:

  paper.pdf
342K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Pedro Coelho  
View profile  
 More options Aug 31 2012, 12:24 pm
From: Luis Pedro Coelho <l...@luispedro.org>
Date: Fri, 31 Aug 2012 17:18:35 +0100
Local: Fri, Aug 31 2012 12:18 pm
Subject: Re: Timing comparisons between mahotas & scikits-image
One good thing about benchmarks is that I always end up improving my code :)

Here is the new table with openCV and github master version of Mahotas (10~20%
faster on morphological operations):

operation   |  mahotas |   pymorph|  skimage |  OpenCV
------------+----------+----------+----------+---------
erode       |     10.3 |     14.2 |     41.5 |      0.4
dilate      |     12.7 |      8.9 |     38.9 |      0.4
open        |     23.0 |     23.3 |     80.8 |       NA
center mass |      7.1 |       NA |       NA |       NA
sobel       |     75.4 |       NA |    105.4 |      6.2
cwatershed  |    191.3 |  60410.0 |    285.0 |     42.1
daubechies  |     20.3 |       NA |       NA |       NA
haralick    |    304.5 |       NA |   7615.8 |       NA

(Best viewed in fixed-font)

OpenCV is really fast. Erosion is faster than simply count 1 pixels:

%timeit cv2.erode(fbin8, Bc8)
10000 loops, best of 3: 35.9 us per loop

%timeit np.sum(fbin8)
10000 loops, best of 3: 110 us per loop

Best,
Luis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stéfan van der Walt  
View profile  
 More options Sep 2 2012, 10:41 am
From: Stéfan van der Walt <ste...@sun.ac.za>
Date: Sun, 2 Sep 2012 07:41:09 -0700
Local: Sun, Sep 2 2012 10:41 am
Subject: Re: Timing comparisons between mahotas & scikits-image

On Thu, Aug 30, 2012 at 9:46 AM, Luis Pedro Coelho <l...@luispedro.org>
wrote:

> I made a timing comparison between mahotas & scikits-image.

> operation   | mahotas  | pymorph  | skimage
> ------------+----------+----------+---------
> dilate      |    11.44 |     8.93 |    41.59

With the latest versions of skimage and mahotas, I have:

          |   mahotas  | skimage
----------+------------+--------
erode     |      9.60  |   16.18
dilate    |     11.69  |    8.01
open      |     20.53  |   16.16

Thanks to Johannes Schönberger for the speed-ups.

Stéfan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Pedro Coelho  
View profile  
 More options Sep 2 2012, 4:11 pm
From: Luis Pedro Coelho <l...@luispedro.org>
Date: Sun, 02 Sep 2012 21:11:17 +0100
Local: Sun, Sep 2 2012 4:11 pm
Subject: Re: Timing comparisons between mahotas & scikits-image
Great!

I will redo the timings in the next round of manuscript corrections (I
already submitted last weeks results yesterday) for the mahotas paper. I
might try to speed up things on mahotas' side too :)

A little friendly competition always gets users better software.

Best,
Luis

On 09/02/2012 03:41 PM, Stéfan van der Walt wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Pedro Coelho  
View profile  
 More options Sep 6 2012, 10:22 am
From: Luis Pedro Coelho <l...@luispedro.org>
Date: Thu, 6 Sep 2012 07:22:39 -0700 (PDT)
Local: Thurs, Sep 6 2012 10:22 am
Subject: Re: Timing comparisons between mahotas & scikits-image

Great!

Now that I look at this, I realise that the comparison is not fair to
mahotas because it includes a thresholding step. The correct comparison
would run mahotas.sobel(f, just_filter=True) which runs in almost the exact
same time as skimage because it is almost the exact same code ;-)

mahotas.center_of_mass also handles labeled images; btw.

Best,
Luis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »