Making Active Contours Fast

July 2nd, 2009 No comments

Active contours are a method of image segmentation. They are well-loved for their accuracy, ease of implementation, and nice mathematical underpinnings. However, they can be quite slow, especially when dealing with large data! Here are some tips to speed things up that go beyond using an efficient level-sets implementation. By combining these ideas and solid programming techniques I’ve been able to get active contour trackers running at hundreds of frames per second!

  1. Create better initializations. The farther the initial contour is from its final position, the more computations must be done for the contour to converge. Hence, if you can start the contour in almost the right place, you’ll drastically reduce the time needed for segmentation. You can use prior knowledge, user input, or other segmentation techniques to create a rough guess that is close to the right answer. Another initialization that can leads to quick initialization is ‘bubbles’ on an evenly-spaced grid.

     

  2. Use a multi-scale approach. This is a way to quickly get good initializations using active contours. Say your data is MxN. Instead of segmenting the full data set, downsample the data so that you are dealing with an (M/8)x(N/8) volume. The segmentation should run much quicker on the smaller volume. Next, upsample the result back to MxN and use this as an initialization for the full data. The idea is that the time saved on the full segmentation by having a good estimate based on downsampled data will make up for the time needed to downsample, segment on the small data, and upsample.

     

  3. Use approximate active contours. Using an approximate solution for all or part of your segmentation can be helpful. As in 1 and 2, you can use an approximate active contour technique to quickly get close to the right answer. Then you can use something like sparse field active contours to get the right answer quickly. Alternatively, the discrete methods can work quite well alone! James Malcolm proposed a nice method in “Fast Approximate Surface Evolution in Arbitrary Dimension” [code].

     

  4. Use another technique entirely. Active contours are “variational,” so they give nice, principled solutions with analytic geometry, etc. However, if you just want fast segmentations, other techniques such as thresholding/morphology, graph cuts, region growing, etc. can all be viable solutions.

Any other tips or links to good implementations? Leave them in the comments.

Categories: Academic, Vision Tags:

Zucchini Stuffed Zucchini

June 24th, 2009 No comments

I love zucchini, and I usually just slice it up and stir-fry it with some soy sauce and red pepper flakes (which is delicious!). Yesterday, I decided to get fancy and make something worth showing off… zucchini-stuffed-zucchini. It turned out great! The filling is rich and hearty, and when it is paired with the roasted zucchini shell the taste is savory and refreshing.

Zucchini Stuffed Zucchini

Best of all, it was super-easy! Read on to find out how to make it. Read more…

Categories: Recipe Tags:

6 Tricks for Healthy Eating

June 6th, 2009 1 comment

This was a guest post for my uncle’s site, Harmony Earth. You can find it in the “Success Stories” section. Enjoy!

I’ve been eating a mostly plant-based diet for the past few years. When I first got started, I faced personal and social barriers. However, by taking a few conscious steps, I was able to break them down and really improve my eating habits! Knowing the truth about nutrition, understanding the benefits of a plant-based diet, and committing to a change are all important, but actually revamping my lifestyle was a daunting task. Here are 6 tricks that I used.

  • Think Long-term
  • Add Some Extra Steps
  • Keep the Good Stuff Nearby
  • Surround Yourself
  • Embrace Frugality
  • Get Accountable

By thinking long-term about rewards and taking steps to preempt myself from falling into old eating habits I was able to leap feet-first into a new way of eating that has improved my life immeasurably. Read more…

Categories: Tips Tags:

We Were Born to Run

June 2nd, 2009 No comments

I run frequently and had heard some buzz about this book. I’m keenly interested in the amazing results that often come from ancient wisdom and using our incredible human body as correctly as possible. These are the exact ideas that author, Christopher McDougall touches on in his book, “Born to Run: A Hidden Tribe, Superathletes, and the Greatest Race the World Has Never Seen.”

The book has two main parts. First, it follows the story of the author as he investigates solutions to his own problems with running. Along the way he, meets, befriends, and races with members of a mysterious southwestern tribe known as the Tarahumara Indians and several other interesting characters. The second part of the book (which is mixed in with the story) contains various accounts of scientific study, an evolutionary history of running, and the modern history of the running industry. Here are some key points I found very interesting: Read more…

Categories: Books Tags:

The Science of Success

April 22nd, 2009 1 comment

Koch Industries is the second largest privately held company in the world. In “The Science of Success,” the C.E.O. talks about the management philosophies that his company uses to be so successful.

