forked from eglxiang/ytf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compuFea2.sh
44 lines (40 loc) · 924 Bytes
/
compuFea2.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
38
39
40
41
42
43
# Xiang Xiang ([email protected]), June 15, 2016.
#!/bin/bash
shopt -s dotglob
rootpath="/localsata/xiang/YouTubeFaces/"
inputfoldername="selected_faces"
outputfoldername="feature"
inputroot=$rootpath$inputfoldername
#echo "1$inputroot"
outputroot=$rootpath$outputfoldername
#echo "2$outputroot"
mkdir $outputroot
for dir in "$inputroot"/*
do
# echo "3$dir"
pename=${dir#$inputroot} # para substitution
# echo "4$pename"
outdir=$outputroot$pename
# echo "5$outdir"
mkdir $outdir
for subdir in "$dir"/*
do
# echo "6$subdir"
idname=${subdir#$dir}
# echo "7$idname"
outsubdir=$outputroot$pename$idname
# echo "8$outsubdir"
mkdir $outsubdir
arg3=${subdir#$inputroot}
echo "$arg3"
for file in "$subdir"/*
do
#echo "10$file"
if [[ -f $file ]]
then
#echo "11$file"
./bin/Release/classify_test VGG_FACE_deploy.prototxt VGG_FACE.caffemodel $rootpath $arg3
fi
done
done
done