  from typing import List, Dict, Optional
  
  from tqdm import tqdm
  
  from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver
  from lib.multithreading import MultiThread
  from lib.utils import get_folder, _image_extensions, _video_extensions
  from plugins.extract.pipeline import Extractor, ExtractMedia
  from scripts.fsmedia import Alignments, PostProcess, finalize
  
 
</s> remove from typing import List, Dict, Optional
 </s> add from typing import List, Dict, Optional, Tuple, TYPE_CHECKING, Union </s> remove from lib.align import AlignedFace
 </s> add from lib.align import AlignedFace, DetectedFace
from lib.image import read_image_meta
from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver, read_image_meta
  from typing import List, Dict, Optional
  
  from tqdm import tqdm
  
from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver, read_image_meta
  from lib.multithreading import MultiThread
  from lib.utils import get_folder, _image_extensions, _video_extensions
  from plugins.extract.pipeline import Extractor, ExtractMedia
  from scripts.fsmedia import Alignments, PostProcess, finalize
  
keep keep keep keep replace keep keep keep keep keep
 Update Face Filter
  - Remove old face filter
  - plugins.extract.pipeline: Expose plugins directly
  - Change `is_aligned` from plugin level to ExtractMedia level
  - Allow extract pipeline to take faceswap aligned images
  - Add ability for recognition plugins to accept aligned faces as input
  - Add face filter to recognition plugin
  - Move extractor pipeline IO ops to own class 
scripts/extract.py