【问题标题】:Object detection training job fails on GCPGCP 上的对象检测训练作业失败
【发布时间】:2020-02-20 23:05:35
【问题描述】:

我正在使用我自己的数据集在 GCP 上运行目标检测训练作业。我的训练作业脚本是这样的:

JOB_NAME=object_detection"_$(date +%m_%d_%Y_%H_%M_%S)"
echo $JOB_NAME
gcloud ml-engine jobs submit training $JOB_NAME \
        --job-dir=gs://$1 \
        --scale-tier BASIC_GPU \
        --runtime-version 1.12 \
        --packages $PWD/models/research/dist/object_detection-0.1.tar.gz,$PWD/models/research/slim/dist/slim-0.1.tar.gz,/tmp/pycocotools/pycocotools-2.0.tar.gz \
        --module-name $PWD/models/research/object_detection.model_main \
        --region europe-west1 \
        -- \
        --model_dir=gs://$1 \
        --pipeline_config_path=gs://$1/data/fast_rcnn_resnet101_coco.config

它在以下行失败:

python -m $PWD/models/research/object_detection.model_main --model_dir=gs://my-hand-detector --pipeline_config_path=gs://my-hand-detector/data/fast_rcnn_resnet101_coco.config --job-dir gs://my-hand-detector/
/usr/bin/python: Import by filename is not supported.

根据日志,这是我理解的错误来源。在这方面的任何帮助都会有所帮助。谢谢你。

【问题讨论】:

    标签: google-cloud-platform object-detection


    【解决方案1】:

    我假设您使用的是来自 Tensorflow GitHub repository 的 model_main.py 文件。使用它,我已经能够复制您的错误消息。故障排除后,我成功提交了训练作业,可以正常训练模型了。

    为了解决您的问题,我建议您关注this tutorial,特别注意以下步骤:

    • 确保拥有更新版本的 tensorflow(1.14 未包含所有必要功能)
    • 根据输入数据正确生成 TFRecords 并上传到 GCS 存储桶
    • 配置对象检测管道(设置数据和标签映射的正确路径)

    就我而言,我已经使用 PASCAL VOC 输入数据重现了工作流程(请参阅 this)。


    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-27
      • 1970-01-01
      • 2020-06-18
      • 2019-03-12
      • 2018-12-07
      • 1970-01-01
      相关资源
      最近更新 更多