This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 445
How to get flow_from_directory accept absolute path of images as input #56
Comments
Have you looked into flow_from_dataframe? |
#67 |
4 tasks
Merged
Merged
Dref360
pushed a commit
that referenced
this issue
Jan 6, 2019
### Summary The documentation in `flow_from_dataframe` and `DataframeIterator` states that if `directory` is None then the filenames are taken as absolute paths. I agree with this behavior, and I think this should be the default behavior if no directory parameter is given. This PR sets the default directory parameter as None and adds the corresponding tests. With this PR is enough to have the absolute paths in a Dataframe and just send that dataframe as parameter to `flow_from_dataframe` Closses #67 #56 #116 ### PR Overview - [y] This PR requires new unit tests [y/n] (make sure tests are included) - [n] This PR requires to update the documentation [y/n] (make sure the docs are up-to-date) - [y] This PR is backwards compatible [y/n] - [n] This PR changes the current API [y/n] (all API changes need to be approved by fchollet)
This issue has been resolved in the current version, as x_col accepts absolute paths. It can be closed. @Dref360 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I learned from the manual page of
flow_from_directory
, the first argument passed toflow_from_directory
is a directory. Sometimes, it's also convenient to pass the path of images if the images are placed in multiple directories. If we could getflow_from_directory
to accept images in the following format:/path1/img1.jpg cat
/path2/img2.jpg dog
The first column is the absolute path to the image, and the second column is the class names.
The text was updated successfully, but these errors were encountered: