% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transforms-segmentation.R
\name{target_transform_trimap_masks}
\alias{target_transform_trimap_masks}
\title{Target Transform: Trimap to Boolean Masks}
\usage{
target_transform_trimap_masks(y)
}
\arguments{
\item{y}{List containing \code{trimap} field (H, W) tensor with values 1, 2, 3}
}
\value{
Modified y list with added \code{masks} field (3, H, W) boolean tensor
}
\description{
Converts Oxford-IIIT Pet dataset target \verb{$trimap} variable (values 1,2,3) into
3-channel boolean masks tensors as target \verb{$masks} variable in order to ease later-on visualisation
via \code{draw_segmentation_mask()}.
Use as \code{target_transform} in \code{oxfordiiitpet_segmentation_dataset()}.
}
\details{
Creates three mutually exclusive masks:
\itemize{
\item Channel 1: Pet pixels (trimap == 1)
\item Channel 2: Background pixels (trimap == 2)
\item Channel 3: Outline pixels (trimap == 3)
}
}
\examples{
\dontrun{
ds <- oxfordiiitpet_segmentation_dataset(
  root = "data",
  target_transform = target_transform_trimap_masks
)
item <- ds[1]
draw_segmentation_masks(item)
}

}
\seealso{
Other target_transforms: 
\code{\link{target_transform_coco_masks}()}
}
\concept{target_transforms}
