title: Tensorflow KeyError for creating train.record for model
body: <p>I'm current facing this error when creating a train.record file for my. I'm following a guide from <a href="https://medium.com/swlh/tensorflow-2-object-detection-api-with-google-colab-b2af171e81cc" rel="nofollow noreferrer">Medium</a></p>
  <p>Previously I had no issue but today I have this error</p>
  <pre><code>/content/gdrive/MyDrive/TensorFlow/scripts/preprocessing
  Traceback (most recent call last):
    File &quot;generate_tfrecord.py&quot;, line 168, in &lt;module&gt;
      tf.app.run()
    File &quot;/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py&quot;, line 40, in run
      _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
    File &quot;/usr/local/lib/python3.6/dist-packages/absl/app.py&quot;, line 300, in run
      _run_main(main, args)
    File &quot;/usr/local/lib/python3.6/dist-packages/absl/app.py&quot;, line 251, in _run_main
      sys.exit(main(argv))
    File &quot;generate_tfrecord.py&quot;, line 158, in main
      tf_example = create_tf_example(group, path)
    File &quot;generate_tfrecord.py&quot;, line 132, in create_tf_example
      classes.append(class_text_to_int(row['class']))
    File &quot;generate_tfrecord.py&quot;, line 101, in class_text_to_int
      return label_map_dict[row_label]
  KeyError: '\\'
  Successfully created the TFRecord file: /content/gdrive/MyDrive/TensorFlow/workspace/training_demo/annotations/test.record
  </code></pre>
  <p>I suspect the problem might be with one of the annotation .xml file in my train image folder causing the issue but I can't seem to find any other sources to confirm. Can someone please enlighten me?</p>
  <p>Edit: Here is the <a href="https://github.com/sglvladi/TensorFlowObjectDetectionTutorial/blob/master/docs/source/scripts/generate_tfrecord.py" rel="nofollow noreferrer">generate_tfrecord.py</a> for reference if required. Thank you</p>