Home

Srinivas Gorur-Shandilya edited this page Apr 25, 2014 · 4 revisions
Clone this wiki locally

README

What this is

FlyVoyeur is a set of functions that allows you to track and quantify fly (Drosophila) behavior. It allows you to track drosophila movement and behavior.

Originially developed for courtship assays, it can track the positions of flies, measure their orientation, detect wing extension, and can handle extreme cases of fly collisions, and is resistant to flies going missing due to skipped frames or sudden movement, and needs no special lighting conditions, and should work well in non-uniform, variable lighting.

FlyVoyeur is fully parallelised, and can take advantage of CUDA-enabled GPUs to speed up tracking.

What this does

Out of the box, this quantifies:

  1. positions of all flies
  2. orientations of all flies
  3. times at which flies look at other flies
  4. collision statisitcs between flies
  5. times of copulation, if any, between flies
  6. times of wing extension between flies.

What you need to give it

  1. Videos of flies in circular arenas (see format support for details)

System Requirements

  • MATLAB R2014a or later with the image processing toolbox
  • The parallel processing toolbox is needed for batch processing and GPU acceleration
  • A CUDA-enabled graphics card is needed for GPU acceleration
  • runs on Windows or Mac OS X. Should work fine on Linux too, but not has been tested.
  • Java (you can run the actual tracking headless, but GUI elements need Java and a display system)
  • srinivas.gs_mtools, a library of MATLAB tools I have written, which you will have to download separately.

Video Format Support

  • FlyVoyeur supports any video format MATLAB can support.
  • In addition, FlyVoyeur can also convert almost any video to a usable MJPG format using VLC in parallel. Video conversion is currently only supported on Mac OS X.
  • If you aren't converting your video, you should make sure your video have square pixels. Most video cameras don't output videos with square pixels. To check that you have square pixels, open the video in MATLAB using VideoReader.m and look at it.
  • To use video conversion, you need to a) figure out what the dimensions of each frame are with square pixels and b) alter the ConvertVideo script

Credits

All code here was written by Srinivas Gorur-Shandilya. Contact me at http://srinivas.gs/contact/ This code came from a public repository at: https://bitbucket.org/srinivasgs/fly-tracking

If you use this code or modify it, please write to me at code@srinivas.gs and I will tell you how to appropriately cite this.

Installation

git

Downloads

Usage

  1. Type FlyVoyeur.m and hit enter

Release Notes

Support for parallel computation

MATLAB's parallel toolbox (matlabpool and parpool) is a disaster in some releases, based on the OS you run and the version of Java you have. If FlyVoyeur tells you parallel computation is not supported, you may have to resort to a number of tricks to get it working.

If you are using R2013a, see this page for a trick to get matlabpool to work correctly.

Support for GPU acceleration

The same goes for GPU acceleration. On Mac OS X, MATLAB fails to tell the OS to switch to the discrete card, and hence initialisation of GPU resources fails.