How to splitfolders in Google Colab and saved it to Google Drive?

Viewed 348

I'm having a hard time splitting test-train-valid datasets randomly then saving it to google drive because it takes a lot of time when my runtime runs out.

1 Answers

If the splitting is slow in colab runtime then you can keep the combined image folder as train. Make a list of validation, test files and only move them to their respective directories. This way there is no extra overhead of copying train folder when it has a lot files.

Else if moving/copying files to google drive is slow then just compress the folder into tar or zip. This should move much faster.

Links

Related