optical.converter.converter.convert_coco¶
-
optical.converter.converter.convert_coco(df: pandas.core.frame.DataFrame, root: Union[str, os.PathLike, pathlib.PosixPath], copy_images: bool = False, save_under: Optional[str] = None, output_dir: Optional[Union[str, os.PathLike, pathlib.PosixPath]] = None) → None[source]¶ converts to coco from master df
- Parameters
df (pd.DataFrame) – the master df
root (Union[str, os.PathLike, PosixPath]) – root directory of the source format
has_image_split (bool, optional) – If the images are arranged under the splits. Defaults to False.
copy_images (bool, optional) – Whether to copy the images to a different directory. Defaults to False.
save_under (str, optional) – Name of the folder to save the target annotations. Defaults to “labels”.
output_dir (Optional[Union[str, os.PathLike, PosixPath]], optional) – Output directory for the target annotation. Defaults to
None.