Sketch Recognition for Digital Circuit Diagrams in the Classroom Christine Alvarado Harvey Mudd College March 26, 2007 Joint work with the HMC Sketchers.

Slides:



Advertisements
Similar presentations
Artificial Intelligence 12. Two Layer ANNs
Advertisements

Evidential modeling for pose estimation Fabio Cuzzolin, Ruggero Frezza Computer Science Department UCLA.
Reconstruction from Voxels (GATE-540)
Neural networks Introduction Fitting neural networks
NEURAL NETWORKS Perceptron
Learning to Combine Bottom-Up and Top-Down Segmentation Anat Levin and Yair Weiss School of CS&Eng, The Hebrew University of Jerusalem, Israel.
Carolina Galleguillos, Brian McFee, Serge Belongie, Gert Lanckriet Computer Science and Engineering Department Electrical and Computer Engineering Department.
Computer vision: models, learning and inference Chapter 8 Regression.
Lecture 13 – Perceptrons Machine Learning March 16, 2010.
What is Statistical Modeling
Multivariate linear models for regression and classification Outline: 1) multivariate linear regression 2) linear classification (perceptron) 3) logistic.
Visual Recognition Tutorial
A Graphical Model For Simultaneous Partitioning And Labeling Philip Cowans & Martin Szummer AISTATS, Jan 2005 Cambridge.
K nearest neighbor and Rocchio algorithm
Simple Neural Nets For Pattern Classification
Logistic Regression Rong Jin. Logistic Regression Model  In Gaussian generative model:  Generalize the ratio to a linear model Parameters: w and c.
Properties of Real-World Digital Logic Diagrams Christine Alvarado, Harvey Mudd College Michael Lazzareschi, Pomona College May 24, 2007.
Code and Decoder Design of LDPC Codes for Gbps Systems Jeremy Thorpe Presented to: Microsoft Research
Learn how to make your drawings come alive…  NEW COURSE: SKETCH RECOGNITION Analysis, implementation, and comparison of sketch recognition algorithms,
Classification and application in Remote Sensing.
Lecturing with Digital Ink Richard Anderson University of Washington.
Pattern Recognition. Introduction. Definitions.. Recognition process. Recognition process relates input signal to the stored concepts about the object.
CPSC 422, Lecture 18Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 18 Feb, 25, 2015 Slide Sources Raymond J. Mooney University of.
CS Bayesian Learning1 Bayesian Learning. CS Bayesian Learning2 States, causes, hypotheses. Observations, effect, data. We need to reconcile.
Statistical Natural Language Processing. What is NLP?  Natural Language Processing (NLP), or Computational Linguistics, is concerned with theoretical.
Crash Course on Machine Learning
Knowledge Systems Lab JN 8/24/2015 A Method for Temporal Hand Gesture Recognition Joshua R. New Knowledge Systems Laboratory Jacksonville State University.
Advanced Multimedia Text Classification Tamara Berg.
Extracting Places and Activities from GPS Traces Using Hierarchical Conditional Random Fields Yong-Joong Kim Dept. of Computer Science Yonsei.
Artificial Neural Nets and AI Connectionism Sub symbolic reasoning.
ECE 8443 – Pattern Recognition Objectives: Error Bounds Complexity Theory PAC Learning PAC Bound Margin Classifiers Resources: D.M.: Simplified PAC-Bayes.
Logistic Regression Debapriyo Majumdar Data Mining – Fall 2014 Indian Statistical Institute Kolkata September 1, 2014.
Learning Theory Reza Shadmehr Linear and quadratic decision boundaries Kernel estimates of density Missing data.
Maximum Entropy (ME) Maximum Entropy Markov Model (MEMM) Conditional Random Field (CRF)
Machine Learning CUNY Graduate Center Lecture 4: Logistic Regression.
Fields of Experts: A Framework for Learning Image Priors (Mon) Young Ki Baik, Computer Vision Lab.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP # 18.
A Passive Approach to Sensor Network Localization Rahul Biswas and Sebastian Thrun International Conference on Intelligent Robots and Systems 2004 Presented.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Supervised Learning Resources: AG: Conditional Maximum Likelihood DP:
GENDER AND AGE RECOGNITION FOR VIDEO ANALYTICS SOLUTION PRESENTED BY: SUBHASH REDDY JOLAPURAM.
John Lafferty Andrew McCallum Fernando Pereira
Maximum Entropy Model, Bayesian Networks, HMM, Markov Random Fields, (Hidden/Segmental) Conditional Random Fields.
CSC321 Lecture 5 Applying backpropagation to shape recognition Geoffrey Hinton.
CSC321: Introduction to Neural Networks and Machine Learning Lecture 23: Linear Support Vector Machines Geoffrey Hinton.
Learning Kernel Classifiers 1. Introduction Summarized by In-Hee Lee.
1 Experiments with Detector- based Conditional Random Fields in Phonetic Recogntion Jeremy Morris 06/01/2007.
CSC Lecture 23: Sigmoid Belief Nets and the wake-sleep algorithm Geoffrey Hinton.
Neural networks (2) Reminder Avoiding overfitting Deep neural network Brief summary of supervised learning methods.
Bayesian Conditional Random Fields using Power EP Tom Minka Joint work with Yuan Qi and Martin Szummer.
Mastering the Pipeline CSCI-GA.2590 Ralph Grishman NYU.
CircuitBoard Shane Zamora Eyrún A. Eyjólfsdóttir University of California, Santa Barbara Department of Computer Science Sketch-Based Logic Circuit Design.
MLPR - Questions. Can you go through integration, differentiation etc. Why do we need priors? Difference between prior and posterior. What does Bayesian.
Today’s Lecture Neural networks Training
Deep Feedforward Networks
School of Computer Science & Engineering
Computer vision: models, learning and inference
Announcements HW4 due today (11:59pm) HW5 out today (due 11/17 11:59pm)
Intelligent Information System Lab
Neural Networks and Backpropagation
Machine Learning Today: Reading: Maria Florina Balcan
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 18
Overview: Fault Diagnosis
Learning to Combine Bottom-Up and Top-Down Segmentation
Behrouz Minaei, William Punch
Where did we stop? The Bayes decision rule guarantees an optimal classification… … But it requires the knowledge of P(ci|x) (or p(x|ci) and P(ci)) We.
Overview of Machine Learning
Artificial Intelligence 12. Two Layer ANNs
Mathematical Foundations of BME
Physics-guided machine learning for milling stability:
Lab 8: GUI testing Software Testing LTAT
Presentation transcript:

