LeapImageWithBBox

code_loader.contract.visualizer_classes.LeapImageWithBBox

Coming Soon!

import numpy.typing as npt
from code_loader.contract.enums import LeapDataType

@dataclass
class LeapImageWithBBox:
    data: npt.NDArray[np.float32]
    bbox: npt.NDArray[np.float32]
    type: LeapDataType = LeapDataType.ImageWithBBox

Examples

Basic Usage

from code_loader.contract.visualizer_classes import LeapImageWithBBox
import numpy as np
...

def bb_image_visualizer(image_input: np.ndarray, bbox: np.ndarray) -> LeapImageWithBBox:
    return LeapImageWithBBox(data=image_input, bbox=bbox)

leap_binder.set_visualizer(
    name='bounding_boxes', 
    function=bb_image_visualizer,
    visualizer_type=LeapImageWithBBox.type
) 

Last updated