% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vision_utils.R
\name{coco_polygon_to_mask}
\alias{coco_polygon_to_mask}
\title{Convert COCO polygon to mask tensor (Robust Version)}
\usage{
coco_polygon_to_mask(segmentation, height, width)
}
\arguments{
\item{segmentation}{A list of polygons from COCO annotations (e.g., \code{anns$segmentation[[i]]}).}

\item{height}{Height of the image}

\item{width}{Width of the image}
}
\value{
A torch_bool() tensor of shape (height, width)
}
\description{
Converts a COCO-style polygon annotation (list of coordinates) into a binary mask tensor.
}
\keyword{internal}