In short, the techniques called “Market-based Management” (MBM) described in the book are string of very sensible ideas. The true power of the book is that it shows how to join these sensible ideas together into a cohesive and effective management strategy. In this review, I’ll briefly describe the points that really hit home with me.

Read more…

Categories: Books, Business Tags:

Sparse Field Active Contours

April 21st, 2009 4 comments

Active contour methods for image segmentation allow a contour to deform iteratively to partition an image into regions. Active contours are often implemented with level sets. The primary drawback, however, is that they are slow to compute. This post presents a technical report describing, in detail, the sparse field method (SFM) proposed by Ross Whitaker, which allows one to implement level set active contours very efficiently. The algorithm is described in detail, specific notes are given about implementation, and source code is provided.

Fast Level Sets Demo

The links below point to the technical report and a demo written in C++/MEX that can be run directly in MATLAB. The demo implements the Chan-Vese segmentation energy, but many energies can be minimized using the provided framework.

Sparse Field Method – Technical Report [pdf]
Sparse Field Method – Matlab Demo [zip]

To run the MATLAB demo, simply unzip the file and run:
>>sfm_chanvese_demo
at the command line. On the first run, this will compile the MEX code on your machine and then run the demo. If the MEX compile fails, please check your MEX setup. The demo is for a 2D image, but the codes work for 3D images as well.

My hope is that other researchers wishing to quickly implement Whitaker’s method can use this information to easily understand the intricacies of the algorithm which, in my opinion, were not presented clearly in Whitaker’s original paper. Personally, these codes have SUBSTANTIALLY sped up my segmentations, and are allowing me to make much faster progress towards completing my PhD!

For more information regarding active contour, segmentation, and computer vision, check here: Computer Vision Posts

Categories: Academic, Featured, Matlab, Vision Tags:

Using Hyperref, Graphicx, and Algorithm together

April 21st, 2009 No comments

In LaTeX, the hyperref package can be challenging to work with. It is well known that the hyperref package must be loaded last, BUT when using the algorithm package as well things get tricky. algorithm must be loaded after hyperref BUT, doing the following error if figures are used at the same time with pdfTeX:

ERROR: pdfTeX warning (ext4): destination with the same identifier (name{figure.1})

The solution is to load the float package (which is normally loaded by other more high-level packages) before hyperref like so:

\usepackage{amsmath,amsymb,graphicx,subfigure,etc.,etc.}
\usepackage{float}
\usepackage{hyperref}
\usepackage{algorithm}

The other solution is to not use pdfLaTeX, and use regular LaTeX instead.

Categories: LaTeX Tags:

Spring Photos

March 28th, 2009 2 comments

Last weekend, I planted a new container garden… this time incorporating tomatoes for the first time! I was inspired by the beautiful spring weather and budding trees to take some photos around my apartment. I’m always amazed at the pictures that can be found in places you thought you already knew.

Categories: Personal Tags:

Advanced LaTeX Workshop

March 12th, 2009 2 comments

The “LaTeX Intro Workshop” was such a big hit that I was asked to do an advanced workshop as a follow up.

LaTeX

I will cover these main topics:

  • LaTeX Basics
  • GT Thesis Writing
  • Useful packages
  • Advanced figure tutorial
  • Beamer slides presentation tutorial
  • Beamer poster tutorial

While there is certainly enough minutia within LaTeX to keep someone busy forever trying to learn it all, I decided to focus on some of the bigger-picture topics that might benefit everyone. After all, there’s always google to answer those little specific questions.

Here are the files for the tutorial that will be covered during the talk:

advanced_latex_presentation.zip

This zip file holds three different tutorials. The first is a tutorial on creating beautiful figures. The second is on creating slideshows in beamer. The third is a short intro to making posters in beamer.

This tutorial will be performed LIVE on March 26th at 3pm in the Homer Rice Instructional Center in the Georgia Tech Library.

Categories: LaTeX Tags:

PhD Thesis Proposal Presentation

March 8th, 2009 1 comment

This week I made a presentation to my thesis committee at Georgia Tech to propose the content that will make up my Ph.D. dissertation. I’m happy to say that it went well and I’m on-track to graduate in September of 2009. The video below is an abridged version of the presentation I gave. It’s about 15 minutes long, and gives a general idea of the work I’ve been doing over the past three years as well as what I hope to accomplish before I finish. In a sentence, I propose a way to analyze image statistics locally that improves performance in several medical image processing applications.


On a side note, people interested in creating screen-casts of presentations on a Mac, should consider the program ScreenFlow, which worked great for me! This was also my first presentation created with Apple’s Keynote software, but I’m sure it won’t be the last.

Categories: Academic, Personal Tags: