boundary - OpenAOI/anodet GitHub Wiki
framed_boundary_images(images: Union[np.ndarray, torch.Tensor], patch_classifications: Union[np.ndarray, torch.Tensor], image_classifictions: Union[np.ndarray, torch.Tensor], padding: int = 30, boundary_color: Tuple[int, int, int] = (255, 0, 0)) -> np.ndarray
Draw boundaries around masked areas on images and adds a frame around the image that indicates if a boundary was drawn.
Arguments:
-
images
- Images on which to draw boundaries. -
patch_classifications
- anomaly classifcations about the images. -
image_classifictions
- information about, if the images have anomalys -
padding
- the thickness of the border around the images. -
boundary_color
- Color of boundaries.
Returns:
-
b_image
- Image with boundaries.
boundary_image(image: Union[np.ndarray, torch.Tensor], patch_classification: Union[np.ndarray, torch.Tensor], boundary_color: Tuple[int, int, int] = (255, 0, 0)) -> np.ndarray
Draw boundaries around masked areas on image.
Arguments:
-
image
- Image on which to draw boundaries. -
patch_classification
- Mask defining the areas. -
boundary_color
- Color of boundaries.
Returns:
-
b_image
- Image with boundaries.