Skip to content
Interlatent/Documentation
Ivy/User manual/Object tracking

Object tracking

Detect objects, track their masks with SAM, and inspect the result before measuring motion or counting passages.

Choose the objects, camera, and interval

Start with a short interval in one recording. Describe the target precisely and say whether you want one object or every visible instance. Choose a camera where the target is visible; a wrist camera may show contact while a scene camera shows the full motion.

Prompt
In this episode, track every visible bottle from 5 to 15 seconds in the main camera. Use Grounding DINO to find the initial instances and SAM for temporal masks. Inspect the source before choosing seeds. Return a rendered overlay and note occlusions, new arrivals, or tracking failures.

Detect the initial instances

Grounding DINO finds instances of the named objects in the chosen frame. Inspect the returned boxes: a box should cover one target, not a group of adjacent objects. Use detections from the start of the intended tracking window as SAM seeds.

  1. Inspect the source frame at the start of the interval.
  2. Detect all instances of the requested object.
  3. Check for missed targets, duplicate boxes, and background detections.
  4. Seed the tracking run with the accepted boxes at that same starting time.

Track masks with SAM

SAM video tracking propagates seeded masks through a continuous interval. Each seed gets an object ID. For independent masks on a set of still frames, use SAM image segmentation instead. The same box applied independently on later frames does not establish temporal identity.

Prompt
Use the accepted detection boxes to seed SAM video at 5 seconds and track through 15 seconds in the same camera. Process every frame for this short interval. Keep the original video and save a separate overlay. Return the job ID, analyzed interval, sampling rate, overlay video, and dashboard link.

Review tracking quality

Compare the overlay with the source at the beginning, middle, and end of the interval. Also inspect the moments when targets overlap, leave the frame, change appearance, or pass behind another object. Check both the mask shape and whether an ID remains associated with the intended target.

Observed problemNext action
A target has no mask at the startCorrect the detection or seed before extending the run.
A mask switches to a neighboring objectInspect the transition and reseed a shorter interval.
An object enters laterDetect and seed the new arrival in a later window.
An object exits and returnsReview whether it is the same physical object before associating IDs.
Prompt
Inspect the tracking overlay at the first, middle, and last frames, plus each occlusion and exit. Report any ID switches or missing targets with timestamps. If necessary, reseed shorter windows and produce a corrected overlay. Explain any remaining identity uncertainty.

Measure motion or count passages

Once the tracks have been reviewed, ask for the measurement you need: presence duration, mask area, image-space trajectory, or crossings of a defined line. State the line, direction, interval, and treatment of missed observations. Pixel coordinates and normalized image coordinates are not physical distances.

Prompt
Using the reviewed bottle tracks, count leftward crossings of the image’s vertical center line during 5–15 seconds. Show the crossing timestamps and mark the line in the overlay. Report unseeded arrivals and identity uncertainties separately, and state exactly which tracks and interval the count covers.

Apply tracking to more recordings

A fixed seed box is specific to the frame where you selected it. A reusable recipe needs to detect targets separately in each recording and handle the new arrivals and occlusions that occur there. Review a representative sample before applying the recipe as a batch.

Start hereQuickstartImport a Hugging Face dataset and analyze an episode with Ivy.Start hereConnect an agentOfficial setup for Interlatent’s Ivy at interlatent.com. Connect your agent to shared visual data, hosted compute, and saved analysis through Ivy.Start hereTrain vision models with an agentUse Ivy by Interlatent for vision model training and evaluation. Training access is gated; contact team@interlatent.com to request access.User manualImport a datasetImport public or private Hugging Face datasets, video files, or recordings from connected storage.User manualAccess datasets from a coding agentDescribe the dataset you want, ask questions about its recordings, and turn the answers into a selection for vision model work with your MCP-compatible coding agent.User manualAmazon S3Connect a bucket, import a small recording collection, and verify that it is ready for analysis.User manualGoogle DriveShare a folder with Ivy, review the import plan, and bring the recordings into a project.User manualGoogle Cloud StorageGrant bucket access, verify the connection, and import recordings from a gs:// path.User manualFiles & video linksImport a single video, a direct download link, or a local recording directory.User manualFind & tag videosFind recordings by their visual content, save a selection as tags, and reuse it in later analysis.User manualObject trackingDetect objects, track their masks with SAM, and inspect the result before measuring motion or counting passages.User manualModels & analysisChoose the method for your question: actions, object locations, masks, or classifications.User manualSubtask segmentation & semantic trimmingPrompt Ivy to divide a video into meaningful steps, steer the boundaries and labels, and export selected sections as video clips.User manualTrim & process videoTrim video by timestamps or meaningful action sections, create processed views, and keep source and output times clear.User manualRun your first experimentsRun action labeling and object tracking on a small sample, then compare and apply the results.User manualReview & exportInspect annotations, correct errors, and export a Dataset snapshot.Technical referenceCore conceptsProjects, recordings, annotations, pipelines, and Dataset snapshots.Technical referencePython recipes & ffmpegRun repeatable measurements and video transformations with annotate(clip, ctx), then save outputs for review.Technical referenceQueries & tag operationsQuery saved annotations and recorded per-frame data with SQL, then use the matching clip IDs for tagging or export.Technical referenceSource connectionsConnection states, cloud permissions, import tools, and recovery for source workflows.Technical referenceTool referencePublic MCP tools grouped by task. Your connected agent provides the current schemas and availability.Technical referenceTroubleshootingResolve common connection, import, analysis, and access errors.ResourcesRights & data FAQAnswers about private video data, vision model ownership, provider handling, evaluation, and trial pricing with Interlatent.