      def shape_model(self):
          """ build 2D shape model """
          landmarks_norm = self.normalized["landmarks"]
          num_components = 20
          normalized_shapes_tbl = np.reshape(landmarks_norm,
                                             [68*2, landmarks_norm.shape[2]]).T
          self.shapes_model = decomposition.PCA(
              n_components=num_components,
              whiten=True,
              random_state=1).fit(normalized_shapes_tbl)
          explained = self.shapes_model.explained_variance_ratio_.sum()
          logger.info("Total explained percent by PCA model with %s components is %s%%",
                      num_components, round(100 * explained, 1))
  
      def spatially_filter(self):
 
</s> remove         landmarks_norm_table = np.reshape(landmarks_norm,
                                          [68 * 2, landmarks_norm.shape[2]]).T
 </s> add         landmarks_norm_table = np.reshape(landmarks_norm, [68 * 2, landmarks_norm.shape[2]]).T
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
      def shape_model(self):
          """ build 2D shape model """
          landmarks_norm = self.normalized["landmarks"]
          num_components = 20
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
        normalized_shapes_tbl = np.reshape(landmarks_norm, [68*2, landmarks_norm.shape[2]]).T
        self.shapes_model = decomposition.PCA(n_components=num_components,
                                              whiten=True,
                                              random_state=1).fit(normalized_shapes_tbl)
          explained = self.shapes_model.explained_variance_ratio_.sum()
          logger.info("Total explained percent by PCA model with %s components is %s%%",
                      num_components, round(100 * explained, 1))
  
      def spatially_filter(self):
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Add Face Hashes to Alignments (#550)

* Convert main scripts to use face hashes

* Alignment tool: Use hashes, add logging, add face rename function

* More logging. Update Manual tool to work with hashing 
tools/lib_alignments/jobs.py