diff --git a/text_to_image/tools/fid/fid_score.py b/text_to_image/tools/fid/fid_score.py index 1df208dd84..6666b30bd9 100644 --- a/text_to_image/tools/fid/fid_score.py +++ b/text_to_image/tools/fid/fid_score.py @@ -46,6 +46,20 @@ import sys from .inception import InceptionV3 +# Extensions accepted when a path points at a directory of images. Kept in +# sync with the upstream pytorch-fid this module is derived from. +IMAGE_EXTENSIONS = { + "bmp", + "jpg", + "jpeg", + "pgm", + "png", + "ppm", + "tif", + "tiff", + "webp", +} + try: from tqdm import tqdm