Download ppt - June 5, 2007

Transcript
Page 1: June 5, 2007

Cliff Rhyne and Jerry Fu

June 5, 2007Parallel Image Segmenter

CSE 262 Spring 2007Project Final Presentation

Page 2: June 5, 2007

2

Parallel Image Segmenter

Outline of Presentation

● Project Overview

● Image Segmentation

● Stability Clustering Algorithm Overview

● Parallel Image Segmentation Program

● Performance

● Future Work

● Lessons Learned and Conclusion

Page 3: June 5, 2007

3

Parallel Image Segmenter

Overview of Image Segmentation

• Image segmentation– Partition an image into a given number of sets (model order k)

– Group pixels with similar qualities together

– Given k sets, group pixels to maximize an objective function

Page 4: June 5, 2007

4

Parallel Image Segmenter

Revised Goals

• Provide segmentations of 2D point sets using the distance between points and density of the points

• Scale program to run on ~1000 processors

• Design program to be easily extendable to take in different inputs.

Page 5: June 5, 2007

5

Parallel Image Segmenter

Overview of algorithm

• Cue combination– Take as input two or more properties (cues) of pixels

– Normalize each cue and combine into a single matrix, with particular weights

• Stability-based clustering– Cluster the data set using some k

– Perturb distances by some small amount, cluster dataset again

– Repeat this x number of times (50 in our case)

– Measure stability (more on this later)

Page 6: June 5, 2007

6

Parallel Image Segmenter

Image Segmentation Program: High Level Design

• Written in C• Communicates using MPI• Scales depending on the available processors• Broken up into 5 modules

– Main– Input– Noise– K-Medoids– Cues

Page 7: June 5, 2007

7

Parallel Image Segmenter

Image Segmentation Program: Cues

• Clustering and segmentation is based on two cues– Proximity

• Calculate Euclidean (straight line) distance between every pair of points

• Store all values in a matrix

– Density• Count all points that fall within a box centered around a particular point

• Width of the box is variable

Page 8: June 5, 2007

8

Parallel Image Segmenter

Image Segmentation Program: K-medoids

• In the end, we used K-medoids

• Easier to use in a proof of concept

• Our k-medoids implementation is serial

• Can easily be converted to K-means by image-segmentation developers without parallel computing experience

• Randomly picks starting medoids and runs k-medoids algorithm multiple times

Page 9: June 5, 2007

9

Parallel Image Segmenter

Image Segmentation Program: Grouping Stability

• After computing the distance (based on the proximity and density cues) and before running k-medoids, we add noise to the values.

• Values are slightly perturbed and then regrouped - 50 times– Slight optimization: perturbing distance matrix rather than original data

• Groupings must be relabeled in order to accurately measure stability

• Each grouping is used as the “anchor” grouping once

• Stability calculated according to following equation:

Page 10: June 5, 2007

10

Parallel Image Segmenter

Stability (relabeling sets)

Page 11: June 5, 2007

11

Parallel Image Segmenter

Image Segmentation Program: Parallelization

• Parallelized based on K, relative weight, and density box size values.

• Process ID is used to determine K, weight, and box size values to use.– For example, if there are 10 values for K, weight, and box size then:

• process #365 has indexes k=3, weight=6, box=5.

• Each slave process communicates to the master process it's stability value.

• The results are the parameter combinations that have stability above a configurable threshold (default is 90%).

Page 12: June 5, 2007

12

Parallel Image Segmenter

Performance

• Ran over 1000 parameter combination on a 65 data point set in ~18 seconds on DataStar

• The per-processor performance is slower than image segmenter written in MATLAB (by Andrew Rabinovich). However the MATLAB implementation took 46 minutes total.

• Still can be further optimized– Use k-means instead of k-medoids.– Parallelize writing the segmentation output file.– Improve the parameter search space.

Page 13: June 5, 2007

13

Parallel Image Segmenter

Output Groupings

Page 14: June 5, 2007

14

Parallel Image Segmenter

Output Groupings

Page 15: June 5, 2007

15

Parallel Image Segmenter

Output Groupings

Page 16: June 5, 2007

16

Parallel Image Segmenter

Output Groupings

Page 17: June 5, 2007

17

Parallel Image Segmenter

Output Groupings

Page 18: June 5, 2007

18

Parallel Image Segmenter

Output Groupings

Page 19: June 5, 2007

19

Parallel Image Segmenter

Future Work

• Segmenting images– Image can be viewed as and M x N set of points

• Dense point set

• Much more data

– Can start by just adding more/different cues• Color, brightness, texture, contours…

– Stability is the key to get through the image

• Heuristics to eliminate parts of search space

• More and/or different parallelization schemes?

Page 20: June 5, 2007

20

Parallel Image Segmenter

Lessons Learned

• Differences in MPI compilers/environments– Unreported errors

– Verifying sections with equations

• Value of test code, particularly on parallel applications– Print statements not always adequate

– Verifying small portions of complex algorithm

• Parallel computing is scary until you start doing it

Page 21: June 5, 2007

21

Parallel Image Segmenter

Conclusion

• Not quite at real time image processing

• With further performance tuning, could perform image processing interactively

• Program is laid out to allow for further improvement with relative ease

Page 22: June 5, 2007

22

Parallel Image Segmenter

Acknowledgements

• Professor Scott Baden– Assistance with getting started on Valkyrie and Datastar machines– Guidance on parallel computing aspects of project

• Professor Serge Belongie– Initial idea of multiple stable segmentation across parallel processors– Provided guidance on algorithm and scope of project

• Andrew Rabinovich– Assistance with stability clustering algorithm– Assistance with relabeling and bipartite matching algorithm

Page 23: June 5, 2007

23

Parallel Image Segmenter

References

• A. Rabinovich et al. “Model Order Selection and Cue Combination for Image Segmentation.” 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 1 (CVPR'06), pp. 1130-1137

• A. Rabinovich et al. “Objects in Context”. 2007 IEEE International Conference on Computer Vision submission.


Recommended