Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';ValueError:已添加id为{}的图像';在OpenImage数据集上运行计算时_Python_Validation_Tensorflow_Neural Network_Object Detection Api - Fatal编程技术网

Python ';ValueError:已添加id为{}的图像';在OpenImage数据集上运行计算时

Python ';ValueError:已添加id为{}的图像';在OpenImage数据集上运行计算时,python,validation,tensorflow,neural-network,object-detection-api,Python,Validation,Tensorflow,Neural Network,Object Detection Api,我正在使用Tensorflow对象检测API评估OpenImageV5数据集上的SSD_mobilenet模型。我使用了他们提供的预设模型。 对于管道配置,我使用可用的默认管道(ssd\u mobilenet\u v2\u oid\u v4) 当我使用以下命令运行评估时: python object_detection/model_main.py --alsologtostderr --run_once --checkpoint_dir=/Path/TO/ssd_mobilenet_v2_oid

我正在使用Tensorflow对象检测API评估OpenImageV5数据集上的SSD_mobilenet模型。我使用了他们提供的预设模型。 对于管道配置,我使用可用的默认管道(
ssd\u mobilenet\u v2\u oid\u v4

当我使用以下命令运行评估时:

python object_detection/model_main.py --alsologtostderr --run_once --checkpoint_dir=/Path/TO/ssd_mobilenet_v2_oid_v4_2018_12_12/ --model_dir=eval/ --pipeline_config_path=PATH/TO/ssd_mobilenet_v2_oid_v4.config
python eval.py --logtostderr --checkpoint_dir=path/to/checkpoint --eval_dir=path/to/eval_dir --pipeline_config_path=path/to/pretrained_model.config
我得到这个错误:

2019-05-28 12:26:09.658946:W tensorflow/core/framework/op_kernel.cc:1306]无效参数:value错误:已添加id为1407414044的图像。
回溯(最近一次呼叫最后一次):
文件“/bigsd/tensorflow_model/v_env_tf_1.8/lib/python3.6/site packages/tensorflow/python/ops/script_ops.py”,第157行,在调用中__
ret=func(*args)
文件“/bigsd/tensorflow_model/models/research/object_detection/utils/object_detection_evaluation.py”,第432行,在更新操作中
self.add_single_ground_truth_image_info(image_id,single_example_dict)
文件“/bigsd/tensorflow\u model/models/research/object\u detection/utils/object\u detection\u evaluation.py”,第600行,在add\u single\u ground\u truth\u image\u info中
raise VALUERROR('已添加id为{}的图像。'.format(图像id))
ValueError:已添加id为1407414044的图像。

我将示例中的示例从10更改为100和1000,但仍然得到了相同的错误。

为了更快的启动,我更改了resnet\u v2\u atrus\u oid\u v4.config

eval_config 
{
  metrics_set: "open_images_V2_detection_metrics"
}

然后使用以下命令使用eval.py运行评估:

python object_detection/model_main.py --alsologtostderr --run_once --checkpoint_dir=/Path/TO/ssd_mobilenet_v2_oid_v4_2018_12_12/ --model_dir=eval/ --pipeline_config_path=PATH/TO/ssd_mobilenet_v2_oid_v4.config
python eval.py --logtostderr --checkpoint_dir=path/to/checkpoint --eval_dir=path/to/eval_dir --pipeline_config_path=path/to/pretrained_model.config

我的错误解决了。

你能把你的配置文件粘贴到这里吗,特别是在
eval\u config
中,
num\u examples
应该等于你的评估数据集大小。
num\u examples
不推荐使用,我在配置文件中没有它。我使用了对象检测api()提供的示例配置文件