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
On Aug 30, 2012 7:05 PM, "Luis Pedro Coelho" <luis@luispedro.org> wrote:
I attach the script that generates these (against github skimage). If you think that I have used skimage incorrectly, please let me know.
Thanks for these timings, Luis. We'll work on improving the execution speed for the time of publication! For anyone interested in a bounty...let me know :) Cheers Stéfan
On Thu, Aug 30, 2012 at 9:46 AM, Luis Pedro Coelho <luis@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
After another round of performance improvements for the sobel filter, I get: erode & 9.03 & 13.67 & 13.31 & \\
dilate & 12.45 & 9.40 & 6.60 & \\ open & 21.99 & 22.70 & 13.25 & \\ center mass & 6.63 & NA & NA & \\ sobel & 74.66 & NA & 43.72 & \\
Note, that there also exists a possibility to calculate the center of mass using the `regionprops` function and the properties "Centroid" and "WeightedCentroid". But due to the label overhead this is probably a lot slower than your implementation. Am Donnerstag, 30. August 2012 18:52:59 UTC+2 schrieb Luis Pedro Coelho:
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
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 On Tuesday, September 4, 2012 4:22:54 PM UTC+1, Johannes Schönberger wrote:
After another round of performance improvements for the sobel filter, I get:
erode & 9.03 & 13.67 & 13.31 & \\
dilate & 12.45 & 9.40 & 6.60 & \\ open & 21.99 & 22.70 & 13.25 & \\ center mass & 6.63 & NA & NA & \\ sobel & 74.66 & NA & 43.72 & \\
Note, that there also exists a possibility to calculate the center of mass using the `regionprops` function and the properties "Centroid" and "WeightedCentroid". But due to the label overhead this is probably a lot slower than your implementation.
Am Donnerstag, 30. August 2012 18:52:59 UTC+2 schrieb Luis Pedro Coelho:
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
participants (3)
-
Johannes Schönberger
-
Luis Pedro Coelho
-
Stéfan van der Walt