          """ Get points from predictor """
          for prediction, roi in zip(batch["prediction"], batch["roi"]):
              points = np.reshape(prediction, (-1, 2))
              points *= (roi[2] - roi[0])
              points[:, 0] += roi[0]
              points[:, 1] += roi[1]
              batch.setdefault("landmarks", []).append(points)
          logger.trace("Predicted Landmarks: %s", batch["landmarks"])
 
</s> remove         for prediction, roi in zip(batch["prediction"], batch["roi"]):
 </s> add         for prediction, roi, offset in zip(batch["prediction"], batch["roi"], batch["offsets"]): </s> remove         # Shift the box if any points fall below zero
        if left < 0:
            shift_right = abs(left)
            right += shift_right
            left += shift_right
        if top < 0:
            shift_down = abs(top)
            bottom += shift_down
            top += shift_down

 </s> add  </s> remove         faces, batch["roi"] = self.align_image(batch)
 </s> add         faces, batch["roi"], batch["offsets"] = self.align_image(batch) </s> remove         retval = cv2.copyMakeBorder(image.copy(),
                                    pad_t,
                                    pad_b,
                                    pad_l,
                                    pad_r,
                                    cv2.BORDER_CONSTANT,
                                    value=(0, 0, 0))
        logger.trace("Padded shape: %s", retval.shape)
        return retval
 </s> add         padded_image = cv2.copyMakeBorder(image.copy(),
                                          pad_t,
                                          pad_b,
                                          pad_l,
                                          pad_r,
                                          cv2.BORDER_CONSTANT,
                                          value=(0, 0, 0))
        offsets = (pad_l - pad_r, pad_t - pad_b)
        logger.trace("image_shape: %s, Padded shape: %s, box: %s, offsets: %s",
                     image.shape, padded_image.shape, box, offsets)
        return padded_image, offsets
            points[:, 0] += (roi[0] - offset[0])
            points[:, 1] += (roi[1] - offset[1])
          """ Get points from predictor """
          for prediction, roi in zip(batch["prediction"], batch["roi"]):
              points = np.reshape(prediction, (-1, 2))
              points *= (roi[2] - roi[0])
            points[:, 0] += (roi[0] - offset[0])
            points[:, 1] += (roi[1] - offset[1])
            points[:, 0] += (roi[0] - offset[0])
            points[:, 1] += (roi[1] - offset[1])
              batch.setdefault("landmarks", []).append(points)
          logger.trace("Predicted Landmarks: %s", batch["landmarks"])
keep keep keep keep replace replace keep keep
 bugfix: CV2-DNN aligner. Fix Assertion error when bounding box falls out of frame 
plugins/extract/align/cv2_dnn.py