Beispiel #1
0
 def final_error(self):
     r"""
     Returns the final fitting error.
     """
     if self.gt_shape is not None:
         return compute_error(self.final_shape.points,
                              self.gt_shape.points, self.error_type)
     else:
         raise ValueError('Ground truth shape has not been set, '
                          'final error cannot be computed')
Beispiel #2
0
 def initial_error(self):
     r"""
     Returns the initial error before fitting.
     """
     if self.gt_shape is not None:
         return compute_error(self.initial_shape.points,
                              self.gt_shape.points, self.error_type)
     else:
         raise ValueError('Ground truth shape has not been set, initial '
                          'error cannot be computed')
Beispiel #3
0
 def errors(self):
     r"""
     Returns a list containing the error at each fitting iteration.
     """
     if self.gt_shape is not None:
         return [compute_error(t, self.gt_shape.points, self.error_type)
                 for t in self.shapes(as_points=True)]
     else:
         raise ValueError('Ground truth has not been set, errors cannot '
                          'be computed')