PINGMapper icon indicating copy to clipboard operation
PINGMapper copied to clipboard

Speedup Needed and Opportunities

Open CameronBodine opened this issue 2 years ago • 3 comments

This issue will document workflows which would benefit from additional speed-up to lower overall processing time of sonar recordings.

  • [x] Mapping substrate probabilities/logits
  • [x] src correction: can this operation be vectorized?
  • [x] Speed up image warping

CameronBodine avatar Mar 23 '23 16:03 CameronBodine

SRC correction sped up using math.sqrt instead of np.sqrt. Also used int() instead of .astype(int). I see a speedup of 1.7x on the hello world scan when processing EGN and exporting WCR rect/non-rect imagery! Great work @dbuscombe-usgs! Still unsure how to vectorize (if it's even possible) but considering that task as complete for the time being. May return if struck with divine numpy inspiration in the future.

CameronBodine avatar May 11 '23 15:05 CameronBodine

This will also speed up the substrate mapping workflow, including rectifying probs/logits since each class needs to be slant range corrected. Checking that task as complete also. Leaving issue open to identify other sources for speedup.

CameronBodine avatar May 11 '23 15:05 CameronBodine

I found this beautiful solution to speeding up the warping process while rectifying sonar imagery:

https://github.com/scikit-image/scikit-image/issues/6864#issue-1653493908

For the example dataset using 7 threads for 7 images, the rectification process went from 23.8 seconds to 16.2 seconds! About to implement.

CameronBodine avatar Jan 22 '24 22:01 CameronBodine