jfilter / split-folders

🗂 Split folders with files (i.e. images) into training, validation and test (dataset) folders
MIT License
412 stars 72 forks source link

split_folders not working #23

Closed sandeeppandey456 closed 3 years ago

sandeeppandey456 commented 3 years ago

I have a directory containing two classes - 0 and 1 , consisting of subfolders with wave files. The structure is - main folder --class 1 ---- speaker1 ----wavefile1 ---wavefile2 ---wavefile3 -----speaker2 ........ --class 2 ---- speaker1 -----speaker2 ........ ` Splitfile is not working when using the syntax given in the example

jacobmcasey commented 3 years ago

I just ran on some wav files and it is working just fine. Could you share your "syntax" that isn't working?

Yukti-09 commented 3 years ago

I am facing the same issue. I have hereby attached a code snippet.

import splitfolders
split_folders.ratio('path', output="output", seed=1337, ratio=(.8, 0.1,0.1))

The error is: NameError Traceback (most recent call last)

in 1 import splitfolders ----> 2 split_folders.ratio('path', output="output", seed=1337, ratio=(.8, 0.1,0.1)) NameError: name 'split_folders' is not defined
jfilter commented 3 years ago

import splitfolders split_folders.ratio('path', output="output", seed=1337, ratio=(.8, 0.1,0.1))

You have to use splitfolders.ratio(...) if you import the package like this

yigagilbert commented 2 years ago

why is splitefolders not working in google colab