Skip to main content

FloatVisionOps

Trait FloatVisionOps 

Source
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§

Source

fn float_erode( input: FloatTensor<Self>, kernel: BoolTensor<Self>, opts: MorphOptions<Self, Float>, ) -> FloatTensor<Self>

Erodes an input tensor with the specified kernel.

Source

fn float_dilate( input: FloatTensor<Self>, kernel: BoolTensor<Self>, opts: MorphOptions<Self, Float>, ) -> FloatTensor<Self>

Dilates an input tensor with the specified kernel.

Source

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) format
  • scores - Confidence scores as [N] tensor
  • options - 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.

Implementations on Foreign Types§

Source§

impl<B: FusionBackend + FloatVisionOps> FloatVisionOps for Fusion<B>

Source§

impl<E: FloatNdArrayElement, I: IntNdArrayElement, Q: QuantElement> FloatVisionOps for NdArray<E, I, Q>

Source§

impl<R, F, I, BT> FloatVisionOps for CubeBackend<R, F, I, BT>

Implementors§