TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 copied to clipboard
ValueError: Tensor conversion requested dtype string for Tensor with dtype float32: 'Tensor("arg0:0", shape=(), dtype=float32)'
C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_resnet101_kitti.config
WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\trainer.py:260: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
WARNING:tensorflow:num_readers has been reduced to 0 to match input file shards.
Traceback (most recent call last):
File "train.py", line 184, in
Hi, I got this issue while I tried to use the faster_rcnn_resnet101_kitti model. Has anyone else seen this problem before?
I had the same error, because I forgot to generate the TFRecord files:
python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record
python generate_tfrecord.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record
I think the record file is there since I switched to use the coco model when I found out the kitti model has this error, but the coco model runs fine with the record file I generated earlier for the kitti model.
I'm following the same tuto and everything was going well until the step 4 (generate the tf record) where I got the following error.
C:\tensorflow1\models\research\object_detection>python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record
Traceback (most recent call last):
File "generate_tfrecord.py", line 110, in
Who can help me to solve this error guys?
Thanks in advance
@Elites2017 I think I had the same issue (at least the stacktrace brings back some memories). Make sure all your labels are setup correctly in generate_record.py. That's what resolved it for me.
Thanks Buddy,
On Fri, Jul 13, 2018 at 1:15 PM, Philipp Weissensteiner < [email protected]> wrote:
@Elites2017 https://github.com/Elites2017 I think I had the same issue (at least the stacktrace brings back some memories). Make sure all your labels are setup correctly https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#4-generate-training-data in generate_record.py. That's what resolved it for me.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/63#issuecomment-404737027, or mute the thread https://github.com/notifications/unsubscribe-auth/AiJBZCX67gsdr1pPCPPrpkEyNRN9u3iKks5uGDsegaJpZM4Uhw6z .
In generate_tfrecords.py, you have to change 'return None' to 'return 0'. This would return an int value i.e 0 and not the None type. Hope this helps :)
It's the .record file missing , check and make sure that the .record file has been generated.
Generate .record files using generate_tfrecords.py. The steps for the same are explained below: 1)python generate_tfrecord.py --csv_input=images\train_labels.csv --image_dir=images\train --output_path=train.record
2)python generate_tfrecord.py --csv_input=images\test_labels.csv --image_dir=images\test --output_path=test.record
Then put the generated .record file in models/research/object_detection/data directory. If this does not work then put the .record file in the models/research/object_detection/ directory.
The error is thrown when the path to the record files is not right. I would recommend adding the whole path to the train and test records file in the data folder in the .config file. Will definitely work and get rid of this particular error.
I had same error because my record files were not existed. Check your record files.
@kaushikb11
thanks buddy