⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 examples.bat

📁 这是个人脸识别程序
💻 BAT
字号:
@rem $masm/examples.bat 1.4 milbo$ example file for ms.exe and masm.exe

rm -f out/*.bmp

@rem ----------------------------------------------------------------
@rem Example of using ms to locate facial features.
@rem
@rem Output will go to ms.log and out/*.bmp.
@rem The -xi flag specifies what images you want generated
@rem (you will see lots of generated images in out/ because of -xi 1ff)
@rem Use -xi 0 if you don't want to generate any images
@rem Use -xi 1 if you want just the final image
@rem Use -fb 1 if you want brief printed output (after initialization)

ms -m ../../stasm/stasm/data/model-1.asm -m ../../stasm/stasm/data/model-2.asm -xi 1ff ref-files/testImage.jpg

@rem ----------------------------------------------------------------
@rem Example of using ms with a reference file and the -p and -P flags.
@rem
@rem This looks up the global detector shapes in the reference shape file 84.shape.
@rem It also prints the difference between the search fit and the fit in
@rem the reference shape file.
@rem It uses the pre-calculated Rowley global face detector results in the
@rem reference file instead of re-running the Rowley face detector for each image.
@rem Use -V if you want to use the Viola JOnes shapes instead.
@rem
@rem You will need to put the BioId files into the "lpgm" directory listed in the
@rem prolog of ../shape/84.shape (they have to be .pgm files so you will
@rem have to convert them from BMP to PGM format first).  So with the
@rem standard release 84.shape you will have to create \a1\faces\BioId\lpgm\*.pgm.
@rem If you don't like the given directory (and why should you?) you can put the
@rem image files in any directory you want but if you do so (a) change the
@rem "Directories" line in your shape file (84.shape) and (b) update
@rem the index file for your shapefile by using "makeShapeIndexFile ../shape/84.shape".
@rem You will find makeShapeIndexFile in the util directory.
@rem The index file is used for fast location of files when -r is used in ms.exe.
@rem
@rem Alternatively, you can modify 84.shape to refer to .bmp files instead of .pgm
@rem file by changing all occurences of ".pgm" to ".bmp".  Once again, run
@rem makeShapeIndexFile after any changes to 84.shape.
@rem
@rem Expect the output of ms for the command line below to to look like this:
@rem
@rem     Logging to ms.log
@rem     ms version 0.3
@rem     Init ASM ../../stasm/stasm/data/model-1.asm
@rem     nPoints 68 nLevs 4 PyrRatio 2 PyrReduce 0 fExplicitPrevNext 0 NormalizedProfLen 1
@rem     nScaledFaceWidth 180 fBilinearRescale 1 nTrimCovar 3 SigmoidScale 1000 [Init ASM in 0.16 secs]
@rem     Init ASM ../../stasm/stasm/data/model-2.asm
@rem     nPoints 84 nLevs 4 PyrRatio 2 PyrReduce 0 fExplicitPrevNext 1 NormalizedProfLen 1
@rem     nScaledFaceWidth 180 fBilinearRescale 1 nTrimCovar 3 SigmoidScale 1000 [Init ASM in 0.88 secs]
@rem     RefShapeFile ../shape/84.shape
@rem     Opening ../shape/84.shape
@rem     Reading shapes matching "^.... B132"
@rem     Ignored 20 global face detector and underscore shapes
@rem     Got 10 shapes
@rem
@rem     Warning: Model shape has 68 landmarks but reference shape has 20 landmarks
@rem
@rem     Fit 0.042 (3.7) for 18 of 68 points B1320_11 [done in 0.53 secs, 0.81 secs per image]
@rem     Fit 0.029 (2.5) for 18 of 68 points B1321_11 [done in 0.50 secs, 0.66 secs per image]
@rem     Fit 0.027 (2.4) for 18 of 68 points B1322_11 [done in 0.45 secs, 0.59 secs per image]
@rem     Fit 0.053 (4.6) for 18 of 68 points B1323_11 [done in 0.44 secs, 0.55 secs per image]
@rem     Fit 0.037 (3.3) for 18 of 68 points B1324_11 [done in 0.50 secs, 0.54 secs per image]
@rem     Fit 0.050 (4.3) for 18 of 68 points B1325_11 [done in 0.45 secs, 0.53 secs per image]
@rem     Fit 0.034 (3.1) for 18 of 68 points B1326_11 [done in 0.45 secs, 0.52 secs per image]
@rem     Fit 0.029 (2.5) for 18 of 68 points B1327_11 [done in 0.41 secs, 0.50 secs per image]
@rem     Fit 0.034 (3.0) for 18 of 68 points B1328_11 [done in 0.45 secs, 0.50 secs per image]
@rem     Fit 0.037 (3.1) for 18 of 68 points B1329_11 [done in 0.39 secs, 0.49 secs per image]

@rem ms -S -ni 0 -m ../../stasm/stasm/data/model-1.asm -m ../../stasm/stasm/data/model-2.asm -r ../shape/84.shape -fb 1 -xi 1 -p "^.... B132"

@rem ----------------------------------------------------------------
@rem Rebuild stasm/data/model-2.asm
@rem
@rem This is an example of using masm to build an ASM model
@rem
@rem You will need to put the XM2VTS files into the directory listed
@rem in the prolog of ../shape/84.shape (they will have to be converted
@rem to PGM format first, see comments above).
@rem The resulting .asm file with the command
@rem line below should be identical stasm/data/model-2.asm, apart
@rem from filename and timing differences.
@rem If you want to generate 1D profiles instead of 2D profiles, or
@rem make any other changes to the generated .asm file, you should
@rem modify masmconf.* and rebuild masm.exe before running it.
@rem
@rem Expect the output of masm for the command line below to look like this:
@rem
@rem    C:\a\masm\masm>masm -o test.asm -p " m" -P f1 0 ../shape/84.shape
@rem    Logging to masm.log
@rem    masm version 0.3
@rem    Opening ../shape/84.shape
@rem    Reading shapes matching " m" Mask1 f1 [NnFailed,Expression,EyesClosed,Obscured,BadIm] Mask2 0 []
@rem    Ignored 8563 global face detector and underscore shapes
@rem    Got 3722 shapes
@rem    Reference shape m000_11.pgm has 84 landmarks, no need to convert the number of landmarks
@rem    Warning: Landmark 76 unused in 0800 m000_11.pgm (and possibly other shapes)
@rem    Some shapes don't use the following landmarks: 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
@rem    Will synthesize 8 eye landmarks for a total of 84 landmarks
@rem    Warning: Not all shapes have the same number of (used) landmarks as shape 0
@rem    Aligning shapes to m000_11.pgm, aligned eye angle -0.56 degrees [13.4 secs]
@rem    Warning: Only 1660 of 3722 shapes used in CalcShapeEigs because of missing landmarks
@rem    First 10 eig vals: 1098.5 503.7 290.4 234.3 156.2 148.1 133.7 91.9 77.8 70.4
@rem    ProfSpecs 0,0:00000041 0,15:80000085 0,48:00000041 0,67:80000085 1,0:00000041 1,15:80000085 1,48:00000041 1,67:80000085 2,0:00000041
@rem    Reading images 01234567890 [530.6 secs]
@rem    Generating stats 01234567890
@rem    92 of 100 trimmed matrices are not pos def
@rem    Checking stats and writing test.asm
@rem    Generated test.asm [656.9 secs]

@rem masm -o test.asm -p " m" -P f1 0 ../shape/84.shape

@rem ----------------------------------------------------------------
@rem Rebuild stasm/data/model-1.asm
@rem
@rem    @echo === build a 68 point 1D masm.exe =======================
@rem    copy masmconf-68-1d.hpp masmconf.hpp
@rem    nmake -nologo CFG=Release -f makefile.ms clean
@rem    nmake -nologo CFG=Release -f makefile.ms
@rem    @echo === build a 68 point 1D masm.exe =======================
@rem    @rem the generated asm file should be the same as stasm/data/model-1.asm
@rem    masm -o test-68-1d.asm -p "^[80]... m" -ni 2000 ../shape/68.shape
@rem    copy masmconf-84-2d.hpp masmconf.hpp
@rem    @echo === tidy up by rebuilding the original masm.exe ========
@rem    @rem we don't do make clean because that would delete the asm file we just created
@rem    rm -f Debug\*.obj Release\*.obj
@rem    nmake -nologo CFG=Release -f makefile.ms

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -