Tutorial 12

136 views
Skip to first unread message

Maia R.

unread,
Feb 2, 2021, 5:31:32 PM2/2/21
to scalismo
Hi,
In Tutorial 12, two result meshes are presented: fittedMesh and projectedMesh.
It says "The fittedMesh that we obtained above is a surface that approximates the target surface. It corresponds to the best representation of the target in the model. For most tasks, this approximation is sufficient. However, sometimes, we need an exact representation of the target mesh (projectedMesh). "
Could you give more explanation about when to use each of these results, please ?
For example, for model building from aligned + registered meshes as explained in Tutorial 6, which one is to be used for createUsingPCA(dc), fitted meshes or projected ones ?

Thank you very much,
Best regards,
Maia

Marcel Luethi

unread,
Feb 3, 2021, 11:55:56 PM2/3/21
to Maia R., scalismo
Dear Maia,

It depends on what you assume about your surfaces. If the surfaces you registered are noisy, you would not want to do the projection, as the registration result would then include that noise.
However, sometimes the surfaces are perfectly fine, but the registration does not perfectly match the surface,due to model bias. In this case, a projection can help to improve the correspondence.

I usually work with the fitted meshes for model building. However, most often it does not even matter: When you see that there is a large difference between the fitted and the projected mesh, chances are, that your registration is not good enough. If they are close, the results of model building will be virtually the same.

Best regards,
Marcel

--
You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/1e6fdd50-1894-41e9-ba9c-dde31c4aee8en%40googlegroups.com.

V R

unread,
Feb 4, 2021, 6:17:34 AM2/4/21
to Marcel Luethi, scalismo
Hi Marcel,
Thank you for the clarification. 
In order to assess the quality of the registration, I computed the Dice and the Hausdorff distance between the registered mesh and the target mesh. Is it a correct to do that ? So I think to filter meshes wrt to those metrics when building the model.
Best regards,
Maia


Marcel Luethi

unread,
Feb 4, 2021, 1:59:08 PM2/4/21
to V R, scalismo
Hi Maia

I would not use the dice coefficient, as it is a counterintuitive measure. We usually report the (symmetric) average distance and the Hausdorff distance. Note, however, that a small average and hausdorff distance does not necessarily imply that the correspondence is good. You can have a Hausdorff distance of 0 , while having the correspondence completely messed up. You would for example, obtain such a result by just projecting each point of an unregistered mesh to the closest point of the target surface. A visual check of the correspondence by e.g. checking that salient points of the meshes are mapped onto each other, that the meshes deforms naturally, and that there are no flipped triangles are always necessary.

Best regards,
Marcel



V R

unread,
Feb 4, 2021, 2:58:39 PM2/4/21
to Marcel Luethi, scalismo
Dear Marcel, 
Thank you very much.
But I'm a bit confused about not using the dice: why is this a counterintuitive measure if I want to compare the fitted mesh superimposed on the target mesh ?
For example, I get a dice of 0.90, an average distance = 1.9 and a Hausdorff distance = 9.8 and visually I check corresponding points which perform very well. So far, I got a low value of dice ( lower than 0.8) and very high Hausdorff distance (more than 20.0) when the registration is not good, for example when I didn't use a posterior model with the landmarks as regularization. Dice is a good measure used in image segmentation.
Sorry to bother you about that as I am wondering how to check the correspondence quality if we have a great number of surfaces to register, say more than 50 ...
Best regards,
Maia

Marcel Luethi

unread,
Feb 6, 2021, 10:06:17 AM2/6/21
to V R, scalismo
Dear Maia

My statement about the dice coefficient was more a personal preference than a rule. I personally find it a unintuitive measure for comparing surfaces, as the same number might mean different things for different surfaces.
if two structures are very thin (think a line), you can have a rather accurate fitting but the dice may nevertheless be low (as there might not be much overlap). Conversely, if you take too large squares, you might have high values as  a dice coefficient even if the surfaces are not well fitted. i find that average distance and Hausdorff distance are much easier to interpret and even easier to compute than the dice.

Best regards,
Marcel


V R

unread,
Feb 8, 2021, 8:28:35 AM2/8/21
to Marcel Luethi, scalismo
Dear Marcel
Thank you very much for the explanation.
Could you direct me about how the dice is computed in Scalismo (+codes if possible).
Best regards
Maia

Maia R.

unread,
Feb 10, 2021, 4:52:13 PM2/10/21
to scalismo
Hi Marcel, 
Could you give more explanation about the model bias in this statement " However, sometimes the surfaces are perfectly fine, but the registration does not perfectly match the surface, due to model bias. In this case, a projection can help to improve the correspondence."
Has it (model bias) something to do with the analytic kernel used for the registration (e.g. a multiscale kernel) ? 

By comparing visually in orthogonal view, I found that the fitted mesh is shrinked a little bit compared to the projected mesh (and the target one) and I have an average distance of 1.50 mm and a Hausdorff distance of 6 mm between the target mesh and the fitted one. The overall shape is almost the same when dispalying in 3D.

In fact, my main question is "how good should be the fitted meshes before building the model by PCA ?" When do I stop improving the registration ? I followed the decreasing regularized weights strategy as in Tutorial 12. Is it mandatory that the fitted mesh and the projected one fit together ? 

Generally, did you found that the parametric non-rigid registration performed well compared to the non rigid ICP ? 

Thank you,
Best regards
Maia

Marcel Luethi

unread,
Feb 11, 2021, 2:16:16 AM2/11/21
to Maia R., scalismo
Hi Maia

I usually work with the parametric (gradient-based) registration and it usually works well for my. Some of my colleagues prefer, however, the ICP approach. So both should work fine.
In both cases it is important that the model is flexible enough to actually explain the target shape, otherwise you will have a fit that does not accurately represent the target.

The numbers you are reporting do not sound like a great fit. One reason could be that your model is not flexible enough to represent the target accurately.  Are you fitting a model built from data, or just built using an analytical kernel?
If the first one is the case, you can try to augment the model with a gaussian kernel (large bandwidth). If it is the second one, you might want to add to the model also kernels with a smaller bandwidth.

Best regards,
Marcel



V R

unread,
Feb 11, 2021, 9:20:06 AM2/11/21
to Marcel Luethi, scalismo
Hi Marcel,
Thanks a lot for your guidance.
I think I understand what are the issues in my case. I also have to add more landmarks for the posterior model.
Thank you very much. 
Best regards,
Maia

V R

unread,
Feb 11, 2021, 5:56:35 PM2/11/21
to Marcel Luethi, scalismo
Hi Marcel,
After following your advices and several attempts, I got those values with ICP + posterior model:
avgDistance = 0.43, dice = 0.98, Hausdorff dist = 4.21 (and yes, visually the fit is better than before).
Do those new values sound correct for you ?

Thanks a lot,
Best regards,
Maia
Reply all
Reply to author
Forward
0 new messages