Python-based whisker tracking package, based on Janelia Whisker Tracker (Nathan Clack).
Create environment
conda create -n whisk python
conda activate whisk
Navigate to project directory
cd /d C:\Code\whisk
Install packages
pip install -e .
Usage instructions After installation, run the whisker-tracing tool from the directory containing your .mp4 files:
python whisk_trace.py
This will: find all .mp4 videos (recursively) trace whiskers in each video save video.whiskers and video.measurements next to each .mp4
Command-line options python whisk_trace.py [options]
Available options:
Flag Default Description --min_length 150 Minimum whisker length (px) to keep --replace off Re-run even if .measurements already exists --processes 1 Number of videos to trace in parallel --cores None CPU core affinity (e.g., "0,2,4"). If omitted, all P-cores are used --face_loc bottom Whisker pad location: left, right, top, bottom --pad_x None Whisker pad x-coordinate (optional) --pad_y None Whisker pad y-coordinate (optional) --px2mm None Pixel-to-mm conversion factor
Examples
- Trace all videos with default settings
python whisk_trace.py
- Process multiple videos in parallel
python whisk_trace.py --processes 8
- Re-run tracing even if output already exists
python whisk_trace.py --replace
- Set whisker pad location
python whisk_trace.py --face_loc bottom