| rf100_peixos_segmentation_dataset | R Documentation |
Loads the Roboflow 100 "peixos" dataset for semantic segmentation. "peixos" contains 3 splits of respectively 821 / 118 / 251 color images of size 640 x 640. Segmentation masks are generated on-the-fly from polygon annotations of the unique "fish" category.
rf100_peixos_segmentation_dataset(
split = c("train", "test", "valid"),
root = tempdir(),
download = FALSE,
transform = NULL,
target_transform = NULL
)
split |
the subset of the dataset to choose between |
root |
directory path to download the dataset. |
download |
Logical. If TRUE, downloads the dataset if not present at |
transform |
Optional transform function applied to the image. |
target_transform |
Optional transform function applied to the target. |
A torch dataset. Each element is a named list with:
x: H × W × 3 array (use transform_to_tensor() in transform to get
C × H × W tensor).
y: a list with:
masks: boolean tensor of shape (1, H, W).
labels: integer vector with the class index (always 1 for "fish").
The returned item is given class image_with_segmentation_mask so it can be
visualised with helpers like draw_segmentation_masks().
Other segmentation_dataset:
oxfordiiitpet_segmentation_dataset(),
pascal_voc_datasets
## Not run:
ds <- rf100_peixos_segmentation_dataset(
split = "train",
transform = transform_to_tensor,
download = TRUE
)
item <- ds[1]
overlay <- draw_segmentation_masks(item)
tensor_image_browse(overlay)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.