Introduction to Faceware AnalyzerBatch

Brian Genna -

With Analyzer Pro you get access to AnalyzerBatch, a command line tool that allows you to setup batch scripts for most of the functionality in Analyzer.  This is extremely useful when setting up your facial pipeline as it allows you to automate the repetitive tasks such as creating new jobs, AutoTracking, and Parameterizing.  To use AnalyzerBatch you'll need some basic familiarity with running a command line tool.  To create more advanced scripts that can repeat commands across an entire folder of videos, you'll need to be slightly more experienced with intermediate scripting.

Using Analyzer Batch to it's full potential can save you days of work over the course of a project.  Combined with the Batch functionality in Retargeter Pro, you can script and automate everything up until the point of seeing an AutoSolve result.  If you're using Shared Poses you can take it even further!  Imagine putting a large amount of videos in a directory before you leave the office and coming back the next morning to watch previews/playblasts of your facial animation.  Sounds great right?  Let's get started.

How to Batch Create New Jobs

The first step to batching the Analyzer process is to create a new "Job" from a source video using only the command line.  The objective here is to use the command line tool to find the source video and generate our scene files that we can open the Job in Analyzer.

 To batch create new jobs:

  1. Choose a source video and put it in the following folder: C:/FacewareBatch/SourceVideos
  2. Create a second folder: C:/FacewareBatch/AnalyzerFiles
  3. Open Windows Command Prompt and type and enter: cd C:/Program Files/Faceware/Analyzer (Alternatively, you can add this folder to your PATH variable in Windows.)
  4. In command prompt, type and enter: AnalyzerBatch NewJob "C:/FacewareBatch/SourceVideos/TestVideo.mov" "C:/FacewareBatch/AnalyzerFiles/TestVideo.fwt"

(Replace the name of the video and "fwt" file with yours.)

Optional - AutoTrack

If you want to AutoTrack the newly created jobs immediately, use the following command instead: AnalyzerBatch NewJob "C:/FacewareBatch/SourceVideos/TestVideo.mov" "C:/FacewareBatch/AnalyzerFiles/TestVideo.fwt" -autotrack h -neutralframe ""

*Note - Replace 'h' with 's' for Static Cam video.  h = headcam, s = static cam.  Replace "" with the path to your Neutral Frame if you have one.  Using "" will run AutoTrack with no Neutral Frame.

The Results

A successful result should be an .FWT file and folder created in your /AnalyzerFiles/ directory.  If you chose to run AutoTrack, your job will be tracked and saved.  Being able to create new Jobs using this command line tool allows you to create more advanced scripts that can repeat this process with many videos.

 

How to Batch Parameterize Videos

Once your Job is created and tracked you'll need to Parameterize it in order to export your data for animation.  Thankfully, this can also be scripted!  It will require an .FWT file and folder as well as your Analyzer credentials to work.  A Neutral Frame file is also highly recommended to increase animation quality.  The objective here is a Parameterize a finished tracking job and create the animation file (fwr).

To batch parameterize:

  1. Open Windows Command Prompt and type and enter: cd C:/Program Files/Faceware/Analyzer (Alternatively, you can add this folder to your PATH variable in Windows.)
  2. In command prompt, type and enter: AnalyzerBatch Parameterize "C:/FacewareBatch/AnalyzerFiles/TestVideo.fwt" "USERNAME" "PASSWORD" -actormodel "C:/Path/To/NeutralFrame.fwlf"

*Note - If you are not using a Neutral Frame?  Remove the -actormodel flag and the path at the end of the command.

The Results

If successful, you'll now have an .FWR file in your /AnalyzerFiles/ folder that is ready to open in Retargeter.  Understanding how to Parameterize your Jobs with this command line tool will allow you to create more advanced scripts that can repeat this process with many Jobs.
 

Using 'Export Landmark Positions' in AnalyzerBatch

AnalyzerBatch.exe contains the command, 'ExportLandmarkPositions'.  To run it, follow the instructions below:

  1. Open Windows Command Prompt
  2. Change directory to 'C:/Program Files/Faceware/Analyzer' or add this directory to the Windows PATH variable.
  3. Run the following command: 'AnalyzerBatch ExportLandmarkPositions <FwtFile> <XmlFile>'

e.g. AnalyzerBatch ExportLandmarkPositions "C:/MyFiles/AnalyzerJob_012.fwt" "C:/MyFiles/AnalyzerFeatureFile_012.xml"

 

Have more questions? Submit a request

Comments

this.location="http://support.facewaretech.com"
Powered by Zendesk