SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.12827 · CVPR · 2022

Sparse Instance Activation for Real-Time Instance Segmentation

Qian Zhang, Wenyu Liu, Xinggang Wang, Zhaoxiang Zhang, Shaoyu Chen, Tianheng Cheng, Chang Huang, Wenqiang Zhang

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2203.12827.json · badge: /api/ran/2203.12827.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
hustvl/sparseinst canonical (classifier label)
classifier basis not recorded on the link
11 ran · 0 no recorded run
FunctionStatusWhere it lives
aligned_bilinear Ran
ran; our contract draft was wrong, not the code
hustvl/sparseinst/sparseinst/utils.py
code served (permissive licence) · get_code("29dbbaafa4be18e1")
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 Tensor, ndim 4, dtype family float, shape (2, 3, 8, 10) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 torch.nn.functional as F

torch.manual_seed(0)

# Create a 4D tensor with shape (batch, channels, height, width)
# Using distinct sizes: batch=2, channels=3, height=4, width=5
tensor = torch.randn(2, 3, 4, 5)

# Factor must be >= 1 and an integer
factor = 2

ARGS = {
    "tensor": tensor,
    "factor": factor,
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 8, 10) — shape (2, 3, 8, 10) as a later run recorded it
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
compute_mask_iou Ran
ran on a synthesized input
hustvl/sparseinst/sparseinst/loss.py
code served (permissive licence) · get_code("fa8b5ab70cd01b52")
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 Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 torch.nn as nn

torch.manual_seed(0)

# Create small test tensors
# inputs: raw model outputs (before sigmoid), shape (batch=2, spatial_dims=4)
inputs = torch.randn(2, 4)

# targets: ground truth masks, shape (batch=2, spatial_dims=4)
targets = torch.randn(2, 4)

