Skip to content

Instantly share code, notes, and snippets.

@bunelr
Last active November 12, 2015 15:51
Show Gist options
  • Save bunelr/339872345ea41e4d9dc8 to your computer and use it in GitHub Desktop.
Save bunelr/339872345ea41e4d9dc8 to your computer and use it in GitHub Desktop.
Using split files to get all Train/Test/Validation images in a folder
cat split/train.txt | trim | awk '{printf("cp /home/rudy/datasets/MSRC/MSRC_ObjCategImageDatabase_v2/Images/%s /home/rudy/datasets/MSRC/train/%s \n" , $1 , $1)}' | bash
cat split/Validation.txt |sed 's/.bmp/_GT.bmp/' | trim | awk '{printf("cp /home/rudy/datasets/MSRC/MSRC_ObjCategImageDatabase_v2/GroundTruth/%s /home/rudy/datasets/MSRC/GT_by_partition/val/%s \n" , $1 , $1)}' | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment