sylvainprigent / stracking

python library for particles tracking in 2D+t and 3D+t scientific images
Other
13 stars 2 forks source link

Accelerate speed ? #5

Open orena1 opened 1 year ago

orena1 commented 1 year ago

Hi, Thanks for the tool, it is very good! I wonder if there is any way to increase its speed? maybe you can share any tips? here is the file: ezyzip.zip

I used this code:

pickle.load(open(..pkl,'rb'))
from stracking.linkers import SPLinker, EuclideanCost
euclidean_cost = EuclideanCost(max_cost=100);
my_tracker = SPLinker(cost=euclidean_cost, gap=3);
tracks = my_tracker.run(particles_all);

BTW, most of the time is on https://github.com/sylvainprigent/stracking/blob/52db3a038d060f6db20b93e65d43c1418601ec34/stracking/linkers/_sp_linker.py#L114

orena1 commented 1 year ago

I managed to make it much faster using graph-tool, reduced from more than 2 hours to a couple of minutes