ARGS = {
    "inputs": inputs,
    "targets": targets,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
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
create_stem Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hustvl/sparseinst/sparseinst/backbones/cspnet.py
code served (permissive licence) · get_code("9419c6922822ae68")
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
import torch.nn as nn
from timm.models.layers import create_conv2d, create_act_layer

torch.manual_seed(0)

# Define a minimal aa_layer (anti-aliasing layer) that accepts channels and stride
class MinimalAALayer(nn.Module):
    def __init__(self, channels, stride=2):
        super().__init__()
        self.channels = channels
        self.stride = stride
    
    def forward(self, x):
        return x

# Define minimal norm and act layers if needed
norm_layer = nn.BatchNorm2d
act_layer = nn.ReLU
aa_layer = MinimalAALayer

ARGS = {
    'in_chans': 3,
    'out_chs': [32, 64],
    'kernel_size': 3,
    'stride': 2,
    'pool': 'max',
    'act_layer': act_layer,
    'norm_layer': norm_layer,
    'aa_layer': aa_layer,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, 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
dice_loss Ran
ran on a synthesized input
hustvl/sparseinst/sparseinst/loss.py
code served (permissive licence) · get_code("2bd30703b07443b2")
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 Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 small tensors for inputs and targets
# inputs will be passed through sigmoid, so raw values should be reasonable
# targets should be binary (0 or 1) for dice loss
batch_size = 2
num_features = 4

inputs = torch.randn(batch_size, num_features)
targets = torch.randint(0, 2, (batch_size, num_features)).float()

ARGS = {
    'inputs': inputs,
    'targets': targets,
    'reduction': 'sum'
}
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 Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
dice_score Ran
ran on a synthesized input
hustvl/sparseinst/sparseinst/loss.py
code served (permissive licence) · get_code("a08c2d41f637733e")
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 Tensor, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 small tensor arguments for dice_score
# inputs: shape (batch_size, feature_dim) - will be sigmoid'd in function
# targets: shape (batch_size, feature_dim) - for comparison

batch_size = 2
feature_dim = 4

inputs = torch.randn(batch_size, feature_dim)
targets = torch.randn(batch_size, feature_dim)

ARGS = {
    "inputs": inputs,
    "targets": targets,
}
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 Tensor, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
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
downsample_avg Ran
ran; our contract draft was wrong, not the code
hustvl/sparseinst/sparseinst/backbones/resnet.py
code served (permissive licence) · get_code("bf7559951d6574a4")
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 Sequential. 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
import torch.nn as nn
from timm.models.layers import AvgPool2dSame

torch.manual_seed(0)

ARGS = {
    'in_channels': 3,
    'out_channels': 64,
    'kernel_size': 3,
    'stride': 2,
    'dilation': 1,
    'first_dilation': None,
    'norm_layer': nn.BatchNorm2d,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not 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
downsample_conv Ran
ran; our contract draft was wrong, not the code
hustvl/sparseinst/sparseinst/backbones/resnet.py
code served (permissive licence) · get_code("eea0376ea397a1c7")
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 Sequential. 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
import torch.nn as nn

torch.manual_seed(0)

# Define ARGS dict with all parameters for downsample_conv
ARGS = {
    'in_channels': 3,
    'out_channels': 64,
    'kernel_size': 3,
    'stride': 2,
    'dilation': 1,
    'first_dilation': None,
    'norm_layer': nn.BatchNorm2d
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not 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
get_padding Ran
ran, honoured the contract we drafted
hustvl/sparseinst/sparseinst/backbones/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from xslidi/EfficientNets_ddl_apex, is pointer only (licence: NONE) · get_code("9b02c1068795fd5b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xslidi/EfficientNets_ddl_apex, 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.

nested_masks_from_list Ran
ran; our contract draft was wrong, not the code
hustvl/sparseinst/sparseinst/utils.py
code served (permissive licence) · get_code("fc67f83665c787db")
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 NestedTensor. 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
from typing import List, Optional

torch.manual_seed(0)

# Create a list of 3D tensors with distinct sizes
# Each tensor has shape (channels, height, width)
tensor1 = torch.randn(2, 4, 5)  # 2 channels, 4 height, 5 width
tensor2 = torch.randn(3, 6, 7)  # 3 channels, 6 height, 7 width

tensor_list = [tensor1, tensor2]

# input_shape is optional, set to None to let the function compute max_size
input_shape = None

ARGS = {
    "tensor_list": tensor_list,
    "input_shape": input_shape,
}
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 NestedTensor — a NestedTensor output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NestedTensor output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
nested_tensor_from_tensor_list Ran
ran; our contract draft was wrong, not the code
hustvl/sparseinst/sparseinst/utils.py
code served (permissive licence) · get_code("764b0c92414d2fed")
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 NestedTensor. 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
from typing import List

torch.manual_seed(0)

# Create a list of 3D tensors with different shapes
# Each tensor has shape (C, H, W) where C=channels, H=height, W=width
tensor_list = [
    torch.randn(3, 4, 5),  # 3 channels, 4 height, 5 width
    torch.randn(3, 6, 7),  # 3 channels, 6 height, 7 width
    torch.randn(3, 5, 6),  # 3 channels, 5 height, 6 width
]

ARGS = {
    "tensor_list": tensor_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NestedTensor — a NestedTensor output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NestedTensor output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
rescoring_mask Ran
ran on a synthesized input
hustvl/sparseinst/sparseinst/sparseinst.py
code served (permissive licence) · get_code("41822f58ea4816aa")
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 Tensor, 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

torch.manual_seed(0)

# Analyze the function:
# - scores: shape used in multiplication with a computed factor, should be 1D (batch size)
# - mask_pred: float() called on it, .sum([1, 2]) called, so shape (batch, height, width)
# - masks: .sum([1, 2]) called and element-wise mult with mask_pred_, so shape (batch, height, width)

batch_size = 2
height = 4
width = 3

scores = torch.randn(batch_size)
mask_pred = torch.randn(batch_size, height, width)
masks = torch.randn(batch_size, height, width)

ARGS = {
    "scores": scores,
    "mask_pred": mask_pred,
    "masks": masks,
}
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 Tensor, ndim 1, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 7 later) and 4 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
nested_tensor_from_tensor_list 55 other papers
10 dated earlier, 3 the same month, 42 later · 17 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2101.01909 (2021-01)
Line Segment Detection Using Transformers without Edges
and 52 more not named here
aligned_bilinear 17 other papers
1 dated earlier, 16 later · 1 only as an assembly brick
2201.00487 (2022-01)
Language as Queries for Referring Video Object Segmentation
2206.03789 (2022-06)
Language-Bridged Spatial-Temporal Interaction for Referring Video Object Segmentation
2207.14012 (2022-07)
Video Mask Transfiner for High-Quality Video Instance Segmentation
and 14 more not named here
get_padding 10 other papers
2 dated earlier, 8 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
2110.07641 (2021-10)
Non-deep Networks
2205.13490 (2022-05)
SemAffiNet: Semantic-Affine Transformation for Point Cloud Segmentation
and 7 more not named here
downsample_conv 7 other papers
1 dated earlier, 6 later
2110.07641 (2021-10)
Non-deep Networks
2205.13490 (2022-05)
SemAffiNet: Semantic-Affine Transformation for Point Cloud Segmentation
2208.10169 (2022-08)
Multi-Granularity Distillation Scheme Towards Lightweight Semi-Supervised Semantic Segmentation
and 4 more not named here
downsample_avg 6 other papers
1 dated earlier, 5 later
2110.07641 (2021-10)
Non-deep Networks
2205.13490 (2022-05)
SemAffiNet: Semantic-Affine Transformation for Point Cloud Segmentation
2208.10169 (2022-08)
Multi-Granularity Distillation Scheme Towards Lightweight Semi-Supervised Semantic Segmentation
and 3 more not named here
create_stem 2 other papers
2 later
2212.04129 (2022-12)
Deep Incubation: Training Large Models by Divide-and-Conquering
nested_masks_from_list 1 other paper
1 later
2308.04583 (2023-08)
LATR: 3D Lane Detection from Monocular Images with Transformer

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-22.

Repositories linked to this paper

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

Abstract

In this paper, we propose a conceptually novel, efficient, and fully convolutional framework for real-time instance segmentation. Previously, most instance segmentation methods heavily rely on object detection and perform mask prediction based on bounding boxes or dense centers. In contrast, we propose a sparse set of instance activation maps, as a new object representation, to highlight informative regions for each foreground object. Then instance-level features are obtained by aggregating features according to the highlighted regions for recognition and segmentation. Moreover, based on bipartite matching, the instance activation maps can predict objects in a one-to-one style, thus avoiding non-maximum suppression (NMS) in post-processing. Owing to the simple yet effective designs with instance activation maps, SparseInst has extremely fast inference speed and achieves 40 FPS and 37.9 AP on the COCO benchmark, which significantly outperforms the counterparts in terms of speed and accuracy. Code and models are available at https://github. com/hustvl/SparseInst.

For agents

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

get_harvested_code_for_paper("2203.12827")
get_code_for_paper("2203.12827")
have("2203.12827")

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

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

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

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

Connect an agent — have() is free.