That's right.

At some point I'm going to make a simpler interface for this, but for now,
the list argument to Stream is an explicit definition of the processing
stages the stream will use.

Each item in the list = 1 stage of the stream. Whether or not a stage is
time-varying controls whether or not it can be used to process multiple
templates simultaneously, so if you separate AggregateFrames from the rest
of that block, then the feature extraction part can be done on multiple
frame groups (output by AggregateFrames) in parallel, rather than just
extracting from one group at a time.

Also, if you have e.g. two adjacent time-varying stages, they can function
as a pipeline, i.e. the later stage can be processing frame N while the
earlier stage processes frame N-1.

Of course, if you are doing batch processing on a bunch of videos
simultaneously most of this won't be relevant at all.

-Charles


On Wed, Jul 31, 2013 at 3:35 PM, Austin Van Blanton <
notifications@github.com> wrote:

> In openbr/plugins/algorithms.cpp:
>
> > @@ -49,6 +49,10 @@ class AlgorithmsInitializer : public Initializer
> >          Globals->abbreviations.insert("DisplayVideo", "Stream([Show(false,[FrameNumber])+Discard])");
> >          Globals->abbreviations.insert("PerFrameDetection", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+RestoreMat(original)+Draw(inPlace=true),Show(false,[FrameNumber])+Discard])");
> >          Globals->abbreviations.insert("AgeGenderDemo", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+Expand+<FaceClassificationRegistration>+<FaceClassificationExtraction>+(<AgeRegressor>+Rename(Subject,Age)+Discard)/(<GenderClassifier>+Rename(Subject,Gender)+Discard)+RestoreMat(original)+Draw(inPlace=true)+DrawPropertiesPoint([Age,Gender],Affine_0,inPlace=true)+SaveMat(original)+Discard+Contract,RestoreMat(original)+FPSCalc+Show(false,[AvgFPS,Age,Gender])+Discard])");
> > +        Globals->abbreviations.insert("BoVW", "Flatten+CatRows+KMeans(500)+Hist(500)");
> > +        Globals->abbreviations.insert("HOF", "Stream([KeyPointDetector(SIFT),AggregateFrames(2)+OpticalFlow,ROI,HoGDescriptor])+BoVW");
> > +        Globals->abbreviations.insert("HoG", "Stream([KeyPointDetector(SIFT),ROI,HoGDescriptor])+BoVW");
> > +        Globals->abbreviations.insert("HoGHOF", "Stream([KeyPointDetector(SIFT),(AggregateFrames(2)+OpticalFlow+ROI+HoGDescriptor)/(ROI+HoGDescriptor),Cat])+BoVW");
>
> I've done/undone this a couple times already, but after reading this
> again, let me know if this is correct @caotto <https://github.com/caotto>
>
> a)
> Stream([KeyPointDetector(SIFT),(AggregateFrames(2)+OpticalFlow+ROI+HoGDescriptor)
> /(ROI+HoGDescriptor),Cat])+BoVW
> b)
> Stream([KeyPointDetector(SIFT),AggregateFrames(2),(OpticalFlow+ROI+HoGDescriptor)/(First+ROI+HoGDescriptor),Cat])+BoVW
>
> Both a & b are technically correct w/r/t grammar, but b might be faster?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biometrics/openbr/pull/80/files#r5513264>
> .
>