Skip to content

Conversation

@kastnerkyle
Copy link
Contributor

...d data from alternate directories

cc @eickenberg

Added the ability to specify arbitrary directories for the load_sample_images and load_sample_image functions to enable loading "other data" easily.

Copy link
Contributor

Choose a reason for hiding this comment

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

How useful is this generalization? I can see it being pretty awesome if instead of a read_dir one could specify a read_glob. That way we wouldn't be stuck with JPG either and could load anything that PIL can load, e.g. PNG images. I think it's just a matter of importing glob and using it instead of os.listdir

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this would be nice - the only thing I don't know is what images PIL supports. I thought it was only jpg but I may be wrong. If it supports more than jpg I am 100% ok with opening up the glob as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

It supports a ton of different formats, PNG being the next most useful one here for us. I wouldn't want to exclude PNG.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I am definitely ok with that. I would prefer to open it to arbitrary globbing without checking for compat or anything in this case!

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, let the user write globs such as /path/to/images/*sloth*.png

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.

2 participants