Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uppercase JPEG extension ignored by get_folder_features #37

Open
Reason239 opened this issue Sep 1, 2022 · 2 comments
Open

Uppercase JPEG extension ignored by get_folder_features #37

Reason239 opened this issue Sep 1, 2022 · 2 comments

Comments

@Reason239
Copy link

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

files = [x for x in files if os.path.splitext(x)[1].lower()[1:] in EXTENSIONS]

but not here for processing folders

clean-fid/cleanfid/fid.py

Lines 140 to 141 in b1d8934

files = sorted([file for ext in EXTENSIONS
for file in glob(os.path.join(fdir, f"**/*.{ext}"), recursive=True)])

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

@GaParmar
Copy link
Owner

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
Copy link

yzy1996 commented Nov 24, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants