Commit 4edf4b197776daca0f8ebb62e6b7bdae1cfcbb62
1 parent
af91bf69
cleaned up script, somehow improved accuracy
Showing
1 changed file
with
17 additions
and
15 deletions
scripts/attributes.sh
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | -BASE="Open+GroundTruth(../../sigsets/CUHK-VHDC/CUFSF/target.xml,[NEC3RightEye,NEC3LeftEye])+Rename(NEC3RightEye,Affine_0)+Rename(NEC3LeftEye,Affine_1)+Affine(192,240,.345,.475,-1,-1,-1,-1,Cubic)+Cvt(Gray)" | ||
| 4 | -NOSE="RectFromStasmNoseWithBridge+ROI+Resize(76,52,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | ||
| 5 | -MOUTH="RectFromStasmMouth+ROI+Resize(36,104,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | ||
| 6 | -EYES="RectFromStasmEyes+ROI+Resize(24,136,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | ||
| 7 | -HAIR="RectFromStasmHair+ROI+Resize(60,116,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | ||
| 8 | -BROW="RectFromStasmBrow+ROI+Resize(24,136,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | ||
| 9 | -JAW="RectFromStasmJaw+ROI+Resize(104,164,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | ||
| 10 | -FACE="Cascade(FrontalFace)+Resize(104,104,Cubic)+Normalize(L2)+PCA(0.95)+Cat" | 3 | +BASE="Open+GroundTruth(../../sigsets/CUHK-VHDC/CUFSF/target.xml,[NEC3RightEye,NEC3LeftEye])+Rename(NEC3RightEye,Affine_0)+Rename(NEC3LeftEye,Affine_1)+Affine(192,240,.345,.475)+Cvt(Gray)" |
| 4 | +SUBSPACE="Normalize(L2)+PCA(0.95)+Center(Range)" | ||
| 5 | +NOSE="RectFromStasmNoseWithBridge+ROI+Resize(76,52)+$SUBSPACE" | ||
| 6 | +MOUTH="RectFromStasmMouth+ROI+Resize(36,104)+$SUBSPACE" | ||
| 7 | +EYES="RectFromStasmEyes+ROI+Resize(24,136)+$SUBSPACE" | ||
| 8 | +HAIR="RectFromStasmHair+ROI+Resize(60,116)+$SUBSPACE" | ||
| 9 | +BROW="RectFromStasmBrow+ROI+Resize(24,136)+$SUBSPACE" | ||
| 10 | +JAW="RectFromStasmJaw+ROI+Resize(104,164)+$SUBSPACE" | ||
| 11 | +FACE="Cascade(FrontalFace)+Resize(104,104)+$SUBSPACE" | ||
| 11 | 12 | ||
| 12 | mkdir -p models | 13 | mkdir -p models |
| 14 | +rm models/all | ||
| 13 | 15 | ||
| 14 | if [ ! -f models/all ]; then | 16 | if [ ! -f models/all ]; then |
| 15 | br -crossValidate 2 -algorithm "CrossValidate($BASE+Stasm(false,true,[(66.24,114),(125.76,114)])+ \ | 17 | br -crossValidate 2 -algorithm "CrossValidate($BASE+Stasm(false,true,[(66.24,114),(125.76,114)])+ \ |
| 16 | -($BROW+Center(Range)+ \ | 18 | +($BROW+ \ |
| 17 | (Turk(unibrow,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasunibrow,outputVariable=predicted_hasunibrow)+Cat)/ \ | 19 | (Turk(unibrow,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasunibrow,outputVariable=predicted_hasunibrow)+Cat)/ \ |
| 18 | (Turk(eyebroworientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsdown,outputVariable=predicted_eyebrowsdown)/ \ | 20 | (Turk(eyebroworientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsdown,outputVariable=predicted_eyebrowsdown)/ \ |
| 19 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsuptodown,outputVariable=predicted_eyebrowsuptodown)+Cat)/ \ | 21 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsuptodown,outputVariable=predicted_eyebrowsuptodown)+Cat)/ \ |
| 20 | (Turk(eyebrowthickness,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thickeyebrows,outputVariable=predicted_thickeyebrows)/ \ | 22 | (Turk(eyebrowthickness,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thickeyebrows,outputVariable=predicted_thickeyebrows)/ \ |
| 21 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyebrows,outputVariable=predicted_lighteyebrows)+Cat))/ \ | 23 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyebrows,outputVariable=predicted_lighteyebrows)+Cat))/ \ |
| 22 | -($MOUTH+Center(Range)+ \ | 24 | +($MOUTH+ \ |
| 23 | (Turk(expression,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smiling,outputVariable=predicted_smiling)+Cat)/ \ | 25 | (Turk(expression,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smiling,outputVariable=predicted_smiling)+Cat)/ \ |
| 24 | (Turk(mouthasymmetry,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=asymmetrical,outputVariable=predicted_asymmetrical)+Cat))/ \ | 26 | (Turk(mouthasymmetry,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=asymmetrical,outputVariable=predicted_asymmetrical)+Cat))/ \ |
| 25 | -($EYES+Center(Range)+ \ | 27 | +($EYES+ \ |
| 26 | (Turk(eyecolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkeyes,outputVariable=predicted_darkeyes)/ \ | 28 | (Turk(eyecolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkeyes,outputVariable=predicted_darkeyes)/ \ |
| 27 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyes,outputVariable=predicted_lighteyes)+Cat)/ \ | 29 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyes,outputVariable=predicted_lighteyes)+Cat)/ \ |
| 28 | (Turk(baggyeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=baggy,outputVariable=predicted_baggy)+Cat)/ \ | 30 | (Turk(baggyeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=baggy,outputVariable=predicted_baggy)+Cat)/ \ |
| @@ -34,7 +36,7 @@ SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyes,outputVariable=predicte | @@ -34,7 +36,7 @@ SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyes,outputVariable=predicte | ||
| 34 | (Turk(smalleyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hassmalleyes,outputVariable=predicted_hassmalleyes)+Cat)/ \ | 36 | (Turk(smalleyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hassmalleyes,outputVariable=predicted_hassmalleyes)+Cat)/ \ |
| 35 | (Turk(glasses,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasglasses,outputVariable=predicted_hasglasses)+Cat)/ \ | 37 | (Turk(glasses,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasglasses,outputVariable=predicted_hasglasses)+Cat)/ \ |
| 36 | (Turk(eyelashvisibility,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=feweyelashes,outputVariable=predicted_feweyelashes)+Cat))/ \ | 38 | (Turk(eyelashvisibility,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=feweyelashes,outputVariable=predicted_feweyelashes)+Cat))/ \ |
| 37 | -($FACE+Center(Range)+ \ | 39 | +($FACE+ \ |
| 38 | (Turk(gender,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=male,outputVariable=predicted_male)+Cat)/ \ | 40 | (Turk(gender,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=male,outputVariable=predicted_male)+Cat)/ \ |
| 39 | (Turk(cheekdensity,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=puffy,outputVariable=predicted_puffy)/ \ | 41 | (Turk(cheekdensity,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=puffy,outputVariable=predicted_puffy)/ \ |
| 40 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=in,outputVariable=predicted_in)/ \ | 42 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=in,outputVariable=predicted_in)/ \ |
| @@ -45,20 +47,20 @@ SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=normal,outputVariable=predicted_n | @@ -45,20 +47,20 @@ SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=normal,outputVariable=predicted_n | ||
| 45 | (Turk(facelength,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longface,outputVariable=predicted_longface)+Cat)/ \ | 47 | (Turk(facelength,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longface,outputVariable=predicted_longface)+Cat)/ \ |
| 46 | (Turk(nosetomouthdist,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=long,outputVariable=predicted_long)/ \ | 48 | (Turk(nosetomouthdist,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=long,outputVariable=predicted_long)/ \ |
| 47 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=small,outputVariable=predicted_small)+Cat))/ \ | 49 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=small,outputVariable=predicted_small)+Cat))/ \ |
| 48 | -($HAIR+Center(Range)+ \ | 50 | +($HAIR+ \ |
| 49 | (Turk(foreheadwrinkles,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=wrinkled,outputVariable=predicted_wrinkled)+Cat)/ \ | 51 | (Turk(foreheadwrinkles,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=wrinkled,outputVariable=predicted_wrinkled)+Cat)/ \ |
| 50 | (Turk(haircolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkhair,outputVariable=predicted_darkhair)/ \ | 52 | (Turk(haircolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkhair,outputVariable=predicted_darkhair)/ \ |
| 51 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighthair,outputVariable=predicted_lighthair)/ \ | 53 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighthair,outputVariable=predicted_lighthair)/ \ |
| 52 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=greyhair,outputVariable=predicted_greyhair)+Cat)/ \ | 54 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=greyhair,outputVariable=predicted_greyhair)+Cat)/ \ |
| 53 | (Turk(hairstyle,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=curlyhair,outputVariable=predicted_curlyhair)+Cat))/ \ | 55 | (Turk(hairstyle,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=curlyhair,outputVariable=predicted_curlyhair)+Cat))/ \ |
| 54 | -($NOSE+Center(Range)+ \ | 56 | +($NOSE+ \ |
| 55 | (Turk(noseorientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=upnose,outputVariable=predicted_upnose)/ \ | 57 | (Turk(noseorientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=upnose,outputVariable=predicted_upnose)/ \ |
| 56 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=downnose,outputVariable=predicted_downnose)+Cat)/ \ | 58 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=downnose,outputVariable=predicted_downnose)+Cat)/ \ |
| 57 | (Turk(nosewidth,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=narrow,outputVariable=predicted_narrow)/ \ | 59 | (Turk(nosewidth,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=narrow,outputVariable=predicted_narrow)/ \ |
| 58 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thick,outputVariable=predicted_thick)+Cat)/ \ | 60 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thick,outputVariable=predicted_thick)+Cat)/ \ |
| 59 | (Turk(nosesize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smallnose,outputVariable=predicted_smallnose)/ \ | 61 | (Turk(nosesize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smallnose,outputVariable=predicted_smallnose)/ \ |
| 60 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=bignose,outputVariable=predicted_bignose)+Cat))/ \ | 62 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=bignose,outputVariable=predicted_bignose)+Cat))/ \ |
| 61 | -($JAW+Center(Range)+ \ | 63 | +($JAW+ \ |
| 62 | (Turk(chinsize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=shortchin,outputVariable=predicted_shortchin)/ \ | 64 | (Turk(chinsize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=shortchin,outputVariable=predicted_shortchin)/ \ |
| 63 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longchin,outputVariable=predicted_longchin))+Cat)): \ | 65 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longchin,outputVariable=predicted_longchin))+Cat)): \ |
| 64 | CrossValidate+Fuse([ \ | 66 | CrossValidate+Fuse([ \ |