          """ get pair of random warped images from aligned face image """
          logger.trace("Randomly warping image")
          height, width = image.shape[0:2]
          coverage = self.get_coverage(image)
          assert height == width and height % 2 == 0
  
          range_ = np.linspace(height // 2 - coverage // 2,
                               height // 2 + coverage // 2,
                               5, dtype='float32')
          mapx = np.broadcast_to(range_, (5, 5)).copy()
 
</s> remove         assert length >= self.batchsize, msg
 </s> add         try:
            assert length >= self.batchsize, msg
        except AssertionError as err:
            msg += ("\nYou should increase the number of images in your training set or lower "
                    "your batch-size.")
            raise FaceswapError(msg) from err
        try:
            assert height == width and height % 2 == 0
        except AssertionError as err:
            msg = ("Training images should be square with an even number of pixels across each "
                   "side. An image was found with width: {}, height: {}."
                   "\nMost likely this is a frame rather than a face within your training set. "
                   "\nMake sure that the only images within your training set are faces generated "
                   "from the Extract process.".format(width, height))
            raise FaceswapError(msg) from err
          """ get pair of random warped images from aligned face image """
          logger.trace("Randomly warping image")
          height, width = image.shape[0:2]
          coverage = self.get_coverage(image)
        try:
            assert height == width and height % 2 == 0
        except AssertionError as err:
            msg = ("Training images should be square with an even number of pixels across each "
                   "side. An image was found with width: {}, height: {}."
                   "\nMost likely this is a frame rather than a face within your training set. "
                   "\nMake sure that the only images within your training set are faces generated "
                   "from the Extract process.".format(width, height))
            raise FaceswapError(msg) from err
  
          range_ = np.linspace(height // 2 - coverage // 2,
                               height // 2 + coverage // 2,
                               5, dtype='float32')
          mapx = np.broadcast_to(range_, (5, 5)).copy()
keep keep keep keep replace keep keep keep keep keep
 Deprecation Warnings, Error Handling and Bugfix

Deprecation Warning: Rotation in Extract
Deprecation Warning: Multiple models within a single folder
Error Handling: Useful message for training size assertion error
Error Handling: Useful message for fewer images than batch size
Bugfix: BoundingBox object sometimes not available inside spawned process 
lib/training_data.py