Iterative method for reference selection

80 views
Skip to first unread message

Laura Zavala Rucio

unread,
Sep 4, 2024, 6:54:47 AM9/4/24
to scalismo

Dear community, 

 

I am trying to implement an iterative method in my SSM-building code to remove bias, by updating the reference mesh with the mean of the resulting model. To check the performance of the point-correspondence method (parametric, non-rigid registration tutorial) I am computing the Hausdorff distance between the target original mesh (aligned with reference mesh) and the new target mesh obtained from the point-correspondence method. 

 

However, in each new iteration, the Hausdorff distance increases instead of decreasing, meaning that the point-correspondence method was not properly performed. I have noticed that this problem does not affect all meshes, only the ones that are longer and thicker than the reference mesh in that current iteration. 

 

I thought that the kernel design was not optimized, so I tried multiple combinations of sigmas and scaling factors (especially by increasing the sigma and scaling factor), with no luck in solving the issue. These are my current settings: 


  val kernelCoarsest = GaussianKernel3D(sigma = 385*2, scaleFactor = 200)
  val kernelCoarse = GaussianKernel3D(sigma = 385, scaleFactor = 50)
  val kernelMiddle = GaussianKernel3D(sigma = 385/2, scaleFactor = 10)
  val kernelFine = GaussianKernel3D(sigma = 385/3, scaleFactor = 5)
  val kernel = kernelCoarsest + kernelCoarse + kernelFine + kernelMiddle
  val diagonal = DiagonalKernel3D(kernel, outputDim = 3)
  val gp = GaussianProcess3D[EuclideanVector[_3D]](diagonal)
  val lowRankGP = LowRankGaussianProcess.approximateGPCholesky(
    refMesh,
    gp,
    relativeTolerance = 0.01,
    interpolator = NearestNeighborInterpolator()
  )
  val gpmm = PointDistributionModel3D(refMesh, lowRankGP)
  val initialCoefficients = DenseVector.zeros[Double](gpmm.rank)
  val registrationParameters = Seq(
    RegistrationParameters(regularizationWeight = 1e-1, numberOfIterations = 20, numberOfSampledPoints = 500),
    RegistrationParameters(regularizationWeight = 1e-2, numberOfIterations = 30, numberOfSampledPoints = 500),
    RegistrationParameters(regularizationWeight = 1e-3, numberOfIterations = 40, numberOfSampledPoints = 1000),
    RegistrationParameters(regularizationWeight = 1e-6, numberOfIterations = 50, numberOfSampledPoints = 4000),
  )
  val finalCoefficients = registrationParameters.foldLeft(initialCoefficients)((coefficients, params) =>
    doRegistration(lowRankGP, refMesh, targetMesh, params, coefficients)
  )

 

Does anyone have any advice? How many iterations should be expected from such an iterative method if it works properly?

 

Best regards, 

 

Laura Zavala

 

 

Dennis Madsen

unread,
Oct 1, 2024, 9:14:57 AM10/1/24
to scalismo
Hi Laura,

The exact kernel values to choose highly depends on the meshes you are working with.
If you have problems with the meshes' size not registering properly, I will simplify the kernels to only a coarse kernel to do the overall registration work and then add more kernels if local deformations are deviating.
I put a guide here on how to choose the kernel values for a specific mesh: https://dennismadsen.me/posts/how-to-shape-model-part4/

You could also try to guide the registration by placing a few manually placed landmarks. Then, either first compute the posterior model based on the landmarks and fit it or include the landmarks as part of the registration process.

Also, remember to visualize your model before registering it to see if the deformations "make sense" and try to visualize after each step of your registration process if it is actually getting closer the more you regularize.

Best,
Dennis
Reply all
Reply to author
Forward
Message has been deleted
0 new messages