-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06bda41
commit 545254d
Showing
11 changed files
with
445 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOOLS=/home/ubuntu/repositories/caffe/build/tools | ||
DATA=/home/ubuntu/AdienceFaces/DATA/aligned/ | ||
DEF_FILES=/home/ubuntu/AdienceFaces/folds/train_val_txt_files_per_fold/test_fold_is_0 | ||
OUT=/home/ubuntu/AdienceFaces/lmdb/Test_fold_is_0 | ||
|
||
# Set RESIZE=true to resize the images to 256x256. Leave as false if images have | ||
# already been resized using another tool. | ||
RESIZE=true | ||
if $RESIZE; then | ||
RESIZE_HEIGHT=256 | ||
RESIZE_WIDTH=256 | ||
else | ||
RESIZE_HEIGHT=0 | ||
RESIZE_WIDTH=0 | ||
fi | ||
|
||
if [ ! -d "$DATA" ]; then | ||
echo "Error: DATA is not a path to a directory: $DATA" | ||
echo "Set the DATA variable in create_imagenet.sh to the path" \ | ||
"where the ImageNet training data is stored." | ||
exit 1 | ||
fi | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_train.txt $OUT/age_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_test.txt $OUT/age_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_val.txt $OUT/age_val_lmdb | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_train.txt $OUT/gender_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_test.txt $OUT/gender_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_val.txt $OUT/gender_val_lmdb | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOOLS=/home/ubuntu/repositories/caffe/build/tools | ||
DATA=/home/ubuntu/AdienceFaces/DATA/aligned/ | ||
DEF_FILES=/home/ubuntu/AdienceFaces/folds/train_val_txt_files_per_fold/test_fold_is_1 | ||
OUT=/home/ubuntu/AdienceFaces/lmdb/Test_fold_is_1 | ||
|
||
# Set RESIZE=true to resize the images to 256x256. Leave as false if images have | ||
# already been resized using another tool. | ||
RESIZE=true | ||
if $RESIZE; then | ||
RESIZE_HEIGHT=256 | ||
RESIZE_WIDTH=256 | ||
else | ||
RESIZE_HEIGHT=0 | ||
RESIZE_WIDTH=0 | ||
fi | ||
|
||
if [ ! -d "$DATA" ]; then | ||
echo "Error: DATA is not a path to a directory: $DATA" | ||
echo "Set the DATA variable in create_imagenet.sh to the path" \ | ||
"where the ImageNet training data is stored." | ||
exit 1 | ||
fi | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_train.txt $OUT/age_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_test.txt $OUT/age_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_val.txt $OUT/age_val_lmdb | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_train.txt $OUT/gender_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_test.txt $OUT/gender_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_val.txt $OUT/gender_val_lmdb | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOOLS=/home/ubuntu/repositories/caffe/build/tools | ||
DATA=/home/ubuntu/AdienceFaces/DATA/aligned/ | ||
DEF_FILES=/home/ubuntu/AdienceFaces/folds/train_val_txt_files_per_fold/test_fold_is_2 | ||
OUT=/home/ubuntu/AdienceFaces/lmdb/Test_fold_is_2 | ||
|
||
# Set RESIZE=true to resize the images to 256x256. Leave as false if images have | ||
# already been resized using another tool. | ||
RESIZE=true | ||
if $RESIZE; then | ||
RESIZE_HEIGHT=256 | ||
RESIZE_WIDTH=256 | ||
else | ||
RESIZE_HEIGHT=0 | ||
RESIZE_WIDTH=0 | ||
fi | ||
|
||
if [ ! -d "$DATA" ]; then | ||
echo "Error: DATA is not a path to a directory: $DATA" | ||
echo "Set the DATA variable in create_imagenet.sh to the path" \ | ||
"where the ImageNet training data is stored." | ||
exit 1 | ||
fi | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_train.txt $OUT/age_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_test.txt $OUT/age_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_val.txt $OUT/age_val_lmdb | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_train.txt $OUT/gender_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_test.txt $OUT/gender_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_val.txt $OUT/gender_val_lmdb | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOOLS=/home/ubuntu/repositories/caffe/build/tools | ||
DATA=/home/ubuntu/AdienceFaces/DATA/aligned/ | ||
DEF_FILES=/home/ubuntu/AdienceFaces/folds/train_val_txt_files_per_fold/test_fold_is_3 | ||
OUT=/home/ubuntu/AdienceFaces/lmdb/Test_fold_is_3 | ||
|
||
# Set RESIZE=true to resize the images to 256x256. Leave as false if images have | ||
# already been resized using another tool. | ||
RESIZE=true | ||
if $RESIZE; then | ||
RESIZE_HEIGHT=256 | ||
RESIZE_WIDTH=256 | ||
else | ||
RESIZE_HEIGHT=0 | ||
RESIZE_WIDTH=0 | ||
fi | ||
|
||
if [ ! -d "$DATA" ]; then | ||
echo "Error: DATA is not a path to a directory: $DATA" | ||
echo "Set the DATA variable in create_imagenet.sh to the path" \ | ||
"where the ImageNet training data is stored." | ||
exit 1 | ||
fi | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_train.txt $OUT/age_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_test.txt $OUT/age_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_val.txt $OUT/age_val_lmdb | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_train.txt $OUT/gender_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_test.txt $OUT/gender_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_val.txt $OUT/gender_val_lmdb | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOOLS=/home/ubuntu/repositories/caffe/build/tools | ||
DATA=/home/ubuntu/AdienceFaces/DATA/aligned/ | ||
DEF_FILES=/home/ubuntu/AdienceFaces/folds/train_val_txt_files_per_fold/test_fold_is_4 | ||
OUT=/home/ubuntu/AdienceFaces/lmdb/Test_fold_is_4 | ||
|
||
# Set RESIZE=true to resize the images to 256x256. Leave as false if images have | ||
# already been resized using another tool. | ||
RESIZE=true | ||
if $RESIZE; then | ||
RESIZE_HEIGHT=256 | ||
RESIZE_WIDTH=256 | ||
else | ||
RESIZE_HEIGHT=0 | ||
RESIZE_WIDTH=0 | ||
fi | ||
|
||
if [ ! -d "$DATA" ]; then | ||
echo "Error: DATA is not a path to a directory: $DATA" | ||
echo "Set the DATA variable in create_imagenet.sh to the path" \ | ||
"where the ImageNet training data is stored." | ||
exit 1 | ||
fi | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_train.txt $OUT/age_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_test.txt $OUT/age_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/age_val.txt $OUT/age_val_lmdb | ||
|
||
|
||
|
||
echo "Creating train leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_train.txt $OUT/gender_train_lmdb | ||
|
||
echo "Creating train subset leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_test.txt $OUT/gender_test_lmdb | ||
|
||
echo "Creating val leveldb..." | ||
GLOG_logtostderr=1 $TOOLS/convert_imageset.bin --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $DATA $DEF_FILES/gender_val.txt $OUT/gender_val_lmdb | ||
|
||
|
||
|
Oops, something went wrong.