def get_seg_dense_parse_fn()

in projects/home/recap/data/tfe_parsing.py [0:0]


def get_seg_dense_parse_fn(data_config: recap_data_config.RecapDataConfig):
  """Placeholder for seg dense.

  In the future, when we use more seg dense variations, we can change this.
  """
  with tf.io.gfile.GFile(data_config.seg_dense_schema.schema_path, "r") as f:
    seg_dense_schema = json.load(f)["schema"]

  tf_example_schema = create_tf_example_schema(
    data_config,
    seg_dense_schema,
  )

  logging.info("***** TF Example Schema *****")
  logging.info(tf_example_schema)

  parse = functools.partial(
    parse_tf_example,
    tfe_schema=tf_example_schema,
    seg_dense_schema_config=data_config.seg_dense_schema,
  )
  return parse