Friday, October 28, 2016

Assignment 7 - Project Proposal

Overview
We have completed the homework portion of the class and covered a majority of the readings, so it is time to start finalizing plans for the project.  In Assignment 5, you started thinking about ideas, and in Assignment 6 you explored these ideas a little bit in terms of their novelty and applicability.  You now will form a team and build your refined proposal.  You have the last month-and-a-half of class to complete the final project, but we would like for you to be able to get started as soon as possible once November begins.

Instructions
Write a paragraph describing your project proposal.  You should discuss what you want to do, why you want to do it, and how you plan to accomplish it.  Roughly, this corresponds to the idea, the motivation, and the project plan.  If you need more than a paragraph, that is fine, but if you need only a few sentences to describe each, a paragraph is sufficient.

At the end, state whether you are working alone or on a team, and if you are on a team, list the team members.

Post this proposal to your blog by the due date.  Only one member of each team needs to post the proposal itself, but if you are a team member, you should create a post that links to the team's proposal and states your intention to work on the project.

If you need help forming a team, a spreadsheet has been placed in the class drive.  I encourage team leaders who have an idea post their name and a short summary of their idea to this spreadsheet.  That will help you find members, since those who are looking for a team are encouraged to sign up in the team slots that interest them.  We can finalize teams some time next week; this is just to help get your ideas out there and express your interests.

Obtaining Credit
You should have a blog post corresponding to Assignment 7 by the due date.  You need either a project proposal or a link to a project proposal stating that you are working on that team.

Due Date
Nov. 7, Monday @ Midnight
25% deducted per day late

Monday, October 24, 2016

Reading 15 - Tahuti

Paper
Hammond, Tracy, and Randall Davis. "Tahuti: A geometrical sketch recognition system for uml class diagrams." ACM SIGGRAPH 2006 Courses. ACM, 2006.

Notes
Tahuti is a system for recognizing UML diagrams and automatically generating code.  It includes some very simple and intuitive geometric recognition methods, including an algorithm for arrow recognition.

Monday, October 17, 2016

Reading 14 - LADDER

Paper
Hammond, Tracy, and Randall Davis. "LADDER, a sketching language for user interface developers." Computers & Graphics 29.4 (2005): 518-532.

Notes
LADDER is a sketch language for defining geometric-based relationships that allow recognition of shapes from any domain.

Friday, October 14, 2016

Reading 13 - Paleosketch

Paper
Paulson, Brandon, and Tracy Hammond. "Paleosketch: accurate primitive sketch recognition and beautification." Proceedings of the 13th international conference on Intelligent user interfaces. ACM, 2008.

Notes
Paleosketch is a good primitive recognition engine which supports many different types of shapes.  Not only does this paper include a number of useful shape test algorithms, it also introduces two new features common in sketch recognition today -- the Normalized Distance between Direction Extremes (NDDE) and the Direction Change Ratio (DCR).

Wednesday, October 12, 2016

Homework 3 - Recognition


Overview
For the third and final homework assignment, before we turn our attention to the project, we will look at building sketch recognition algorithms.  By now you have implemented feature extraction and corner-finding/segmentation methods.  We will build on this experience to perform recognition.

Instructions
Languages and Data
As in Homework 2, you are not required to use any specific language, but the data is only available via the Sketch Recognition Library Database (srlib_db), so you will at least need to make calls to the service and parse the JSON files.  If you have completed Homework 2 in any language, you will have code to handle these operations.

The data handlers for srlib_db are available in Javascript via srlib_js, which is included in a limited form in the Starter code available on the class drive under "Homework 3".  The documentation for srlib_js is also included in "srlib_jsdoc"; it is a JSDoc directory and should be downloaded and read through a web browser by opening the "index.html" inside "srlib_jsdoc".

The specification of SketchML::JSON, which is the format of all sketches on srlib_db, is also available in the homework's folder.  If you wish to use another language, that will be a useful reference, but any language that handles JSON-like objects natively will be easy to adapt.

Recognition

The goal of this assignment is that, given a set of processed strokes, you can group them into meaningful, recognized shapes.  Specifically, you should be able to recognize "arrow" and "truss" shapes from the substrokes.  You may use your pre-existing code for feature extraction and segmentation (from Homeworks 1 and 2, respectively) if you wish.  Alternatively, you may directly use the substrokes provided by the Mechanix data; for this assignment, only the shape data has been removed, while both shapes and substrokes were removed in the previous assignment.  As mentioned in the previous assignment, if you performed some additional effort in Homework 2 to identify nodes, that could be useful in your recognition of trusses in this assignment if you want to use your own segmenter.

