  from tqdm import tqdm
  
  from lib.alignments import Alignments
  from lib.faces_detect import DetectedFace
  from lib.image import BackgroundIO
  
  from lib.multithreading import MultiThread
  from lib.utils import set_system_verbosity, get_folder
  from plugins.extract.pipeline import Extractor
  
 
</s> remove from lib.image import encode_image_with_hash
 </s> add from lib.image import encode_image_with_hash, ImagesLoader, ImagesSaver </s> remove from lib.queue_manager import queue_manager
 </s> add  </s> remove from pathlib import Path
 </s> add  </s> remove from scripts.fsmedia import Alignments, Images, PostProcess, Utils
 </s> add from scripts.fsmedia import Alignments, PostProcess, Utils </s> remove """ The script to run the extract process of faceswap """
 </s> add """ Main entry point to the extract process of FaceSwap """
from lib.image import ImagesLoader, ImagesSaver
  from tqdm import tqdm
  
  from lib.alignments import Alignments
  from lib.faces_detect import DetectedFace
from lib.image import ImagesLoader, ImagesSaver
  
  from lib.multithreading import MultiThread
  from lib.utils import set_system_verbosity, get_folder
  from plugins.extract.pipeline import Extractor
  
keep keep keep keep replace keep keep keep keep keep
 scripts.extract - code optimizations

Limit queue sizes to reduce RAM usage
Rename lib.image.BackgroundIO to ImageIO
Create separate ImagesLoader and ImagesSaver classes
Load/Save images from centralized lib.image.ImageIO
scripts.extract documentation 
tools/mask.py