DEIM: DETR with Improved Matching for Fast Convergence
Copyright (c) 2024 The DEIM Authors. All Rights Reserved.
---------------------------------------------------------------------------------
Modified from D-FINE (https://github.com/Peterande/D-FINE/)
Copyright (c) 2024 D-FINE Authors. All Rights Reserved.
A static layer that calculates integral results from a distribution.
This layer computes the target location using the formula: `sum{Pr(n) * W(n)}`,
where Pr(n) is the softmax probability vector representing the discrete
distribution, and W(n) is the non-uniform Weighting Function.
Args:
reg_max (int): Max number of the discrete bins. Default is 32.
It can be adjusted based on the dataset or task requirements.
Transformer Decoder implementing Fine-grained Distribution Refinement (FDR).
This decoder refines object detection predictions through iterative updates across multiple layers,
utilizing attention mechanisms, location quality estimators, and distribution refinement techniques
to improve bounding box accuracy and robustness.