You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to propose an application of scipy.ndimage.measurements to speed up color.label2rgb in case it might be helpful to the project.
I have been experimenting with superpixel segmentations, but found the biggest bottleneck for larger images was computing superpixel statistics, e.g. color.label2rgb as seen in this demo.
A scipy module for this type of analysis can be found in scipy.ndimage.measurements. I found this module capable of supporting most analyses and to be fast on very large images. For example, the equivalent of the lines in labels2rgb can be replaced by labeled_comprehension or mean.
I created a gist to demonstrate the speedup, albeit on the small astronaut image.
If this not deemed useful for this project, I hope the record of this issue might be helpful for others doing similar experiments with scikits wonderful superpixel library.
The text was updated successfully, but these errors were encountered:
@cmarshak Thank you very much for performing the preliminary benchmark! I'd support your proposal as I find label2rgb very useful in many occasions. Would you like to go forward and submit a pull request with the proposed change?
Description
I wanted to propose an application of
scipy.ndimage.measurements
to speed upcolor.label2rgb
in case it might be helpful to the project.I have been experimenting with superpixel segmentations, but found the biggest bottleneck for larger images was computing superpixel statistics, e.g.
color.label2rgb
as seen in this demo.A scipy module for this type of analysis can be found in
scipy.ndimage.measurements
. I found this module capable of supporting most analyses and to be fast on very large images. For example, the equivalent of the lines inlabels2rgb
can be replaced bylabeled_comprehension
ormean
.I created a gist to demonstrate the speedup, albeit on the small astronaut image.
If this not deemed useful for this project, I hope the record of this issue might be helpful for others doing similar experiments with scikits wonderful superpixel library.
The text was updated successfully, but these errors were encountered: