Viewing a single comment thread. View all comments

eingrid2 t1_irmnf02 wrote

You might shuffle dataframe (df.sample(frac=1)) and then just take first 80 % of samples as train and other 20 as test

Also you might use sklearn train_test_split

1

redditnit21 OP t1_irmnk5i wrote

But the images are present in some other folder. Can you send me the code for that?

−3

eingrid2 t1_irmnv0u wrote

If all images are in one folder you can make a variable like path_to_dataset = “your_path” Split normally and then just add dataset path to image name

1