Motion Detection
Pause inference while the scene is still
On a camera that is mostly watching nothing happen, motion detection pauses inference until the scene changes. Frames are divided into a grid of cells; a cell counts as moved when enough of its pixels change, and the source counts as moving when enough cells have moved.
motionDetect
Turn motion gating on
false
—
motionSensitivity
How readily a cell counts as moved
0.5
0.0–1.0
motionThreshold
Fraction of cells that must have moved to count as motion
0.01
0.0–1.0
motionGap
Seconds of stillness before motion is considered over
1
1–60
motionGridX
Grid cells across
10
8–32
motionGridY
Grid cells down
10
8–32
from eyepop.worker.worker_types import MotionDetectConfig
job = endpoint.load_from(
"rtsp://camera.example.com/stream1",
motion_detect=MotionDetectConfig(
motionDetect=True,
motionSensitivity=0.6,
motionGap=5,
),
)const results = await endpoint.process({
source: { url: 'rtsp://camera.example.com/stream1' },
motionDetect: {
motionDetect: true,
motionSensitivity: 0.6,
motionGap: 5,
},
})Raising motionGap keeps inference running through short pauses — someone standing still mid-frame — at the cost of processing more quiet frames. It is the only control over the end of motion: the same value decides when motion counts as finished and when the stillness is reported, with no way to set the two apart. At the start of motion there is no knob at all — movement has to show up in two consecutive frames before it counts, so a single-frame flicker does not wake the source. Motion detection composes with fps: gate on motion, then throttle what gets through.
Last updated
