ObjectDetectionHead class
A simple object detection head for a ViT backbone.
This head takes the output features from the ViT backbone (e.g., the CLS token output or aggregated patch features) and predicts bounding box coordinates and class probabilities for a single object.
For multi-object detection, a more advanced architecture like DETR's Transformer Decoder or R-CNN style heads would be required.
Constructors
- ObjectDetectionHead({required int embedSize, required int numClasses})
Properties
- bboxRegressionHead → Layer
-
final
- classPredictionHead → Layer
-
final
- embedSize → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- numClasses → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
forward(
ValueVector backboneFeature) → Map< String, 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
Constants
- numBoxCoords → const int