alt.freeweights.vision / detr-resnet-50
From: facebook <huggingface.co/facebook>Newsgroups: alt.freeweights.visionSubject:

detr-resnet-50

Date: 2026-11-14Commit: 1d5f47bSigned: 2DC28CC7B26A283B ✓

Object detection model with 42M parameters. Safetensors weights, 333 MB in all. Published by facebook under Apache-2.0.

42M params333MBdetr-resnet-50safetensorspermissive
FactsParams42MSize333 MBFormatssafetensorsTaskobject detectionLicenseApache-2.0From sourcepermissive
$ fw get facebook/detr-resnet-50
# manifest sha256 35d11e5141db… · 333 MB · 6 files
$ fw verify ./detr-resnet-50 facebook/detr-resnet-50
From sourceHosted (signed)facebook/detr-resnet-50Last check: 2026-11-14 21:36 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Overview

Size
333 MB
Weights
167 MB (safetensors)
Parameters
42M
Formats
safetensors
Task
object detection
License
Apache-2.0 (permissive)
Files
6, each with a sha256
Publisher
facebook
Added
2026-11-14
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:36 UTCpassed

Model card

From the publisher at commit 1d5f47b. Shown as plain text with links; images open at the publisher.

DETR (End-to-End Object Detection) model with ResNet-50 backbone#

DEtection TRansformer (DETR) model trained end-to-end on COCO 2017 object detection (118k annotated images). It was introduced in the paper End-to-End Object Detection with Transformers by Carion et al. and first released in this repository.

Disclaimer: The team releasing DETR did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description#

The DETR model is an encoder-decoder transformer with a convolutional backbone. Two heads are added on top of the decoder outputs in order to perform object detection: a linear layer for the class labels and a MLP (multi-layer perceptron) for the bounding boxes. The model uses so-called object queries to detect objects in an image. Each object query looks for a particular object in the image. For COCO, the number of object queries is set to 100.

The model is trained using a "bipartite matching loss": one compares the predicted classes + bounding boxes of each of the N = 100 object queries to the ground truth annotations, padded up to the same length N (so if an image only contains 4 objects, 96 annotations will just have a "no object" as class and "no bounding box" as bounding box). The Hungarian matching algorithm is used to create an optimal one-to-one mapping between each of the N queries and each of the N annotations. Next, standard cross-entropy (for the classes) and a linear combination of the L1 and generalized IoU loss (for the bounding boxes) are used to optimize the parameters of the model.

Image: model image

Intended uses & limitations#

You can use the raw model for object detection. See the model hub to look for all available DETR models.

How to use#

Here is how to use this model:

from transformers import DetrImageProcessor, DetrForObjectDetection
import torch
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

# you can specify the revision tag if you don't want the timm dependency
processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50", revision="no_timm")
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50", revision="no_timm")

inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)

# convert outputs (bounding boxes and class logits) to COCO API
# let's only keep detections with score > 0.9
target_sizes = torch.tensor([image.size[::-1]])
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.9)[0]

for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
    box = [round(i, 2) for i in box.tolist()]
    print(
            f"Detected {model.config.id2label[label.item()]} with confidence "
            f"{round(score.item(), 3)} at location {box}"
    )

This should output:

Detected remote with confidence 0.998 at location [40.16, 70.81, 175.55, 117.98]
Detected remote with confidence 0.996 at location [333.24, 72.55, 368.33, 187.66]
Detected couch with confidence 0.995 at location [-0.02, 1.15, 639.73, 473.76]
Detected cat with confidence 0.999 at location [13.24, 52.05, 314.02, 470.93]
Detected cat with confidence 0.999 at location [345.4, 23.85, 640.37, 368.72]

Currently, both the feature extractor and model support PyTorch.

Training data#

The DETR model was trained on COCO 2017 object detection, a dataset consisting of 118k/5k annotated images for training/validation respectively.

Training procedure#

