Skip to content

Particle Tracking for Soft Matter offers a modular set of Jupyter notebooks to help experimentalists and researchers analyze microscopy data with minimal coding effort. The tutorials are designed to be accessible, with well-structured utility modules and clear workflows.

License

Notifications You must be signed in to change notification settings

softmatterlab/ParticleTracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particle Tracking for Soft Matter

Particle Tracking for Soft Matter offers a modular set of Jupyter notebooks to help experimentalists and researchers analyze microscopy data with minimal coding effort. The tutorials are designed to be accessible, with well-structured utility modules and clear workflows.


Overview

This repository supports the full pipeline for particle tracking:

  • Detection – Identify and localize particles using both classical and deep learning methods.
  • Linking – Associate particles across time frames to reconstruct trajectories.
  • Simulation - Generate realistic dataset for training and evaluation.
  • Evaluation – Compare predictions to ground truth using tracking metrics.
  • Visualization – Animate and inspect results interactively.

Tutorials

The tutorials are organized into two main parts: Detection & Localization and Linking.

Detection & Localization

You will apply and compare several detection strategies:

  1. Thresholding & Connected Components – Simple and fast.
  2. Crocker–Grier (TrackPy) – Classical approach to particle tracking.
  3. U-Net – Supervised deep learning for segmentation.
  4. LodeSTAR – Unsupervised deep learning for subpixel localization.

Each method is benchmarked on simulated data and then applied to experimental datasets.

Tutorials:


Linking

Associate localized particles across frames to reconstruct trajectories using:

  1. Nearest-neighbor linking (TrackPy).
  2. Linear Assignment Problem (LAP) using Hungarian algorithm (LapTrack).
  3. Graph-based deep learning linker (MAGIK, via deeplay).

Tutorial:


Getting Started

  1. Clone the repository:
git clone https://github.com/softmatterlab/ParticleTracking.git
cd ParticleTracking
  1. Install dependencies:
pip install -r requirements.txt
  1. Launch the tutorials:
jupyter lab  # or jupyter notebook

Using utils/ in Google Colab

The tutorials rely on the utility modules stored in the utils/ folder.

Option 1: Clone the full repository (recommended)

!git clone https://github.com/softmatterlab/ParticleTracking.git
%cd ParticleTracking

Option 2: Upload the utils/ folder manually

Upload a zipped copy of utils/:

from google.colab import files
uploaded = files.upload()  # Upload utils.zip

Unzip it:

!unzip utils.zip -d .

Then import as usual:

from utils import detection_utils, tracking_utils, video_utils

Dependencies

Core libraries:

  • numpy, scipy, matplotlib
  • scikit-image, torch
  • trackpy, laptrack, deeptrack, deeplay

See requirements.txt for full details.


License

This project is licensed under the MIT License.


Citation

If you use this toolkit for your research, please cite:
(BibTeX and citation information coming soon)

About

Particle Tracking for Soft Matter offers a modular set of Jupyter notebooks to help experimentalists and researchers analyze microscopy data with minimal coding effort. The tutorials are designed to be accessible, with well-structured utility modules and clear workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •