Error while training the model on custom dataset
System information
- OS Platform and Distribution : Linux Ubuntu 16.04:
- TensorFlow installed from pip on anaconda3
- TensorFlow version: v1.2.0-rc2-21-g12f033d 1.2.0
- CUDA/cuDNN version: 8.0
- GPU model and memory: Quadro K2200 4 GB
The directory tree is as follows (as specified by ):
+ models-master
+ object_detection
+ data
- windmill_label_map.pbtxt
- windmill_train.record
- windmill_val.record
+ models
+ model
+ eval
+ train
- faster_rcnn_resnet101_windmill.config
Describe the problem
I am using the API to detect windmills from satellite images. I created the dataset (each image of size 1024x1024x3) and annotations in same manner as pets dataset. I successfully converted my dataset and annotations into tf.record files by modifying the existing create_pet_tf_record.py.I also modified the faster_rcnn_resnet101_pets.config file to specifications of my data set. however when I try to train the model using :
python object_detection/train.py \
--logtostderr \
--pipeline_config_path=/home/rrscw/models-master/object_detection/models/model/faster_rcnn_resnet101_windmill.config \
--train_dir=/home/rrscw/models-master/object_detection/models/model/train
I receive an error: TypeError: '<' not supported between instances of 'tuple' and 'str (the full log is provided below)
The config and pbtxt file for training are attached as a zip file along with a sample training and validation tf record. Files.zip
Source code / logs
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
Traceback (most recent call last):
File "object_detection/train.py", line 198, in <module>
tf.app.run()
File "/home/rrscw/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 194, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/home/rrscw/models-master/object_detection/trainer.py", line 184, in train
data_augmentation_options)
File "/home/rrscw/models-master/object_detection/trainer.py", line 77, in _create_input_queue
prefetch_queue_capacity=prefetch_queue_capacity)
File "/home/rrscw/models-master/object_detection/core/batcher.py", line 93, in __init__
num_threads=num_batch_queue_threads)
File "/home/rrscw/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/input.py", line 919, in batch
name=name)
File "/home/rrscw/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/input.py", line 697, in _batch
tensor_list = _as_tensor_list(tensors)
File "/home/rrscw/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/input.py", line 385, in _as_tensor_list
return [tensors[k] for k in sorted(tensors)]
TypeError: '<' not supported between instances of 'tuple' and 'str
How do I resolve this error?
@Ghost123Writer Did you try to train voc or pet dataset following the tutorial? When I have did it, I met the same problem!
@xhzcyc I did not but I think the error might be the same, how did you resolve it?
@Ghost123Writer I had the same issue, but switched and Python 2 and it worked.
@manlito You are right. I done it using python2.
I am using python 3.6 I will try it with Python2.7 and close the issue if it works
The error is resolved when I am using Python 2.7