Description:
So I did a lot of benchmarking, and BY FAR the worst offender when it comes to compute time is obj.centroid when switching slices, and I can only assume frames too! So I had the idea to use cached centroids, where we init all centroids based on acdc_df and then only update when calling update_rp (and if we want to be super efficient, we can also give it a kwarg to only update specific IDs. An implementation solely based on acdc_df completely eradicated any lag whatsoever, which was very promising!
Description:
So I did a lot of benchmarking, and BY FAR the worst offender when it comes to compute time is
obj.centroidwhen switching slices, and I can only assume frames too! So I had the idea to use cached centroids, where we init all centroids based onacdc_dfand then only update when callingupdate_rp(and if we want to be super efficient, we can also give it a kwarg to only update specific IDs. An implementation solely based onacdc_dfcompletely eradicated any lag whatsoever, which was very promising!