docker中tensorflow object_detection API训练问题及解决方法

1.尝试运行models/research/object_detection/目录下的.py文件时出现:

ModuleNotFoundError: No module named 'object_detection'

需在models/research/目录下执行:

python setup.py install

出现ModuleNotFoundError: No module named 'pycocotools'

执行:

conda install pycocotools

出现 ImportError: No module named 'nets'

需在models/research/slim目录下执行:

python setup.py install

2.训练中出现的问题

① raise ValueError('First step cannot be zero.')ValueError: First step cannot be zero.

  删除预训练模型Config中的下列代码

1

2

3

4

schedule{

        step:0,

        learning_rate:0.00001

}

 ②Assertion failed: [maximum box coordinate value is larger than 1.100000: ] [1.1435889]

问题:标注数据,超出了图像的长宽

解决方法:在生成标注数据时,将x,y坐标进行截断

3.出现 ValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].错误

找到错误提示中的learning_schedules.py

将其167~19行

    rate_index = tf.reduce_max(tf.where(tf.greater_equal(global_step, boundaries),
                                          range(num_boundaries),
                                          [0] * num_boundaries))

修改成:

      rate_index = tf.reduce_max(tf.where(tf.greater_equal(global_step, boundaries),
                                          list(range(num_boundaries)),
                                          [0] * num_boundaries)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值