r/computervision • u/TraditionalSecret717 • 26d ago
Help: Theory Tracking a 3 Hz appendage beat on a translucent animal (720×480, CPU only, no labels)
Not a CV person — I'm building the analysis tool for a lab. I'd like a sanity check before spending weeks on the wrong approach.
Data.
An amphipod in a small arena, filmed through a stereomicroscope:
720×480, 29.97 fps, 1–2 min, backlit on a dark background. The animal is translucent and the appendages show through the carapace. [img 1]
What is measured.
It ventilates by beating the pleopods, a row of feathery paddles under the body that move together at roughly 2–4 Hz. We report beats/min against controls; the reference is a human counting blind at 0.3× playback. The rate also shifts with water temperature and salinity, so only animals held under the same conditions are compared.
What I do today.
Mean grey level over a fixed rectangle (or a 6×8 grid, keeping the most periodic cell), band-pass 2–12 Hz, peak-pick, median interval.
Fine while the animal holds still in profile. It drifts, rotates, curls, and swims towards the lens — by 40 s the rectangle is on a blurred, out-of-scale animal. [img 1]
Two dead ends already: frame differencing (the magnitude rectifies the beat and doubles the apparent frequency) and spectral argmax (the spectrum is comb-like, it jumps between harmonics — I sum them instead).
Constraints.
Offline, CPU only, under a minute per 2-minute clip, Python 3.10 + OpenCV headless (no contrib, so no CSRT/KCF), NumPy/SciPy, no GPU, no labels. Maybe a few dozen frames annotated by hand, slowly.
Three questions.
- Segmentation. A translucent animal whose outline is a soft gradient, no training data: classical (background model, local contrast, Otsu, contour, optical-flow mask) or a promptable segmentation model prompted from the previous frame? Does the latter survive 30 fps on CPU?
- Body motion vs appendage motion.
The body translates, rotates, scales and deforms. Phase correlation first, affine + RANSAC if rotation dominates, then warp and re-analyse? Or is local/piecewise the standard answer for a deformable object? - Finding the row in a new clip.
Today: the hottest tile of a per-tile 2–12 Hz power map (the bright region in [img 2]; in the same band, empty background is ~30× flatter). Is that a sound detector, or does it die as soon as the body translates? Is periodic-motion segmentation a practical tool here (frequency-domain, phase-based)? Or keypoints — does DeepLabCut/SLEAP work when there is no skeleton to keypoint, only a blur?
I'm not asking anyone to build it: which of the three would you start with, and what breaks first?
