1 / 69

Shape and Matching

Shape and Matching. Andrew Bender Alexander Cobian. Topics. Approaches Involving New Descriptors Shape Contexts Matching Local Self-Similarities Novel Matching Techniques Pyramid Match Kernel Spatial Pyramid Matching. Shape Contexts (2002).

vondra
Download Presentation

Shape and Matching

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Shape and Matching Andrew Bender Alexander Cobian

  2. Topics • Approaches Involving New Descriptors • Shape Contexts • Matching Local Self-Similarities • Novel Matching Techniques • Pyramid Match Kernel • Spatial Pyramid Matching

  3. Shape Contexts (2002) • Shape Matching and Object Recognition Using Shape Contexts • Serge Belongie • JitendraMalik • Jan Puzicha

  4. Shape Contexts (2002) • As vectors of pixel brightness values, very different • As shapes to human perception, very similar

  5. Three steps to shape matching with shape contexts • Find the correspondence between sets of points from the two shapes • Use the matches to compute an alignment transform • Compute the “distance” between the shapes

  6. Three steps to shape matching with shape contexts • Find the correspondence between sets of points from the two shapes • Use the matches to compute an alignment transform • Compute the “distance” between the shapes Shape contexts are a point descriptor used in step 1

  7. An edge detector is used

  8. ~100 points are sampled at random from the edge. Uniformity is not required!

  9. Histogram uses bins which are uniform in log-polar space.

  10. Rotation invariance • If rotation invariance is desired for a domain, the shape context can be calculated with the tangent vector as the x-axis. • For many domains this is undesirable.

  11. Matching points • Must find the distance from every point in one image to every point in the other • Dummy points with a constant ε distance from every other point are added to both sets • For non-dummy points, the cost of matching is the L2 norm

  12. Shape Distance • The authors use an iterative method to measure the magnitude of the transformation required to align the points

  13. Categorization of Images • Prototype-based approach (with k-NN) • Prototypes are chosen using k-medoids • k is initialized to the number of categories • Worst category is split until training classification error drops below a criterion level

  14. Application: Digit Recognition Training set size: 20,000 Test set size: 10,000 Error: 0.63%

  15. Application: Breaking CAPTCHA 92% success rate on EZ-Gimpy space sock

  16. Application: Breaking CAPTCHA Must identify three words. 33% success rate on Gimpy.

  17. Application: Trademark Retrieval • Can be used to find different shapes with similar elements. • Useful to determine cases of trademark infringement.

  18. Application: 3D Object Recognition Not the most natural application of shape contexts. Test examples can only be matched to an image taken from a very similar angle.

  19. Shape context conclusions • Shape context is a local descriptor that describes a point’s location relative to its neighbors • Good at character recognition, comparison of isolated 2D structures • Not well suited to classification of objects with significant variance

  20. Matching Images/Video UsingLocal Self-Similarities (2007) • Matching Local Self-Similarities across Images and Videos • Eli Shechtman • Michal Irani

  21. Matching Images/Video UsingLocal Self-Similarities (2007) • All of these images contain the same object. • The images do not share colors, textures, or edges.

  22. Problem: • Previous Descriptors for Image Matching: • Pixel intensity or color values of the entire image • Pixel intensity or color values of parts of the image • Texture filters • Distribution-based descriptors (e.g., SIFT) • Shape context • All of these assume that there exists a visual property that is shared by the two images.

  23. Solution: A “Self-Similarity” Descriptor • The four heart images are similar only in that the local internal layouts of their self-similarities are shared. • Video data (seen as a cube of pixels) is rife with self-similarity.

  24. General Approach • Our smallest unit of comparison is the “patch” rather than the pixel. • Patches are compared to a larger, encompassing image region.

  25. General Approach • The comparison results in a correlation surface which determines nearby areas of the image which are similar to the current patch. • The correlation surface is used to produce a self-similarity image descriptor for the patch.

  26. General Approach • For video data, the patch and region are cubes, as time is the depth dimension. • The resulting video descriptor is cylindrical.

  27. Descriptor Generation Process • For every image patch q (e.g., 5x5 pixel area) • For every patch-sized area contained in the enclosing image region (e.g., 50x50 pixel area) • Calculate SSD and determine correlation surface • varnoise is a constant which specifies the level of acceptable photometric variation • varauto(q) is the maximal variance of the difference of all patches near q

  28. Descriptor Generation Process • Transform each correlation surface to log-polar coordinates with 80 bins (20 angles, 4 radial intervals) • The largest value in each bin determines the entry in the descriptor.

  29. Descriptor Generation Process

  30. Descriptor Generation Process • Video data adaptations: • Image patch exists in three dimensions, but is usually chosen to have 1 frame depth (e.g., 5x5x1) • Image region encompasses several frames (e.g., 60x60x5) • This creates a cuboid correlation volume, from which we generate a cylindrical descriptor by binning it in log log polar coordinates

  31. Properties of the Self-Similarity Descriptor • Self-similarity descriptors are local features • The log-polar representation allows for small affine deformations (like for shape contexts) • The nature of binning allows for non-rigid deformations • Using patches instead of pixels captures more meaningful patterns

  32. Performing Shape Matching • Calculate self-similarity descriptors for the image at a variety of scales (gives us invariance to scale) • Filter out the uninformative descriptors for each scale • Employ probabilistic star graph model to find the probability of a pattern match at each site for each scale • Normalize and combine the probability maps using a weighted average

  33. Results • Results require only one query image which can be much smaller than the target images • Process even works when one of the images is hand-drawn

  34. Results

  35. Results

  36. Self-Similarity Conclusions • Can discover similar shapes in images that share no common image properties • Requires only a single query image to perform complex shape detection • Hand-drawn sketches are sufficient to find matches • Video is a natural extension

  37. The Pyramid Match Kernel (2005) • The Pyramid Match Kernel: Discriminative Classification with Sets of Image Features • Kristen Grauman • Trevor Darrell

  38. The Pyramid Match Kernel (2005) • Support Vector Machines • Widely used approach to discriminative classification • Finds the optimal separating hyperplane between two classes

  39. The Pyramid Match Kernel (2005) • Kernels can be used to transform the feature space (e.g. XOR) • Kernels are typically similarity measures between points in the original feature space

  40. The Pyramid Match Kernel (2005) • Most kernels are used on fixed-length feature vectors where ordering is meaningful • In image matching, the number of image features differ, and the ordering is arbitrary • Furthermore, most kernels take polynomial time, which is prohibitive for image matching

  41. Desirable characteristics in an image matching kernel • Captures co-occurrences • Is positive-definite • Does not assume a parametric model • Can handle sets of unequal cardinality • Runs in sub-polynomial time • No previous image matching kernels had all four of the first characteristics, and all ran in polynomial time

  42. General Approach • Divide the feature space into bins of equal size • Repeat • Count the features which fall into each bin for both images • Min the two counts to find the overlap in each bin • Calculate new match score based on new overlaps and ease of overlapping at this resolution • Create a new set of bins with side length double that of the current side length

  43. General Approach

More Related