Skip to content

AndyZ0915/Cell_imaging_analysis_tool

Repository files navigation

Cell Imaging Analysis Tool

A PyQt5 desktop application for detecting, tracking, and analyzing cells in microscopy images and video, built on Cellpose for segmentation.

Features

  • 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

Requirements

  • Python 3.9+
  • A CUDA-capable GPU is optional — Cellpose will fall back to CPU automatically if none is available

Setup

pip install -r requirements.txt
python ui_main.py

Project layout

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

Notes

  • 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_frames dispatches 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_MB to avoid loading very large videos entirely into memory.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages