PINGMapper
PINGMapper copied to clipboard
Speedup Needed and Opportunities
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
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.
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.
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.