训练Multinet踩坑记(一)

怀揣激动用原demo.py去测试一下自己刚训练好的multinet2(seg+detect).运行:

python demo_multi2.py --logdir /home/cvrsg/MultiNet/RUNS/max_steps_90000_batchsize_1/multinet2_2019_05_25_21.05/step10000 --input data/demo/um_000005.png --output_image output_image --gpus 0

报错:

.
.
.

ce (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0)
2019-05-28 18:24:08,705 INFO /home/cvrsg/MultiNet/hypes/../RUNS/max_steps_10000_batchsize_1/multinet2_2019_05_28_01.54/model.ckpt-9999
Traceback (most recent call last):
  File "demo.py", line 426, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "demo.py", line 329, in main
    test_constant_input(subhypes)
  File "demo.py", line 157, in test_constant_input
    road_input_conf = subhypes['road']['jitter']
KeyError: 'road'

(是关于road的错误,拍下脑门一想:肯定会报错呀,因为你训练的时候没有包含road的分类)然后把关于road相关的代码做修改,修改后的代码(demo_multi2.py)
再次运行:出现如下错误:

I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0:   Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0)
2019-05-27 23:16:59,827 ERROR 
2019-05-27 23:16:59,827 ERROR Issue with Segmentation input handling.
2019-05-27 23:16:59,827 ERROR Segmentation input will be resized during thisevaluation, but was not resized during training.
2019-05-27 23:16:59,827 ERROR This will lead to bad results.
2019-05-27 23:16:59,827 ERROR To use this script please train segmentation usingthe configuration:.
2019-05-27 23:16:59,827 ERROR 
{
    "jitter": {
    "reseize_image": true,
    "image_height" : 384,
    "image_width" : 1248,
    },
}
2019-05-27 23:16:59,827 ERROR Alternatively implement evaluation using non-resized input.

  • 训练前设置(reseize_image": true,)

WHAT???
原来训练的时候需要将seg部分:在KittiSeg.json中搜索(ctrl+F)reseize_image,默认设置的是false,改成 true并保存。
然后重新训练。

(续)
重新训练好之后(本人为了检验是否的却是上述问题,这里先跑了10000steps),我们拿之前修改过的代码测试:

(a)下载原作者训练好的权重测试效果。
(a)下载原作者训练好的权重测试效果。(b):自己训练10000steps的检测效果。
(b)自己训练10000steps的检测效果

从测试效果来看:
分割的效果几乎差不多;
检测的效果:(a)出现了误检现象,(b)则没有(开心,哈哈)。原文训练好像是14w steps,而自己只训练了10000 steps,效果就差不多了,最起码分割效果是相当了。但是检测效果还是没有14w steps 检测的准确。

如有不对,望大佬指正,轻喷。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值