train_test_split.py

Home   »   train_test_split.py

# train and test split
train_path = []
train_mask = []
test_path = []
test_mask =[]

train_len  = len(df_downsampled) - int(len(df_downsampled)* 0.20)
test_len   = int(len(df_downsampled)* 0.20)
count = 0

for i in tqdm(range(len(df_downsampled))):
  if count <= train_len:
    train_path.append(file_path[i])
    train_mask.append(mask[i])
    count +=1
  else:
    test_path.append(file_path[i])
    test_mask.append(mask[i])

Leave a Reply

Your email address will not be published. Required fields are marked *