read_image_meta_batch
- lib.image.read_image_meta_batch(filenames)
Read the Faceswap metadata stored in a batch extracted faces’ exif headers.
Leverages multi-threading to load multiple images from disk at the same time leading to vastly reduced image read times. Creates a generator to retrieve filenames with their metadata as they are calculated.
Notes
The order of returned values is non-deterministic so will most likely not be returned in the same order as the filenames
- Parameters:
filenames (list) – A list of
strfull paths to the images to be loaded.- Yields:
tuple – (filename (str), metadata (dict) )
Example
>>> image_filenames = ["/path/to/image_1.png", "/path/to/image_2.png", "/path/to/image_3.png"] >>> for filename, meta in read_image_meta_batch(image_filenames): >>> <do something>