小编Mad*_*nes的帖子

Tensorflow对象检测API-'ValueError:anchor_strides必须是与self._box_specs长度相同的列表

我正在使用Tensorflow的对象检测API解决对象检测问题,特别是facessd在开放图像数据集上训练的模型。任何人都可以澄清

anchor_strides must be a list with the same length as self.box_specs
Run Code Online (Sandbox Code Playgroud)

手段?我正在查看源代码,但是找不到在哪里self._box_specs定义。我假设这是在推断过程中最终绘制的边界框。我尝试调整图像的大小,但没有任何改变。

每次运行模型时,都会出现以下错误和回溯:

Traceback (most recent call last):  
  File "object_detection/model_main.py", line 109, in <module>
    tf.app.run()  
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))  
  File "object_detection/model_main.py", line 105, in main
    tf.estimator.train_and_evaluate(estimator, train_spec, eval_specs[0])  
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/training.py", line 471, in train_and_evaluate
    return executor.run()  
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/training.py", line 610, in run
    return self.run_local()  
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/training.py", line 711, in run_local
    saving_listeners=saving_listeners)  
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/tensorflow/python/estimator/estimator.py", line 354, in train
    loss = self._train_model(input_fn, hooks, saving_listeners) …
Run Code Online (Sandbox Code Playgroud)

python tensorflow object-detection-api

5
推荐指数
1
解决办法
607
查看次数

标签 统计

object-detection-api ×1

python ×1

tensorflow ×1