CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-supervision

A set of easy-to-use utils that will come in handy in any Computer Vision project

Overview
Eval results
Files

iou-nms.mddocs/

IOU and NMS Operations

Intersection over Union calculations and Non-Maximum Suppression algorithms for filtering and merging detection results.

Capabilities

IOU Calculation

def box_iou(boxes_true: np.ndarray, boxes_detection: np.ndarray) -> np.ndarray:
    """Calculate IoU between two sets of boxes."""

def box_iou_batch(boxes_true: np.ndarray, boxes_detection: np.ndarray) -> np.ndarray:
    """Batch IoU calculation between box sets."""

def mask_iou_batch(masks_true: np.ndarray, masks_detection: np.ndarray) -> np.ndarray:
    """Calculate IoU between segmentation masks."""

def oriented_box_iou_batch(boxes_true: np.ndarray, boxes_detection: np.ndarray) -> np.ndarray:
    """IoU calculation for oriented bounding boxes."""

Non-Maximum Suppression

def box_non_max_suppression(predictions: np.ndarray, iou_threshold: float = 0.5) -> np.ndarray:
    """Apply NMS to remove overlapping boxes."""

def mask_non_max_suppression(predictions: np.ndarray, masks: np.ndarray, iou_threshold: float = 0.5) -> np.ndarray:
    """Apply NMS using mask IoU."""

def box_non_max_merge(predictions: np.ndarray, iou_threshold: float = 0.5) -> np.ndarray:
    """Merge overlapping boxes instead of suppressing."""

class OverlapMetric(Enum):
    IOU = "iou"
    IOS = "ios"

class OverlapFilter(Enum):
    NMS = "nms"
    NMM = "nmm"

Install with Tessl CLI

npx tessl i tessl/pypi-supervision

docs

annotators.md

coordinate-conversion.md

core-data-structures.md

dataset-management.md

detection-tools.md

drawing-colors.md

file-utilities.md

index.md

iou-nms.md

keypoint-annotators.md

metrics.md

tracking.md

video-processing.md

vlm-support.md

tile.json