  Here we present the first method for tracking each leg of a fruit fly
behaving spontaneously upon a trackball, in real time. Legs were tracked with
infrared-fluorescent dye invisible to the fly, and compatible with two-photon
microscopy and controlled visual stimuli. We developed machine learning
classifiers to identify instances of numerous behavioral features (e.g.
walking, turning, grooming) thus producing the highest resolution ethological
profiles for individual flies.
