Capture a day in the life of a slime mold aka Physarum polycephalum aka The BlobTM, read its wanderings, and whisper the findings to a mythic LLM that answers like a pocket oracle.
Physarum polycephylum is a unicellular slime mold. It's famous for being very smart, despite having no brain or nervous system. It can find routes through mazes and build transport networks.
In this project, we're using the blob's intelligence to give us real life advice. We make it choose between two oats and interpret its movements and preferences as a whimsical premonition.
-
📸 Conjure Starlight Raspberry Pi + Picamera2 timelapse →
data/raw/
-
🪄 Alchemy of Shadows — Black & White Convert & segment to BW →
data/bw/
-
🌿 Trail of Tendrils — Growth Masks Compute per-frame new growth masks →
data/analysis/growth_masks/
-
🔭 Reading the Rings — Analysis Measure approach/lead/alignment →
data/analysis/growth_summary.json -
🔮 Whisper to the Blob Oracle Build a poetic prompt and ask an LLM (local or OpenRouter) →
data/analysis/prophecy.txt
Project layout (core scripts):
blob/
capture.py # Pi timelapse (Picamera2)
bw.py # black & white conversion (your original thresholds/logic)
growth.py # per-frame new-growth masks (seed+oats excluded)
analyze.py # scene detect, distances, leader logic, summary JSON
oracle.py # prompt builder + LLM client (local PC or OpenRouter)
run.py # the spellbook (orchestrates the whole journey)
Data folders are configurable, defaulting to:
data/
raw/
bw/
analysis/
growth_masks/
growth_summary.json
prophecy.txt
# on the Pi
export OPENROUTER_API_KEY=sk-or-... # required once per shell
python run.py summon --backend openrouter --stream --hours 24 --interval 300On your PC:
python server.pyOn your Pi:
python run.py summon --backend local --pc-ip 192.168.1.123 --hours 24 --interval 300- Create and activate a venv
- Install Python deps (typical):
numpy,opencv-python,requests.
Minimal example:
python -m venv venv
source venv/bin/activate
pip install numpy opencv-python requestsIf you're using the local PC relay, your PC also needs flask and openai (for the local OpenAI-compatible server client):
pip install flask openaiEnvironment variables (optional; CLI flags override):
HOURS=24
INTERVAL=300
DATA_ROOT=data
RAW_FOLDER=raw
BW_FOLDER=bw
ANALYSIS_FOLDER=analysis
CAM_WIDTH=3840
CAM_HEIGHT=2160
JPEG_QUALITY=90
ORACLE_BACKEND=local
ORACLE_PC_IP=192.168.1.123
ORACLE_SERVER_PORT=5000
OPENROUTER_API_KEY=sk-or-...
OR_MODEL=openai/gpt-oss-20b
OR_TEMP=1.0
OR_BASE_URL=https://openrouter.ai/api/v1
Temperature: higher = more whimsical/creative (e.g., 1.0); lower = safer/straighter (e.g., 0.5).
- Spells:
python run.py summon(also acceptsprophesize,🍄,shimmer) - Whimsical banners for each step. Toggle with
--no-whimsyorWHIMSY=0. - The spell sets friendly defaults (24h, 5-min interval, OpenRouter if key is present, streaming on).
Examples:
python run.py summon
python run.py summon --hours 0.05 --interval 120
python run.py summon --backend local --pc-ip 192.168.1.123
python run.py --no-whimsy summonRun just capture (Pi + camera):
python -m blob.capture --out data/raw --hours 0.1 --interval 120 \
--width 3840 --height 2160 --quality 90Run just BW:
python -m blob.bw --in data/raw --out data/bwRun just growth masks:
python -m blob.growth --bw-dir data/bw --out-dir data/analysis/growth_masksRun just analysis:
python -m blob.analyze \
--bw-dir data/bw \
--growth-dir data/analysis/growth_masks \
--out-dir data/analysisAsk the oracle only (OpenRouter):
python -m blob.oracle --backend openrouter --json data/analysis/growth_summary.json --streamAsk the oracle only (local PC):
python -m blob.oracle --backend local --json data/analysis/growth_summary.json --pc-ip 192.168.1.123- BW conversion uses your exact thresholds and CLAHE+Otsu flow.
- Growth masks track expansion frame-by-frame, subtract seed & oat regions.
- Analysis reproduces your original logic: dish detection, distances to oats, leader timeline, contact frames, alignment fractions, compact JSON.
- Oracle never reveals raw labels; it renames oats into poetic "paths" and writes a short, imagistic prophecy.