tensorflow / tensorflow/models
Exporting graph with number_of_stages=1 gives TypeError
@tombstone is already working on this.
Since May 19, 2020.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm trying to run faster_rcnn_inception_resnet_v2_atrous_oid_v4_2018_12_12 pretrained model from the model zoo and obtain RPN boxes. I'm setting number_of_stages = 1 in the pipeline.config file, but when I run export_inference_graph.py, I get the following error:
python ../models/research/object_detection/export_inference_graph.py --pipeline_con
fig_path ./pipeline.config --trained_checkpoint_prefix ./model.ckpt --output_directory ../new_graph_0.2_0.4_first_stage
/usr/lib/python2.7/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from floattonp.floatingis deprecated. In future, it will be treated asnp.float64 == n
p.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "../models/research/object_detection/export_inference_graph.py", line 150, in <module>
tf.app.run()
File "/usr/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "../models/research/object_detection/export_inference_graph.py", line 146, in main
write_inference_graph=FLAGS.write_inference_graph)
File "/home/ditochi/yandexsdc/Experiments SSD/models/research/object_detection/exporter.py", line 453, in export_inference_graph
write_inference_graph=write_inference_graph)
File "/home/ditochi/yandexsdc/Experiments SSD/models/research/object_detection/exporter.py", line 357, in _export_inference_graph
graph_hook_fn=graph_hook_fn)
File "/home/ditochi/yandexsdc/Experiments SSD/models/research/object_detection/exporter.py", line 325, in _build_detection_graph
output_collection_name=output_collection_name)
File "/home/ditochi/yandexsdc/Experiments SSD/models/research/object_detection/exporter.py", line 306, in _get_outputs_from_inputs
output_collection_name)
File "/home/ditochi/yandexsdc/Experiments SSD/models/research/object_detection/exporter.py", line 209, in add_output_tensor_nodes
detection_fields.detection_classes) + label_id_offset
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
I'm using Tesorflow 1.13, python 2.7, Ubuntu 18.04
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.