Created
June 15, 2016 20:22
-
-
Save BernardoGO/d18531ef025902d1c0405e6813302846 to your computer and use it in GitHub Desktop.
build test set from training sets
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
for D in $(find train/ -mindepth 1 -maxdepth 1 -type d) ; do | |
b=$(basename $D) | |
echo $D $b; | |
for Di in $(find $D/ -mindepth 1 -maxdepth 1 -type f | head -n 3) ; do | |
bi=$(basename $Di) | |
echo file: $Di $bi; | |
mkdir test/$b | |
mv $Di test/$b/$bi | |
done | |
done |
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
for D in $(find train/ -mindepth 1 -maxdepth 1 -type d | head -n 8) ; do | |
b=$(basename $D) | |
echo $D $b; | |
mkdir tiny_train | |
for Di in $(find $D/ -mindepth 1 -maxdepth 1 -type f | head -n 50) ; do | |
bi=$(basename $Di) | |
echo file: $Di $bi; | |
mkdir tiny_train/$b | |
cp $Di tiny_train/$b/$bi | |
done | |
done | |
for D in $(find test/ -mindepth 1 -maxdepth 1 -type d | head -n 8) ; do | |
b=$(basename $D) | |
echo $D $b; | |
mkdir tiny_test | |
for Di in $(find $D/ -mindepth 1 -maxdepth 1 -type f | head -n 50) ; do | |
bi=$(basename $Di) | |
echo file: $Di $bi; | |
mkdir tiny_test/$b | |
cp $Di tiny_test/$b/$bi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment