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

[Bug fix] Fix get_file_list() not returning images with uppercase extension. #725

Merged
merged 1 commit into from
Apr 17, 2023
Merged

[Bug fix] Fix get_file_list() not returning images with uppercase extension. #725

merged 1 commit into from
Apr 17, 2023

Conversation

kikefdezl
Copy link
Contributor

@kikefdezl kikefdezl commented Apr 11, 2023

Motivation

When running demo/demo_large_image.py on a folder of images, no images were used for inference because the get_file_list() function in mmyolo/utils/misc does NOT read uppercase extension images when passing a folder as argument.

Example: Image_001.JPG, Image_002.PNG and Image_003.TIFF are NOT returned by the function, but they should. Many cameras output images with uppercase extensions (such as DJI drones, for example). We should not have to rename our images to be able to infer on them.

Modification

Simple fix: Inside get_file_list(), I simply added the existing flag: case_sensitive=False to the scandir() function from mmengine.

Impact

This PR simply allows users to use the get_file_list() function on folders that contain uppercase, lowercase, or mixed case image extensions.

@CLAassistant
Copy link

CLAassistant commented Apr 11, 2023

CLA assistant check
All committers have signed the CLA.

@hhaAndroid hhaAndroid merged commit e02c558 into open-mmlab:dev Apr 17, 2023
@OpenMMLab-Assistant-004

Hi @kikefdezl !We are grateful for your efforts in helping improve mmyolo open-source project during your personal time.

Welcome to join OpenMMLab Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA
If you have a WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)

Thank you again for your contribution❤

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

Successfully merging this pull request may close these issues.

4 participants