SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.05302 · 2025

Perceive Anything: Recognize, Explain, Caption, and Segment Anything in Images and Videos

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2506.05302.json · badge: /api/ran/2506.05302.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
AFeng-x/Draw-and-Understand canonical (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran on a synthesized input
AFeng-x/Draw-and-Understand/accessory/eval/infer_and_save.py
code served (permissive licence) · get_code("f5b33c6a8295f129")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create sample batch items that match the structure expected by collate_fn
batch_item_1 = {
    'question': 'What is in the image?',
    'question_id': 'q001',
    'annotation': 'sample annotation 1',
    'image_path': '/path/to/image1.jpg',
    'question_raw': 'What is in the image?',
    'sparse_vp': torch.randn(2, 4),  # 2 sparse viewpoint features, dim 4
    'image': torch.randn(3, 4, 4),   # 3 channels, 4x4 spatial
}

batch_item_2 = {
    'question': 'Where is the object?',
    'question_id': 'q002',
    'annotation': 'sample annotation 2',
    'image_path': '/path/to/image2.jpg',
    'question_raw': 'Where is the object?',
    'sparse_vp': torch.randn(2, 4),  # 2 sparse viewpoint features, dim 4
    'image': torch.randn(3, 4, 4),   # 3 channels, 4x4 spatial
}

batches = [batch_item_1, batch_item_2]

ARGS = {
    'batches': batches,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_masks_from_draw Ran
ran on a synthesized input
AFeng-x/Draw-and-Understand/accessory/demos/visual_prompt_gradio.py
code served (permissive licence) · get_code("d0026e3327b2cdbe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a simple stand-in for img_input_draw
# The function expects a dict with a 'layers' key containing an iterable of array-like objects
# Each layer should be convertible to a numpy array

# Create some sample layers with different dimensions
# Layer 1: A 5x5x3 RGB image with some non-zero pixels
layer1 = np.zeros((5, 5, 3), dtype=np.uint8)
layer1[1:3, 1:3, :] = 255  # Set a 2x2 region to non-zero

# Layer 2: Another 5x5x3 RGB image with different non-zero pixels
layer2 = np.zeros((5, 5, 3), dtype=np.uint8)
layer2[2:4, 3:5, :] = 128  # Set a different 2x2 region to non-zero

# Layer 3: An empty layer (all zeros) - should be skipped
layer3 = np.zeros((5, 5, 3), dtype=np.uint8)

# Layer 4: A 4x6x3 layer with non-zero pixels (different dimensions)
layer4 = np.zeros((4, 6, 3), dtype=np.uint8)
layer4[0:2, 0:3, :] = 200

img_input_draw = {
    'layers': [layer1, layer2, layer3, layer4]
}

ARGS = {
    'img_input_draw': img_input_draw
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
probe_tokenizer_path_from_pretrained Ran
ran; our contract draft was wrong, not the code
AFeng-x/Draw-and-Understand/accessory/model/tokenizer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from siyuanhuang95/manipvqa, is pointer only (licence: NONE) · get_code("476ee9ec95271a06")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from siyuanhuang95/manipvqa, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

vp_normalize Ran
ran on a synthesized input
AFeng-x/Draw-and-Understand/accessory/eval/infer_and_save.py
code served (permissive licence) · get_code("8d4839d960333aa8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Analyze the function: vp_normalize takes 5 parameters
# - in_p: a sequence/list with either 2 or 4 elements
# - pad_x: numeric value for x padding
# - pad_y: numeric value for y padding
# - width: numeric value for width normalization
# - height: numeric value for height normalization

# Test case 1: in_p with 2 elements (point normalization)
in_p_2 = [10, 20]
pad_x = 5
pad_y = 8
width = 100
height = 200

ARGS = {
    "in_p": in_p_2,
    "pad_x": pad_x,
    "pad_y": pad_y,
    "width": width,
    "height": height
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
draw_masks Not yet run
unverified (harvested, no recorded run)
AFeng-x/Draw-and-Understand/accessory/demos/visual_prompt_gradio.py
code served (permissive licence) · get_code("7412d9bb6f8eb47f")
How it ran

no invocation recorded.

get_qa_list Not yet run
unverified (harvested, no recorded run)
AFeng-x/Draw-and-Understand/accessory/eval/infer_and_save.py
code served (permissive licence) · get_code("4ae716b03c71bf84")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
probe_tokenizer_path_from_pretrained 1 other paper
1 dated earlier
2403.11289 (2024-03)
ManipVQA: Injecting Robotic Affordance and Physically Grounded Information into Multi-Modal Large Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We present Perceive Anything Model (PAM), a conceptually straightforward and efficient framework for comprehensive region-level visual understanding in images and videos. Our approach extends the powerful segmentation model SAM 2 by integrating Large Language Models (LLMs), enabling simultaneous object segmentation with the generation of diverse, region-specific semantic outputs, including categories, label definition, functional explanations, and detailed captions. A key component, Semantic Perceiver, is introduced to efficiently transform SAM 2's rich visual features, which inherently carry general vision, localization, and semantic priors into multi-modal tokens for LLM comprehension. To support robust multi-granularity understanding, we also develop a dedicated data refinement and augmentation pipeline, yielding a high-quality dataset of 1.5M image and 0.6M video region-semantic annotations, including novel region-level streaming video caption data. PAM is designed for lightweightness and efficiency, while also demonstrates strong performance across a diverse range of region understanding tasks. It runs 1.2-2.4x faster and consumes less GPU memory than prior approaches, offering a practical solution for real-world applications. We believe that our effective approach will serve as a strong baseline for future research in region-level visual understanding.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2506.05302")
get_code_for_paper("2506.05302")
have("2506.05302")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2506.05302.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2506.05302.svg)](https://syntology.ai/paper/2506.05302)

Connect an agent — have() is free.