You may implement any recognition method you like except template matching.  Such a method does not scale to trusses of any number of nodes, nor does it handle the many variations of drawing arrows very well.  It may be possible to perform fairly well in this specific domain on very specific examples with template matching, but it is heavily discouraged because of the lack of scalability.  We will be covering more recognition methods over the next two weeks in class, and you are encouraged to explore your own ideas for sketch recognition algorithms.  Any exploration and implementation you do during this assignment will likely benefit your final project.

As before, evaluation code and details will be shared soon.  Placeholder text has been added to the Starter code so that only the function will need to be added.  Your shapes will be evaluated against other types of shapes (e.g. triangles, letters, generic closed bodies, etc.), so be sure your algorithm is robust enough to detect true negatives.  That is, do not assume that you can label every shape as an arrow or a truss simply because there are so many in the Mechanix data; that will lead to many false positives on test data.

Starter Code

As with Homeworks 1 and 2, there is provided Starter code in the directory for Homework 3.  This file already handles loading data and converting it into the appropriate format.  It also visualizes the original sketch data, prefixed "old", and your sketch data, prefixed "new", according to either the substrokes or shapes.

When plotting substrokes, each substroke is assigned a random color to easily differentiate them on the canvas.  Substrokes are identical for "old" and "new" in the current version, as strokes were in the previous homework, although you may use your own segmenter if desired.  When plotting shapes, the entire shape is given the same random color.  The "old" sketches will have correctly segmented (by Mechanix) shapes, which will be the basis for comparison of your "new" sketch shapes.  The Starter code simply makes all substrokes part of one shape at the moment in order to demonstrate some useful functions of srlib_js.  Once finished, your "new" sketches should also feature multiple shapes for the different recognized objects.

Note that Mechanix sketches can be large and may get cut off by the canvas.

Obtaining Credit
Again, the goal of this assignment is that you write sketch recognition algorithms for arrows and trusses.  You will need to submit all of your source files to the grader.  Also, include a small report describing what algorithm you implemented, the intuition of how it works, and the most difficult problems you encountered.  If you run the metrics code, include those numbers as well.

Please ZIP all your files together into a single file submission titled "HW3_<last name>_<first initial>.zip".  Since the university may block ZIP files, it is recommended that you upload your file to Google Drive and share the link via email.

More details will follow regarding the evaluation metrics.  Remember to keep false positives and true negatives in mind so that your algorithm can perform well on general test data.

This homework may seem large, but given the previous experience and code you've developed from homeworks 1 and 2, it should be quite manageable.  You will have approximately two weeks to complete the assignment before we switch over to project-centered tasks for the final half of the class.

Due Date
Nov. 2, Wednesday @ Midnight (extended from Oct. 26)
25% deducted per day late

Reading 12 - Electronic Cocktail Napkin

Paper
Gross, Mark D. "Recognizing and interpreting diagrams in design." Proceedings of the workshop on Advanced visual interfaces. ACM, 1994.

Notes
This is another simple recognition method which relies on template codes against which to match.

Monday, October 10, 2016

Reading 11 - $1 Recognizer

Paper
Wobbrock, Jacob O., Andrew D. Wilson, and Yang Li. "Gestures without libraries, toolkits or training: a $1 recognizer for user interface prototypes." Proceedings of the 20th annual ACM symposium on User interface software and technology. ACM, 2007.

Notes
We have now finished the corner finding portion of readings and will be moving on to recognition in preparation for the next homework.  The recognition portion begins with the most simple recognition algorithm, which is often used as a baseline for error evaluation.  This is the $1 algorithm -- template matching.  In this paper, the authors present a method for finding the optimal matching shape/template using the distance between the drawn shape and the template.  There are many variants of $1, e.g. $N, $P, $3, etc., but all of them are based on the same idea of resampling into a cloud of points and finding the distances between drawn shapes and templates.  Dealing with rotation differs slightly between methods, such as using polar coordinates to handle minimizing rotation, but overall, the idea is the same.  Following this introduction into recognition, we'll start exploring more specific methods.

Friday, October 7, 2016

Reading 10 - Yu Corners

Paper
Yu, Bo, and Shijie Cai. "A domain-independent system for sketch recognition." Proceedings of the 1st international conference on Computer graphics and interactive techniques in Australasia and South East Asia. ACM, 2003.

Notes
Continuing on our readings in corner finding before we progress on to primitive recognition and other methods.

Wednesday, October 5, 2016

Reading 9 - Combining Corners

Paper
Wolin, Aaron, Martin Field, and Tracy Hammond. "Combining corners from multiple segmenters." Proceedings of the Eighth Eurographics Symposium on Sketch-Based Interfaces and Modeling. ACM, 2011.

