Use Shape Statistics

Hi everyone,

While reading the documentation (specifically here: How to Optimize Your Shape Model? - ShapeWorks and in the python API), I came across the “use_shape_statistics_after” and “use_shape_statistics_in_init”, which however I can’t however I cannot seem to add within the parameter dictionary. Is it a feature that is implemented automatically? Or did it ‘change name’ in the latest release?

Thanks in advance!

Best regards,

Beatrice

Yes, those were the names for the older XML projects. We need to update the docs. The parameters now are:

multiscale : true
multiscale_particles : 32

Hi,

Thank you very much! I have another unrelated question that I was hoping you could assist me with. I have been using the python API to speed up some analysis using the shape metrics (I have been using mostly ComputeGeneralization()and ComputeSpecificity(). However the metrics that I get in python are quite different from the ones I get once I open the project file in Studio (example: I get gen = 0.8 in Python vs. gen=3 in Studio - so quite substantial difference). What could this be due to and/or which one should I ‘trust’?

Thanks again for your help!

Beatrice

I am wondering if your usage of the Python API is perhaps using the local particles or both local+world. It should only use the world particles.

I’ve just run the ellipsoid_evaluate python example which uses this API and the values are matching for me:

Compactness value of the 1st mode - 0.9784689807553621
Generalization value of the 1st mode - 0.1351896290180642
Specificity value of the 1st mode - 0.18514057769833261

In Studio, opening the plot data:

image

image

image

Hi,

I had a mistake in my own script indeed, now it’s working correctly and the metrics match! Thank you for the support and the prompt response, and for keeping up such a great tool!

Best regards,

Beatrice