  
  from hashlib import sha1
  from random import random, shuffle, choice
  
  import cv2
  import numpy as np
  from scipy.interpolate import griddata
  
  from lib.model import masks
  from lib.multithreading import FixedProducerDispatcher
 
</s> remove from lib.multithreading import FixedProducerDispatcher
 </s> add from lib.multithreading import BackgroundGenerator </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 hashlib import sha1
  from random import random, shuffle, choice
  

  import numpy as np
  from scipy.interpolate import griddata
  
  from lib.model import masks
  from lib.multithreading import FixedProducerDispatcher
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