ModelMetrics

scalismo.statisticalmodel.dataset.ModelMetrics$

Implements utility functions for evaluating the quality of a StatisticalMeshModel

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

Returns the generalization metric of the Statistical Mesh Model, that is how well the model can represent unseen data

Returns the generalization metric of the Statistical Mesh Model, that is how well the model can represent unseen data

Attributes

dc

test data collection that is in correspondence with the model reference The implementation of this metric is inspired from : Styner, Martin A., et al. "Evaluation of 3D correspondence methods for model building." Information processing in medical imaging. Springer Berlin Heidelberg, 2003. For every mesh in the test data, we project the mesh into the model (that is find the closest shape in the model space to the given mesh) and compute the average mesh distance (see scalismo.mesh.MeshMetrics) between the mesh and the projection. To be able to perform the projection, it is important that the data collection is in correspondence with the model. The returned value is a scala.util.Try containing the average over all test data in case of success, or an Exception otherwise

pcaModel

Statistical Mesh Model to be evaluated

def specificity(pcaModel: PointDistributionModel[_3D, TriangleMesh], data: Iterable[TriangleMesh[_3D]], nbSamples: Int)(implicit rng: Random): Double

Returns the specificity metric of the Statistical Mesh Model, that is how close the model remains to the category of shapes it is supposed to represent

Returns the specificity metric of the Statistical Mesh Model, that is how close the model remains to the category of shapes it is supposed to represent

Attributes

data

test data to verify specificity against

nbSamples

number of samples drawn to compute the average The implementation of this metric is inspired from : Styner, Martin A., et al. "Evaluation of 3D correspondence methods for model building." Information processing in medical imaging. Springer Berlin Heidelberg, 2003. The general idea is as follows : 1 - sample a shape from the mesh model 2- compute the average mesh distance (see scalismo.mesh.MeshMetrics) of the sample to all elements of the given sequence of meshes and select the minimum distance These steps are then repeated nbSamples times and the average value is returned.

pcaModel

model to be evaluated