ObjectDetectionHead class
A simple object detection head for a ViT backbone, predicting multiple objects.
This head takes the output features from the ViT backbone (e.g., the CLS token
output) and predicts a fixed number of numQueries bounding box coordinates
and class probabilities.
Note: This is a simplified approach. In architectures like DETR, a Transformer Decoder processes learnable object queries to generate these predictions.
Constructors
- ObjectDetectionHead({required int embedSize, required int numClasses, required int numQueries})
Properties
- bboxRegressionHead → Layer
-
final
- classPredictionHead → Layer
-
final
- embedSize → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- numClasses → int
-
final
- numQueries → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
forward(
ValueVector backboneFeature) → Map< String, List< ValueVector> > - Forward pass for the object detection head.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parameters(
) → List< Value> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
zeroGrad(
) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- numBoxCoords ↔ int
-
getter/setter pair