# Path: object_detection/utils/dataset_util.py
# def int64_feature(value):
# def int64_list_feature(value):
# def bytes_feature(value):
# def bytes_list_feature(value):
# def float_list_feature(value):
# def read_examples_list(path):
# def recursive_parse_xml_to_dict(xml):


import hashlib
import io
import logging
import PIL.Image
import os
import tensorflow as tf
from lxml import etree
from object_detection.utils import dataset_util
from object_detection.utils import label_map_util
  width = int(data['size']['width'])
  height = int(data['size']['height'])

  xmin = []
  ymin = []
  xmax = []
  ymax = []
  classes = []
  classes_text = []
  truncated = []
  poses = []
  difficult_obj = []


  for obj in data['object']:
    difficult = bool(int(obj['difficult']))
    if ignore_difficult_instances and difficult:
      continue

    difficult_obj.append(int(difficult))
    xmin.append(float(obj['bndbox']['xmin']) / width)
    ymin.append(float(obj['bndbox']['ymin']) / height)
    xmax.append(float(obj['bndbox']['xmax']) / width)
    ymax.append(float(obj['bndbox']['ymax']) / height)
    classes_text.append(obj['name'].lower().encode('utf8'))
    classes.append(label_map_dict[obj['name'].lower()])
    truncated.append(int(obj['truncated']))
    poses.append(obj['pose'].encode('utf8'))

  example = tf.train.Example(features=tf.train.Features(feature={

# Path: object_detection/utils/dataset_util.py
# def int64_feature(value):
# def int64_list_feature(value):
# def bytes_feature(value):
# def bytes_list_feature(value):
# def float_list_feature(value):
# def read_examples_list(path):
# def recursive_parse_xml_to_dict(xml):


# Path: object_detection/create_pascal_tf_record.py
import hashlib
import io
import logging
import PIL.Image
import os
import tensorflow as tf
from lxml import etree
from object_detection.utils import dataset_util
from object_detection.utils import label_map_util

  width = int(data['size']['width'])
  height = int(data['size']['height'])

  xmin = []
  ymin = []
  xmax = []
  ymax = []
  classes = []
  classes_text = []
  truncated = []
  poses = []
  difficult_obj = []


  for obj in data['object']:
    difficult = bool(int(obj['difficult']))
    if ignore_difficult_instances and difficult:
      continue

    difficult_obj.append(int(difficult))
    xmin.append(float(obj['bndbox']['xmin']) / width)
    ymin.append(float(obj['bndbox']['ymin']) / height)
    xmax.append(float(obj['bndbox']['xmax']) / width)
    ymax.append(float(obj['bndbox']['ymax']) / height)
    classes_text.append(obj['name'].lower().encode('utf8'))
    classes.append(label_map_dict[obj['name'].lower()])
    truncated.append(int(obj['truncated']))
    poses.append(obj['pose'].encode('utf8'))

  example = tf.train.Example(features=tf.train.Features(feature={

      'image/height': dataset_util.int64_feature(height),