Skip to contents

Creates a portable .zip archive containing a YOLO dataset. By default, the zip file is named after the dataset folder (e.g. <dataset_name>.zip) and saved directly in the same location (parent directory) as the dataset itself.

Usage

yolo_dataset_zip(
  data,
  dest_file = NULL,
  include_review = FALSE,
  overwrite = TRUE,
  verbose = TRUE
)

yolo_zip(
  data,
  dest_file = NULL,
  include_review = FALSE,
  overwrite = TRUE,
  verbose = TRUE
)

Arguments

data

A yolo_dataset object or character path to a YOLO dataset directory.

dest_file

Character. Optional path or filename for the resulting .zip file. If NULL (default), the file is saved as <dataset_name>.zip in the parent directory of the dataset. If a directory path is provided, the zip is saved inside it using the dataset's name.

include_review

Logical. Whether to include the review/ visual inspection folder if present in the dataset. Defaults to FALSE to produce clean and compact training archives suitable for Google Colab, Kaggle, or server deployments.

overwrite

Logical. Whether to overwrite an existing zip file. Defaults to TRUE.

verbose

Logical. If TRUE (default), prints status and size information.

Value

The normalized path to the created .zip file (invisibly).

Examples

if (FALSE) { # interactive()
yolo_dataset_zip("my_dataset")
}