brails.filters.house_view.house_view module

class brails.filters.house_view.house_view.FilterBoundingBox(xmin: int, ymin: int, xmax: int, ymax: int)

Bases: object

xmax: int
xmin: int
property xyxy: List[float]
ymax: int
ymin: int
class brails.filters.house_view.house_view.FilterDetectionResult(score: float, label: str, box: brails.filters.house_view.house_view.FilterBoundingBox, mask: Optional[<built-in function array>] = None)

Bases: object

box: FilterBoundingBox
classmethod from_dict(detection_dict: Dict) FilterDetectionResult
label: str
mask: array | None = None
score: float
class brails.filters.house_view.house_view.HouseView(input_data: dict)

Bases: Filter

filter(input_images: ImageSet, output_dir: str)

Abstract class that must be implemented by subclasses.

This method will be used by the caller to obtain a filtered ImageSet and save the output in a specified directory.

Args:

images (ImageSet): The ImageSet to filter. dir_path (str): Path to the output directory for filtered images.

Returns:

ImageSet: The filtered set of images.

filter1(image_path, output_dir)
brails.filters.house_view.house_view.detect(image: Image, labels: List[str], threshold: float = 0.3, detector_id: str | None = None) List[Dict[str, Any]]

Use Grounding DINO to detect a set of labels in an image in a zero-shot fashion.