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 | 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 | 13 | mkdir -p models |
| 14 | +rm models/all | |
| 13 | 15 | |
| 14 | 16 | if [ ! -f models/all ]; then |
| 15 | 17 | br -crossValidate 2 -algorithm "CrossValidate($BASE+Stasm(false,true,[(66.24,114),(125.76,114)])+ \ |
| 16 | -($BROW+Center(Range)+ \ | |
| 18 | +($BROW+ \ | |
| 17 | 19 | (Turk(unibrow,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasunibrow,outputVariable=predicted_hasunibrow)+Cat)/ \ |
| 18 | 20 | (Turk(eyebroworientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsdown,outputVariable=predicted_eyebrowsdown)/ \ |
| 19 | 21 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsuptodown,outputVariable=predicted_eyebrowsuptodown)+Cat)/ \ |
| 20 | 22 | (Turk(eyebrowthickness,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thickeyebrows,outputVariable=predicted_thickeyebrows)/ \ |
| 21 | 23 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyebrows,outputVariable=predicted_lighteyebrows)+Cat))/ \ |
| 22 | -($MOUTH+Center(Range)+ \ | |
| 24 | +($MOUTH+ \ | |
| 23 | 25 | (Turk(expression,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smiling,outputVariable=predicted_smiling)+Cat)/ \ |
| 24 | 26 | (Turk(mouthasymmetry,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=asymmetrical,outputVariable=predicted_asymmetrical)+Cat))/ \ |
| 25 | -($EYES+Center(Range)+ \ | |
| 27 | +($EYES+ \ | |
| 26 | 28 | (Turk(eyecolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkeyes,outputVariable=predicted_darkeyes)/ \ |
| 27 | 29 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyes,outputVariable=predicted_lighteyes)+Cat)/ \ |
| 28 | 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 | 36 | (Turk(smalleyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hassmalleyes,outputVariable=predicted_hassmalleyes)+Cat)/ \ |
| 35 | 37 | (Turk(glasses,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasglasses,outputVariable=predicted_hasglasses)+Cat)/ \ |
| 36 | 38 | (Turk(eyelashvisibility,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=feweyelashes,outputVariable=predicted_feweyelashes)+Cat))/ \ |
| 37 | -($FACE+Center(Range)+ \ | |
| 39 | +($FACE+ \ | |
| 38 | 40 | (Turk(gender,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=male,outputVariable=predicted_male)+Cat)/ \ |
| 39 | 41 | (Turk(cheekdensity,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=puffy,outputVariable=predicted_puffy)/ \ |
| 40 | 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 | 47 | (Turk(facelength,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longface,outputVariable=predicted_longface)+Cat)/ \ |
| 46 | 48 | (Turk(nosetomouthdist,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=long,outputVariable=predicted_long)/ \ |
| 47 | 49 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=small,outputVariable=predicted_small)+Cat))/ \ |
| 48 | -($HAIR+Center(Range)+ \ | |
| 50 | +($HAIR+ \ | |
| 49 | 51 | (Turk(foreheadwrinkles,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=wrinkled,outputVariable=predicted_wrinkled)+Cat)/ \ |
| 50 | 52 | (Turk(haircolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkhair,outputVariable=predicted_darkhair)/ \ |
| 51 | 53 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighthair,outputVariable=predicted_lighthair)/ \ |
| 52 | 54 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=greyhair,outputVariable=predicted_greyhair)+Cat)/ \ |
| 53 | 55 | (Turk(hairstyle,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=curlyhair,outputVariable=predicted_curlyhair)+Cat))/ \ |
| 54 | -($NOSE+Center(Range)+ \ | |
| 56 | +($NOSE+ \ | |
| 55 | 57 | (Turk(noseorientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=upnose,outputVariable=predicted_upnose)/ \ |
| 56 | 58 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=downnose,outputVariable=predicted_downnose)+Cat)/ \ |
| 57 | 59 | (Turk(nosewidth,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=narrow,outputVariable=predicted_narrow)/ \ |
| 58 | 60 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thick,outputVariable=predicted_thick)+Cat)/ \ |
| 59 | 61 | (Turk(nosesize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smallnose,outputVariable=predicted_smallnose)/ \ |
| 60 | 62 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=bignose,outputVariable=predicted_bignose)+Cat))/ \ |
| 61 | -($JAW+Center(Range)+ \ | |
| 63 | +($JAW+ \ | |
| 62 | 64 | (Turk(chinsize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=shortchin,outputVariable=predicted_shortchin)/ \ |
| 63 | 65 | SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longchin,outputVariable=predicted_longchin))+Cat)): \ |
| 64 | 66 | CrossValidate+Fuse([ \ | ... | ... |