CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a...

58
CS223B Assignment 1 Recap
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    212
  • download

    0

Transcript of CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a...

Page 1: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

CS223BAssignment 1 Recap

Page 2: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Lots of Solutions!

• 37 Groups

• Many different approaches

• Let’s take a peek at all 37 results on one image from the test set

Page 3: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 4: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 5: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 6: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 7: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 8: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 9: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 10: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 11: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 12: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 13: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 14: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 15: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 16: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 17: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 18: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 19: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 20: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 21: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 22: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 23: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 24: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 25: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 26: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 27: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 28: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 29: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 30: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 31: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 32: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 33: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 34: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 35: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 36: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 37: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 38: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.
Page 39: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Possible Things to Look For

• Symmetry

• Color

• Shadow

• Corners

• Edges

• Texture

• Taillights

Page 40: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Road Finding Tactic 1

• Run adaptive flood fill on the image starting at the pixels near the bottom

• Everything that gets filled in is considered road

• Holes inside the road are likely car candidates

Page 41: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Road Finding Tactic 2

• Run an edge detector (such as Prewitt or Canny) and a Hough transform, and then look for lines with the right approximate angle and position.

Page 42: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Road Finding Tactic 3

• Sample the color from some pixels directly in front of car (bottom of image)

• Generate a difference map using this color

• Run an edge detector on this difference map, followed by a Hough transform

Page 43: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Road Finding Tactic 4

• Assume the road is in pretty much the same place in every image and hard code it in

Page 44: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Edge Approach 1

• Detect edges with Canny detector

• Dilate image to join nearby edges

• Fill in closed regions

Page 45: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Edge Approach 2

• Custom edge mask that considers vertical and horizontal edges in likely configurations

Page 46: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Shadow Finding

• Use a mask that enhances horizontal edges

• Look for several adjacent rows of dark pixels in the road region

Page 47: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Corner Approach

• Compute strong corners

• Cluster them with kmeans

• Find the densest clusters and compute their convex hulls

Page 48: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Texture Approach

• Look for regions of high frequency– Find density of edges in rectangular regions– Mask or sum the derivative across rectangular

regions– Take FFT of image and set magnitudes to 1,

leaving only phase info; inverse FFT then enhances portions with many frequencies

Page 49: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Taillight Detection

• Transforming the color space can help spot the reddest pixels

• Groups of these pixels are good candidates for taillights

• If there’s a horizontal pair of taillights, even better

• Or, use a mask with the pair built in

Page 50: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Going from Pixels to Regions

• Count the number of “car pixels” in square regions; if above a threshold, consider it a car region

Page 51: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Statistical Classifier

More stages mean many fewer false positives (and only slightly fewer missed cars)

Page 52: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Multiple Classifiers

Page 53: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Filtering Classifier Output Tactics

• Check number of corners in the rectangle.If too low, reject.

• Check position and size of rectangle. If it doesn’t make sense given perspective, then reject.

• Run an edge detector on the rectangular region and then sum the pixels inside. If below threshold, reject.

• Look at the average derivative of image intensity. If below threshold, reject.

Page 54: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Consider Geometry of Scene

Page 55: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Combining Results from Different Detectors

• Many of the best solutions used some weighted combination of several heuristics to verify the strength of hypotheses

Page 56: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Building a Better Bounding Box

• Get the strong corners in the box, and then trace the convex hull of these corners to eliminate some of the road.

• Alternatively, make a 2D or 3D model of car shape based on image position and replace rectangle with appropriate polygon.

• Or, segment the rectangle by colors and keep only the inner segments.

Page 57: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Common Mistakes

• Strange ways of drawing car regions

• Don’t use anti-aliased lines or flood fill, just draw filled polygons with cvPolyLine

Page 58: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.

Common Mistakes

• Stray Pixels

• Could be fixed with image close operation