GaParmar / clean-fid

PyTorch - FID calculation with proper image resizing and quantization steps [CVPR 2022]
https://www.cs.cmu.edu/~clean-fid/
MIT License
894 stars 68 forks source link

Uppercase JPEG extension ignored by get_folder_features #37

Open Reason239 opened 1 year ago

Reason239 commented 1 year ago

Hi! Uppercase JPEG extension ignored by get_folder_features I've noticed this issue while making custom statistics from a folder with .JPEG files. It seems like it has been thought of here for processing .zip https://github.com/GaParmar/clean-fid/blob/b1d8934d7ebb7e0c471f7bdb4c12872fe62f6cc4/cleanfid/fid.py#L138 but not here for processing folders https://github.com/GaParmar/clean-fid/blob/b1d8934d7ebb7e0c471f7bdb4c12872fe62f6cc4/cleanfid/fid.py#L140-L141

Probably the easiest fix is to expand the EXTENSIONS with the upper-case versions

GaParmar commented 1 year ago

Hi,

I have added the uppercase extensions in the latest version of the library (0.1.31). Let me know if the issue is not resolved yet.

-Gaurav

yzy1996 commented 1 year ago

Hi,

Linux's file system is case-sensitive and it will find .jpg and .JPG differently.

However, it will double count the number of files on Windows. The latest version will cause the issue.

Thanks!