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
xmin
property xyxy
ymax
ymin
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
classmethod from_dict(detection_dict)
label
mask = None
score
class brails.filters.house_view.house_view.HouseView(input_data)

Bases: Filter

filter(input_images, output_dir)

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.

Parameters:
  • images (ImageSet) – The ImageSet to filter.

  • dir_path (str) – Path to the output directory for filtered images.

Returns:

The filtered set of images.

Return type:

ImageSet

filter1(image_path, output_dir)
brails.filters.house_view.house_view.detect(image, labels, threshold=0.3, detector_id=None)

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