optical.converter.converter.convert_tfrecord

optical.converter.converter.convert_tfrecord(df: pandas.core.frame.DataFrame, root: Union[str, os.PathLike, pathlib.PosixPath], has_image_split: bool = False, copy_images: bool = False, save_under: Optional[str] = None, output_dir: Optional[Union[str, os.PathLike, pathlib.PosixPath]] = None)None[source]

convert to tfrecords from Masterdf

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 (Optional[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