Sketch Recognition for Digital Circuit Diagrams in the Classroom Christine Alvarado Harvey Mudd College March 26, 2007 Joint work with the HMC Sketchers group: Aaron Wolin, Ned Burns, Jason Fennell, Max Pfleuger, Devin Smith, Paul Wais, Howard Chen, Matt Weiner, Prof. Sarah Harris

Sketching In Education Digital Circuit Design

Educational Technologies "Most of the time the lab was more about battling Xilinx than actually learning anything useful" –HMC, E85 student

Problem: Design a 1-bit full adder

CinBACoutSum Correct! AND-2 XOR-2 OR-2

Goals Build a sketch-based circuit simulation tool that: –is robust enough for real use –allows students to sketch as freely as possible –is easier to use than current software We need: –An integrated circuit simulation system –Improved free-sketch recognition algorithms –An understanding of user interface issues

Integrated System Overview Front End Circuit Recognition and Translation Simulation (Xilinx) Verilog file hand-drawn sketch

Integrated System Overview Front End Simulation (Xilinx) Verilog file hand-drawn sketch Recognize Symbols Construct Circuit Translate to Verilog Free-sketch Recognition Diagram Parsing User Interface Design

Sketch Recognition Subtasks Stroke Fragmentation Stroke Grouping Symbol Recognition NOR

A Typical Approach to Recognition Stroke Fragmentation Stroke Grouping Symbol Recognition

A Typical Approach to Recognition: Problem incorrect grouping

Why is Grouping Hard? No clear boundaries in space…

Why is Grouping Hard? No clear boundaries in space or time

A Typical Approach to Recognition: Problem ??? Stroke Grouping cannot be done without recognition (But recognition cannot be done without stroke grouping)

Our Approach Stroke Grouping Symbol Recognition Stroke Fragmentation Single-Stroke Recognition

Our Approach Stroke Grouping Symbol Recognition Stroke Fragmentation Single-Stroke Recognition

