Closed william-silversmith closed 5 years ago
Progress so far:
The initial loading, masking, connected components, and mapping steps take about five seconds. The edt takes about 15 seconds on parallel 1, the find_objects call takes about seven seconds. It would be realistic to get this down to 22 seconds on parallel 1. This would amount to a global improvement of about 6%, but an annoyance improvement of nearly 50% when trying different things.
Here's where it is at parallel 4
It looks like scipy's find_objects is much faster on C arrays than on Fortran arrays (probably going against the grain). This, or something like it, might be the trick to collapsing find_objects
down to almost nothing.
bbxs = scipy.ndimage.find_objects(labels.T)
bbxs = [ slcs[::-1] for slcs in bbxs ]
On my laptop, the difference is from almost 8 seconds down to 1.
The Preamble used to be a fairly significant chunk of time (typically about a minute) before skeletonization proceeded in earnest.
A string of recent improvements in fastremap, cc3d, skeletontricks.get_mapping, and the edt has made it possible to execute the preamble in 15-25 seconds. If we could speed up
np.unique(..., return_counts=True)
andscipy.ndimage.find_objects
, the preamble could be collapsed to nearly only the edt, which is parallel enabled.