Trait FloatVisionOps
pub trait FloatVisionOps: Backend {
// Provided methods
fn float_erode(
input: Self::FloatTensorPrimitive,
kernel: Self::BoolTensorPrimitive,
opts: MorphOptions,
) -> Self::FloatTensorPrimitive { ... }
fn float_dilate(
input: Self::FloatTensorPrimitive,
kernel: Self::BoolTensorPrimitive,
opts: MorphOptions,
) -> Self::FloatTensorPrimitive { ... }
fn nms(
boxes: Self::FloatTensorPrimitive,
scores: Self::FloatTensorPrimitive,
options: NmsOptions,
out_dtype: IntDType,
) -> Self::IntTensorPrimitive { ... }
}Expand description
Vision ops on float tensors
Provided Methods§
fn float_erode(
input: Self::FloatTensorPrimitive,
kernel: Self::BoolTensorPrimitive,
opts: MorphOptions,
) -> Self::FloatTensorPrimitive
fn float_erode( input: Self::FloatTensorPrimitive, kernel: Self::BoolTensorPrimitive, opts: MorphOptions, ) -> Self::FloatTensorPrimitive
Erodes an input tensor with the specified kernel.
fn float_dilate(
input: Self::FloatTensorPrimitive,
kernel: Self::BoolTensorPrimitive,
opts: MorphOptions,
) -> Self::FloatTensorPrimitive
fn float_dilate( input: Self::FloatTensorPrimitive, kernel: Self::BoolTensorPrimitive, opts: MorphOptions, ) -> Self::FloatTensorPrimitive
Dilates an input tensor with the specified kernel.
fn nms(
boxes: Self::FloatTensorPrimitive,
scores: Self::FloatTensorPrimitive,
options: NmsOptions,
out_dtype: IntDType,
) -> Self::IntTensorPrimitive
fn nms( boxes: Self::FloatTensorPrimitive, scores: Self::FloatTensorPrimitive, options: NmsOptions, out_dtype: IntDType, ) -> Self::IntTensorPrimitive
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".
Implementors§
impl FloatVisionOps for Dispatch
impl FloatVisionOps for Flex
impl<B> FloatVisionOps for Fusion<B>where
B: FusionBackend + FloatVisionOps,
Available on crate feature
fusion only.