Рет қаралды 9,456
This video gives easy way to unzip and split the data into train, test and validation folder in python.
#### Extract the Zip folder
from zipfile import ZipFile
with ZipFile('/content/drive/MyDrive/gas.zip', 'r') as zipObj:
zipObj.extractall('Gas')
Install the Split - folder package
pip install split-folders[full]
#### Import the package
import splitfolders
###### Path of input folder
input_folder = '/content/Gas'
#######ration of split is 70%, 20% and 10%
splitfolders.ratio(input_folder, output="dataset",
seed=42, ratio=(.7, .2, .1),
group_prefix=None)