  
              # Make box square.
              roi = self.get_square_box(box_moved)
  
              interpolation = cv2.INTER_CUBIC if face.shape[0] < self.input_size else cv2.INTER_AREA
              face = cv2.resize(face, dsize=sizes, interpolation=interpolation)
              faces.append(face)
              rois.append(roi)
              offsets.append(offset)
          return faces, rois, offsets
 
</s> remove         return faces, rois
 </s> add             offsets.append(offset)
        return faces, rois, offsets </s> remove             # Pad the image if face is outside of boundaries
            image = self.pad_image(roi, image)
            face = image[roi[1]: roi[3], roi[0]: roi[2]]
 </s> add  </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         width, height = image.shape[:2]
 </s> add         height, width = image.shape[:2]
            # Pad the image and adjust roi if face is outside of boundaries
            image, offset = self.pad_image(roi, image)
            face = image[roi[1] + offset[1]: roi[3] + offset[1],
                         roi[0] + offset[0]: roi[2] + offset[0]]
  
              # Make box square.
              roi = self.get_square_box(box_moved)
  
            # Pad the image and adjust roi if face is outside of boundaries
            image, offset = self.pad_image(roi, image)
            face = image[roi[1] + offset[1]: roi[3] + offset[1],
                         roi[0] + offset[0]: roi[2] + offset[0]]
              interpolation = cv2.INTER_CUBIC if face.shape[0] < self.input_size else cv2.INTER_AREA
              face = cv2.resize(face, dsize=sizes, interpolation=interpolation)
              faces.append(face)
              rois.append(roi)
              offsets.append(offset)
          return faces, rois, offsets
keep keep keep add keep keep keep keep keep keep
 bugfix: CV2-DNN aligner. Fix Assertion error when bounding box falls out of frame 
plugins/extract/align/cv2_dnn.py