TypeError: create_estimator_and_inputs() missing 1 required positional argument: 'hparams'

Viewed 1157

I am trying to form a mask model r cnn with new data. I have my tf.record and I launch the following command

python D:\Projet\CV-CommonTools\model_main.py 
--model_dir training 
--pipeline_config_path training\mask_rcnn_inception_v2.config 
--num_train_steps 20000 
--sample_1_of_n_eval_examples=0 
--alsologtostderr

But I get the following error.

Traceback (most recent call last):
  File "D:\Projet\model_main.py", line 110, in <module>
    tf.app.run()
  File "C:\Users\Ibrahim\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "C:\Users\Ibrahim\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 299, in run
    _run_main(main, args)
  File "C:\Users\Ibrahim\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "D:\Projet\model_main.py", line 71, in main
    FLAGS.sample_1_of_n_eval_on_train_examples))
TypeError: create_estimator_and_inputs() missing 1 required positional argument: 'hparams'

Could someone guide me please ?

ps:why don't I have an answer? Did I ask my question wrong?

2 Answers

Try to add models and models/research folders to your PYTHONPATH Environment Variable

In model_main.py, add

from object_detection import model_hparams
Related