Papers › MDETR -- Modulated Detection for End-to-End Multi-Modal Understanding

MDETR -- Modulated Detection for End-to-End Multi-Modal Understanding

26 Apr 2021arXiv:2104.12763archive 2025-07-28

Aishwarya Kamath, Mannat Singh, Yann Lecun, Gabriel Synnaeve, Ishan Misra, Nicolas Carion

Multi-modal reasoning systems rely on a pre-trained object detector to extract regions of interest from the image. However, this crucial module is typically used as a black box, trained independently of the downstream task and on a fixed vocabulary of objects and attributes. This makes it challenging for such systems to capture the long tail of visual concepts expressed in free form text. In this paper we propose MDETR, an end-to-end modulated detector that detects objects in an image conditioned on a raw text query, like a caption or a question. We use a transformer-based architecture to reason jointly over text and image by fusing the two modalities at an early stage of the model. We pre-train the network on 1.3M text-image pairs, mined from pre-existing multi-modal datasets having explicit alignment between phrases in text and objects in the image. We then fine-tune on several downstream tasks such as phrase grounding, referring expression comprehension and segmentation, achieving state-of-the-art results on popular benchmarks. We also investigate the utility of our model as an object detector on a given label set when fine-tuned in a few-shot setting. We show that our pre-training approach provides a way to handle the long tail of object categories which have very few labelled instances. Our approach can be easily extended for visual question answering, achieving competitive performance on GQA and CLEVR. The code and models are available at https://github.com/ashkamath/mdetr.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (ashkamath/mdetr) is linked to this paper; the 11 samples below come from 3 community repositories. Syntology harvested code from ashkamath/mdetr for another paper.

ashkamath/mdetr: Syntology's graph links these samples to Disambiguating Reference in Visually Grounded Dialogues through Joint Modeling of... (arXiv:2505.11726; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 1 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method.

