-
-
Save techzizou/9017e6dd21f01cc1716bd2997ac8707a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#creating two dir for training and testing | |
!mkdir test_labels train_labels | |
# lists the files inside 'annotations' in a random order (not really random, by their hash value instead) | |
# Moves the first 274/1370 labels (20% of the labels) to the testing dir: `test_labels` | |
!ls annotations/* | sort -R | head -274 | xargs -I{} mv {} test_labels/ | |
# Moves the rest of the labels ( 1096 labels ) to the training dir: `train_labels` | |
!ls annotations/* | xargs -I{} mv {} train_labels/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment