xmojiao / deeplab_v2

基于v2版本的deeplab,使用VGG16模型,在VOC2012,Pascal-context,NYU-v2等多个数据集上进行训练
162 stars 103 forks source link

不是路径问题,为什么我的fc输出的.mat转成png后都是黑的, #9

Open litingsjj opened 6 years ago

litingsjj commented 6 years ago

主要是作者预训练的模型与你实际测试的模型出现了偏差。主要是fc8 的问题。 以https://github.com/xmojiao/deeplab_v2 为例,如果直接使用此代码,则run_pascal.sh出现在voc12目录下,而run_pascal.sh上EXP2=. ,这与官方的预设不同。官方代码,假定run_pascal.sh应该出现在voc12上一级目录下。 这样最后测试时会出现fc8_voc12_1,fc8_voc12_2,fc8_voc12_3,fc8_voc12_4被忽略的情况。 看到博客里说的,我这边不是这个问题,路径也没错,但还是出现这个问题,请问是哪里出了问题??

xmojiao commented 6 years ago

@litingsjj 全黑的吗?那可能是你的cudnn设置的问题,deeplab2很多人也有这个问题。其他人将Makefile.config中的USE_CUDNN =1 就好了,意思就是仍然使用cuda,但是禁止cudnn。你可以试试

litingsjj commented 6 years ago

@xmojiao 我的USE_CUDNN一直没有打开过,应该不是这个问题

ygjwd12345 commented 5 years ago

我也出现了这个问题,训练的好好地,但是预测的结果就是全黑 I0302 18:59:54.658221 68687 sgd_solver.cpp:106] Iteration 19920, lr = 6.94792e-06 I0302 19:00:08.628782 68687 solver.cpp:229] Iteration 19940, loss = 0.152072 I0302 19:00:08.629428 68687 solver.cpp:245] Train net output #0: accuracy = 0.933349 I0302 19:00:08.629456 68687 solver.cpp:245] Train net output #1: accuracy = 0.790654 I0302 19:00:08.629478 68687 solver.cpp:245] Train net output #2: accuracy = 0.775194 I0302 19:00:08.629509 68687 sgd_solver.cpp:106] Iteration 19940, lr = 5.36305e-06 I0302 19:00:23.009595 68687 solver.cpp:229] Iteration 19960, loss = 0.164694 I0302 19:00:23.009635 68687 solver.cpp:245] Train net output #0: accuracy = 0.967043 I0302 19:00:23.009654 68687 solver.cpp:245] Train net output #1: accuracy = 0.857977 I0302 19:00:23.009670 68687 solver.cpp:245] Train net output #2: accuracy = 0.728167 I0302 19:00:23.009701 68687 sgd_solver.cpp:106] Iteration 19960, lr = 3.72325e-06 I0302 19:00:37.206060 68687 solver.cpp:229] Iteration 19980, loss = 0.163561 I0302 19:00:37.206102 68687 solver.cpp:245] Train net output #0: accuracy = 0.931767 I0302 19:00:37.206113 68687 solver.cpp:245] Train net output #1: accuracy = 0.776065 I0302 19:00:37.206123 68687 solver.cpp:245] Train net output #2: accuracy = 0.780556 I0302 19:00:37.206136 68687 sgd_solver.cpp:106] Iteration 19980, lr = 1.99524e-06 I0302 19:00:50.589030 68687 solver.cpp:456] Snapshotting to binary proto file ./log_iter_20000.caffemodel I0302 19:00:56.394479 68687 sgd_solver.cpp:273] Snapshotting solver state to binary proto file ./log_iter_20000.solverstate I0302 19:01:01.731747 68687 solver.cpp:318] Iteration 20000, loss = 0.153133

ygjwd12345 commented 5 years ago

我还打开了 test的生成的mat文件,全是零!!! @xmojiao

ygjwd12345 commented 5 years ago

我是用cmake编译的

ygjwd12345 commented 5 years ago

2007_000332_blob_0 我现在能跑通了,总结了两条错误: 1.weight赋值是采用而是普通的vgg16版本,应该用init.caffemodel github上带的,这个似乎与fine tune有关 2.只改了sh文件没有对应改solver.prototxt. ps:我是用cmake编译的

xmojiao commented 5 years ago

@ygjwd12345 厉害了 ###

ygjwd12345 commented 5 years ago

@xmojiao 在caffe下没法计算mIoU吗