Vision Model
Concept
USB microscope captures images of toluidine blue stained cells. Vision model classifies each cell as intact (granules present, purple metachromatic staining) or degranulated (granules absent, altered morphology). Outputs degranulation percentage per field of view, logged with timestamp and drop number.
Replaces eyeball counting with objective, reproducible, time-series quantification.
Why This Is Tractable
The visual difference between intact and degranulated mast cells under toluidine blue staining is significant. Intact cells have dense purple granules. Degranulated cells are pale, granules absent or reduced, morphology altered. This is not a subtle computer vision problem — the signal is strong.
You don’t need research-grade optics. Cell-scale morphology is visible on $30-80 USB microscopes. Toluidine blue staining amplifies contrast.
Hardware
USB microscope: $30-80, Amazon. Look for 1000x optical (not digital) magnification, manual focus. AmScope and similar brands. Connects via USB, streams to laptop.
Phone camera + eyepiece adapter: If you have a better microscope already, adapter mounts phone camera to eyepiece. Cheap, works.
Depression slides or microwells: Cells settle to bottom by gravity. Add liberator drops to top of fluid volume — surface tension and gravity keep cells in place during incremental additions. Cells are visible in consistent focal plane.
Software Stack
Rails API backend (obviously). Vision model via Claude API or lightweight local model for offline operation.
Pipeline
- Capture image from USB microscope on trigger (manual button or timer)
- Send to vision model with prompt: identify and classify mast cells as intact vs degranulated
- Return count and percentage
- Log: timestamp, drop number, degranulation percentage, image path
- Display real-time trend during experiment
Training Data
Research papers publish toluidine blue stained mast cell images. Build initial dataset from literature images. Augment with your own experimental images as you generate them.
Fine-tune on mast cell morphology specifically — general cell classification models may not handle the metachromatic staining characteristics well without domain-specific training.
Alternatively
Claude Vision API with a well-crafted prompt may perform well zero-shot on distinctive toluidine blue stained images without fine-tuning. Test this first before building a training pipeline.
Output Format
{
"timestamp": "2024-01-15T14:23:11",
"drop_number": 5,
"cells_counted": 47,
"intact": 31,
"degranulated": 16,
"degranulation_pct": 34.0,
"image_path": "/experiments/2024-01-15/drop_005.jpg"
}Time series of degranulation_pct vs drop_number is the primary readout. Threshold crossing (where degranulation_pct significantly exceeds baseline) is the reactivity score.
The IP Angle
The assay chemistry will eventually be figured out by someone. A validated, trained computer vision model that reliably quantifies mast cell degranulation from stained microscopy images — built on real experimental data — is a defensible technical asset. The model improves with every experiment run through it.
Status
- Source USB microscope
- Establish baseline image quality with toluidine blue stained cells
- Test Claude Vision API zero-shot classification
- Build Rails API wrapper
- Develop logging and visualization layer
- Evaluate need for fine-tuning vs zero-shot performance