  
  from ast import literal_eval
  from bisect import bisect
  from concurrent import futures
  from typing import Optional
  from zlib import crc32
  
  import cv2
  import imageio
  import imageio_ffmpeg as im_ffm
 
</s> remove from typing import List, Dict, Optional
 </s> add from typing import List, Dict, Optional, Tuple, TYPE_CHECKING, Union </s> remove from typing import Any, cast, Dict, Generator, List, Optional, Tuple, TYPE_CHECKING, Union
 </s> add from typing import cast, Dict, Generator, List, Optional, Tuple, TYPE_CHECKING, Union </s> remove from lib.face_filter import FaceFilter as FilterFunc
 </s> add  </s> remove from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver
 </s> add from lib.image import encode_image, generate_thumbnail, ImagesLoader, ImagesSaver, read_image_meta
from typing import Optional, TYPE_CHECKING, Union
  
  from ast import literal_eval
  from bisect import bisect
  from concurrent import futures
from typing import Optional, TYPE_CHECKING, Union
  from zlib import crc32
  
  import cv2
  import imageio
  import imageio_ffmpeg as im_ffm
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 
lib/image.py