Preprocessing#

The exact details of preprocessing of images during training/validation can be found here.

Images are resized/rescaled such that the shortest side is at least 800 pixels and the largest side at most 1333 pixels, and normalized across the RGB channels with the ImageNet mean (0.485, 0.456, 0.406) and standard deviation (0.229, 0.224, 0.225).

Training#

The model was trained for 300 epochs on 16 V100 GPUs. This takes 3 days, with 4 images per GPU (hence a total batch size of 64).

Evaluation results#

This model achieves an AP (average precision) of 42.0 on COCO 2017 validation. For more details regarding evaluation results, we refer to table 1 of the original paper.

BibTeX entry and citation info#
@article{DBLP:journals/corr/abs-2005-12872,
  author    = {Nicolas Carion and
               Francisco Massa and
               Gabriel Synnaeve and
               Nicolas Usunier and
               Alexander Kirillov and
               Sergey Zagoruyko},
  title     = {End-to-End Object Detection with Transformers},
  journal   = {CoRR},
  volume    = {abs/2005.12872},
  year      = {2020},
  url       = {https://arxiv.org/abs/2005.12872},
  archivePrefix = {arXiv},
  eprint    = {2005.12872},
  timestamp = {Thu, 28 May 2020 17:38:09 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2005-12872.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Files

6 files · 333 MBWeights 167 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 6 files with their sha256
FileSizesha256
.gitattributes744 Bf888dc7c230287cd68af7034aa9fc2e2d6663fb7b3e70faa153caf93877914c3
README.md5.89 KBbc7d74d96a9101113c06be3a90975510dd19671382eb6fdfc5d1edbb042a723b
config.json4.59 KBe7bcf3992363f27717a863f14b193140ad2e41d4338ee012730e58a92cae17e6
model.safetensors167 MB830f5e2eeaada8c8c8281779dcc8ab12833972eb8514ed0a35be6c1d4420ad81
preprocessor_config.json290 B0673fea2a6d3cf92cdbab3c7426c0ecdf8a4729a2a4d5199033dcd66a2b8759b
pytorch_model.bin167 MB9400d5a6a433c73bb3440f42daab69a7b728b4bce0922904ac4779cb04e08989
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
1d5f47bd3b pinned now manifest updated, same commit2026-11-14 21:36 UTC6 files · 333 MB
1d5f47bd3b2026-11-14 21:36 UTC6 files · 333 MB

Use it

$ fw get facebook/detr-resnet-50
# manifest sha256 35d11e5141db… · 333 MB · 6 files
$ fw verify ./detr-resnet-50 facebook/detr-resnet-50
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/facebook/detr-resnet-50.json --dir ./detr-resnet-50 $ python3 fw.py verify ./detr-resnet-50 ./facebook__detr-resnet-50.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download facebook/detr-resnet-50 --revision 1d5f47bd3bdd2c4bbfa585418ffe6da5028b4c0b --local-dir ./detr-resnet-50

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
bc7d74d96a9101113c06be3a90975510dd19671382eb6fdfc5d1edbb042a723b
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: facebook <huggingface.co/facebook>Newsgroups: alt.freeweights.visionSubject: detr-resnet-50Date: 2026-11-14Commit: 1d5f47bSigned: 2DC28CC7B26A283B ✓
Upstream
facebook/detr-resnet-50
Pinned commit
1d5f47bd3bdd2c4bbfa585418ffe6da5028b4c0b
Manifest
detr-resnet-50.json · .minisig
Manifest sha256
35d11e5141db658c1a57c8cfac4fbc0c884087bc53e28aaaf015eaf5f8bc8f35
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:36 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/facebook/detr-resnet-50.json $ curl -O https://freeweights.allternit.com/manifests/facebook/detr-resnet-50.json.minisig $ minisign -Vm detr-resnet-50.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download facebook/detr-resnet-50
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. detr-resnet-50.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX