to_darknet#
- Dataset.to_darknet(output_path: Path | str, copy_images: bool = False, overwrite_images: bool = True, overwrite_labels: bool = True, create_split_folder: bool = False) None[source]#
Save dataset in darknet format, readable by darknet . Save in the same folder the images, annotations and data files
- Parameters:
output_path – folder where images and annotations will be stored
copy_images – If set to False, will create a symbolic link instead of copying. Much faster, but needs to keep original images in the same relative path. Defaults to False.
overwrite_images – if set to False, will skip images that are already copied. Defaults to True.
overwrite_labels – if set to False, will skip annotation that are already created. Defaults to True.
create_split_folder – if set to True, will create a dedicated folder for each split and will save images in it. Image paths in {split}.txt will be changed accordingly. Note that this changes the dataset structure. Defaults to False