from_folder#

from_folder(images_root: str | Path, split: str | None = 'eval', label_map: dict[int, str] | None = None, dataset_path: Path | str | None = None) Dataset[source]#

Load a folder of images into a dataset without annotations.

Globbed image file formats are the following:

  • “.bmp”

  • “.dng”

  • “.jpeg”

  • “.jpg”

  • “.mpo”

  • “.png”

  • “.tif”

  • “.tiff”

  • “.webp”

  • “.pfm”

Parameters:
  • images_root – Root of folder to get images from

  • split – Split value to apply to resulting dataset. Defaults to “eval”.

  • label_map – Optional label map to apply to dataset. Defaults to None.

  • dataset_path – Deprecated name for images_root, if not None, triggers a warning and will be removed in future releases

Returns:

Dataset with images of given folder, but without annotations.