              bottom += delta
              if diff % 2 == 1:
                  bottom += 1
  
          # 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
  
          # Make sure box is always square.
          assert ((right - left) == (bottom - top)), 'Box is not square.'
  
          return [left, top, right, bottom]
  
 
</s> remove             points[:, 0] += roi[0]
            points[:, 1] += roi[1]
 </s> add             points[:, 0] += (roi[0] - offset[0])
            points[:, 1] += (roi[1] - offset[1]) </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             # 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         return faces, rois
 </s> add             offsets.append(offset)
        return faces, rois, offsets
              bottom += delta
              if diff % 2 == 1:
                  bottom += 1
  










          # Make sure box is always square.
          assert ((right - left) == (bottom - top)), 'Box is not square.'
  
          return [left, top, right, bottom]
  
keep keep keep keep replace replace replace replace replace replace replace replace replace replace 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