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

group_by_prefix function finding multiple matches #39

Open
yogiderek opened this issue Jun 28, 2022 · 0 comments
Open

group_by_prefix function finding multiple matches #39

yogiderek opened this issue Jun 28, 2022 · 0 comments

Comments

@yogiderek
Copy link

I have a dataset with images in this format, image_1.png, image _2.png,.... image_130.png, ...., image_1301.png, image_1302.png, .... and my label files follow the same convention.

When I use group_prefix = 2, I get an error message to say it has found multiple matches for image_130.png. I am not a python expert but looking at your group_by_prefix function in splitfolders/split.py on line 190 it is checking to see if the file name startswith instead of checking for an exact match on the file name before the file extension. So for image_130.png, the function is going to find a match for image_130.png, image_1300,png, image_1301.png etc.

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

1 participant