  import numpy as np
  from scipy.interpolate import griddata
  
  from lib.model import masks
  from lib.multithreading import FixedProducerDispatcher
  from lib.queue_manager import queue_manager
  from lib.umeyama import umeyama
  from lib.utils import cv2_read_img, FaceswapError
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 
</s> remove import cv2
 </s> add  </s> remove import numpy as np
 </s> add  </s> remove     @staticmethod
    def minibatch(side, is_display, load_process):
 </s> add     def minibatch(self, images, side, is_display, do_shuffle, batchsize):
from lib.multithreading import BackgroundGenerator
  import numpy as np
  from scipy.interpolate import griddata
  
  from lib.model import masks
from lib.multithreading import BackgroundGenerator
  from lib.queue_manager import queue_manager
  from lib.umeyama import umeyama
  from lib.utils import cv2_read_img, FaceswapError
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
keep keep keep keep replace keep keep keep keep keep
 de-MultiProcess Training

* Replaced multiprocessing in training_data with threading
* Fix cpu affinity issue
* Using multiple threads for BackgroundGenerator 
lib/training_data.py