DETR<T>
Models & Types · AiDotNet.ComputerVision.Detection.ObjectDetection.DETR
DETR (DEtection TRansformer) - End-to-end object detection with transformers.
Inheritance: ModelBase<T, Tensor<T>, Tensor<T>> → VisionTaskModelBase<T> → ObjectDetectorBase<T> → DETR<T>
Implements: IDetectionTrainingModel<T>
For Beginners
DETR is a revolutionary approach to object detection that uses a transformer architecture instead of traditional anchor-based methods. It treats detection as a set prediction problem, eliminating the need for NMS post-processing.
How It Works
Key features:
- No anchors needed
- No NMS required (uses Hungarian matching for training)
- Global reasoning via self-attention
- Simple end-to-end architecture
Reference: Carion et al., “End-to-End Object Detection with Transformers”, ECCV 2020
Constructors
| Constructor | Summary |
|---|---|
DETR(ObjectDetectionOptions<T> options) |
Creates a new DETR detector. |
Properties
| Property | Summary |
|---|---|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
DetectionResult<T> Detect(Tensor<T> image, double confidenceThreshold, double nmsThreshold) |
|
Task LoadWeightsAsync(string pathOrUrl, CancellationToken cancellationToken) |
|
double EffectiveNmsThreshold(double requested) |
|
void SaveWeights(string path) |
|
void TrainDetections(Tensor<T> input, DetectionTrainingBatch<T> targets) |
Trains the final DETR heads with exact assignment, no-object CE, L1 and GIoU. |