---
title: "SAM 2: Segment Anything in Images and Videos (2024)"
description: "Understand how SAM 2 segments objects across images and videos, uses streaming memory, and learns from interactive annotation."
canonical: "https://research.elamur.ai/free/en/papers/ravi-2024-sam-2-segment-anything-images/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/ravi-2024-sam-2-segment-anything-images/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / SAM 2: Segment Anything in Images and Videos

# SAM 2: Segment Anything in Images and Videos

Paper · 2024 · Nikhila Ravi, Valentin Gabeur, Yuan-Ting Hu et al.

**Authors:** [Nikhila Ravi](https://md.research.elamur.ai/free/en/authors/nikhila-ravi/), [Valentin Gabeur](https://md.research.elamur.ai/free/en/authors/valentin-gabeur/), Yuan-Ting Hu, [Ronghang Hu](https://md.research.elamur.ai/free/en/authors/ronghang-hu/), Chaitanya K. Ryali, [Ma](https://md.research.elamur.ai/free/en/authors/ma/), Tengyu, Haitham Khedr, Roman Rädle, [Chloe Rolland](https://md.research.elamur.ai/free/en/authors/chloe-rolland/), [Laura Gustafson](https://md.research.elamur.ai/free/en/authors/laura-gustafson/), [Eric Mintun](https://md.research.elamur.ai/free/en/authors/eric-mintun/), [Junting Pan](https://md.research.elamur.ai/free/en/authors/junting-pan/), [Kalyan Vasudev Alwala](https://md.research.elamur.ai/free/en/authors/kalyan-vasudev-alwala/), [Nicolas Carion](https://md.research.elamur.ai/free/en/authors/nicolas-carion/), Chao-Yuan Wu, [Ross Girshick](https://md.research.elamur.ai/free/en/authors/ross-girshick/), [Piotr Dollár](https://md.research.elamur.ai/free/en/authors/piotr-dollar/) and [Christoph Feichtenhofer](https://md.research.elamur.ai/free/en/authors/christoph-feichtenhofer/) · **Year:** 2024 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**290** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4401307635) · [arXiv (Cornell University)](https://openalex.org/S4306400194) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/2408.00714)
- [arXiv 2408.00714](https://arxiv.org/abs/2408.00714)
- [OpenAlex](https://openalex.org/W4401307635)

Citations: OpenAlex, 2026-10-14.

## Deep dive: SAM 2: Segment Anything in Images and Videos

Understand how SAM 2 segments objects across images and videos, uses streaming memory, and learns from interactive annotation. · about 34 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Selecting an object in an image is a spatial problem: determine which pixels belong to it. Selecting that object throughout a video adds another difficulty: preserve its identity as its appearance changes, other objects obscure it, or it leaves the view and returns. SAM 2 addresses both problems through a common task. A person indicates a target with clicks, a box, or a mask, and the system returns its segmentation. In video, the result extends across frames, and further prompts can repair mistakes wherever they occur. The paper calls this task promptable visual segmentation.

The architectural contribution is a segmentation system with streaming memory. Each frame receives an image representation, which is then conditioned on information retained from earlier predictions and user interactions. A lightweight decoder uses that context to produce the current mask. Memory makes a correction more informative than an isolated annotation: a click can refer back to an object whose appearance and extent the system has already observed. For an image, there is no temporal history, so the same architecture operates without video memory. The paper treats image segmentation and video segmentation as related cases of a shared problem.

The other major contribution is the annotation process and the SA-V dataset it produced. Annotators first worked frame by frame, then used mask propagation, and eventually corrected predictions directly through the full interactive system. Independent verification checked whether each tracked segment remained consistent. SA-V contains 50.9K videos, 642.6K masklets—sequences of masks following particular targets—and 35.5M masks. Its annotations include object parts as well as complete objects, and its collection process deliberately seeks difficult targets. The final annotation workflow reached 4.5 seconds per frame, compared with 37.8 seconds for the initial workflow.

The experiments test interactive video segmentation, video tracking from an initial annotation, and segmentation of individual images. In the interactive video evaluations, SAM 2 achieves better segmentation with more than 3× fewer interactions than the comparison approaches. Across the image benchmarks inherited from SAM, image-only training gives 58.9 mIoU with a single click, compared with SAM’s 58.1 mIoU, while the paper reports 6× higher speed. Combining image and video training raises the reported average on those benchmarks to 61.4%. These findings support a broadly useful segmentation interface, but they do not establish unrestricted tracking: the authors describe failures involving shot changes, prolonged occlusion, crowded scenes, fine structures, and similar-looking objects. The reported experiments use the improved version designated SAM 2.1 in the official release, although the paper consistently calls it SAM 2.

### Ideas worth borrowing

Preserve context when accepting corrections. A correction is easier to interpret when the system retains the state that produced the error. SAM 2 combines new prompts with memories of the target instead of asking the user to specify the target again from scratch. This principle applies to interactive analysis tools in which a user gradually establishes an intended object, region, or interpretation. Retaining the relevant context lets later feedback concentrate on what went wrong. The paper’s contribution is especially clear when a small correction recovers a target after tracking has failed.

Separate expensive representation from repeated interaction. The image encoder computes frame features that subsequent prompting can reuse. Memory conditioning and mask decoding then perform the work specific to the target and its current interaction history. This separation matters because users may revise the same frame repeatedly, and several targets may share its visual representation. In another application, the reusable component could be document analysis or another expensive input transformation. The transferable design is to identify what depends on the input itself and what depends on the user’s changing request.

Retain both detailed evidence and compact identity cues. SAM 2 stores spatial feature maps alongside lightweight object pointers derived from decoder tokens. These representations serve different purposes: spatial memories preserve information tied to image locations, while pointers supply a compact description associated with the target. The ablations show that their value depends on the evaluation setting, with pointers helping particularly on challenging tracking benchmarks. Other memory-based systems could likewise distinguish detailed records from concise identity information, then test whether each actually contributes rather than assuming that a single representation must do everything.

Use intervention history to find valuable data. The annotation process records which frames needed editing. The authors use this history as an indicator of difficulty, both when selecting training subsets and when choosing material for longer-sequence fine-tuning. This converts ordinary work performed during annotation into a signal for allocating future effort. The broader application is a data collection process that learns from its own corrections. The important qualification is that editing frequency measures difficulty for the current system and workflow; it is not an independent definition of intrinsic task difficulty.

Build evaluation data through a different assistance path. SA-V’s validation and test targets are annotated with the earlier frame-by-frame procedure rather than with the final tracking system in the loop. That choice reduces a specific concern: evaluation labels might otherwise inherit the same temporal mistakes as the system being tested. The principle is useful wherever assisted annotation creates training data. A strong evaluation process should examine whether its labels reproduce the assumptions or characteristic errors of the tool under evaluation.

Measure the interaction process as well as the final output. SAM 2 is assessed under protocols that vary when corrections become available and whether they can revise earlier frames. The paper also distinguishes segmentation accuracy, interaction count, estimated annotation time, and inference throughput. These quantities answer different engineering questions. An interactive system may be accurate after extensive repair but burdensome to use; a fast predictor may still demand frequent attention. Evaluating the process exposes these differences and makes the result more informative for applications involving human oversight.

### How Mova uses it

For Mova, a small transparent language system written in Rust, the most plausible connection is an architectural and evaluation idea rather than a demonstrated integration. SAM 2 solves a visual segmentation problem. Its pixels, masks, image encoder, and video benchmarks do not directly establish anything about language processing. No implemented Mova component follows from the paper alone.

A concrete possibility is to distinguish durable user guidance from recent working context. SAM 2 keeps information from prompted frames separately from information associated with recent predictions. A language system could use a similarly explicit distinction between a user-confirmed interpretation and a provisional interpretation produced during ongoing processing. For example, if a user identifies the intended referent of an expression, that decision could remain available while nearby contextual evidence changes. This would be a proposed design for Mova, requiring its own language-specific representation and evaluation.

The correction mechanism suggests another possibility. A transparent system could record the interpretation that preceded a correction, the user’s intervention, and the resulting revised state. Later decisions could consult that record instead of treating every intervention as a new independent request. The useful borrowing is continuity of evidence. SAM 2’s numerical improvements concern segmentation, so they cannot be transferred as predicted gains for Mova.

The data engine also offers a practical research pattern. Mova could log which examples repeatedly require intervention and use those records to guide review or dataset expansion. Cases with frequent corrections would become candidates for inspection, while independently prepared evaluation material would check whether the changes generalize. This would preserve a distinction between improving on known failures and improving on unseen examples. It would also make the selection process inspectable, which fits the stated aim of transparency.

Finally, SAM 2’s treatment of ambiguity offers a conceptual connection. A click may reasonably identify a part or a whole object, so the system maintains alternative masks before choosing what to propagate. A language system could likewise expose competing interpretations when the available evidence does not determine a unique answer. The paper does not test that extension, and retaining alternatives would require clear rules for resolving and presenting them. These are ideas Mova could investigate, not claims about features already built or about language capabilities demonstrated by SAM 2.

### The problem and its context

#### Following a region while preserving its identity

A segmentation mask describes which pixels belong to a target. In a still image, the target’s appearance is fixed. In a video, the target may rotate, deform, become blurred, pass behind something else, or disappear from view. Its visible extent can change substantially while its identity remains the same.

The practical problem is therefore broader than repeatedly drawing a boundary. The system must maintain a target-specific interpretation over time. If the user selects a shirt, later predictions should continue to follow the shirt rather than expand to the person wearing it. If the user selects a small part, the appearance of a larger containing object should not silently redefine the request.

The paper motivates this capability through applications such as video editing, robotics, autonomous vehicles, and augmented or virtual reality. These applications need temporal localization: an object’s location and extent across a sequence. A segmentation system restricted to isolated frames leaves much of that work unresolved.

Video also introduces computational pressure. Processing an entire sequence can involve many frames, while an interactive user expects a quick response to a local correction. A practical design must combine temporal information with an efficient way of consuming frames and reusing prior computation. SAM 2’s streaming architecture addresses that requirement directly.

#### What SAM supplied, and what remained missing

[Segment Anything](https://md.research.elamur.ai/free/en/papers/kirillov-2023-segment-anything/) established the image-based interface from which this work develops. A prompt, such as a point or bounding box, specifies an object, and the system produces a compatible mask. Training on SA-1B supported transfer to image segmentation settings beyond the training distribution.

The related-work discussion describes several directions taken after SAM. Some work sought finer boundaries through an additional high-quality output token. Other approaches emphasized efficiency. The authors also describe applications in medical imagery, remote sensing, motion segmentation, and camouflaged-object detection.

Those developments did not by themselves provide a unified solution for interactive video segmentation. Applying an image segmenter independently to every frame discards temporal continuity. Combining it with a separate tracker introduces continuity, but leaves a boundary between interpreting the user’s prompt and maintaining the target over time.

The paper identifies several weaknesses in such combinations. A tracker may fail on targets outside its effective range. An image segmenter may behave poorly on degraded video frames. More importantly, correction can require rebuilding a spatial annotation and restarting propagation, because the image component does not have access to the tracker’s accumulated object context.

SAM 2 makes that correction problem central. Its objective is not merely to obtain an initial mask and follow it. It must also use new interaction to repair an existing masklet while retaining knowledge of what the user had selected.

#### Earlier interactive and semi-supervised video segmentation

The paper distinguishes interactive video object segmentation from the conventional semisupervised VOS setting. In interactive segmentation, user guidance may arrive throughout the process. Earlier approaches included graph-based optimization, followed by systems that converted an interaction into a frame mask and propagated that mask through the video.

In semisupervised VOS, an accurate mask is supplied on the opening frame. The system then follows that target through the remaining frames. Here, “semi-supervised” refers to the available target annotation at inference time. It does not mean that the user keeps supplying labels throughout the sequence.

The historical account describes methods that adapted to the target through online fine-tuning, either using the opening frame or incorporating later frames. Faster approaches used systems trained beforehand and conditioned predictions on the initial frame, the previous frame, or a broader temporal history. Recurrent architectures and [transformer attention](https://md.research.elamur.ai/free/en/concepts/transformer/) extended the amount and form of temporal context that could be used.

SAM 2 places these tasks within a more general interface. A full mask on the opening frame is a permitted prompt, so conventional VOS becomes a restricted case of promptable visual segmentation. A single image is another restricted case, with no temporal sequence to traverse. This formulation lets the paper evaluate specialized protocols without making either protocol the full definition of the system’s purpose.

#### Why the data problem mattered

The authors argue that available video segmentation datasets did not provide sufficient coverage for unrestricted target selection. Many annotations represented whole objects within familiar categories, including people, vehicles, and animals. Parts and subparts were less extensively represented.

Earlier datasets also emphasized particular kinds of difficulty. The paper discusses benchmarks designed around occlusion, long sequences, substantial transformations, broader object categories, or varied scenes. These datasets advanced particular aspects of tracking, but the authors considered their combined coverage insufficient for selecting almost any visually bounded target.

That distinction affects annotation policy. If the intended interface permits someone to choose a hat, a cheek, or another local region with a clear boundary, training only on prominent complete objects encourages the wrong notion of a valid answer. SA-V therefore expands the target space as well as the volume of annotation.

The paper’s formulation still has a boundary of its own. Targets should possess a visually identifiable extent. Arbitrary regions without a discernible visual boundary are outside the intended task. “Anything” describes broad target coverage within this segmentation formulation; it does not remove the need to define what counts as a segment.

### The method, step by step

#### Start with an interactive target definition

The user can supply positive clicks, negative clicks, a bounding box, or a mask. A positive click indicates a location belonging to the target; a negative click excludes a location. A box supplies a coarse spatial constraint, while a mask specifies the target more directly.

Prompts can arrive on any frame. The system should respond promptly on the frame receiving the interaction, then propagate the target through the video. Further prompts can refine that result. Depending on the interaction setting, the available information may include a prompted frame that lies later than the frame currently being processed.

The output is a masklet: a target-specific sequence of masks. A masklet must preserve both the visible shape and the identity implied by the prompts. It must also accommodate frames in which the target has no visible mask because it is absent or occluded.

The paper illustrates the benefit through a tongue that becomes lost during propagation. A later click can recover the intended target because the system retains information from earlier frames. A separated image-segmentation and tracking pipeline may need a fuller reannotation at that point. The example explains what memory is meant to accomplish: make a new prompt a contextual correction.

How SAM 2 follows a prompted target The steps in order.

#### Compute reusable visual features

The image encoder produces a representation of each frame. SAM 2 uses Hiera, a hierarchical encoder initialized through [masked-autoencoder pre-training](https://md.research.elamur.ai/free/en/papers/he-2021-masked-autoencoders-scalable-vision-learners/). Hierarchical features represent the image at different spatial scales, which is useful when the system must combine broad object information with detailed boundaries.

A [feature pyramid network](https://md.research.elamur.ai/free/en/papers/lin-2016-feature-pyramid-networks-object-detection/) combines features from the encoder’s later stages to create the frame embedding. Finer-scale features from earlier stages take a separate route into the decoder’s upsampling layers. They bypass memory attention and help recover spatial detail in the output mask.

The distinction between unconditioned and conditioned features is important. The image encoder represents the frame before selecting a particular target. Memory attention then adapts that representation using target-specific history. The mask decoder receives the conditioned representation instead of relying solely on the current image.

This organization also avoids repeating the expensive image encoding whenever the user adds another prompt. The existing frame features can support further interactions. When several targets are processed, they share these visual features, although their other computations remain separate.

#### Condition the current frame on memory

Memory attention combines the current frame with information stored for the target. The default architecture uses 4 layers. Each layer applies self-attention, then cross-attention to the stored information, followed by a feed-forward component.

Self-attention operates within the current representation. Cross-attention allows it to draw on other frames and target-related tokens. The memory sources include frames with user prompts and frames whose masks were predicted without new interaction.

The authors use standard attention operations instead of introducing a specialized attention mechanism. This permits implementation benefits from efficient kernels, including [FlashAttention-2](https://md.research.elamur.ai/free/en/papers/dao-2023-flashattention-2-faster-attention-better/). The architectural decision therefore serves both representation and execution: temporal conditioning uses operations for which efficient implementations are available.

Position is represented spatially and temporally, but not identically for every memory type. Recent frame memories receive temporal position information so that short-term motion can be represented. Prompted-frame memories do not receive the same temporal treatment. The authors explain that prompted frames are comparatively sparse during training and may occur over quite different temporal ranges during use.

For spatial position within memory attention, the system uses a visual form of rotary positional encoding, connected to [RoFormer](https://md.research.elamur.ai/free/en/papers/su-2021-roformer-enhanced-transformer-rotary-position/). Object pointers are excluded from this spatial encoding because they do not correspond to particular image locations.

#### Turn prompts and features into candidate masks

The prompt encoder follows SAM’s design. Sparse prompts combine positional information with learned embeddings indicating the prompt type. A mask prompt is processed by convolutions and combined with the frame representation.

The decoder updates prompt and image information through two-way attention. Its output includes segmentation masks and estimates of their intersection over union, or IoU. IoU measures overlap between a predicted region and its reference region. The predicted IoU serves as an internal estimate of mask quality.

Ambiguity is handled explicitly. A point on a bicycle tire may identify the tire or the bicycle. In video, the ambiguity can persist or become more apparent as previously hidden portions enter view. SAM 2 therefore produces alternative masks during video processing as well as for an ambiguous image prompt.

When additional interaction does not resolve the alternatives, the candidate with the highest estimated IoU is propagated. This makes the quality estimate operationally important: it influences which interpretation becomes the continuing target. Producing alternatives does not mean that all alternatives are maintained as independent full-video tracks.

The decoder also predicts visibility. A separate output token and prediction head estimate whether the target is visible in the current frame. This is necessary because the video task contains legitimate empty-mask situations. A positive prompt on an earlier frame does not imply that the target must remain visible throughout the sequence.

#### Write spatial and compact memories

After predicting a frame mask, the memory encoder combines that prediction with the unconditioned visual features. It downsamples the mask through convolutional processing, adds the resulting information to the frame embedding, and fuses them with lightweight convolutional layers.

This memory construction reuses the image encoder’s representation. It does not introduce another image encoder solely for memory. Accordingly, improvements to the shared visual representation can also benefit the memories built from it.

The memory bank has separate provision for recent predictions and prompted frames. Recent memories use a first-in, first-out policy, retaining a bounded temporal context. Prompted memories preserve information associated with explicit interaction. In conventional VOS, this means retaining the initial annotated frame together with recent unprompted history.

The default recent-frame setting is 6 past frames. Spatial memory features are projected to a dimension of 64. The decoder’s object pointer has 256 dimensions and is divided into 4 tokens of 64 dimensions for cross-attention.

Object pointers supplement the spatial maps with compact target information derived from decoder output tokens. They are especially relevant when matching a target requires more than local spatial correspondence. The architecture also adds a learned occlusion embedding to spatial memories from frames predicted to contain an invisible target.

For multiple targets, each target receives its own memory bank and decoding path. The frame encoder is shared, but the targets do not communicate through a common object-level reasoning process. This simplifies the design while leaving a potential source of information and efficiency unused.

#### Pre-train spatial segmentation

Training begins with static images from SA-1B. The image encoder starts from MAE-pre-trained Hiera weights, and the segmentation components learn the interactive image task before full image-and-video training.

The pretraining procedure excludes masks occupying more than 90% of an image and samples 64 masks per image. Images are resized to 1024×1024, and horizontal flipping provides augmentation. These choices retain the broad image segmentation setup while adapting several details from SAM.

One change concerns quality prediction. The estimated IoU receives an absolute-error loss, and a sigmoid restricts the prediction to values between 0 and 1. For ambiguous multi-mask outputs, every candidate’s quality estimate is supervised, while segmentation supervision is applied to the candidate with the smallest segmentation loss.

This separates two learning objectives. The system should produce a good compatible mask, but it should also recognize when another proposed mask is poor. Supervising all quality predictions supplies feedback about unsuccessful alternatives instead of leaving those scores unconstrained.

The simulated interaction uses 7 corrective clicks. Unlike SAM’s training procedure, it does not insert additional iterations that provide only the preceding mask logits without another prompt. Optimization uses AdamW, encoder layer decay, and a reciprocal square-root learning-rate schedule.

#### Train spatial interaction and temporal propagation together

Full training alternates batches of static images and video sequences. A batch comes entirely from one source type, allowing image and video batches to use different sizes. Sampling probabilities depend on the amount of data in each source.

The authors describe training mixtures containing SA-V, licensed internal video data, and a 10% subset of SA-1B. Some experimental configurations additionally include established VOS datasets. The released system is described as using manual SA-V annotations, the internal collection, and SA-1B.

This distinction matters because the released dataset contains many automatically generated masklets, but the reported training procedure uses manually annotated video masklets. Automatic generation supports dataset coverage and failure discovery without implying that every released annotation participates in the final training mixture.

The main video training procedure samples sequences of 8 frames. Up to 2 frames, including the first, receive corrective interaction. Initial prompts are full reference masks with probability 50%, positive clicks with probability 25%, and boxes with probability 25%.

Corrective clicks are generated from discrepancies between prediction and reference. With probability 10%, a corrective click is instead sampled from the reference mask without depending on the current prediction. This introduces variation in how refinement arrives.

Each sampled sequence contains at most 3 randomly selected masklets. Temporal order is reversed with probability 50%, supporting propagation in either temporal direction. Video augmentation includes affine transformations, color changes, grayscale conversion, and horizontal flipping.

A further augmentation creates similar-looking distractors. With probability 10%, the same video is arranged into a 2×2 mosaic, and a target is chosen from a quadrant. Appearance alone becomes insufficient to distinguish its copies. The transformed targets also occupy smaller regions, exposing training to smaller objects.

#### Extend training to longer sequences

The authors identify a mismatch between short training clips and potentially long videos at inference time. They address it with an additional [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) stage using 16-frame sequences.

This stage emphasizes challenging material. Masklets are ordered by how many frames annotators edited, and the top 50% are retained from both SA-V and the internal collection. Where the open-source VOS datasets are included, those datasets remain complete.

Fine-tuning runs for 50k iterations. The image encoder is frozen, and the learning rate is reduced to half its earlier value. Freezing the encoder allows the longer sequences to fit within the A100 GPUs’ 80 GB memory.

The supervision combines focal loss and dice loss for segmentation, absolute error for estimated IoU, and cross-entropy for target presence. Their stated weighting is 20:1:1:1. For multiple mask candidates, segmentation supervision again selects the candidate with the smallest segmentation loss.

When a reference frame has no target mask, the mask outputs do not receive segmentation supervision. The visibility prediction remains supervised. This prevents an absent target from being treated as though a visible spatial region must nevertheless be produced.

#### Build the dataset through progressively better assistance

The initial annotation phase uses SAM on individual frames. Annotators work at 6 FPS and can adjust masks with brush and eraser tools. No temporal propagation assists them. This process is slow, but it supplies high-quality masks and becomes the basis for validation and test annotation.

The next phase introduces a mask-prompted version of SAM 2. Annotators create an initial spatial mask, propagate it, and repair later frames by producing replacement masks. This substantially reduces repeated frame annotation, but repairs still require reconstructing the spatial target.

The final phase permits direct interactive refinement with the full system. Annotators can correct intermediate predictions through clicks while using the existing temporal context. The system is retrained as new annotations become available, so the assistance tool and the collected data improve together.

Verification is a separate task. Reviewers assess whether a masklet consistently follows a clearly defined target. Incorrect but well-defined tracks return for refinement. Tracks without an acceptable target boundary are rejected.

Automatic proposals broaden coverage. Regular point grids, including grids applied to cropped regions, generate candidate masklets. Reviewers accept satisfactory proposals, while selected failures become targets for human correction. Annotators are also shown already accepted automatic tracks and asked to find challenging targets that remain unannotated.

#### Make interaction costs explicit

The paper estimates annotation time separately for offline and online interaction. Its offline expression is:

```
T_offline = (T_exam × (L / 300) + T_loc + T_click × N_click) × N_frame
```

T_offline is the estimated time spent annotating a target in offline mode. T_exam is the examination time for a reference video, L is the video’s frame count, T_loc is the time to locate the target on a prompted frame, and T_click is the time assigned to each click. N_click is the clicks supplied per prompted frame, and N_frame is the number of prompted frames. The factor L / 300 adjusts examination time for video length.

The online expression is:

```
T_online = T_exam × (L / 300) + (T_loc + T_click × N_click) × N_frame
```

T_online denotes the corresponding estimate for online interaction. All remaining symbols have the same meanings as in the offline expression. The difference is procedural: offline interaction includes another video examination in each round, whereas online interaction examines the sequence during a single forward traversal.

The assumptions assign 1 second to locating a target and 1.5 seconds to each click. Examining a 300-frame sequence takes 30 seconds. The interactive evaluations use 3 clicks on each prompted frame. These expressions describe a cost estimate under stated assumptions; they are separate from the measured annotation times in the data-engine experiment.

### Experiments and results

#### What each evaluation measures

The [evaluation benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/) cover several distinct questions. Interactive video evaluation asks how efficiently a user can correct a masklet. First-frame-only evaluation asks how well a target can be followed after an initial prompt. Image evaluation asks whether adding temporal capability preserves or improves spatial segmentation.

For video, the main measure is J&F, combining region agreement and boundary quality under the established VOS evaluation protocol. VOST follows its own protocol and uses J. For images, the main measure is mean IoU, abbreviated mIoU. These metrics should be read together with their prompting conditions: a full reference mask and a single click provide very different amounts of target information.

The default zero-shot configuration uses the Hiera-B+ encoder, input resolution 1024, and the full experimental training mixture. Zero-shot transfer concerns evaluation beyond the training data used for the relevant setting. It does not mean that the system learns segmentation without annotated training data.

The paper also distinguishes these default comparisons from ablations conducted at lower resolution and with smaller data mixtures. Architectural findings from those controlled experiments help explain design choices, but they are not themselves the final system’s headline benchmark configuration.

#### The scale and composition of SA-V

SA-V contains 50.9K crowdworker-recorded videos and 642.6K masklets. Of these, 190.9K are manual annotations and 451.7K are automatic masklets retained through the verification process. The paper reports 35.5M masks overall.

The collection covers everyday environments, with 54% indoor scenes and 46% outdoor scenes. The detailed dataset account gives an average video duration of 13.8 seconds, a total duration of 196 hours, and 4.2M frames. Videos originate from 47 countries.

Small targets are prominent: more than 88% of masks occupy a normalized area below 0.1. In the manual portion, the disappearance-and-return measure is 42.5%. This measure concerns masklets that become absent in at least a frame and subsequently reappear; it is a dataset characteristic rather than a tracking accuracy result.

The splits separate video creators and account for geographic location to reduce similar-content overlap. SA-V validation contains 155 videos and 293 masklets. The test split contains 150 videos and 278 masklets. Target selection for these splits emphasizes difficult motion, occlusion, and disappearance patterns.

The internal training collection adds 62.9K videos and 69.6K masklets. A separate internal test collection contains 96 videos and 189 masklets. Because this material is distinct from the public SA-V release, reproducing a public-data-only configuration and reproducing the full reported training setting are different goals.

#### Measured annotation efficiency

The annotation comparison uses a controlled experiment involving 169 videos and 452 masklets. Separate annotator groups apply the different phase protocols to the same target set. This gives the timing result a firmer basis than a comparison between unrelated production batches.

Data-engine workflows, controlled annotation experiment, time per frame Interactive temporal refinement requires the least annotation time.

**The numbers**

| System or setting | seconds per frame |
| --- | --- |
| Phase 1, framewise SAM | 37.8 |
| Phase 2, mask propagation | 7.4 |
| Phase 3, interactive SAM 2 (this paper) | 4.5 |

Quality is assessed against the framewise annotations. A mask counts as aligned when its IoU with the Phase 1 reference exceeds 0.75. The authors examine alignment by target size and report comparable quality alongside the timing improvement.

The final workflow also has the lowest proportion of edited frames and the fewest clicks per clicked frame among the compared protocols. Together, these observations support the explanation that temporal context reduces repeated specification of the same target. The result concerns the complete annotation workflow, including the interface and assistance available in each phase.

#### Interactive video segmentation

Interactive evaluation uses the 9 densely annotated datasets from the zero-shot video suite. Dense labels permit the simulator to locate errors throughout a sequence and decide where another interaction should occur.

In offline evaluation, the system first segments the video from an opening-frame prompt. The simulator then finds the frame with the weakest IoU and supplies correction clicks there. Another pass uses all accumulated prompts. Performance is assessed over interaction budgets spanning 1 through 8 prompted frames.

In online evaluation, the system moves forward once. When a prediction’s IoU falls below 0.75, the simulator pauses and supplies a correction, provided the interaction budget permits it. Those corrections affect later frames without revising already processed frames.

The comparison systems combine SAM with XMem++ or Cutie. SAM interprets click or box input, and the temporal component propagates the resulting mask. The baselines are also adapted to receive annotations on multiple frames, making them meaningful competitors for the interactive task.

The correction procedure is stronger than simply ignoring the existing prediction. The authors reconstruct the tracker’s current mask through SAM prompts until reconstruction exceeds 0.8 IoU, then add the corrective clicks. They report that this strategy works better than several simpler alternatives.

SAM 2 leads both comparison systems in the online and offline experiments across the densely annotated suite. The paper’s main interaction claim is that it reaches better accuracy with more than 3× fewer interactions. This result supports the value of unified correction and propagation under the simulator’s error-selection and click-placement rules.

#### Tracking from the opening frame

The broader video suite contains 17 zero-shot datasets. They cover substantial variation, including surgical tools, microscopy, driving environments, and everyday activity. The densely annotated subset supports the interactive protocols; sparsely annotated datasets are scored only where reference masks exist.

First-frame-only evaluation supplies 1, 3, or 5 clicks, a box, or a reference mask. With clicks, the initial point comes from the target’s interior, and later points come from prediction-error regions. When necessary, sequences are rearranged so that a target’s evaluation begins where it first becomes visible.

Click and box comparisons use SAM before XMem++ or Cutie. Reference-mask comparisons feed the annotation directly to those trackers. The latter setting therefore evaluates their established VOS capability without introducing SAM’s initial-mask errors.

The detailed account reports that SAM 2 leads on the majority of datasets across prompt types. This is the useful scope of the result: strong performance across a varied suite, instead of an assertion that every individual dataset and prompt configuration is won.

The conventional VOS comparisons also examine encoder size and speed. Hiera-B+ runs at 43.8 FPS, while Hiera-L runs at 30.2 FPS, measured on a single A100 GPU with batch size one. The larger encoder improves accuracy while reducing throughput.

#### Image segmentation and the effect of video training

The image suite contains 37 datasets. SA-23 denotes the 23 benchmarks previously used to evaluate SAM, while the expanded suite adds 14 datasets derived from video. In this evaluation, video frames are treated independently as images, so temporal propagation is not responsible for their scores.

SA-23 image benchmarks, average single-click mIoU SAM 2 improves spatial segmentation, with an additional gain from joint image and video training.

**The numbers**

| System or setting | mIoU |
| --- | --- |
| SAM, image training | 58.1 |
| SAM 2, image training | 58.9 |
| SAM 2, image and video training (this paper) | 61.4 |

The image-only comparison matters because it separates the architecture from the added video data. SAM 2 improves the average single-click result without requiring extra training data in that comparison. The authors attribute much of this result to the effective Hiera encoder.

Joint image-and-video training provides a further improvement and is particularly helpful on image evaluations drawn from video distributions. The detailed account also compares against HQ-SAM and reports both single-click and repeated-click performance.

Speed measurements use the same stated execution environment: an A100 GPU, PyTorch 2.3.1, CUDA 12.1, and bfloat16 mixed precision. Image encoders are compiled for the compared systems. Image throughput uses batches of 10, whereas video throughput uses batch size one. These conditions are essential when interpreting the reported 6× image speed advantage.

#### Additional interactive and fairness analyses

On the DAVIS interactive benchmark, the paper follows a click-based protocol and compares with MiVOS and CiVOS. SAM 2 performs better under click input. The authors also identify an evaluation tension: SAM 2 may select a plausible object part where DAVIS expects the complete object.

The [fairness](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/) analysis uses person annotations from Ego-Exo4D and examines gender and age groups. The detailed description refers to demographic information reported by the subjects, while the introductory account describes the comparison in terms of perceived groups.

The authors report little discrepancy with 3 clicks or a full mask. They find that some single-click errors concern part-versus-person selection. Restricting analysis to clips where the whole person is selected gives J&F values of 94.3 for male subjects and 92.7 for female subjects. This is a conditional analysis of ambiguity, not a comprehensive demonstration of parity.

### What the ablations show

#### Broader data improves transfer

The data-mixture experiments keep training iterations and batch size fixed while changing the sources of training data. This is important because it separates the effect of additional kinds of examples from simply performing more optimization.

A configuration trained only on established VOS datasets does reasonably well on the related MOSE development split but transfers less effectively elsewhere. Its average across the 9 zero-shot video datasets is 59.7 J&F. Adding data collected through the new annotation engine produces the reported +12.1% average improvement in that comparison.

The authors interpret this as evidence that earlier datasets have limited coverage as well as limited size. The new examples broaden the kinds of targets and situations the system encounters. That interpretation fits SA-V’s annotation policy, which includes parts and deliberately seeks difficult cases.

Adding SA-1B images improves image segmentation without degrading the measured video capability. Conversely, training with SA-V and SA-1B already yields strong results across much of the suite, though MOSE benefits from its task-specific data. The strongest overall experimental mixture combines the available sources.

The lesson is about complementary coverage. Still-image data continues to contribute useful spatial supervision, while video data adds temporal experience and examples drawn from video appearance distributions. The controlled comparisons support combining them instead of assuming temporal training must replace spatial training.

#### More data helps, but selection also matters

The quantity study varies the amount of SA-V used after image pretraining. The authors describe a consistent power-law relationship between training-data quantity and segmentation accuracy across the evaluated benchmarks. This establishes a useful empirical trend, although the article does not turn it into an unsupported numerical extrapolation.

The quality study compares 50k randomly chosen manual masklets with 50k selected for frequent editing. The difficulty-focused subset performs better than the random subset. Selection therefore changes the value of a fixed annotation budget.

The selected subset uses 25% of the manual data considered in that ablation, but it still does not match training on all 190k masklets. Difficulty targeting helps concentrate useful examples; it does not establish that easy or less-edited examples are dispensable.

Editing frequency also has a specific meaning. It captures where the current assistance system required more intervention. A new architecture or interface could produce a different ordering. The finding supports using workflow records as an empirical selection signal, while leaving their transferability to other systems open.

The phase-by-phase data study gives a related result. Holding training iterations fixed, adding the successive collections improves both SA-V validation and the zero-shot video average. This suggests that the iterative data engine supplies useful material beyond merely making annotation faster.

#### Spatial capacity and temporal capacity affect different tasks

The architecture ablations typically operate at reduced resolution and with a smaller training setup. Higher input resolution improves both image and video results, motivating the final 1024² spatial setting.

Longer training sequences improve video segmentation. The main procedure uses 8 frames as a balance between computational cost and temporal learning, followed by the longer-sequence stage described earlier. This is a practical compromise rather than evidence that short clips completely represent long-video behavior.

Increasing image-encoder capacity improves both image and video metrics. Increasing memory-attention capacity primarily benefits video. That separation is consistent with the architecture: image encoding supports every prediction, while memory attention contributes temporal conditioning.

The authors characterize image and video design choices as largely separable within their experiments. This is useful for engineering because it suggests that temporal capacity can be adjusted without assuming an identical effect on still-image performance. It does not imply complete independence under every training regime.

#### Memory can remain relatively simple

Increasing the number of stored recent frames generally helps, though the results contain variation. The default retains 6 past frames to balance context and cost. More history is beneficial within limits, but it is not free.

Reducing memory channels causes little performance regression in the reported comparison and makes storage 4× smaller. This supports compressing stored representations instead of keeping the full dimensionality of the image features everywhere.

The authors also test recurrent processing of memory features with a GRU, associated with the earlier [RNN encoder–decoder work](https://md.research.elamur.ai/free/en/papers/cho-2014-learning-phrase-representations-rnn-encoder/). Adding recurrence before storage does not improve the broad set of results, apart from a small benefit on the long-video benchmark.

The chosen design therefore stores memory features directly. This is a meaningful negative result: adding another temporal mechanism does not automatically improve an architecture that already retrieves temporal information through attention.

Object pointers show a more selective benefit. They do not improve the average over the 9 zero-shot datasets, but they help SA-V validation and the challenging LVOSv2 validation setting. Their inclusion is justified by those harder conditions rather than by uniform gains everywhere.

#### Positional encoding involves accuracy and implementation

The image encoder removes relative positional biases while retaining absolute positional information. The authors report no regression on SA-23 and only a small regression on video benchmarks, alongside a substantial speed benefit at high resolution.

The removal also permits use of the efficient attention implementation. This makes positional encoding an execution decision as well as a representational one: an apparently local architectural component can determine which kernels are available.

Within memory attention, spatial rotary encoding is beneficial. At the higher resolution, the reported speed gap relative to omitting rotary encoding becomes 4%. The final design accepts that cost for its measured performance value.

These experiments do not establish a universal best positional scheme. They support a particular combination within SAM 2’s encoder, attention structure, training procedure, and execution environment. Their reusable value lies in measuring the full accuracy-and-throughput consequence of each component.

### Limitations

#### Failures the authors explicitly describe

The authors identify shot changes as a failure case. A cut can remove the visual continuity on which temporal matching depends. The system may also confuse targets in crowds, lose them after extended occlusion, or fail during long sequences.

Similar-looking nearby objects are another difficulty. When several targets share almost identical appearance, retaining a representation of appearance may not determine which physical instance is the intended one. The paper suggests more explicit motion modeling as a possible improvement, instead of claiming that its memory already solves this problem.

Thin structures and fine details remain challenging, especially during fast motion. A system can maintain the general target while losing precisely the spatial detail that matters for editing or measurement. Strong average region and boundary scores do not eliminate such localized failures.

The ability to correct any frame mitigates these problems without preventing them. The intended workflow permits recovery when tracking goes wrong. That is an important practical capability, but it leaves a distinction between uninterrupted autonomous tracking and tracking maintained through occasional human intervention.

The authors also state that multiple targets are processed independently after sharing frame features. There is no explicit inter-object exchange of contextual information. This may limit efficiency and leaves relationships among targets unavailable to the current design.

Finally, the annotation engine still depends on people to verify tracks and identify frames needing repair. The authors propose automating more of that work as a future direction. The current efficiency result should therefore be understood as improved human-assisted annotation, not removal of human quality control.

#### Boundaries visible in the evaluation setup

A careful reading distinguishes simulated interaction from measured human behavior. The simulator has reference masks, uses them to find error regions, and places clicks accordingly. In offline evaluation, it can identify the weakest frame directly. A person must discover that frame through inspection.

The estimated annotation-time expressions assign fixed costs to locating a target, clicking, and examining a sequence. They do not measure the full variation in individual users, interface latency, hesitation, or task complexity. The separate controlled annotation experiment provides direct timing evidence, but the simulated benchmark’s time axis remains assumption-based.

The cost estimate also does not add tracker execution time independently. The authors assume that examination is slow enough to cover that computation. This assumption may be reasonable under their intended setting, but it need not hold for another hardware configuration or interaction pattern.

Reported speed depends on the benchmark environment. The image and video measurements use different batch sizes, and the image encoders are compiled. A throughput figure is therefore not an unconditional prediction of application latency, especially when several objects require separate downstream processing.

The broad zero-shot evaluation also contains a stated exception. OVIS is not strictly unseen for the relevant SAM 2 configuration because its videos occur within MOSE training data. That caveat does not invalidate the remaining evaluations, but it prevents treating every dataset in the suite as an identical transfer test.

#### Dataset coverage and reproducibility

SA-V’s size and geographic spread do not establish comprehensive representation. The dataset card acknowledges unequal coverage across geographic and demographic groups. The fairness analysis is narrower still, concentrating on person segmentation under particular prompts and demographic comparisons.

Annotation remains fallible. Manual tracks can contain missed corrections, and accepted automatic tracks can preserve system errors. Independent verification is a quality-control measure, not a proof that every mask is correct.

Target selection is also subjective. Choosing which visually bounded part to follow is a human judgment, and the annotation policy emphasizes difficult targets for the current system. This makes the dataset useful for the intended task while shaping the distribution on which success is measured.

The public dataset and the full training resources are not identical. Licensed internal videos contribute to the reported training configurations. Access to SA-V and released checkpoints does not on its own provide every example needed to reconstruct the complete training process from scratch.

#### What segmentation success does not establish

SAM 2 predicts target regions and their temporal continuation. SA-V masklets do not carry object categories or associated text. Accurate masks therefore do not by themselves demonstrate naming, language understanding, causal explanation, or general scene comprehension.

Ambiguous prompts further limit what a single accuracy score means. A part mask can be visually valid while disagreeing with a benchmark’s whole-object reference. Multiple candidate masks acknowledge this ambiguity, but selecting a candidate by estimated IoU does not guarantee agreement with the user’s unexpressed intention.

The paper supports a general and repairable segmentation interface across varied evaluations. It does not establish that every visually meaningful target can be followed reliably, that every failure can be fixed by the same amount of interaction, or that the method’s benefits automatically transfer to a language system such as Mova.

### What came after

#### A citation trail across visual research

The later citation record spans video generation, image editing, visual question answering, and reasoning segmentation. It establishes that SAM 2 became relevant to several neighboring research directions. The listed titles identify those directions, but citation alone does not specify whether a work used its masks, its released weights, its dataset, or its architectural ideas.

This distinction matters when tracing influence. A segmentation system can serve as infrastructure inside another experiment without becoming that experiment’s central method. Equally, a later paper may discuss SAM 2 as related work without directly running it. Specific claims about those roles require evidence beyond the fact of citation.

[Wan](https://md.research.elamur.ai/free/en/papers/wan-2025-wan-open-advanced-large-scale/) concerns large-scale video generation. Its citation places SAM 2 in the surrounding discussion of systems operating on video. The available citation information does not establish a particular segmentation stage inside Wan, a training dependency, or a result attributable to SAM 2.

The [survey of resource-efficient systems](https://md.research.elamur.ai/free/en/papers/xu-2024-survey-resource-efficient-llm-multimodal/) provides another kind of connection: synthesis across language and multimodal research. SAM 2’s own balance of reusable image computation, compact memory, and throughput makes efficiency a relevant point of comparison. The citation record does not identify which of those aspects the survey emphasizes.

#### Image editing and interactive environments

[Step1X-Edit](https://md.research.elamur.ai/free/en/papers/liu-2025-step1x-edit-practical-framework/) addresses general image editing. This places it near an application area in which selecting a region can matter, but the listed information does not specify how it incorporates SAM 2. It would be too strong to infer a particular masking pipeline from the citation.

[I2E](https://md.research.elamur.ai/free/en/papers/yu-2026-i2e-image-pixels-actionable-interactive/) concerns interactive environments derived from image pixels for text-guided editing. Its subject connects visual input, interaction, and editing actions. SAM 2 demonstrates an interactive visual selection mechanism, yet the citation alone does not establish that I2E adopts its memory architecture or correction procedure.

The work on [multi-subject in-context image generation](https://md.research.elamur.ai/free/en/papers/zhou-2026-multimodal-large-language-models-multi/) investigates another neighboring problem: handling multiple subjects in generation. Its inclusion shows that SAM 2 is cited beyond segmentation benchmarks. It does not demonstrate that the independent-target design in SAM 2 is reused or that a shared multi-object mechanism was added.

#### Language, counting, and visual evaluation

[Pixels Versus Priors](https://md.research.elamur.ai/free/en/papers/golovanevsky-2025-pixels-versus-priors-controlling-knowledge/) studies knowledge priors through visual counterfacts. Its focus differs from tracking a prompted region: it concerns how visual evidence interacts with prior knowledge. The citation identifies a relationship in the research literature without establishing which SAM 2 component supports that investigation.

[CountQA](https://md.research.elamur.ai/free/en/papers/tamarapalli-2025-countqa-well-mllms-count-wild/) examines counting in unconstrained visual settings, while [RotBench](https://md.research.elamur.ai/free/en/papers/niu-2026-rotbench-evaluating-multi-modal-large/) evaluates identification of image rotation. These are separate visual evaluation problems. Their citations should not be read as evidence that accurate segmentation necessarily produces accurate counting or rotation judgments.

[MSVBench](https://md.research.elamur.ai/free/en/papers/shi-2026-msvbench-human-level-evaluation-multi/) concerns evaluation of multi-shot video generation. This is especially distinct from uninterrupted target propagation: SAM 2 itself names shot changes as a difficult condition. The later title identifies a broader video-evaluation setting, but supplies no basis for claiming that SAM 2 solves correspondence across shots within it.

#### Reasoning segmentation and robustness

[AnchorSeg](https://md.research.elamur.ai/free/en/papers/qian-2026-anchorseg-language-grounded-query-banks/) focuses on language-grounded query banks for reasoning segmentation. This moves towards target specification through language and reasoning, whereas SAM 2’s evaluated prompts are spatial inputs such as clicks, boxes, and masks. The citation suggests a relevant segmentation foundation, but does not establish the exact interface between the approaches.

[SPARTA](https://md.research.elamur.ai/free/en/papers/zinkovich-2026-sparta-evaluating-reasoning-segmentation-robustness/) investigates reasoning-segmentation robustness under adversarial paraphrasing. Its stated concern is how changes in language affect segmentation behavior. That is a different source of ambiguity from a click that can identify either an object or a part, although both make target specification central to evaluation.

These later works document the breadth of the citation trail more clearly than they document any single technical inheritance. SAM 2’s demonstrated contribution remains specific: combining prompt interpretation, temporal memory, repairable propagation, and a large annotation effort into a common image-and-video segmentation system. The later titles show where that contribution entered subsequent discussion, while leaving their precise implementations and results to the individual works.

## Cite

Cite as Nikhila Ravi, Valentin Gabeur, Yuan-Ting Hu, Ronghang Hu, Chaitanya K. Ryali, Tengyu Ma, Haitham Khedr, Roman Rädle, Chloe Rolland, Laura Gustafson, Eric Mintun, Junting Pan, Kalyan Vasudev Alwala, Nicolas Carion, Chao-Yuan Wu, Ross Girshick, Piotr Dollár and Christoph Feichtenhofer. 2024. SAM 2: Segment Anything in Images and Videos. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2408.00714](https://doi.org/10.48550/arxiv.2408.00714) · [arXiv 2408.00714](https://arxiv.org/abs/2408.00714)

```bibtex
@misc{ravi2024sam,
  title = {{SAM 2: Segment Anything in Images and Videos}},
  author = {Nikhila Ravi, Valentin Gabeur, Yuan-Ting Hu, Ronghang Hu, Chaitanya K. Ryali, Tengyu Ma, Haitham Khedr, Roman Rädle, Chloe Rolland, Laura Gustafson, Eric Mintun, Junting Pan, Kalyan Vasudev Alwala, Nicolas Carion, Chao-Yuan Wu, Ross Girshick, Piotr Dollár and Christoph Feichtenhofer},
  year = {2024},
  doi = {10.48550/arxiv.2408.00714},
  eprint = {2408.00714},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2408.00714}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
