← Latest papers
💻 computer science

SAM 2++: Tracking Anything at Any Granularity

The paper introduces SAM 2++, a unified video tracking framework that integrates prompt encoding, output decoding, and memory representation to handle diverse target granularities (masks, boxes, and points) within a single model, accompanied by the creation of the first large-scale multi-granularity dataset to achieve state-of-the-art performance across various tracking tasks.

Original authors: Jiaming Zhang, Cheng Liang, Yichun Yang, Chenkai Zeng, Yutao Cui, Xinwen Zhang, Xin Zhou, Kai Ma, Gangshan Wu, Limin Wang

Published 2026-05-19
📖 5 min read🧠 Deep dive

Original authors: Jiaming Zhang, Cheng Liang, Yichun Yang, Chenkai Zeng, Yutao Cui, Xinwen Zhang, Xin Zhou, Kai Ma, Gangshan Wu, Limin Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart robot assistant whose job is to watch videos and keep an eye on specific things. Before this new paper, if you wanted the robot to track a moving car, you had to teach it one specific way. If you wanted it to track a person's face, you had to teach it a completely different way. If you wanted it to track a tiny dot on a ball, you needed a third, totally separate teacher.

The researchers behind SAM 2++ asked a simple question: Why do we need three different teachers for the same job? They realized that whether you are tracking a whole car (a box), a person's body (a mask), or a single dot (a point), the robot is doing the exact same mental work: "Remember what this thing looked like a second ago, and find it again now."

Here is how they built a "Universal Tracker" that does it all, explained simply:

1. The Problem: Too Many Specialized Tools

Think of the old way like having a Swiss Army knife where you have to swap out the entire handle just to use the screwdriver instead of the scissors. Existing video trackers were built for just one job.

  • Box Trackers only knew how to draw a rectangle around an object.
  • Mask Trackers only knew how to color in the exact shape of an object.
  • Point Trackers only knew how to follow a single dot.

This meant the robot had to carry three different "brains," which was wasteful and made it hard to learn from all types of videos at once.

2. The Solution: One Brain, Three Languages

The team created SAM 2++, which is like a polyglot (someone who speaks many languages) robot. It has one main brain, but it can understand three different "languages" of instructions:

  • The "Box" Language: "Here is a rectangle around the car."
  • The "Mask" Language: "Here is the exact outline of the person."
  • The "Point" Language: "Here is a tiny dot on the ball."

The Translator (Task-Specific Prompts):
When you give the robot a box, a mask, or a point, a special translator immediately converts that instruction into a universal "thought" that the robot's brain understands. This way, the robot doesn't care if you gave it a box or a dot; it just knows, "Okay, I need to track this."

The Universal Output (Unified Decoder):
Once the robot finds the object, it doesn't just spit out a box or a dot. It first draws a perfect "shadow" (a mask) of the object. Then, if you asked for a box, it quickly measures the shadow to draw a box. If you asked for a dot, it finds the center of the shadow. This keeps the process simple and consistent.

3. The Memory: The "Smart Notebook"

The hardest part of video tracking is remembering what the object looked like when it gets hidden behind a tree or moves fast. The robot uses a "Memory Notebook" to store past frames.

The researchers noticed that if they forced the robot to use the exact same notebook pages for boxes, masks, and points, the robot got confused. A box needs a rough sketch; a mask needs a detailed drawing; a point needs a precise coordinate.

The Fix (Task-Adaptive Memory):
Instead of one rigid notebook, they gave the robot a smart, flexible notebook.

  • When tracking a box, it writes in a "rough sketch" style.
  • When tracking a mask, it writes in a "detailed art" style.
  • When tracking a point, it writes in a "precise math" style.

This allows the robot to keep one main brain but switch its writing style depending on the job, preventing confusion and making it much better at remembering things.

4. The Training Ground: The "TAG" Dataset

To teach this robot, they couldn't just use old textbooks because those only had one type of exercise. They built a brand new, massive library called TAG (Tracking-Any-Granularity).

  • How they built it: They used a clever "human-in-the-loop" system. Humans labeled a few frames (like the start and end of a clip), and the robot filled in the rest. Then, humans checked the robot's work and fixed mistakes.
  • Why it's special: Every single video in this library has three labels for the same object: a box, a mask, and a point. This allowed the robot to learn all three skills simultaneously, making it a true master of tracking.

The Result

When they tested this new robot, it didn't just do "okay" at all three jobs; it beat the specialized robots that had been trained for years to do only one job.

  • It tracked boxes better than box experts.
  • It tracked masks better than mask experts.
  • It tracked points better than point experts.

In short: SAM 2++ proves that you don't need a different tool for every job. With the right design, one smart, flexible system can handle tracking anything, anywhere, at any level of detail, just by speaking the right "language" to it.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →