SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.11978 · 2020

The Devil is in Classification: A Simple Framework for Long-tail Object Detection and Instance Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 2 have no contract verdict; 0 failures of our instrument; 1 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/2007.11978.json · badge: /api/ran/2007.11978.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
twangnh/SimCal canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
FunctionStatusWhere it lives
shot_acc Ran
ran on a synthesized input
twangnh/SimCal/cls_head_models/utils.py
code served (permissive licence) · get_code("b3ba3d62736c2db6")
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 numpy as np
import pickle
import tempfile
import os

# Create temporary pickle files that the function expects
temp_dir = tempfile.gettempdir()
original_dir = os.getcwd()
os.chdir(temp_dir)

# Create mock train_info and val_info pickle files
# Each should be a list of dicts with 'id' and 'instance_count' keys
train_info = [
    {'id': 0, 'instance_count': 10000},
    {'id': 1, 'instance_count': 1500},
    {'id': 2, 'instance_count': 500},
    {'id': 3, 'instance_count': 50},
]

val_info = [
    {'id': 0, 'instance_count': 100},
    {'id': 1, 'instance_count': 150},
    {'id': 2, 'instance_count': 50},
    {'id': 3, 'instance_count': 5},
]

with open('./lvis_train_cats_info.pt', 'wb') as f:
    pickle.dump(train_info, f)

with open('./lvis_val_cats_info.pt', 'wb') as f:
    pickle.dump(val_info, f)

# Create small test tensors
torch.manual_seed(0)

# Create predictions and labels
# preds shape: (8,) - 8 predictions
# labels shape: (8,) - 8 labels
preds = torch.tensor([0, 1, 1, 2, 2, 3, 0, 1], dtype=torch.long)
labels = torch.tensor([0, 1, 1, 2, 3, 3, 0, 1], dtype=torch.long)

ARGS = {
    'preds': preds,
    'labels': labels,
    'many_shot_thr1': 1000,
    'many_shot_thr2': 100,
    'low_shot_thr': 10,
}
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 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
source_import Ran
ran on a synthesized input
twangnh/SimCal/cls_head_models/utils.py
code served (permissive licence) · get_code("07cca9631fe4f26a")
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 module. 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 importlib
import tempfile
import os

# Create a temporary Python module file to import
temp_dir = tempfile.mkdtemp()
module_file = os.path.join(temp_dir, "test_module.py")

with open(module_file, "w") as f:
    f.write("""
def hello_world():
    return "Hello from imported module"

class TestClass:
    def __init__(self):
        self.value = 42
""")

ARGS = {
    "file_path": module_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type module — a module output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a module 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
init_weights Not yet run
unverified (harvested, no recorded run)
twangnh/SimCal/cls_head_models/utils.py
code served (permissive licence) · get_code("4826cd3596c12660")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 1 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
init_weights 5 other papers
2 dated earlier, 3 later
2001.01385 (2020-01)
Identifying and Compensating for Feature Deviation in Imbalanced Deep Learning
2004.03706 (2020-04)
Long-Tailed Recognition Using Class-Balanced Experts
2111.13998 (2021-11)
Targeted Supervised Contrastive Learning for Long-Tailed Recognition
and 2 more not named here
source_import 4 other papers
1 dated earlier, 3 later
2004.03706 (2020-04)
Long-Tailed Recognition Using Class-Balanced Experts
2111.13998 (2021-11)
Targeted Supervised Contrastive Learning for Long-Tailed Recognition
2207.13378 (2022-07)
Identifying Hard Noise in Long-Tailed Sample Distribution
and 1 more not named here

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

Most existing object instance detection and segmentation models only work well on fairly balanced benchmarks where per-category training sample numbers are comparable, such as COCO. They tend to suffer performance drop on realistic datasets that are usually long-tailed. This work aims to study and address such open challenges. Specifically, we systematically investigate performance drop of the state-of-the-art two-stage instance segmentation model Mask R-CNN on the recent long-tail LVIS dataset, and unveil that a major cause is the inaccurate classification of object proposals. Based on such an observation, we first consider various techniques for improving long-tail classification performance which indeed enhance instance segmentation results. We then propose a simple calibration framework to more effectively alleviate classification head bias with a bi-level class balanced sampling approach. Without bells and whistles, it significantly boosts the performance of instance segmentation for tail classes on the recent LVIS dataset and our sampled COCO-LT dataset. Our analysis provides useful insights for solving long-tail instance detection and segmentation problems, and the straightforward \emph{SimCal} method can serve as a simple but strong baseline. With the method we have won the 2019 LVIS challenge. Codes and models are available at https://github.com/twangnh/SimCal.

For agents

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

get_harvested_code_for_paper("2007.11978")
get_code_for_paper("2007.11978")
have("2007.11978")

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

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

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

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

Connect an agent — have() is free.