pub trait FloatVisionOps: Backend {
// Provided methods
fn float_erode(
input: FloatTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Float>,
) -> FloatTensor<Self> { ... }
fn float_dilate(
input: FloatTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Float>,
) -> FloatTensor<Self> { ... }
fn nms(
boxes: FloatTensor<Self>,
scores: FloatTensor<Self>,
options: NmsOptions,
) -> IntTensor<Self> { ... }
}Expand description
Vision ops on float tensors
Provided Methods§
Sourcefn float_erode(
input: FloatTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Float>,
) -> FloatTensor<Self>
fn float_erode( input: FloatTensor<Self>, kernel: BoolTensor<Self>, opts: MorphOptions<Self, Float>, ) -> FloatTensor<Self>
Erodes an input tensor with the specified kernel.
Sourcefn float_dilate(
input: FloatTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Float>,
) -> FloatTensor<Self>
fn float_dilate( input: FloatTensor<Self>, kernel: BoolTensor<Self>, opts: MorphOptions<Self, Float>, ) -> FloatTensor<Self>
Dilates an input tensor with the specified kernel.
Sourcefn nms(
boxes: FloatTensor<Self>,
scores: FloatTensor<Self>,
options: NmsOptions,
) -> IntTensor<Self>
fn nms( boxes: FloatTensor<Self>, scores: FloatTensor<Self>, options: NmsOptions, ) -> IntTensor<Self>
Perform Non-Maximum Suppression on bounding boxes.
Returns indices of kept boxes after suppressing overlapping detections. Boxes are processed in descending score order; a box suppresses all lower-scoring boxes with IoU > threshold.
§Arguments
boxes- Bounding boxes as [N, 4] tensor in (x1, y1, x2, y2) formatscores- Confidence scores as [N] tensoroptions- NMS options (IoU threshold, score threshold, max boxes)
§Returns
Indices of kept boxes as [M] tensor where M <= N
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.