Probabilistic Context Free Grammars for Representing Action Song Mao November 14, 2000.

Slides:



Advertisements
Similar presentations
1 Parsing The scanner recognizes words The parser recognizes syntactic units Parser operations: Check and verify syntax based on specified syntax rules.
Advertisements

By: Ryan Wendel.  It is an ongoing analysis in which videos are analyzed frame by frame  Most of the video recognition is pulled from 3-D graphic engines.
PARSING WITH CONTEXT-FREE GRAMMARS
10. Lexicalized and Probabilistic Parsing -Speech and Language Processing- 발표자 : 정영임 발표일 :
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing Probabilistic Context Free Grammars (Chapter 14) Muhammed Al-Mulhem March 1,
1 Earley Algorithm Chapter 13.4 October 2009 Lecture #9.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Parsing context-free grammars Context-free grammars specify structure, not process. There are many different ways to parse input in accordance with a given.
Parsing with CFG Ling 571 Fei Xia Week 2: 10/4-10/6/05.
Parsing with PCFG Ling 571 Fei Xia Week 3: 10/11-10/13/05.
Parsing III (Eliminating left recursion, recursive descent parsing)
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
Parsing — Part II (Ambiguity, Top-down parsing, Left-recursion Removal)
Syntactic Parsing with CFGs CMSC 723: Computational Linguistics I ― Session #7 Jimmy Lin The iSchool University of Maryland Wednesday, October 14, 2009.
Language Model. Major role: Language Models help a speech recognizer figure out how likely a word sequence is, independent of the acoustics. A lot of.
1 The Parser Its job: –Check and verify syntax based on specified syntax rules –Report errors –Build IR Good news –the process can be automated.
Fall 2004 Lecture Notes #5 EECS 595 / LING 541 / SI 661 Natural Language Processing.
Chapter 3: Formal Translation Models
Parsing SLP Chapter 13. 7/2/2015 Speech and Language Processing - Jurafsky and Martin 2 Outline  Parsing with CFGs  Bottom-up, top-down  CKY parsing.
Cs466(Prasad)L8Norm1 Normal Forms Chomsky Normal Form Griebach Normal Form.
Syntactic Pattern Recognition Statistical PR:Find a feature vector x Train a system using a set of labeled patterns Classify unknown patterns Ignores relational.
Tracking with Linear Dynamic Models. Introduction Tracking is the problem of generating an inference about the motion of an object given a sequence of.
Basic Parsing with Context- Free Grammars 1 Some slides adapted from Julia Hirschberg and Dan Jurafsky.
Statistical Natural Language Processing. What is NLP?  Natural Language Processing (NLP), or Computational Linguistics, is concerned with theoretical.
1 Syntax and Semantics The Purpose of Syntax Problem of Describing Syntax Formal Methods of Describing Syntax Derivations and Parse Trees Sebesta Chapter.
1 Introduction to Parsing Lecture 5. 2 Outline Regular languages revisited Parser overview Context-free grammars (CFG’s) Derivations.
Syntax & Semantic Introduction Organization of Language Description Abstract Syntax Formal Syntax The Way of Writing Grammars Formal Semantic.
Compiler1 Chapter V: Compiler Overview: r To study the design and operation of compiler for high-level programming languages. r Contents m Basic compiler.
CS 4705 Parsing More Efficiently and Accurately. Review Top-Down vs. Bottom-Up Parsers Left-corner table provides more efficient look- ahead Left recursion.
Real-time object tracking using Kalman filter Siddharth Verma P.hD. Candidate Mechanical Engineering.
1. Introduction Motion Segmentation The Affine Motion Model Contour Extraction & Shape Estimation Recursive Shape Estimation & Motion Estimation Occlusion.
1 Chapter 5 LL (1) Grammars and Parsers. 2 Naming of parsing techniques The way to parse token sequence L: Leftmost R: Righmost Top-down  LL Bottom-up.
BİL 744 Derleyici Gerçekleştirimi (Compiler Design)1 Syntax Analyzer Syntax Analyzer creates the syntactic structure of the given source program. This.
Some Probability Theory and Computational models A short overview.
Testing Grammars For Top Down Parsers By Asma M Paracha, Frantisek F. Franek Dept. of Computing & Software McMaster University Hamilton, Ont.
K. J. O’Hara AMRS: Behavior Recognition and Opponent Modeling Oct Behavior Recognition and Opponent Modeling in Autonomous Multi-Robot Systems.
LINGUISTICA GENERALE E COMPUTAZIONALE ANALISI SINTATTICA (PARSING)
CS Describing Syntax CS 3360 Spring 2012 Sec Adapted from Addison Wesley’s lecture notes (Copyright © 2004 Pearson Addison Wesley)
Profs. Necula CS 164 Lecture Top-Down Parsing ICOM 4036 Lecture 5.
Lesson 3 CDT301 – Compiler Theory, Spring 2011 Teacher: Linus Källberg.
CS 3240: Languages and Computation Context-Free Languages.
TextBook Concepts of Programming Languages, Robert W. Sebesta, (10th edition), Addison-Wesley Publishing Company CSCI18 - Concepts of Programming languages.
Context Free Grammars. Context Free Languages (CFL) The pumping lemma showed there are languages that are not regular –There are many classes “larger”
Parsing with Context Free Grammars CSC 9010 Natural Language Processing Paula Matuszek and Mary-Angela Papalaskari This slide set was adapted from: Jim.
Parsing I: Earley Parser CMSC Natural Language Processing May 1, 2003.
1 Chapter 4 Grammars and Parsing. 2 Context-Free Grammars: Concepts and Notation A context-free grammar G = (Vt, Vn, S, P) –A finite terminal vocabulary.
Recognizing Action at a Distance Alexei A. Efros, Alexander C. Berg, Greg Mori, Jitendra Malik Computer Science Division, UC Berkeley Presented by Pundik.
CSE 425: Syntax II Context Free Grammars and BNF In context free grammars (CFGs), structures are independent of the other structures surrounding them Backus-Naur.
Introduction to Parsing
Pushdown Automata Chapters Generators vs. Recognizers For Regular Languages: –regular expressions are generators –FAs are recognizers For Context-free.
Basic Parsing Algorithms: Earley Parser and Left Corner Parsing
Introduction to Compiling
Quick Speech Synthesis CMSC Natural Language Processing April 29, 2003.
CS 4705 Lecture 10 The Earley Algorithm. Review Top-Down vs. Bottom-Up Parsers –Both generate too many useless trees –Combine the two to avoid over-generation:
Multiple track hypotheses maintained for each possible blob-object mapping Parse driven by blob interaction events Domain-general events are detected (e.g.,
Hand Gesture Recognition Using Haar-Like Features and a Stochastic Context-Free Grammar IEEE 高裕凱 陳思安.
Syntax Analysis - Parsing Compiler Design Lecture (01/28/98) Computer Science Rensselaer Polytechnic.
Course14 Dynamic Vision. Biological vision can cope with changing world Moving and changing objects Change illumination Change View-point.
Using Adaptive Tracking To Classify And Monitor Activities In A Site W.E.L. Grimson, C. Stauffer, R. Romano, L. Lee.
Top-Down Parsing.
Instructor: Nick Cercone CSEB - 1 Parsing and Context Free Grammars Parsers, Top Down, Bottom Up, Left Corner, Earley.
Stochastic Grammars: Overview Representation: Stochastic grammar Representation: Stochastic grammar Terminals: object interactions Terminals: object interactions.
1 Topic #4: Syntactic Analysis (Parsing) CSC 338 – Compiler Design and implementation Dr. Mohamed Ben Othman ( )
By Kyle McCardle.  Issues with Natural Language  Basic Components  Syntax  The Earley Parser  Transition Network Parsers  Augmented Transition Networks.
Syntax Analysis Or Parsing. A.K.A. Syntax Analysis –Recognize sentences in a language. –Discover the structure of a document/program. –Construct (implicitly.
Eliminating Left-Recursion Where some of a nonterminal’s productions are left-recursive, top-down parsing is not possible “Immediate” left-recursion can.
Programming Languages Translator
Syntax Analysis Sections :.
R.Rajkumar Asst.Professor CSE
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Presentation transcript:

Probabilistic Context Free Grammars for Representing Action Song Mao November 14, 2000

Action Understanding in Computer Vision  Interpretation of basic movements Sitting, walking, running …  Description of motion of several objects  Recognition of gestures  High-level event

High-level Events  Consists of primitives For car drop-off event: car-enter, car-stop, person-enter, person-exit, etc.  Spatio-temporal structure & constraint  Semantically defined activities  Span extended periods of time  Multi-object interactions

Approaches  Statistical techniques  Syntactic techniques  Methods that combine the two techniques

Statistical Techniques  Classifying pattern by assuming an statistical model Tennis stroke recognition Gesture recognition Visual language recognition  Advantages Real world data are noisy in nature (signal noise) Uncertainty in observation (sensor noise)

Statistical Techniques (cont.)  Disadvantages Insufficient data Semantic ambiguity Temporal ambiguity Known structure

Syntactic Techniques  Describe pattern structure  Formal grammar  Context free grammar (CFG)  Stochastic context free grammar (SCFGs)  Parsing

Combine the Two Techniques  Independent primitives detection using statistical techniques  Actions (structured primitives) recognition by syntactic techniques Parsing primitives by SCFGs Removing ambiguity by parsing SCFGs Correcting errors (substitution, insertion, deletion) by adding SKIP rules and penalty function to SCFGs

Decoupling Primitive Detection and Primitive Structuring

Parsing  What is Parsing? The process of taking an input and producing some sort of structure for it.(Jurafsky & Martin)  Structure assigned by Context Free Grammar (CFG) / Stochastic Context Free Grammar (SCFG)

Parsing Approaches  Top-down approach  Bottom-up approach  Dynamic programming approach Cocke-Younger-Kasami parser (CYK) Graham-Harrison-Ruzzo parser (GHR) Earley parser

Context Free Grammars (CFG)  A set of non-terminal symbols  A set of terminal symbols  A set of productions P of form  Start symbol  Directly derivation: if,

Context Free Grammar (Cont.)  Derivation:...,  A language generated by a grammar

Stochastic Context Free Grammar (SCFG)  Modify production as:  Where is the rule probability of the production from a Context-Free Grammars (CFGs)  Rules are conditionally independent

Earley Parsing Algorithm  A set of states for each position in the input  Dot denotes the current input position  A state with the dot at the right most position is a complete state  A state produced by prediction is a predicted state  A state produced by completion is a completed state

Earley Parsing Algorithm (cont.)  A State:  Prediction:

Earley Parser (cont.)  Scanning:  Completion:

An Example state set (0) (1) Book (2) that (3) flight

Earley-Stolcke Parser (1)  A state  Forward probability  Inner probability  Earley path: a sequence of states needed to reach the current state  Length of path: number of scanning states

Earley-Stolcke Parser (2)  Prediction where

Compute  Left-recursion in grammar  Possibly infinite prediction loop that accumulate probability computation  Example:  Left Corner relation: 

Compute (cont.)  Matrix form  Computed once for the grammar, and used at each iteration of the prediction step

Earley-Stolcke Parser (3)  Scanning  Completion where

Compute  Unit production:  Infinite completion by unit production e. g.  Unit production relation matrix  Similarly as computing in prediction step

Uncertainty in the Input  Source of the input symbols is probabilistic  Modify scanning of the Earley-Stolcke parser  Address the substitution error

An Example for a Grammar

Insertion and Deletion  Use a robust form grammar of   Includes all repetitions of all terminals  Set small  Penalize derivation consuming less terminals

Enforcing Consistency (1)  Types of consistency Temporal consistency Spatial consistency Object identity consistency  Add 2 vector valued state variables low mark high mark  Containing the data for computing distance penalty between two joining states

Enforcing Consistency (2)  Prediction  Scanning

Enforcing Consistency (3)  Completion  : distance penalty function  Computed based on high mark of completed state and low mark of completing state

Choice of  Sever penalty: step function e. g.  Softer penalty: exponential function e. g.

Application: Vedio Surveillance of Parking Lot  Outdoor environment – occlusions and lighting change  Static cameras  Real-time performance  Labeling activities and person-vehicle interactions in a parking lot  Handling simultaneous events

Known Structure, Uncertain Elements  Activities as sequences of primitives represented by SCFG Car drop-off, car pick-up Dancing  Input primitives are uncertain Uncertain observation of primitive Noisy symbols

Approach  First detect primitives using statistical method Tracker Event generator  Then Recognize activity by parsing input stream of uncertain primitives (partial tracks) by an SCFG parser

System Overview

System Overview (cont.)  Tracker Assign identity to the moving objects Collects the trajectory data into partial tracks  Event generator Maps partial tracks onto predetermined set of events  Parser Labels sequences of events by parsing using a SCFG Enforce consistency constraint

Tracker  Object found  Assign a unique ID  Track changes in objects’ appearance, position, velocity  Based on the data, assign each object a class label (e.g. a car or a person)  Object lost  Object exit

Event Generator  Based on data from tracker Object-enter Object-found Object-exit Object-lost Object-stopped  Initially, tracker can not figure out class label,  When object exit, tracker has enough information to assign a class label to the object

An Example of Generating Events

Parsing Events

Sample Stochastic Context- Free Grammar

Tracker and Event Generator Data for Parser States  Tracker event generator provides data for “low mark” and “high mark” of parser states f: frame number t: timing stamp (x,y): location (dx,dy): velocity

Distance Penalty Function  : high mark data of state being completed  :low mark of the completing state  Where is the predicted position of the object at time

An Example

Events Data for Drive-In and Drop-Off Activities

Vedio Frame Illustration Person passed throughPerson drove inPerson drop offCar passed through