SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.07781 · ICCV · 2021

End-to-End Dense Video Captioning with Parallel Decoding

Ping Luo, Kong, Feng Zheng, Ruimao Zhang, Teng Wang, Ran Cheng, Zhichao Lu

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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; 3 failures of our instrument; 2 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/2108.07781.json · badge: /api/ran/2108.07781.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
ttengwang/pdvc canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
ttengwang/PDVC community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_avg_proposal_num Ran
ran on a synthesized input
ttengwang/pdvc/eval_utils.py
code served (permissive licence) · get_code("53e64888999b6cb7")
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 float64, ndim 0, 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 numpy as np
import json
import tempfile
import os

# Create a temporary JSON file with the expected structure
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "test_data.json")

# Create sample data matching the function's expected structure
data = {
    "results": {
        "item_1": [1, 2, 3],
        "item_2": [1, 2],
        "item_3": [1, 2, 3, 4, 5],
        "item_4": [1]
    }
}

# Write the JSON file
with open(json_path, 'w') as f:
    json.dump(data, f)

ARGS = {
    "json_path": json_path
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
decide_two_stage Ran
ran; our contract draft was wrong, not the code
ttengwang/PDVC/pdvc/pdvc.py
code served (permissive licence) · get_code("88861105cb84eccd")
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

torch.manual_seed(0)

class StandInMatcher:
    def __init__(self):
        self.cost_caption = 1.0

class StandInCriterion(nn.Module):
    def __init__(self):
        super().__init__()
        self.matcher = StandInMatcher()
        self.weight_dict = {
            'loss_length': 1.0,
            'loss_ce': 2.0,
            'loss_bbox': 3.0,
            'loss_giou': 4.0,
            'loss_other': 0.5,
        }

criterion = StandInCriterion()

dt_gt_proposals = {
    'gt_boxes': torch.randn(2, 5, 4),
    'gt_boxes_mask': torch.ones(2, 5, dtype=torch.bool),
}

dt_queries = {
    'gt_boxes': torch.randn(2, 5, 4),
    'gt_boxes_mask': torch.ones(2, 5, dtype=torch.bool),
}

ARGS = {
    'transformer_input_type': 'gt_proposals',
    'dt': dt_gt_proposals,
    'criterion': criterion,
}
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
regression_loss Ran
ran; our contract draft was wrong, not the code
ttengwang/pdvc/pdvc/criterion.py
code served (permissive licence) · get_code("65a13ac177e73bcd")
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
import torch.nn as nn

torch.manual_seed(0)

# Create inputs tensor: batch_size=2, with at least 1 column (accessed via inputs[:, 0])
inputs = torch.randn(2, 4)

# Create targets tensor: batch_size=2, needs multiple columns for argmax to work meaningfully
targets = torch.randn(2, 3)

# Create opt config object with regression_loss_type attribute
class OptConfig:
    def __init__(self, regression_loss_type):
        self.regression_loss_type = regression_loss_type

opt = OptConfig(regression_loss_type='l2')

# Create weight parameter
weight = torch.tensor(1.0)

ARGS = {
    'inputs': inputs,
    'targets': targets,
    'opt': opt,
    'weight': weight
}
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
reranking Ran
ran on a synthesized input
ttengwang/pdvc/eval_utils.py
code served (permissive licence) · get_code("bf97e726097b2a5f")
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 str. 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 numpy as np
import json
import tempfile
import os

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Create a sample JSON file that matches what reranking expects
sample_data = {
    'results': {
        'video_1': [
            {
                'sentence': 'person walking down street',
                'sentence_score': 0.8,
                'proposal_score': 0.7,
                'timestamp': [5, 10],
                'pred_event_count': 2
            },
            {
                'sentence': 'car driving',
                'sentence_score': 0.6,
                'proposal_score': 0.5,
                'timestamp': [15, 20],
                'pred_event_count': 2
            },
            {
                'sentence': 'dog running',
                'sentence_score': 0.7,
                'proposal_score': 0.65,
                'timestamp': [25, 30],
                'pred_event_count': 2
            }
        ],
        'video_2': [
            {
                'sentence': 'woman talking on phone',
                'sentence_score': 0.85,
                'proposal_score': 0.75,
                'timestamp': [1, 5],
                'pred_event_count': 1
            },
            {
                'sentence': 'man sitting',
                'sentence_score': 0.5,
                'proposal_score': 0.6,
                'timestamp': [10, 15],
                'pred_event_count': 1
            }
        ]
    }
}

# Write the sample data to a temporary JSON file
p_src = os.path.join(temp_dir, 'test_input.json')
with open(p_src, 'w') as f:
    json.dump(sample_data, f)

ARGS = {
    'p_src': p_src,
    'alpha': 0.5,
    'temperature': 1.5
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
sigmoid_focal_loss Ran
ran; our contract draft was wrong, not the code
ttengwang/pdvc/pdvc/criterion.py
code served (permissive licence) · get_code("5c0711aada67957e")
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) 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for inputs and targets
# inputs: predictions (logits) - shape (2, 4) for batch_size=2, num_predictions=4
inputs = torch.randn(2, 4, requires_grad=True)

# targets: binary labels - shape (2, 4) matching inputs
targets = torch.randint(0, 2, (2, 4), dtype=torch.float32)

# num_boxes: number of boxes for normalization
num_boxes = 2

# alpha and gamma are already float parameters with defaults
alpha = 0.25
gamma = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_boxes": num_boxes,
    "alpha": alpha,
    "gamma": gamma,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
PDVC Not yet run
unverified (harvested, no recorded run)
ttengwang/PDVC/pdvc/pdvc.py
code served (permissive licence) · get_code("9f7f34125123e431")
How it ran

no invocation recorded.

cross_entropy_with_gaussian_mask Not yet run
unverified (harvested, no recorded run)
ttengwang/pdvc/pdvc/criterion.py
code served (permissive licence) · get_code("594f41589a9b1b8a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 4 later) and 3 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
sigmoid_focal_loss 56 other papers
6 dated earlier, 1 the same month, 49 later · 1 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.11731 (2021-03)
Meta-DETR: Image-Level Few-Shot Object Detection with Inter-Class Correlation Exploitation
and 53 more not named here
calculate_avg_proposal_num 1 other paper
1 later
2303.06378 (2023-03)
Learning Grounded Vision-Language Representation for Versatile Understanding in Untrimmed Videos
cross_entropy_with_gaussian_mask 1 other paper
1 later
2404.07610 (2024-04)
Do You Remember? Dense Video Captioning with Cross-Modal Memory Retrieval
regression_loss 1 other paper
1 later
2404.07610 (2024-04)
Do You Remember? Dense Video Captioning with Cross-Modal Memory Retrieval

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

Dense video captioning aims to generate multiple associated captions with their temporal locations from the video. Previous methods follow a sophisticated "localizethen-describe" scheme, which heavily relies on numerous hand-crafted components. In this paper, we proposed a simple yet effective framework for end-to-end dense video captioning with parallel decoding (PDVC), by formulating the dense caption generation as a set prediction task. In practice, through stacking a newly proposed event counter on the top of a transformer decoder, the PDVC precisely segments the video into a number of event pieces under the holistic understanding of the video content, which effectively increases the coherence and readability of predicted captions. Compared with prior arts, the PDVC has several appealing advantages: (1) Without relying on heuristic non-maximum suppression or a recurrent event sequence selection network to remove redundancy, PDVC directly produces an event set with an appropriate size; (2) In contrast to adopting the two-stage scheme, we feed the enhanced representations of event queries into the localization head and caption head in parallel, making these two sub-tasks deeply interrelated and mutually promoted through the optimization; (3) Without bells and whistles, extensive experiments on ActivityNet Captions and YouCook2 show that PDVC is capable of producing high-quality captioning results, surpassing the state-of-the-art two-stage methods when its localization accuracy is on par with them. Code is available at https://github.com/ttengwang/PDVC.

For agents

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

get_harvested_code_for_paper("2108.07781")
get_code_for_paper("2108.07781")
have("2108.07781")

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

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

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

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

Connect an agent — have() is free.