  import os
  import sys
  from pathlib import Path
  
  from tqdm import tqdm
  
  from scripts.fsmedia import Alignments, Images, PostProcess, Utils
  from lib.faces_detect import DetectedFace
  from lib.multithreading import BackgroundGenerator, SpawnProcess, queue_manager
 
</s> remove from scripts.fsmedia import Alignments, Images, Faces, Utils
from scripts.extract import Extract
from lib.utils import BackgroundGenerator, get_folder, get_image_paths
 </s> add from scripts.fsmedia import Alignments, Images, PostProcess, Utils
from lib.faces_detect import DetectedFace
from lib.multithreading import BackgroundGenerator, SpawnProcess, queue_manager
from lib.utils import get_folder, get_image_paths </s> remove from lib.multithreading import pool_process
from lib.utils import rotate_image_by_angle, rotate_landmarks
from scripts.fsmedia import Alignments, Faces, Images, Utils
 </s> add from lib.multithreading import (MultiThread, PoolProcess, QueueEmpty,
                                SpawnProcess, queue_manager)
from lib.utils import get_folder
from plugins.plugin_loader import PluginLoader
from scripts.fsmedia import Alignments, Images, PostProcess, Utils </s> remove from plugins.PluginLoader import PluginLoader
 </s> add from plugins.plugin_loader import PluginLoader </s> remove from lib import face_alignment, Serializer
 </s> add from lib import Serializer
from lib.faces_detect import DetectedFace
from lib.multithreading import queue_manager, SpawnProcess
from plugins.plugin_loader import PluginLoader
import cv2
import numpy as np
  import os
  import sys
  from pathlib import Path
  
import cv2
import numpy as np
  from tqdm import tqdm
  
  from scripts.fsmedia import Alignments, Images, PostProcess, Utils
  from lib.faces_detect import DetectedFace
  from lib.multithreading import BackgroundGenerator, SpawnProcess, queue_manager
keep keep keep add keep keep keep keep keep
 Extraction - Speed improvements (#522) (#523)

* Extraction - Speed improvements (#522)

* Initial Plugin restructure

* Detectors to plugins. Detector speed improvements

* Re-implement dlib aligner, remove models, FAN to TF. Parallel processing

* Update manual, update convert, implement parallel/serial switching

* linting + fix cuda check (setup.py). requirements update keras 2.2.4

* Add extract size option. Fix dlib hog init

* GUI: Increase tooltip width

* Update alignment tool to support new DetectedFace

* Add skip existing faces option

* Fix sort tool to new plugin structure

* remove old align plugin

* fix convert -skip faces bug

* Fix convert skipping no faces frames

* Convert - draw onto transparent layer

* Fix blur threshold bug

* fix skip_faces convert bug

* Fix training 
scripts/convert.py