예제 #1
0
파일: fitting.py 프로젝트: ikassi/menpo
 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')
예제 #2
0
파일: fitting.py 프로젝트: ikassi/menpo
 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')
예제 #3
0
파일: fitting.py 프로젝트: ikassi/menpo
 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')