CameronBodine / PINGMapper

Open-source interface for processing recreation-grade side scan sonar datasets and reproducibly mapping benthic habitat
https://cameronbodine.github.io/PINGMapper/
MIT License
39 stars 3 forks source link

Speedup Needed and Opportunities #66

Open CameronBodine opened 1 year ago

CameronBodine commented 1 year ago

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

CameronBodine commented 1 year ago

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 commented 1 year ago

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 commented 7 months ago

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.