View source: R/target-transforms-segmentation.R
| target_transform_coco_masks | R Documentation |
Converts COCO-style polygon segmentation annotations from target $segmentation variable
into boolean mask tensors as target $masks variable in order to ease later-on visualisation
via draw_segmentation_mask().
Use as target_transform in coco_segmentation_dataset().
target_transform_coco_masks(y)
## S3 method for class 'segmentation_target'
target_transform_coco_masks(y)
y |
a |
Modified y list with added masks field (N, H, W) boolean tensor, N being the number of
classes.
Other target_transforms_segmentation:
target_transform_trimap_masks()
## Not run:
ds <- coco_segmentation_dataset(
root = "data",
target_transform = target_transform_coco_masks
)
item <- ds[1]
draw_segmentation_masks(item)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.