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

fix: supported extensions in compute_image_statistics method #130

Merged

Conversation

yuta-tsuzuki-woven
Copy link
Collaborator

@yuta-tsuzuki-woven yuta-tsuzuki-woven commented Oct 4, 2022

Some ML teams are handling image data with uppercase extensions such as .JPG, .PNG.
If there are no negative effects, I would like to support such uppercase extensions in compute_image_statistics method.


This change is Reviewable

Copy link
Collaborator Author

@yuta-tsuzuki-woven yuta-tsuzuki-woven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@kuanleetri +@chrisochoatri please review it

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @chrisochoatri and @kuanleetri)

Copy link
Collaborator

@chrisochoatri chrisochoatri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @kuanleetri and @yuta-tsuzuki-woven)


dgp/utils/dataset_conversion.py line 75 at r1 (raw file):

    valid_extensions = (
        ".jpg",

nit: do we need .jpeg also?

Code quote:

.jpg"

dgp/utils/dataset_conversion.py line 86 at r1 (raw file):

        ".TIFF",
    )
    image_list = list(filter(lambda x: x.endswith(valid_extensions), image_list))

just a question, would it make sense to do something like x.lower().endswith and just keep the lower case extensions?

Code quote:

    image_list = list(filter(lambda x: x.endswith(valid_extensions), image_list))

Copy link
Collaborator Author

@yuta-tsuzuki-woven yuta-tsuzuki-woven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisochoatri please next round

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @chrisochoatri and @kuanleetri)


dgp/utils/dataset_conversion.py line 75 at r1 (raw file):

Previously, chrisochoatri (Chris Ochoa) wrote…

nit: do we need .jpeg also?

Thank you! It looks nice.
I added .jpeg.


dgp/utils/dataset_conversion.py line 86 at r1 (raw file):

Previously, chrisochoatri (Chris Ochoa) wrote…

just a question, would it make sense to do something like x.lower().endswith and just keep the lower case extensions?

Thank you for your advice. It makes sense.
I added .lower() here and remove uppercase extensions from the list.

Copy link
Collaborator

@chrisochoatri chrisochoatri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @kuanleetri)

@yuta-tsuzuki-woven yuta-tsuzuki-woven merged commit 23479ca into TRI-ML:master Oct 5, 2022
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.

None yet

3 participants