% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/collection-rf100-doc.R
\name{rf100_document_collection}
\alias{rf100_document_collection}
\title{RF100 Document Collection Datasets}
\usage{
rf100_document_collection(
  dataset,
  split = c("train", "test", "valid"),
  transform = NULL,
  target_transform = NULL,
  download = FALSE
)
}
\arguments{
\item{dataset}{Dataset to select within \code{c("tweeter_post", "tweeter_profile", "document_part",
"activity_diagram", "signature", "paper_part", "tabular_data", "paragraph", "currency", "wine_label")}.}

\item{split}{the subset of the dataset to choose between \code{c("train", "test", "valid")}.}

\item{transform}{Optional transform function applied to the image.}

\item{target_transform}{Optional transform function applied to the target.}

\item{download}{Logical. If TRUE, downloads the dataset if not present at \code{root}.}
}
\value{
A torch dataset. Each element is a named list with:
\itemize{
\item \code{x}: H x W x 3 array representing the image, auto-oriented and stretched to 640 x 640.
\item \code{y}: a list containing the target with:
\itemize{
\item \code{image_id}: numeric identifier of the x image.
\item \code{labels}: numeric identifier of the N bounding-box object class.
\item \code{boxes}: a torch_tensor of shape (N, 4) with bounding boxes, each in \eqn{(x_{min}, y_{min}, x_{max}, y_{max})} format.
}
}

The returned item inherits the class \code{image_with_bounding_box} so it can be
visualised with helper functions such as \code{\link[=draw_bounding_boxes]{draw_bounding_boxes()}}.
}
\description{
RoboFlow 100 Document dataset Collection
}
\details{
Loads one of the RoboFlow 100 Document datasets with
bounding box annotations for object-detection task.
}
\examples{
\dontrun{
ds <- rf100_document_collection(
  dataset = "tweeter_post",
  split = "train",
  transform = transform_to_tensor,
  download = TRUE
)

# Retrieve a sample and inspect annotations
item <- ds[1]
item$y$labels
item$y$boxes

# Draw bounding boxes and display the image
boxed_img <- draw_bounding_boxes(item)
tensor_image_browse(boxed_img)
}

}
\seealso{
Other detection_dataset: 
\code{\link{coco_detection_dataset}()},
\code{\link{pascal_voc_datasets}},
\code{\link{rf100_biology_collection}()},
\code{\link{rf100_damage_collection}()},
\code{\link{rf100_infrared_collection}()},
\code{\link{rf100_medical_collection}()},
\code{\link{rf100_underwater_collection}()}
}
\concept{detection_dataset}
