A PyQt5 desktop application for detecting, tracking, and analyzing cells in microscopy images and video, built on Cellpose for segmentation.
- Load a single image or a video (
.png,.jpg,.jpeg,.tif,.tiff,.avi,.mp4,.mov) - Detect cells per-frame or across an entire video using Cellpose
- Track detected cells across frames (simple nearest-centroid matching)
- Measure per-cell intensity statistics (mean/max/min/std) across one or more fluorescence channels
- Flag cell-cell interactions based on centroid distance
- Plot intensity over time for a selected track
- Export detection/track/intensity results to Excel or CSV
- Python 3.9+
- A CUDA-capable GPU is optional — Cellpose will fall back to CPU automatically if none is available
pip install -r requirements.txt
python ui_main.py| File | Responsibility |
|---|---|
ui_main.py |
PyQt5 main window, wiring, and app entry point |
video_handler.py |
Loading images/video, frame caching, playback |
cell_detection.py |
Cellpose model management and async detection |
cell_tracking.py |
Frame-to-frame cell tracking |
intensity_analysis.py |
Per-cell fluorescence intensity statistics |
interaction_detection.py |
Distance-based cell-cell interaction detection |
visualization_utils.py |
Drawing detections/tracks/plots onto frames |
data_export.py |
Exporting results to Excel/CSV |
config.py |
Central tunable parameters |
- Detection parameters (diameter, flow threshold, cellprob threshold) and the
interaction distance threshold can be adjusted live from the UI; defaults
come from
config.py. detect_all_framesdispatches detection for every loaded frame to a background thread pool and reports completion once every frame has actually finished processing.- Frame caching is capped by
Config.MAX_CACHE_FRAMES/Config.MAX_MEMORY_USAGE_MBto avoid loading very large videos entirely into memory.