Notes
Another paper in corner finding, we look at a method of combining multiple different techniques into a better, more flexible segmenter.

Sunday, October 2, 2016

Homework 2 - Segmentation

Overview
Following on our previous assignment about feature extraction and classification, we will now move into additional sketch-specific operations.  Over the next two assignments, we will cover stroke segmentation (corner finding) and a couple of simple recognition algorithms.  Homework 2 will focus on segmentation.

Instructions
Languages and Data
While there is no "required" language for this assignment, it is strongly recommended that you use Javascript.  The primary reason is ready access to the data.  As we move from having a couple hundred files of small, single-stroke sketches into more complicated tasks, we will be dealing with thousands of sketches, with multiple strokes and shapes that are of substantial size.  Rather than downloading large datasets to your local computer, all data for this homework is provided via the Sketch Recognition Library database API (srlib_db), which was an optional data source in the first homework.

The data handlers for srlib_db are available in Javascript via srlib_js, which is included in a limited form in the Starter code available on the class drive under "Homework 2".  The documentation for srlib_js is also included; it is a JSDoc directory and so should be downloaded and read through a web browser.

The specification of SketchML::JSON, which is the format of all sketches on srlib_db, is also available in the homework's folder.  If you wish to use another language, that will be a useful reference, but any language that handles JSON-like objects natively will be easy to adapt.  Furthermore, if you wish to use another language, you should make an HTTP GET request to http://srl-prod1.cs.tamu.edu:7750/getSketches?domain=MechanixCleaned&interpretation=force to retrieve the data.  That particular request simply grabs the first 50 sketches, and the Starter code grabs 200 between 4000 and 4200.  None of these numbers really matter as the main goal is to collect some pool of data for using with your segmentation algorithm.

Segmentation

The goal of the assignment is that, given a set of raw strokes, you can segment them successfully into a set of segmented substrokes.  You may implement any corner finding / segmentation algorithm you would like.  This can be an algorithm from class, a paper, or one of your own creation.  A few points will be awarded based on creativity of your algorithm.

Try to make an algorithm which performs fairly well on the data set.  All of the sketches in srlib_db for this domain (MechanixCleaned) will feature a set of raw strokes and segmented substrokes.  These are provided for comparison of your algorithm.  There are thousands of sketches, so you will not be able to make use of the provided substrokes to hardcode a solution.  Furthermore, some of the sketches are imperfect, with the occasional dropped stroke and mis-identified substroke.  They were generated by a sketch recognition software tool -- Mechanix in this case.  As such, you should try to make the best segmentation algorithm you can, knowing that some disagreements will exist between your algorithm and the original dataset.

Finally, Mechanix is designed to recognize trusses, so it segments strokes into substrokes at points of nodes on trusses.  You may choose to ignore this form of segmentation for the assignment if you wish to focus on corner finding.  It will not impact you greatly on this homework; however, as the subsequent homework will be using the same data to implement a recognizer for arrows and trusses, you may benefit from some additional work in finding truss nodes as corners in this homework.

More details will be shared regarding evaluation metrics soon.  For now, the focus should be on an algorithm which generates substrokes and adds them to a sketch object when only working from the raw stroke data.

Starter Code

As with Homework 1, there is provided Starter code in the directory for Homework 2.  This file already handles loading data and converting it into the appropriate format.  It also visualizes the original sketch data, prefixed "old", and your sketch data, prefixed "new", according to either the strokes or substrokes.  Note that Mechanix sketches may be large and can get cutoff on the canvas.

Obtaining Credit
Again, the goal of this assignment is that you write a corner finding / segmentation algorithm.  You will need to submit all of your source files to the grader.  Also, include a small report describing what algorithm you implemented, the intuition of how it works, and the most difficult problems you encountered.  If you run the metrics code, include those numbers as well.

Please ZIP all your files together into a single file submission titled "HW2_<last name>_<first initial>.zip".  Since the university may block ZIP files, it is recommended that you upload your file to Google Drive and share the link via email.

More details will follow regarding the evaluation metrics.  Remember that the Mechanix data is imperfect, which will be accounted for during the grading process; however, srlib_db has a large sketch library against which your work may be checked, so you should still strive to write an algorithm which performs well on the supplied data.

Although this assignment seems large because of the size of the data repository, it really only consists of a single algorithm, likely meaning less code than the first homework.  Thus, you will have roughly a week and a half to complete the assignment.

Due Date
Oct. 16, Sunday @ Midnight (extended from Oct. 12)
25% deducted per day late