Repository navigation
Home
CTIP (Cannabis Trichome Intelligence Platform) analyzes cannabis trichomes from microscopy images using computer vision. It detects, classifies, and measures individual trichomes without any manual counting.
Core pipeline:
- YOLO11s detects all trichomes (tiled inference for large images)
- SAM2-tiny generates pixel-accurate masks per instance
- Classifier assigns: Stalked / Sessile / Bulbous / Non-glandular
- Maturity model assigns: Clear → Cloudy → Amber (optical only — no THC claims)
- Calibrated scale converts pixel size to µm
Scientific constraint: CTIP never predicts cannabinoid concentrations. Maturity = optical observation only.
Browser (:3001)
│
nginx (Reverse Proxy)
├── /api/v1/* → FastAPI Backend (:8000)
└── /* → Next.js Frontend (:3000)
Supporting services:
├── Label Studio (:3005) — annotation
├── CVAT (:3006) — annotation (alternative)
└── MLflow (:3004) — experiment tracking
The End-to-End Guide walks through every step from raw microscopy images to a verified, benchmarked detection pipeline — with interactive checklists and per-step tips. It is also available as an interactive page inside the app: Guide in the sidebar.
git clone https://github.com/ottco-dev/ctip-oss.git
cd ctip-oss
# Python environment
pip install uv
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[all]"
# Frontend
cd frontend && npm install && cd ..
# Start everything
./scripts/dev-start.sh
# Open browser → setup wizard launches automatically
# http://localhost:3001| Component | Minimum | Recommended |
|---|---|---|
| GPU | NVIDIA 6 GB VRAM | RTX 4060 8 GB |
| RAM | 8 GB | 16 GB |
| CPU | 4 cores | i5-13400F |
| Storage | 20 GB free | 100 GB SSD |
| Python | 3.11 | 3.12 |
| CUDA | 11.8 | 12.1+ |
CPU-only works for inference (slower). Not recommended for training.
| Service | Port | Purpose |
|---|---|---|
| Main UI (nginx) | 3001 | Entry point for all requests |
| Next.js frontend | 3000 | UI server (proxied through nginx) |
| FastAPI backend | 8000 | REST API + WebSockets |
| MLflow | 3004 | Experiment tracking UI |
| Label Studio | 3005 | Annotation platform (Docker) |
| CVAT | 3006 | Alternative annotation (Docker) |
CTIP — Cannabis Trichome Intelligence Platform · RTX 4060 / 8 GB VRAM · Backend API · MLflow · Label Studio
Installation & Setup
Scientific Workflow
Reference