-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_lmdb.sh
37 lines (34 loc) · 965 Bytes
/
create_lmdb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#########################################################################
# File Name: create_lmdb.sh
# Created Time: 2016Äê07ÔÂ05ÈÕ ÐÇÆÚ¶þ 16ʱ42·Ö43Ãë
#########################################################################
#!/bin/bash
echo "Create lmdb dataset "
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
DATA_DIR=/home/lc/DRF/data/megaage_256_256
TOOLS_DIR=/home/lc/caffe-drf/build/tools
# set RESIZE to resize images to 224x224.
RESIZE=true
if $RESIZE; then
RESIZE_HEIGHT=224
RESIZE_WIDTH=224
else
RESIZE_HEIGHT=0
RESIZE_WIDTH=0
fi
#GLOG_logtostderr=1 $TOOLS_DIR/convert_imageset \
# --shuffle \
# --resize_height=$RESIZE_HEIGHT \
# --resize_width=$RESIZE_WIDTH \
# $DATA_DIR/ \
# $SCRIPT_DIR/train.txt \
# $SCRIPT_DIR/train.lmdb
#
GLOG_logtostderr=1 $TOOLS_DIR/convert_imageset \
--shuffle \
$DATA_DIR/ \
--resize_height=$RESIZE_HEIGHT \
--resize_width=$RESIZE_WIDTH \
$SCRIPT_DIR/test.txt \
$SCRIPT_DIR/test.lmdb
echo "Done."