Last active
January 27, 2020 06:12
-
-
Save netbrain/0fccdd93325ccaf481070ace5a526e71 to your computer and use it in GitHub Desktop.
Create test/train set example
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
#!/bin/bash | |
find /path/to/JPEGImages | grep jpg$ | shuf > files.list | |
cat files.list | wc -l | |
#180 = 10% | |
cat files.list | head -n 180 > test.txt | |
#rest goes into train.txt | |
cat files.list | grep -v -f test.txt > train.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment