                                     centering="legacy",
                                     size=256,
                                     is_aligned=True)
              mask = det_face.mask["components"]
              mask.set_sub_crop(aln_face.pose.offset["face"] * -1)
              mask = cv2.resize(mask.mask, (256, 256), interpolation=cv2.INTER_CUBIC)[..., None]
              image = np.minimum(aln_face.face, mask)
          if image.ndim == 3:
              image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
          height, width = image.shape
 
</s> remove             mask.set_sub_crop(aln_face.pose.offset["face"] * -1)
 </s> add             mask.set_sub_crop(aln_face.pose.offset[mask.stored_centering] * -1, centering="legacy") </s> remove                 centering = "legacy" if self._alignments.version == 1.0 else "face"
 </s> add                 centering = "legacy" if self._alignments.version == 1.0 else mask.stored_centering </s> remove         if self._extract_version > 1.0 and self._centering == "legacy":
            mask.set_sub_crop(self._cache[key]["aligned_face"].pose.offset["face"] * -1)
 </s> add         mask.set_sub_crop(self._cache[key]["aligned_face"].pose.offset[mask.stored_centering] * -1,
                          self._centering) </s> remove         if self._centering == "legacy":
            crop_offset = reference_face.pose.offset["face"] * -1
 </s> add         mask_centering = detected_face.mask[self._args.mask_type].stored_centering
        if self._centering != mask_centering:
            crop_offset = reference_face.pose.offset[mask_centering] * -1 </s> remove                 mask.set_sub_crop(sub_crop_offset)
 </s> add                 mask.set_sub_crop(sub_crop_offset, centering)
            mask.set_sub_crop(aln_face.pose.offset[mask.stored_centering] * -1, centering="legacy")
                                     centering="legacy",
                                     size=256,
                                     is_aligned=True)
              mask = det_face.mask["components"]
            mask.set_sub_crop(aln_face.pose.offset[mask.stored_centering] * -1, centering="legacy")
              mask = cv2.resize(mask.mask, (256, 256), interpolation=cv2.INTER_CUBIC)[..., None]
              image = np.minimum(aln_face.face, mask)
          if image.ndim == 3:
              image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
          height, width = image.shape
keep keep keep keep replace keep keep keep keep keep
 Add support for different mask centering types 
tools/sort/sort.py