Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DELF: Create the output directory if it doesn't already exist #11248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions research/delf/delf/python/training/build_image_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

import csv
import os
import pathlib

from absl import app
from absl import flags
Expand Down Expand Up @@ -476,6 +477,10 @@ def _build_test_tfrecord_dataset(csv_path, image_dir):


def main(unused_argv):
# Create the output directory if it does not exist.
directory_path = pathlib.Path(FLAGS.output_directory)
directory_path.mkdir(parents=True, exist_ok=True)

_build_train_tfrecord_dataset(FLAGS.train_csv_path,
FLAGS.train_clean_csv_path,
FLAGS.train_directory,
Expand Down