          # TODO improve rudimentary sub-pixel logic to centroid of 3x3 window algorithm
          subpixel_landmarks[:, :, 0] = indices[1] + np.sign(x_subpixel_shift) * 0.25 + 0.5
          subpixel_landmarks[:, :, 1] = indices[0] + np.sign(y_subpixel_shift) * 0.25 + 0.5
  
          batch.landmarks = self.transform(subpixel_landmarks,
                                           batch.data[0]["center_scale"],
                                           resolution)
          logger.trace("Obtained points from prediction: %s", batch.landmarks)  # type:ignore
 
</s> remove         for prediction, roi, offset in zip(batch.prediction,
                                           batch.data[0]["roi"],
                                           batch.data[0]["offsets"]):
            points = np.reshape(prediction, (-1, 2))
            points *= (roi[2] - roi[0])
            points[:, 0] += (roi[0] - offset[0])
            points[:, 1] += (roi[1] - offset[1])
            landmarks.append(points)
        batch.landmarks = np.array(landmarks)
 </s> add         if batch.second_pass:
            batch.landmarks = batch.prediction.reshape(self.batchsize, -1, 2) * self.input_size
        else:
            for prediction, roi, offset in zip(batch.prediction,
                                               batch.data[0]["roi"],
                                               batch.data[0]["offsets"]):
                points = np.reshape(prediction, (-1, 2))
                points *= (roi[2] - roi[0])
                points[:, 0] += (roi[0] - offset[0])
                points[:, 1] += (roi[1] - offset[1])
                landmarks.append(points)
            batch.landmarks = np.array(landmarks) </s> remove logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 </s> add logger = logging.getLogger(__name__) </s> remove         faces = self.crop(batch, center_scale)
        logger.trace("Aligned image around center")  # type:ignore
        faces = self._normalize_faces(faces)
 </s> add         batch.feed = np.array(self.crop(batch, center_scale))[..., :3] </s> remove         batch.feed = np.array(faces, dtype="float32")[..., :3] / 255.0
 </s> add         logger.trace("Aligned image around center")  # type:ignore
        if batch.second_pass:  # Transformation handled by plugin parent for re-aligned faces
            batch.landmarks = subpixel_landmarks[..., :2] * 4.
        else:
            batch.landmarks = self.transform(subpixel_landmarks,
                                             batch.data[0]["center_scale"],
                                             resolution)
          # TODO improve rudimentary sub-pixel logic to centroid of 3x3 window algorithm
          subpixel_landmarks[:, :, 0] = indices[1] + np.sign(x_subpixel_shift) * 0.25 + 0.5
          subpixel_landmarks[:, :, 1] = indices[0] + np.sign(y_subpixel_shift) * 0.25 + 0.5
  
        if batch.second_pass:  # Transformation handled by plugin parent for re-aligned faces
            batch.landmarks = subpixel_landmarks[..., :2] * 4.
        else:
            batch.landmarks = self.transform(subpixel_landmarks,
                                             batch.data[0]["center_scale"],
                                             resolution)
        if batch.second_pass:  # Transformation handled by plugin parent for re-aligned faces
            batch.landmarks = subpixel_landmarks[..., :2] * 4.
        else:
            batch.landmarks = self.transform(subpixel_landmarks,
                                             batch.data[0]["center_scale"],
                                             resolution)
        if batch.second_pass:  # Transformation handled by plugin parent for re-aligned faces
            batch.landmarks = subpixel_landmarks[..., :2] * 4.
        else:
            batch.landmarks = self.transform(subpixel_landmarks,
                                             batch.data[0]["center_scale"],
                                             resolution)
          logger.trace("Obtained points from prediction: %s", batch.landmarks)  # type:ignore
keep keep keep keep replace replace replace keep
 Extract: Implement re-align/2nd pass
   - implement configurable re-align function in extract
  - update locales + documentation
  - re-factor align._base and split to separate modules
  - move normalization method to plugin parent
  - bugfix: FAN use zeros for pre-processing crop
  - lint AlignedFilter 
plugins/extract/align/fan.py