Pliny the Pigeon BEHAVIORAL DATA SCIENCERESEARCH LAB

Planarian Real-Time Behavior Tracking

A live look at a single planarian flatworm in its dish. The stream below is the raw rig; the panel underneath is its position and movement, tracked automatically in near-real-time (location, speed, distance from center, and turning) and refreshed continuously.

Live rig

Watch live on YouTube →
Player not loading? — if the box is blank

No sign-in needed. A blank player almost always means the stream is just briefly offline — the rig reconnects on its own, so wait a minute and reload, or open it directly on YouTube. If it's still blank, a privacy or ad-blocking extension may be blocking the embed — pause it for this site and reload.

View the full run history — every point since the start

Live tracking ≈ 3 min behind the video

Live planarian tracking plots
Tracking trails the live stream by about 3 minutes (the clip has to finish recording, upload, and process before it appears here). refreshing…

How it works

live video 1-min clips plot (~3 min behind) Planarian rig dish + overhead camera Capture Mac OBS encoder + clip recorder Live video stream YouTube live Google Drive 1-min clip buffer (works on any network) Compute Mac every 90s: YOLO tracker + behavior model (Apple MPS) renders the plot This page GitHub Pages: live video + tracking plot

The video you see above is real-time. The tracking plot takes a different path: 1-minute clips upload to Google Drive, and a second Mac pulls and processes them with a YOLO tracker + behavior model every 90 seconds, then publishes the plot here - so the data trails the video by about 3 minutes.

How well do the models perform?

Location tracking

YOLO detector + temporal cleanup, scored against 200 hand-labeled frames.

0.68 mmmedian error
1.57 mm90th percentile
3.66 mmworst case
100%within 5 mm

For scale, the dish is about 50 mm across — a typical error is roughly 1% of the arena.

Behavior classification

5-class model, leave-one-out cross-validation (F1 per behavior; 1.0 is perfect).

0.84overall (macro-F1)
0.92gliding
0.89contracted
0.86resting
0.86turning
0.65wig-wag

Numbers are from held-out evaluation on this rig's footage. On the live plot, the locomotion states (gliding / resting / turning) are read directly from the worm's motion, while the model supplies the postural calls (contracted, wig-wag).

How much of this is human-taught?

None of this is automatic magic — every model here learns from frames and clips a person reviewed by hand, one at a time. The running totals:

1,514total human labels
786frames boxed (location)
728clips tagged (behavior)
213video samples

Hand-labeled on this rig's footage.

Want to help teach the worm-tracker?

Labeling is the bottleneck, and it's something anyone can do — no biology degree required. Mark where the worm is, or tell us what it's doing, and you directly improve the models running on this page. Add your name to join the contributors.

Label where the worm is Label what the worm is doing