nickgillian / grt

gesture recognition toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how forget history

Ixiodor opened this issue · comments

I am working with DTW and all works fine, there is only one problem.
When toolkit match the gesture it'll keep spamming the gesture recognized(predictin on successive frames), and i dosn't want this.
I did a try putting a delay in before another "pipeline.predict()" but it's the same cause will be:

old gesture frames + 1 new frame

so the result will be the same old gesture.
How can i "delete" the old predict history?

One option for this is to add a post processing filter to the pipeline.

For example, the GRT currently has three post processing filters:

  • ClassLabelTimeoutFilter
  • ClassLabelFilter
  • ClassLabelChangeFilter

The first one (ClassLabelTimeoutFilter) is probably the most useful in this case. As the name suggests this will add a timeout to any positive (i.e., no background) gesture labels detected, so if the timeout is set to 1000 milliseconds, the pipeline will out a positive gesture label (say 1) followed by zeros for 1 second (1000 milliseconds).

You can find out more about this on this wiki page:

https://github.com/nickgillian/grt/wiki/class_label_timeout_filter