OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Sam Detr

SAM-DETR is an official PyTorch implementation of SAM-DETR and SAM-DETR++, transformer-based models for object detection. Its Semantics Aligner matches object queries with encoded image features before decoder cross-attention, with the stated aim of speeding DETR convergence. The repository includes code and scripts for COCO training, evaluation, and selected paper-result reproductions.

Independent OpenViST project profile, based on linked sources.

Sam Detr — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it for code-level object-detection research or to reproduce the repository’s documented COCO workflows when NVIDIA GPU compute and the required data are available.

Who it is for

  • Computer-vision researchers studying transformer-based object detection.
  • PyTorch developers seeking a codebase for experiments with DETR-style detectors and convergence methods.
  • Teams reproducing the repository’s specified COCO experiments on NVIDIA GPU systems.

Documented uses

  • Train a SAM-DETR detector using COCO 2017 training data.
  • Evaluate a model on COCO 2017 validation data.
  • Reproduce specified paper configurations using provided scripts, including an R50 with SMCA 12-epoch run.
  • Explore documented options including SMCA, DC5, and multi-scale detection.
Before you choose

Requirements & limits

The public GitHub repository is open source under the MIT license.

  • The code requires NVIDIA GPUs; the README’s recommended setup uses eight NVIDIA V100 GPUs, while its example single-scale R50 reproduction configuration specifies four GPUs.
  • The README recommends Linux, Python 3.8, CUDA 10.1, PyTorch 1.8.1, TorchVision 0.9.1, and GCC 7.5; it also lists broader versions that may work.
  • Training and evaluation workflows use COCO 2017 data organized in a prescribed directory layout.
  • Multi-scale mode requires compiling Deformable Attention CUDA operators and is described as having results not reported in the CVPR paper.
  • Reproduction scripts depend on matching the paper’s total batch size; the README gives different GPU and per-GPU batch configurations for model variants.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the code and COCO 2017 data

Prepare the documented environment, install the repository requirements, and organize COCO 2017 files for the model workflows.

Before you start

  • An NVIDIA GPU and Linux environment; the recommended setup uses Python 3.8, CUDA 10.1, PyTorch 1.8.1, TorchVision 0.9.1, and GCC 7.5.
  • Anaconda or conda, plus the cython, scipy, tqdm, and pycocotools dependencies.
  • COCO 2017 train and validation images and instance annotations.

Steps

  1. Clone the SAM-DETR repository and create and activate a Python 3.8 conda environment.

  2. Install PyTorch and TorchVision with a CUDA toolkit version matching the local environment, then install cython, scipy, tqdm, and COCO API Python tools as shown in the README.

  3. Download COCO 2017 and place train2017, val2017, and the two instance annotation JSON files under data/coco using the documented layout.

Expected outcome

The repository, listed dependencies, and COCO 2017 files are arranged for subsequent training or evaluation.

Guide limitations

  • This covers setup and data preparation, not a training or evaluation run.
  • NVIDIA GPU hardware is required to run the codes; multi-scale use additionally requires compiling Deformable Attention CUDA operators.
Source-based practical guide

Launch the documented 12-epoch paper-result run

Use the repository’s provided script for the SAM-DETR-R50 with SMCA 12-epoch reproduction configuration.

Before you start

  • The repository and its dependencies are installed, and COCO 2017 is arranged as documented.
  • A multi-GPU NVIDIA setup matching the documented single-scale R50 reproduction configuration: four GPUs with batch size 4 on each GPU.

Steps

  1. From the repository, use the provided scripts directory and select scripts/r50_smca_e12_4gpu.sh.

  2. Run the documented command: bash scripts/r50_smca_e12_4gpu.sh.

Expected outcome

The documented script launches the SAM-DETR-R50 with SMCA 12-epoch reproduction workflow.

Guide limitations

  • The README cautions that total batch size must match the paper’s implementation details.
  • This recipe reflects the repository instructions; it is not a report of an independently executed run.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
20 November 2026
Original website title
ZhangGongjie/SAM-DETR · Official homepage title · retained in its source language