我想在使用 Google Cloud 的新测试集上评估自定义训练的 Tensorflow 对象检测模型。
我从以下位置获得了初始检查点:https : //github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
我知道 Tensorflow 对象检测 API 允许我使用以下方法同时运行训练和评估:
https://github.com/tensorflow/models/blob/master/research/object_detection/model_main.py
要开始这样的工作,我提交以下 ml-engine 工作:
gcloud ml-engine jobs submit training [JOBNAME]
--runtime-version 1.9
--job-dir=gs://path_to_bucket/model-dir
--packages dist/object_detection-
0.1.tar.gz,slim/dist/slim-0.1.tar.gz,pycocotools-2.0.tar.gz
--module-name object_detection.model_main
--region us-central1
--config object_detection/samples/cloud/cloud.yml
--
--model_dir=gs://path_to_bucket/model_dir
--pipeline_config_path=gs://path_to_bucket/data/model.config
Run Code Online (Sandbox Code Playgroud)
但是,在成功转移训练模型后,我想使用计算性能指标,例如 COCO mAP( http://cocodataset.org/#detection-eval ) 或 PASCAL mAP ( http://host.robots. ox.ac.uk/pascal/VOC/pubs/everingham10.pdf)在一个以前没有使用过的新测试数据集上(无论是在训练期间还是在评估期间)。
我已经看到,model_main.py 中有可能的标志:
flags.DEFINE_string(
'checkpoint_dir', None, 'Path to directory holding a checkpoint. If '
'`checkpoint_dir` is provided, this binary operates in eval-only
mode, '
'writing resulting metrics to `model_dir`.') …Run Code Online (Sandbox Code Playgroud)