Skip to content

python script for dividing image data to train test and val

License

Notifications You must be signed in to change notification settings

umamakhalid/dataset-division-to-train-val-test-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dataset-division-to-train-val-test-python

python script for dividing image data to train test and val

If you have an image dataset in the following structure of directories

  • dataset
    • label_1 directory
    • label_2 directory
    • label_3 directory
    • label_n-1 directory
    • label_n directory

then this python script (main.py) will divide the images present in each label directories into train, val and test directories.

set the following variables according to your requirements in main.py

PATH_OF_DATA= './dataset/'
train_perc = 0.7 #70%
val_perc = 0.2 #20%
test_perc = 0.1 #10%

About

python script for dividing image data to train test and val

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages