Commit a4daec29ccf3bd6e039148a8d18617ac7c150d60
1 parent
3808a6fe
added attributes.sh
Showing
1 changed file
with
109 additions
and
0 deletions
scripts/attributes.sh
0 → 100644
| 1 | +#!/bin/bash | |
| 2 | + | |
| 3 | +BASE="Open+NEC3Enroll(true)+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" | |
| 11 | + | |
| 12 | +: ' | |
| 13 | + | |
| 14 | +br -crossValidate 2 -algorithm "CrossValidate($BASE+Stasm(false,true,[(66.24,114),(125.76,114)])+ \ | |
| 15 | +($BROW+Center(Range)+ \ | |
| 16 | +(Turk(unibrow,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasunibrow,outputVariable=predicted_hasunibrow)+Cat)/ \ | |
| 17 | +(Turk(eyebroworientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsdown,outputVariable=predicted_eyebrowsdown)/ \ | |
| 18 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=eyebrowsuptodown,outputVariable=predicted_eyebrowsuptodown)+Cat)/ \ | |
| 19 | +(Turk(eyebrowthickness,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thickeyebrows,outputVariable=predicted_thickeyebrows)/ \ | |
| 20 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyebrows,outputVariable=predicted_lighteyebrows)+Cat))/ \ | |
| 21 | +($MOUTH+Center(Range)+ \ | |
| 22 | +(Turk(expression,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smiling,outputVariable=predicted_smiling)+Cat)/ \ | |
| 23 | +(Turk(mouthasymmetry,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=asymmetrical,outputVariable=predicted_asymmetrical)+Cat))/ \ | |
| 24 | +($EYES+Center(Range)+ \ | |
| 25 | +(Turk(eyecolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkeyes,outputVariable=predicted_darkeyes)/ \ | |
| 26 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighteyes,outputVariable=predicted_lighteyes)+Cat)/ \ | |
| 27 | +(Turk(baggyeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=baggy,outputVariable=predicted_baggy)+Cat)/ \ | |
| 28 | +(Turk(almondeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=almond,outputVariable=predicted_almond)+Cat)/ \ | |
| 29 | +(Turk(buriedeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=buried,outputVariable=predicted_buried)+Cat)/ \ | |
| 30 | +(Turk(sleepyeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=sleepy,outputVariable=predicted_sleepy)+Cat)/ \ | |
| 31 | +(Turk(lineeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=line,outputVariable=predicted_line)+Cat)/ \ | |
| 32 | +(Turk(roundeyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=round,outputVariable=predicted_round)+Cat)/ \ | |
| 33 | +(Turk(smalleyes,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hassmalleyes,outputVariable=predicted_hassmalleyes)+Cat)/ \ | |
| 34 | +(Turk(glasses,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=hasglasses,outputVariable=predicted_hasglasses)+Cat)/ \ | |
| 35 | +(Turk(eyelashvisibility,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=feweyelashes,outputVariable=predicted_feweyelashes)+Cat))/ \ | |
| 36 | +($FACE+Center(Range)+ \ | |
| 37 | +(Turk(gender,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=male,outputVariable=predicted_male)+Cat)/ \ | |
| 38 | +(Turk(cheekdensity,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=puffy,outputVariable=predicted_puffy)/ \ | |
| 39 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=in,outputVariable=predicted_in)/ \ | |
| 40 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=normal,outputVariable=predicted_normal)+Cat)/ \ | |
| 41 | +(Turk(facemarks,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=scars,outputVariable=predicted_scars)/ \ | |
| 42 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=moles,outputVariable=predicted_moles)/ \ | |
| 43 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=normal,outputVariable=predicted_normal)+Cat)/ \ | |
| 44 | +(Turk(facelength,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longface,outputVariable=predicted_longface)+Cat)/ \ | |
| 45 | +(Turk(nosetomouthdist,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=long,outputVariable=predicted_long)/ \ | |
| 46 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=small,outputVariable=predicted_small)+Cat))/ \ | |
| 47 | +($HAIR+Center(Range)+ \ | |
| 48 | +(Turk(foreheadwrinkles,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=wrinkled,outputVariable=predicted_wrinkled)+Cat)/ \ | |
| 49 | +(Turk(haircolor,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=darkhair,outputVariable=predicted_darkhair)/ \ | |
| 50 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=lighthair,outputVariable=predicted_lighthair)/ \ | |
| 51 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=greyhair,outputVariable=predicted_greyhair)+Cat)/ \ | |
| 52 | +(Turk(hairstyle,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=curlyhair,outputVariable=predicted_curlyhair)+Cat))/ \ | |
| 53 | +($NOSE+Center(Range)+ \ | |
| 54 | +(Turk(noseorientation,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=upnose,outputVariable=predicted_upnose)/ \ | |
| 55 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=downnose,outputVariable=predicted_downnose)+Cat)/ \ | |
| 56 | +(Turk(nosewidth,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=narrow,outputVariable=predicted_narrow)/ \ | |
| 57 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=thick,outputVariable=predicted_thick)+Cat)/ \ | |
| 58 | +(Turk(nosesize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=smallnose,outputVariable=predicted_smallnose)/ \ | |
| 59 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=bignose,outputVariable=predicted_bignose)+Cat))/ \ | |
| 60 | +($JAW+Center(Range)+ \ | |
| 61 | +(Turk(chinsize,3)+SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=shortchin,outputVariable=predicted_shortchin)/ \ | |
| 62 | +SVM(RBF,EPS_SVR,returnDFVal=true,inputVariable=longchin,outputVariable=predicted_longchin))+Cat)): \ | |
| 63 | +CrossValidate+Fuse([ \ | |
| 64 | +Turk(unibrow,[hasunibrow],3), \ | |
| 65 | +Turk(eyebroworientation,[eyebrowsdown,eyebrowsuptodown],3), \ | |
| 66 | +Turk(eyebrowthickness,[thickeyebrows,lighteyebrows],3), \ | |
| 67 | +Turk(expression,[smiling],3), \ | |
| 68 | +Turk(mouthasymmetry,[asymmetrical],3), \ | |
| 69 | +Turk(eyecolor,[darkeyes,lighteyes],3), \ | |
| 70 | +Turk(baggyeyes,[baggy],3), \ | |
| 71 | +Turk(almondeyes,[almond],3), \ | |
| 72 | +Turk(buriedeyes,[buried],3), \ | |
| 73 | +Turk(sleepyeyes,[sleepy],3), \ | |
| 74 | +Turk(lineeyes,[line],3), \ | |
| 75 | +Turk(roundeyes,[round],3), \ | |
| 76 | +Turk(smalleyes,[hassmalleyes],3), \ | |
| 77 | +Turk(glasses,[hasglasses],3), \ | |
| 78 | +Turk(cheekdensity,[puffy,in,normal],3), \ | |
| 79 | +Turk(facemarks,[scars,moles,normal],3), \ | |
| 80 | +Turk(facelength,[longface],3), \ | |
| 81 | +Turk(nosetomouthdist,[long,small],3), \ | |
| 82 | +Turk(foreheadwrinkles,[wrinkled],3), \ | |
| 83 | +Turk(haircolor,[darkhair,lighthair,greyhair],3), \ | |
| 84 | +Turk(hairstyle,[curlyhair],3), \ | |
| 85 | +Turk(noseorientation,[upnose,downnose],3), \ | |
| 86 | +Turk(nosewidth,[narrow,thick],3), \ | |
| 87 | +Turk(nosesize,[smallnose,bignose],3), \ | |
| 88 | +Turk(chinsize,[shortchin,longchin],3)],indices=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,21,22,23,24,25,26])" \ | |
| 89 | +-path ../../img/CUHK-VHDC/CUFSF/target/ -train results30v2.turk models/all | |
| 90 | + | |
| 91 | +' | |
| 92 | + | |
| 93 | +br -crossValidate 2 -path ../../img/CUHK-VHDC/CUFSF/target/ -algorithm models/all -compare results30v2.turk results30v2.turk simmat/eyes.mtx | |
| 94 | + | |
| 95 | +br -crossValidate 2 -setHeader simmat/eyes.mtx ../../sigsets/CUHK-VHDC/CUFSF/target.xml ../../sigsets/CUHK-VHDC/CUFSF/query.xml | |
| 96 | +br -crossValidate 2 -convert Output simmat/eyes.mtx output/eyes.rank | |
| 97 | +br -crossValidate 2 -convert Output simmat/eyes.mtx algorithm_dataset/eyes_CUFSF%1.eval | |
| 98 | + | |
| 99 | +# Not trained on: earpitch, earsize, neck thickness | |
| 100 | +# Not used for comparison: gender, eyelashvisbility | |
| 101 | + | |
| 102 | +#br -crossValidate 2 -path ../../img/CUHK-VHDC/CUFSF/target/ -algorithm models/attributes -enroll results30v2.turk gallery/results30v2.gal | |
| 103 | + | |
| 104 | +#for attribute in male puffy in scars moles longface long small darkeyes lighteyes upnose downnose darkhair lighthair thickeyebrows lighteyebrows upnose downnose narrow thick smallnose bignose asymmetrical eyebrowsdown eyebrowsuptodown shortchin longchin baggy almond buried sleepy line round hassmalleyes smiling feweyelashes wrinkled curlyhair hasunibrow; do | |
| 105 | + | |
| 106 | +#echo $attribute | |
| 107 | +#br -evalRegression gallery/results30v2.gal gallery/results30v2.gal $attribute predicted_$attribute | |
| 108 | + | |
| 109 | +#done | ... | ... |