Syntology 11 code samples harvested from 3 repositories linked to this paper: 7 ran (of which 4 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 1 violated, 5 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 11 samples from 3 repositories, 7 ran (6 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 7 samples that ran has no recorded date.

ashkamath/mdetr officialmentioned in papermentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Disambiguating Reference in Visually Grounded Dialogues through Joint Modeling of... (arXiv:2505.11726; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 1 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. report
AleDella/mdter_eval mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
b-faye/lightmdetr mentioned on GitHubpytorchApache-2.0Syntology: 7 samples, 3 ran (1 instrument-failed) · 4 unverified report
facebookresearch/multimodal mentioned on GitHubpytorchSyntology: 3 samples, 3 ran (0 instrument-failed) · 0 unverified report
thunlp/pevl mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to PEVL: Position-enhanced Pre-training and Prompt Tuning for Vision-language Models (arXiv:2205.11169; that paper's own run record: 5 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

11 samples harvested: 7 ran (of which 4 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 1 violated, 5 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · violated contract
1ran · our draft was wrong
5ran
4unverified

Licence: 0 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

AleDella/mdter_eval community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
MDETR models/mdetr.py ran Apache-2.0 (permissive) · 237c7b6df0869f30 · report fixture: returned MDETR · level recorded 2026-09-22
b-faye/lightmdetr community (archive-listed) 7 samples, 3 ran (1 instrument-failed) · 4 unverified
build_position_encoding in 42 papers models/position_encoding.py ran Apache-2.0 (permissive) · cea3f92defccfb9c · report fixture: signature args:Args/0/? · returned PositionEmbeddingSine · level recorded 2026-09-25
dice_loss in 193 papers
census: 10 implementations from 16 papers, 7 distinct outputs across 4 buckets, one shared input per bucket this sample: bucket 1 of 4, arg 1: rank 2, kind float, dtype float32 · arg 2: rank 2, kind float, dtype float32
models/segmentation.py ran · violated contract fingerprinted Apache-2.0 (permissive) · ac8fe530cdad4d8c · report fixture: signature inputs:Tensor/2/float, targets:Tensor/2/float, num_boxes:int/0/int · returned Tensor · level recorded 2026-09-22
sigmoid_focal_loss in 122 papers
census: 3 implementations from 9 papers, 2 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 2, kind float, dtype float32 · arg 2: rank 2, kind float, dtype float32
models/segmentation.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 5c0711aada67957e · report fixture: signature inputs:Tensor/2/float, targets:Tensor/2/float, num_boxes:int/0/int, alpha:float/0/float, gamma:float/0/float · returned Tensor · level recorded, date not recorded
build_transformer in 62 papers models/transformer.py unverified Apache-2.0 (permissive) · 09e538653a528ac8 · report
build_transformer in 62 papers models/transformer_plus.py unverified Apache-2.0 (permissive) · 751cd5726698116b · report
get_init_file in 6 papers run_with_submitit.py unverified Apache-2.0 (permissive) · d71abefc7fbfd28f · report
get_shared_folder in 6 papers run_with_submitit.py unverified Apache-2.0 (permissive) · 84691ff17ae1504d · report
facebookresearch/multimodal community (archive-listed) 3 samples, 3 ran (0 instrument-failed) · 0 unverified
MDETR torchmultimodal/models/mdetr/model.py ran BSD-3-Clause (permissive) · 609d6e843c9168d9 · report fixture: returned MDETR · level recorded 2026-09-22
MDETRModelOutput torchmultimodal/models/mdetr/model.py ran BSD-3-Clause (permissive) · fb58fa6bb659e502 · report fixture: returned MDETRModelOutput · level recorded 2026-09-22
MDETRTransformerOutput torchmultimodal/models/mdetr/model.py ran BSD-3-Clause (permissive) · 5da926b2f714f541 · report fixture: returned MDETRTransformerOutput · level recorded 2026-09-22

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

2 assemblies on this paper: 2 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

2 sibling assemblies for MDETR (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for MDETR (graph method: MDETR). 3 bricks; individually on a fixture: 3 ran (of which 3 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; every one of the 3 samples that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.

one of 2 siblings

  1. MDETR entry · level 1 · ran · 609d6e843c9168d9
  2. MDETRModelOutput helper · level 1 · ran · fb58fa6bb659e502
  3. MDETRTransformerOutput helper · level 1 · ran · 5da926b2f714f541

harvested Assembly for MDETR (graph method: MDETR). 3 bricks; individually on a fixture: 2 ran (of which 2 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified; every one of the 2 samples that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.

one of 2 siblings

  1. MDETR entry · level 1 · ran · 237c7b6df0869f30
  2. MLP helper · level 1 · ran · d71ab24dd4408288
  3. NestedTensor helper · level 0 · unverified · c2fbce65b2ac327b

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2104.12763") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Generalized Referring Expression ComprehensionPhrase GroundingQuestion AnsweringReferring ExpressionReferring Expression ComprehensionReferring Expression SegmentationReferring Image Matting (Expression-based)Referring Image Matting (Keyword-based)Referring Image Matting (RefMatte-RW100)Visual GroundingVisual Question AnsweringVisual Question Answering (VQA)

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Generalized Referring Expression Comprehension gRefCOCO MDETR N-acc. 36.1 #3 of 5 Archive leaderboard report
Generalized Referring Expression Comprehension gRefCOCO MDETR Precision@(F1=1, IoU≥0.5) 41.5 #3 of 5 Archive leaderboard report
Phrase Grounding Flickr30k Entities Test MDETR-ENB5 R@1 84.3 #5 of 18 Archive leaderboard report
Phrase Grounding Flickr30k Entities Test MDETR-ENB5 R@10 95.8 #5 of 18 Archive leaderboard report
Phrase Grounding Flickr30k Entities Test MDETR-ENB5 R@5 93.9 #5 of 18 Archive leaderboard report
Referring Expression Segmentation PhraseCut MDETR ENB3 Mean IoU 53.7 #3 of 6 Archive leaderboard report
Referring Expression Segmentation PhraseCut MDETR ENB3 Pr@0.5 57.5 #3 of 6 Archive leaderboard report
Referring Expression Segmentation PhraseCut MDETR ENB3 Pr@0.7 39.9 #3 of 6 Archive leaderboard report
Referring Expression Segmentation PhraseCut MDETR ENB3 Pr@0.9 11.9 #3 of 6 Archive leaderboard report
Referring Image Matting (Expression-based) RefMatte MDETR (ResNet-101) MAD 0.0482 #4 of 4 Archive leaderboard report
Referring Image Matting (Expression-based) RefMatte MDETR (ResNet-101) MAD(E) 0.0515 #4 of 4 Archive leaderboard report
Referring Image Matting (Expression-based) RefMatte MDETR (ResNet-101) MSE 0.0434 #4 of 4 Archive leaderboard report
Referring Image Matting (Expression-based) RefMatte MDETR (ResNet-101) MSE(E) 0.0463 #4 of 4 Archive leaderboard report
Referring Image Matting (Expression-based) RefMatte MDETR (ResNet-101) SAD 84.70 #4 of 4 Archive leaderboard report
Referring Image Matting (Expression-based) RefMatte MDETR (ResNet-101) SAD(E) 90.45 #4 of 4 Archive leaderboard report
Referring Image Matting (Keyword-based) RefMatte MDETR (ResNet-101) MAD 0.0183 #4 of 4 Archive leaderboard report
Referring Image Matting (Keyword-based) RefMatte MDETR (ResNet-101) MAD(E) 0.0190 #4 of 4 Archive leaderboard report
Referring Image Matting (Keyword-based) RefMatte MDETR (ResNet-101) MSE 0.0137 #4 of 4 Archive leaderboard report
Referring Image Matting (Keyword-based) RefMatte MDETR (ResNet-101) MSE(E) 0.0141 #4 of 4 Archive leaderboard report
Referring Image Matting (Keyword-based) RefMatte MDETR (ResNet-101) SAD 32.27 #4 of 4 Archive leaderboard report
Referring Image Matting (Keyword-based) RefMatte MDETR (ResNet-101) SAD(E) 33.52 #4 of 4 Archive leaderboard report
Referring Image Matting (RefMatte-RW100) RefMatte MDETR (ResNet-101) MAD 0.0751 #3 of 4 Archive leaderboard report
Referring Image Matting (RefMatte-RW100) RefMatte MDETR (ResNet-101) MAD(E) 0.0779 #3 of 4 Archive leaderboard report
Referring Image Matting (RefMatte-RW100) RefMatte MDETR (ResNet-101) MSE 0.0675 #3 of 4 Archive leaderboard report
Referring Image Matting (RefMatte-RW100) RefMatte MDETR (ResNet-101) MSE(E) 0.0700 #3 of 4 Archive leaderboard report
Referring Image Matting (RefMatte-RW100) RefMatte MDETR (ResNet-101) SAD 131.58 #3 of 4 Archive leaderboard report
Referring Image Matting (RefMatte-RW100) RefMatte MDETR (ResNet-101) SAD(E) 136.59 #3 of 4 Archive leaderboard report
Visual Question Answering (VQA) CLEVR MDETR Accuracy 99.7 #2 of 15 Archive leaderboard report
Visual Question Answering (VQA) CLEVR-Humans MDETR Accuracy 81.7 #1 of 5 Archive leaderboard report
Visual Question Answering (VQA) GQA test-std MDETR-ENB5 Accuracy 62.45 #3 of 7 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: MDETR

Absolute Position EncodingsAdamAttentionAttention DropoutBERTBPEConvolutionDense ConnectionsDetrDropoutFeedforward NetworkInfoNCELabel SmoothingLayer NormalizationLinear LayerLinear Warmup With Linear DecayMDETRMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionRoBERTaSoftmaxTransformerWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections