$ show ikeda042/PhenoPixel
PhenoPixel is a full-stack web application for single-cell analysis of time-lapse microscopy data, specifically designed for mother machine microfluidics experiments. The system ingests Nikon ND2 files, segments cells using both classical image processing (Canny, PCA, centerline fitting) and a bundled machine learning ensemble (Weighted KNN + LogisticRegressionGD), and stores extracted features in per-experiment SQLite databases. It provides an interactive React frontend for manual annotation, bulk population analysis (cell length, area, fluorescence heatmaps, map256), and training dataset creation for supervised models. The architecture follows a modular FastAPI backend with RESTful APIs, async file storage, and background processing via ProcessPoolExecutor for CPU-intensive tasks, served alongside a React 19 SPA built with Chakra UI and Vite. Key modules include the cell extraction pipeline, database manager with overlay rendering, bulk engine for population-level metrics, graph engine for aggregation scores, and a dedicated mother machine workflow with Cellpose-SAM segmentation. The backend also includes a Model Context Protocol (MCP) server for AI-assisted repository navigation. While primarily an application, PhenoPixel has strong data research characteristicsβit generates quantitative biological measurements, bundles a trained auto-annotation model with evaluation, and includes detailed algorithmic documentation in Docusaurus with LaTeX equations.
The LLM identified 2 files worth highlighting for reuse:
Provides a simple, stateless function to convert pixel dimensions to micrometers based on objective magnification (e.g., 100x, 60x). It contains a dictionary mapping magnifications to pixel sizes (ΞΌm/pixel) and a `get_pixel_size(magnification)` function. This is a self-contained, reusable utility that can be extracted into any microscopy image analysis project without modification. It demonstrates clean separation of domain-specific calibration data from processing logic.
Implements the feature extraction and classification pipeline for automatic cell annotation. It defines `FeatureRecord` (Pydantic model for cell features), `AutoAnnotator` (ensemble of `WeightedKNN` and `LogisticRegressionGD` with configurable weights), and `RobustScaler` for normalization. The module is self-contained with its own data structures, scaler, and classifier implementations, and can be extracted and reused for any binary classification task on microscopy-derived morphological and intensity features. It demonstrates a reproducible ensemble pattern with parameter persistence (pickle) and configurable thresholds.