Goal: Label each stroke as WIRE, GATE or SIGNAL Method: Conditional Random Field Approach based on Yuan Qi, Martin Szummer, Thomas P. Minka. Diagram Structure Recognition by Bayesian Conditional Random Fields June 2005 Proc Comp. Vision Pattern Recogn. (CVPR) C. Schmid and S. Soatto and C. Tomasi Diagram Structure Recognition by Bayesian Conditional Random Fields gate wire gate wire signal

Conditional Random Field (CRF) Determines P(y|x) –y: vector of labels (wire or gate), one for each fragment (stroke) –x: set of all observations (stroke features)

Single-Stroke Classification Demo

Training the CRF: Data Collection and Labeling

Data Collection Goal: Free sketching in engineering education Method: –Distributed Tablet Computers to ~35 students in HMC E85 (digital circuit design) and E84 (analog circuit design) –Collected sketches from notes, homeworks, and labs But what about labeling?

Labeling Tasks Stroke Fragmentation Stroke Grouping and Labeling

Labeler Demo

Designing the UI User Study to examine: –Recognition Triggers (button, gesture, pause) –Feedback mechanisms (color, symbol, text) –Error Rates and Types Preliminary Results –Users prefer active recognition trigger –Trigger must be reliable –Users rarely trigger recognition

(Some Immediate) Future Work Stroke Grouping Symbol Recognition Stroke Fragmentation Single-Stroke Recognition Multi-class recognition wire vs. gate vs. signal

Conclusion Single-stroke recognition  Improved grouping + recognition Direct manipulation labeling  more complete datasets Robust free-sketch recognition  lower barriers to learning

Extra Slides

Nodes for every stroke (fragment)

Edges between related fragments

Example of a label set

CRF Probability Distribution The probability of a set of labels given data Want to maximize P(y|x) Normalize by sum over all possible label sets. Nasty term Need approximation to make this computationally feasible Local compatibility with labelsCompatibility based on context Normalizing term

Feature functions CRF cannot use raw stroke data Feature functions extract useful numerical data Vector of data extracted for each node and pair of adjacent nodes P(y|x) What are these observations?

Parameters Relative usefulness of features for classification needs to be accounted for Parameters act as weights for individual features Weighted features combined with a sum Represented with a dot product

Site Potentials Measure compatibility between labels and a node The exponential makes the math nicer All potentials combined with a product Site Potential feature function weight vector

Interaction Potentials Where the CRF gets its power Uses context by measuring compatibility between pairs of adjacent nodes and pairs of labels Mathematically, same story as site potentials Interaction Potential feature function weight vector

What does a CRF need? Gather data on the sketch and individual strokes (feature functions) Determine weights (training) Maximize P(y|x) in a computationally feasible way (inference) –Not going to talk about this

Feature Functions Can’t pass stroke data directly into the CRF Feature functions translate raw stroke data into simple linear values that the CRF can act on We required returned values to be in the range of [-1, 1] –In theory other ranges work, but we had problems with them

The CRF must respond linearly to the values returned by feature functions This can be problematic if the returned value has physical meaning, like the length of a stroke –To deal with features like length we created a couple of different features for whether the length was within a certain range Mathematical Limitations

Site Feature: Turning Calculates the total quantity of rotation in a stroke After calculating the value of Turning, we returned four different values for different regions To see why we need to do this, consider the red, blue, and green strokes below

Interaction Feature: T-Junction Detects whether two strokes are configured in a T-Junction with each other –Might occur where a wire meets a gate Note that this function is non-symmetric –We have to differentiate the cross from the stem of a T-Junction –We use two identical versions of this function with the arguments reversed

Parameters We still need a list of weights or parameters relating every site feature to every label, and every interaction feature to every pair of labels Must learn parameters from labeled data

Likelihood function The likelihood function is a representation of how well a given set of parameters classifies a given data set We actually use (-log(likelihood)) to make the math simpler Training allows us to find

Training: Idea How can we minimize ? –Take the derivative and set it to 0? Equation is too complicated –Gradient descent: Locally follow the gradient down to the lowest point (hopefully!) [w,v] optimal parameters [evaluated on training data]

More / better feature functions Computational issues –Numerical under- and overflow Multi-Pass CRFs –Find Gates and Wires –Train the CRF again on the gates, distinguishing the type of gate Circuit understanding, interface with Xilinx Future Work