Skip to content

Instantly share code, notes, and snippets.

@arjun-kava
Created June 5, 2018 10:38
Show Gist options
  • Save arjun-kava/b96422aecf813745e275689c323c4750 to your computer and use it in GitHub Desktop.
Save arjun-kava/b96422aecf813745e275689c323c4750 to your computer and use it in GitHub Desktop.
prepare train and test for training model
####### First Solution ########
# create train and test list
find `pwd`/train -name \*.jpg > train.list
find `pwd`/test -name \*.jpg > test.list
######## Second Solution
# append path to already available files
REPLACE_TRAIN="\/path\/to\/train\/"
REPLACE_TEST="\/path\/to\/test\/"
sed -e "s/^/${REPLACE_TRAIN}/" > train.list
sed -e "s/^/${REPLACE_TEST}/" > test.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment