models icon indicating copy to clipboard operation
models copied to clipboard

ValueError: model_config not of type model_pb2.DetectionModel.

Open LyonOconner opened this issue 8 years ago • 6 comments

hi, im exporting data training with this command python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training/model.ckpt-4489 --output_directory inference_graph

but i have this error:

File "C:\TensorFlow\models\research\object_detection\builders\model_builder.py", line 113, in build raise ValueError('model_config not of type model_pb2.DetectionModel.') ValueError: model_config not of type model_pb2.DetectionModel.

any idea ? thanks you

LyonOconner avatar Oct 30 '18 00:10 LyonOconner

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce

tensorflowbutler avatar Oct 30 '18 12:10 tensorflowbutler

hi thanks for answering,

before compile I had to copy slim content folder in C:\ProgramData\Anaconda3\envs\tensorflow\Lib\site-packages\object_detection-0.1-py3.6.egg because no identify nets module.

i'm using:

Windows 10, tensorboard 1.11.0 py36he025d50_0 tensorflow 1.11.0 eigen_py36h346fd36_0 tensorflow-base 1.11.0 eigen_py36h45df0d8_0 Cython 0.29 keras-applications 1.0.6 py36_0 keras-preprocessing 1.0.5 py36_0 pandas 0.23.4 py36h830ac7b_0 pandas 0.20.1 pillow 5.3.0 py36hdc69c19_0 pip 18.1 protobuf 3.6.1 protobuf 3.6.0 py36he025d50_0 protoc-3.4.0-win32.zip $bazel version Build label: 0.18.0 cuda_9.0.176_win10 cudnn-10.0-windows10-x64-v7.3.1.20 (checking my CUDA folder "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA" ) i have v.9.0 and v10.0 can this cause an error? i'm install packages using pip or conda too, does this influence something?

My PC Processor: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 CPUs), ~3.6GHz Memory: 16384MB RAM NVIDIA GeForce GTX 1050 Ti

I'm doing this tutorial https://www.youtube.com/watch?v=Rgpfk6eYxJA https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

My tensorflow directory C:\TensorFlow\models\research\object_detection

So i´m trying Export Inference Graph with this command in object-detection folder:

python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training/model.ckpt-4489 --output_directory inference_graph.

Greetings, I remain attentive

LyonOconner avatar Oct 30 '18 14:10 LyonOconner

This is the complete error: (tensorflow1) C:\TensorFlow\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config WARNING:tensorflow:From C:\ProgramData\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:124: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. W1031 16:28:00.182125 12248 tf_logging.py:118] From C:\ProgramData\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py:124: main (from main) is deprecated and will be removed in a future version. Instructions for updating: Use object_detection/model_main.py. Traceback (most recent call last): File "train.py", line 184, in tf.app.run() File "C:\ProgramData\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\platform\app.py", line 124, in run _sys.exit(main(argv)) File "C:\ProgramData\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\python\util\deprecation.py", line 136, in new_func return func(*args, **kwargs) File "train.py", line 180, in main graph_hook_fn=graph_rewriter_fn) File "C:\TensorFlow\models\research\object_detection\legacy\trainer.py", line 248, in train detection_model = create_model_fn() File "C:\TensorFlow\models\research\object_detection\builders\model_builder.py", line 113, in build raise ValueError('model_config not of type model_pb2.DetectionModel.') ValueError: model_config not of type model_pb2.DetectionModel.

LyonOconner avatar Oct 31 '18 21:10 LyonOconner

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.

If you think we've misinterpreted a bug, please comment again with a clear explanation, as well as all of the information requested in the issue template. Thanks!

k-w-w avatar Nov 01 '18 18:11 k-w-w

@k-w-w How can you close the issue as many of them has the same issue even iam also facing the same issue from 2 days

File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\object_detection-0.1-py3.5.egg\object_detection\builders\model_builder.py", line 118, in build raise ValueError('model_config not of type model_pb2.DetectionModel.') ValueError: model_config not of type model_pb2.DetectionModel.

prasanna532 avatar Apr 17 '19 20:04 prasanna532

In my computer,I did these and fixed this problem in model_builder.py don't use "from protos import model_pb2" use "from object_detection.protos import model_pb2" instead

OliverSeth avatar Aug 20 '19 08:08 OliverSeth