def setup(self): self._data_dir = os.path.join(self.export_dir, "data") self._labels_dir = os.path.join(self.export_dir, "labels") self._filename_maker = fou.UniqueFilenameMaker( output_dir=self._data_dir ) self._writer = CVATVideoAnnotationWriter() etau.ensure_dir(self._data_dir) etau.ensure_dir(self._labels_dir)
def setup(self): self._data_dir = os.path.join(self.export_dir, "data") self._labels_dir = os.path.join(self.export_dir, "labels") self._filename_maker = fou.UniqueFilenameMaker( output_dir=self._data_dir, default_ext=self.image_format, ignore_exts=True, ) self._writer = KITTIAnnotationWriter() etau.ensure_dir(self._data_dir) etau.ensure_dir(self._labels_dir)
def __init__(self, output_dir="", default_ext="", ignore_exts=False): self.output_dir = output_dir self.default_ext = default_ext self.ignore_exts = ignore_exts self._filename_counts = defaultdict(int) self._default_filename_patt = (fo.config.default_sequence_idx + default_ext) self._idx = 0 if output_dir: etau.ensure_dir(output_dir) filenames = etau.list_files(output_dir) self._idx = len(filenames) for filename in filenames: self._filename_counts[filename] += 1
def setup(self): self._obj_names_path = os.path.join(self.export_dir, "obj.names") self._images_path = os.path.join(self.export_dir, "images.txt") self._data_dir = os.path.join(self.export_dir, "data") self._classes = {} self._labels_map_rev = {} self._images = [] self._filename_maker = fou.UniqueFilenameMaker( output_dir=self._data_dir, default_ext=self.image_format, ignore_exts=True, ) self._writer = YOLOAnnotationWriter() etau.ensure_dir(self._data_dir) self._parse_classes()
def setup(self): self._class_counts = defaultdict(int) self._filename_counts = defaultdict(int) etau.ensure_dir(self.export_dir)