from_crowd_human#

from_crowd_human(annotation_odgt: Path | str, images_root: Path | str | None = None, visible_box: bool = True, dataset_name: str | None = None, split: str | None = None) Dataset[source]#

Read a dataset in the format described for CrowdHuman

See https://www.crowdhuman.org/download.html

Parameters:
  • annotation_odgt – annotation file using the format described in link given above.

  • images_root – Folder where images are stored. Note that since annotations IDs are file names, all images must be at the root of this folder. If set to None, will use the image folder in the annotation file’s parent folder. Defaults to None.

  • visible_box – If set to True, will only take the visible bounding box. Otherwise, will take the whole bounding box, with possibly occluded parts.

  • dataset_name – If specified, will be the dataset name, used when showing the dataset or exporting in other formats such as fiftyone. If not specified, the dataset name will be deduced from the name of the json file.

  • split – Split value to give to the dataset. If set to None, will try to deduce it from the annotation file name. Defaults to None.

Raises:

FileNotFoundError – Will raise an error if the images_root folder does not exist Unlike COCO or Caipy, image size information is not stored in annotations and thus need to be computed by loading picture’s headers.

Returns:

Dataset