OTB_LSMS parameters

60 views
Skip to first unread message

grahams...@gmail.com

unread,
May 21, 2020, 4:28:29 PM5/21/20
to SegOptim user group
Hello!

I was recently browsing the OTB LSMS segmentation user manual and noticed that it is recommended in the LSMSSegmentation function to use spatial radius and range radius values that are half the values used in the MeanShiftSmoothing function. I believe this is confirmed in the original citation (Michel et al. 2015) as seen in section VI.C and Fig. 14.  However, in the SegOptim function segmentation_OTB_LSMS, there is only the option for one set of parameters for both the mean shift smoothing and the segmentation algorithms. Is this choice intentional? If not I think the segmentation_OTB_LSMS function should allow specification for two sets of spatial radius and range radius parameters. Provided you agree with me, I can see a solution in adding two new arguments to the function for the additional parameters, although I realize this may complicate optimization.

I would like to hear your thoughts as this is not my background. Thank you for providing a very useful tool that I am continuing to use in my work!

-Graham

João Gonçalves

unread,
May 25, 2020, 1:23:25 PM5/25/20
to SegOptim user group
Hi Graham,

Thanks for the great feedback. You are absolutely right with this issue. At the time I was aiming to implement a simpler version of this OTB's LSMS segmentation algorithm targetting its optimization and completely missed to do a more complete two-parameter version as you mentioned.

I will try to do this in the upcoming days and will get back to you.

Cheers
João

João Gonçalves

unread,
May 26, 2020, 1:35:29 PM5/26/20
to SegOptim user group
Hi,

The new two-parameter OTB segmentation function, named: segmentation_OTB_LSMS2 is now available and allows to define separate parameters for the mean-shift smoothing step (MS_SpectralRange and MS_SpatialRange) and the large-scale segmentation step (LSS_SpectralRange and LSS_SpatialRange).

You can install the test package version by referencing the experimental branch - check the line below to install/update the package:

remotes::install_bitbucket("joao_goncalves/segoptim", ref = "experimental")

If you happen to test this in the near-future let me know if it works. Parameter optimization should also be fine (but not tested yet).

Cheers
João
- - -

grahams...@gmail.com

unread,
May 30, 2020, 2:48:38 PM5/30/20
to SegOptim user group
Hi João,

Thanks so much for looking into this! I tried the experimental function and got the following error message:

Error in checkPrintSegmentationParams(x, segmentMethod = "OTB_LSMS") :
  The segmentation method requires 3 parameters to be optimized and 5 were defined! Please check input arguments

Cheers,
Graham

João Gonçalves

unread,
Jun 1, 2020, 12:38:33 PM6/1/20
to SegOptim user group
Hi Graham,

Thanks for testing the package changes and for spotting this bug.
This problem is now corrected/patched. Please re-install SegOptim using the (new) GitHub repo (master) through:

remotes::install_github("joaofgoncalves/SegOptim")

Let me know your feedback.

Cheers
João
Reply all
Reply to author
Forward
0 new messages