I assume you are talking about this block:

Stream([KeyPointDetector(SIFT),(AggregateFrames(2)+OpticalFlow+ROI+HoGDescriptor
/(ROI+HoGDescriptor),Cat])+BoVW")

In this case, the stream will have 3 child transforms, the second one, this
pipe:

(AggregateFrames(2)+OpticalFlow+ROI+HoGDescriptor /(ROI+HoGDescriptor)

will be time varying (time varying propagates up through composite
transforms, see CompositeTransform::init), so the stream will run it
as a single-threaded stage. It may be faster to separate. If the rest
of the transforms are not time varying it will probably be faster to
separate AggregateFrames into its own stage, so that the OpticalFlow
etc. can be run as a multi-threaded stage.

I don't see that having a stream within a stream is relevant here,
after the merge earlier today that is possible and probably will not
even deadlock. Of course, a stream expects the templatelist it
receives to contain either unopened video sources or a list of already
opened images, so in most cases this will probably not make sense.


-Charles



On Wed, Jul 31, 2013 at 2:52 PM, jklontz <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 don't think the current code will work. @caotto<https://github.com/caotto>can time varying transforms exist as grandchildren of Stream? Can you have
> a stream within a stream?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biometrics/openbr/pull/80/files#r5512064>
> .
>