'ValueError: Image with id {} already added' When Run Evaluation on OpenImage Dataset
'ValueError: Image with id {} already added' When Run Evaluation on OpenImage Dataset
我正在使用 Tensorflow 对象检测 API 来评估 OpenImageV5 数据集上的 SSD_mobilenet 模型。我使用了他们 model zoo 中提供的预保留模型。
对于管道配置,我使用可用的默认管道 (ssd_mobilenet_v2_oid_v4
) here.
当我 运行 使用以下命令进行评估时:
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
我收到此错误:
2019-05-28 12:26:09.658946: W tensorflow/core/framework/op_kernel.cc:1306] Invalid argument: ValueError: Image with id 1407414044 already added.
Traceback (most recent call last):
File "/bigSSD/tensorflow_model/v_env_tf_1.8/lib/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 157, in __call__
ret = func(*args)
File "/bigSSD/tensorflow_model/models/research/object_detection/utils/object_detection_evaluation.py", line 432, in update_op
self.add_single_ground_truth_image_info(image_id, single_example_dict)
File "/bigSSD/tensorflow_model/models/research/object_detection/utils/object_detection_evaluation.py", line 600, in add_single_ground_truth_image_info
raise ValueError('Image with id {} already added.'.format(image_id))
ValueError: Image with id 1407414044 already added.
我将 sample_1_of_n_examples
从 10 更改为 100 和 1000,但仍然出现相同的错误。
为了faster_rcnn_inception_resnet_v2_atrous_oid_v4.config我变了
eval_config
{
metrics_set: "open_images_V2_detection_metrics"
}
到
eval_config {
metrics_set: "open_images_V2_detection_metrics"
num_examples: 383 #correspond to my test images
}
然后 运行 使用以下命令对 eval.py 进行评估:
python eval.py --logtostderr --checkpoint_dir=path/to/checkpoint --eval_dir=path/to/eval_dir --pipeline_config_path=path/to/pretrained_model.config
我的错误解决了。
我正在使用 Tensorflow 对象检测 API 来评估 OpenImageV5 数据集上的 SSD_mobilenet 模型。我使用了他们 model zoo 中提供的预保留模型。
对于管道配置,我使用可用的默认管道 (ssd_mobilenet_v2_oid_v4
) here.
当我 运行 使用以下命令进行评估时:
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
我收到此错误:
2019-05-28 12:26:09.658946: W tensorflow/core/framework/op_kernel.cc:1306] Invalid argument: ValueError: Image with id 1407414044 already added.
Traceback (most recent call last):
File "/bigSSD/tensorflow_model/v_env_tf_1.8/lib/python3.6/site-packages/tensorflow/python/ops/script_ops.py", line 157, in __call__
ret = func(*args)
File "/bigSSD/tensorflow_model/models/research/object_detection/utils/object_detection_evaluation.py", line 432, in update_op
self.add_single_ground_truth_image_info(image_id, single_example_dict)
File "/bigSSD/tensorflow_model/models/research/object_detection/utils/object_detection_evaluation.py", line 600, in add_single_ground_truth_image_info
raise ValueError('Image with id {} already added.'.format(image_id))
ValueError: Image with id 1407414044 already added.
我将 sample_1_of_n_examples
从 10 更改为 100 和 1000,但仍然出现相同的错误。
为了faster_rcnn_inception_resnet_v2_atrous_oid_v4.config我变了
eval_config
{
metrics_set: "open_images_V2_detection_metrics"
}
到
eval_config {
metrics_set: "open_images_V2_detection_metrics"
num_examples: 383 #correspond to my test images
}
然后 运行 使用以下命令对 eval.py 进行评估:
python eval.py --logtostderr --checkpoint_dir=path/to/checkpoint --eval_dir=path/to/eval_dir --pipeline_config_path=path/to/pretrained_model.config
我的错误解决了。