  
  import queue as Queue
  import sys
  import threading
  import numpy as np
  from lib.logger import LOG_QUEUE, set_root_logger
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  _launched_processes = set()  # pylint: disable=invalid-name
  
 
</s> remove from lib.multithreading import FixedProducerDispatcher
 </s> add from lib.multithreading import BackgroundGenerator </s> remove import cv2
 </s> add 
  
  import queue as Queue
  import sys
  import threading

  from lib.logger import LOG_QUEUE, set_root_logger
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  _launched_processes = set()  # 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/multithreading.py