Commit 8c8fc0c2 authored by Vivek Rathod's avatar Vivek Rathod
Browse files

Change DEFINE_enum to DEFINE_string and delete unused file.

parent ae2c506e
......@@ -39,12 +39,11 @@ from object_detection.utils import label_map_util
flags = tf.app.flags
flags.DEFINE_string('data_dir', '', 'Root directory to raw PASCAL VOC dataset.')
flags.DEFINE_enum('set', 'train', ['train', 'val', 'trainval', 'test'],
'Convert training set, validation set or merged set.')
flags.DEFINE_string('set', 'train', 'Convert training set, validation set or '
'merged set.')
flags.DEFINE_string('annotations_dir', 'Annotations',
'(Relative) path to annotations directory.')
flags.DEFINE_enum('year', 'VOC2007', ['VOC2007', 'VOC2012', 'merged'],
'Desired challenge year.')
flags.DEFINE_string('year', 'VOC2007', 'Desired challenge year.')
flags.DEFINE_string('output_path', '', 'Path to output TFRecord')
flags.DEFINE_string('label_map_path', 'data/pascal_label_map.pbtxt',
'Path to label map proto')
......@@ -52,6 +51,9 @@ flags.DEFINE_boolean('ignore_difficult_instances', False, 'Whether to ignore '
'difficult instances')
FLAGS = flags.FLAGS
SETS = ['train', 'val', 'trainval', 'test']
YEARS = ['VOC2007', 'VOC2012', 'merged']
def dict_to_tf_example(data,
dataset_directory,
......@@ -139,6 +141,11 @@ def dict_to_tf_example(data,
def main(_):
if FLAGS.set not in SETS:
raise ValueError('set must be in : {}'.format(SETS))
if FLAGS.year not in YEARS:
raise ValueError('year must be in : {}'.format(YEARS))
data_dir = FLAGS.data_dir
years = ['VOC2007', 'VOC2012']
if FLAGS.year != 'merged':
......
include "devtools/blueprint/ncl/blueprint_file.ncl";
include "releasetools/rapid/ncl/rapid_config.ncl";
blueprint_file = ::blueprint::BlueprintFile(
project_name = "open_tf_object_detection",
project_grouping = ["Search", "Search Features", "Image Search", "Visual Search"],
mdb_groups = ["vale-project"],
tech_lead = ["jonathanhuang", "kpmurphy"],
dev_mailing_list = "object-detection-reviews@google.com",
buganizer_component_ids = [163596],
owned_code_depotpaths = [
"//depot/google3/third_party/tensorflow_models/object_detection/...",
],
buildable_units = [
::blueprint::BuildableUnit(
name = "open_tf_object_detection.fastbuild",
enable_continuous_build = true,
enable_release = false,
continuous_build_email = ::blueprint::ContinuousBuildEmailInfo(
build_cop_email_addrs = ["vale-project+tap@google.com"]),
build_patterns = [
"third_party/tensorflow_models/object_detection/...",
],
build_flags = [
"--compilation_mode=fastbuild",
],
test_patterns = [
"third_party/tensorflow_models/object_detection/...",
],
enable_coverage = true,
),
::blueprint::BuildableUnit(
name = "open_tf_object_detection.opt",
enable_continuous_build = true,
enable_release = false,
continuous_build_email = ::blueprint::ContinuousBuildEmailInfo(
build_cop_email_addrs = ["vale-project+tap@google.com"]),
build_patterns = [
"third_party/tensorflow_models/object_detection/...",
"image/understanding/object_detection/...",
],
build_flags = [
"--compilation_mode=opt",
],
test_patterns = [
"third_party/tensorflow_models/object_detection/...",
"image/understanding/object_detection/...",
],
),
],
);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment