#!/bin/bash

file_val=$ILSVRC2012_BASEDIR/Dataset/RawData/ILSVRC2012_img_val.tar
labels_val=$ILSVRC2012_BASEDIR/Dataset/Metadata/val.txt
output_val=$ILSVRC2012_BASEDIR/Dataset/PostProcessedLMDB/val

rm -rf $TMPDIR/input
rm -rf $output_val

mkdir -p $TMPDIR/input

echo "=========== Unzipping validation dataset `date` ============="

tar -C $TMPDIR/input -xvf $file_val

echo "=========== Processing validation `date` =============="

GLOG_logtostderr=1 $CAFFE_BIN/convert_imageset --resize_height=256 --resize_width=256 --shuffle $TMPDIR/input/ $labels_val $output_val


