makefile / frcnn

Faster R-CNN / R-FCN :bulb: C++ version based on Caffe
Other
184 stars 75 forks source link

res101 inference result zero #16

Open SuperPowerLF2 opened 5 years ago

SuperPowerLF2 commented 5 years ago

看Owner是中国人就用中文了(小声BB...)

我直接用caffe.exe训练了 resnet101 (models/FRCNN/res101/solver.proto VOC2007) 我一开始训练了10000步发现推理结果为0 (使用test_frcnn.exe, 直接用训练集当做测试集) 于是我继续训练到20000发现推理结果还是为0 详细调试后发现score肥肠肥肠低都是0.00x,最高的我看到也就0.05... 我浏览了其他问题, 你说可以不用convert_model.py 于是我就直接训练完的模型直接test_frcnn也不行.输出结果如下

I0828 13:00:15.272047 19684 FRCNNtest.cpp:210] Handle 97 th image : 000193.jpg, with image_thresh : 0, 0 -> 0 boxes I0828 13:00:15.367131 19684 FRCNNtest.cpp:210] Handle 98 th image : 000194.jpg, with image_thresh : 0, 0 -> 0 boxes I0828 13:00:15.479229 19684 FRCNNtest.cpp:210] Handle 99 th image : 000198.jpg, with image_thresh : 0, 0 -> 0 boxes I0828 13:00:15.584322 19684 FRCNNtest.cpp:210] Handle 100 th image : 000200.jpg, with image_thresh : 0, 0 -> 0 boxes I0828 13:00:15.687412 19684 FRCNNtest.cpp:210] Handle 101 th image : 000203.jpg, with image_thresh : 0, 0 -> 0 boxes I0828 13:00:15.791504 19684 FRCNNtest.cpp:210] Handle 102 th image : 000207.jpg, with image_thresh : 0, 0 -> 0 boxes I0828 13:00:15.887589 19684 FRCNNtest.cpp:210] Handle 103 th image : 000208.jpg, with image_thresh : 0, 0 -> 0 boxes

我现在不知道怎么修改了...下面是训练时一部分....我认为正常

I0828 11:53:16.375608 19192 solver.cpp:218] Iteration 19920 (2.24295 iter/s, 8.91684s/20 iters), loss = 1.99799 I0828 11:53:16.375608 19192 solver.cpp:237] Train net output #0: bbox_accuracy = 0.75 I0828 11:53:16.376610 19192 solver.cpp:237] Train net output #1: loss_bbox = 0.430361 ( 1 = 0.430361 loss) I0828 11:53:16.376610 19192 solver.cpp:237] Train net output #2: loss_cls = 1.27145 ( 1 = 1.27145 loss) I0828 11:53:16.376610 19192 solver.cpp:237] Train net output #3: rpn_cls_loss = 0.898545 ( 1 = 0.898545 loss) I0828 11:53:16.376610 19192 solver.cpp:237] Train net output #4: rpn_loss_bbox = 0.391415 ( 1 = 0.391415 loss) I0828 11:53:16.376610 19192 sgd_solver.cpp:105] Iteration 19920, lr = 0.001 I0828 11:53:25.249524 19192 solver.cpp:218] Iteration 19940 (2.25401 iter/s, 8.87307s/20 iters), loss = 1.99201 I0828 11:53:25.249524 19192 solver.cpp:237] Train net output #0: bbox_accuracy = 0.75 I0828 11:53:25.250700 19192 solver.cpp:237] Train net output #1: loss_bbox = 0.644284 ( 1 = 0.644284 loss) I0828 11:53:25.250700 19192 solver.cpp:237] Train net output #2: loss_cls = 0.905329 ( 1 = 0.905329 loss) I0828 11:53:25.250700 19192 solver.cpp:237] Train net output #3: rpn_cls_loss = 0.0850422 ( 1 = 0.0850422 loss) I0828 11:53:25.250700 19192 solver.cpp:237] Train net output #4: rpn_loss_bbox = 0.0457095 ( 1 = 0.0457095 loss) I0828 11:53:25.251526 19192 sgd_solver.cpp:105] Iteration 19940, lr = 0.001 I0828 11:53:34.160838 19192 solver.cpp:218] Iteration 19960 (2.24479 iter/s, 8.90953s/20 iters), loss = 2.00955 I0828 11:53:34.160838 19192 solver.cpp:237] Train net output #0: bbox_accuracy = 0.75 I0828 11:53:34.161839 19192 solver.cpp:237] Train net output #1: loss_bbox = 0.721698 ( 1 = 0.721698 loss) I0828 11:53:34.161839 19192 solver.cpp:237] Train net output #2: loss_cls = 1.35276 ( 1 = 1.35276 loss) I0828 11:53:34.161839 19192 solver.cpp:237] Train net output #3: rpn_cls_loss = 0.107642 ( 1 = 0.107642 loss) I0828 11:53:34.161839 19192 solver.cpp:237] Train net output #4: rpn_loss_bbox = 0.0488492 ( 1 = 0.0488492 loss) I0828 11:53:34.161839 19192 sgd_solver.cpp:105] Iteration 19960, lr = 0.001 I0828 11:53:43.032603 19192 solver.cpp:218] Iteration 19980 (2.25453 iter/s, 8.87101s/20 iters), loss = 1.98453 I0828 11:53:43.032603 19192 solver.cpp:237] Train net output #0: bbox_accuracy = 0.96875 I0828 11:53:43.033603 19192 solver.cpp:237] Train net output #1: loss_bbox = 0.000514256 ( 1 = 0.000514256 loss) I0828 11:53:43.033603 19192 solver.cpp:237] Train net output #2: loss_cls = 0.411482 ( 1 = 0.411482 loss) I0828 11:53:43.033603 19192 solver.cpp:237] Train net output #3: rpn_cls_loss = 0.192493 ( 1 = 0.192493 loss) I0828 11:53:43.033603 19192 solver.cpp:237] Train net output #4: rpn_loss_bbox = 0.0110174 ( 1 = 0.0110174 loss) I0828 11:53:43.033603 19192 sgd_solver.cpp:105] Iteration 19980, lr = 0.001

请问如何修改使其能跑锕....救救我...

makefile commented 5 years ago

你的分类损失比较大,看起来不太正常。和另一个issue里边的问题一样,我很长时间不用这份代码了,也不好找出原因是什么。或许你换个proto再试试,或者换到我commit里边的历史版本,不清楚是不是因为我做了哪些改动造成的。

SuperPowerLF2 commented 5 years ago

@makefile 还在苦战中, 寻找问题

SuperPowerLF2 commented 5 years ago

@makefile 请问在哪里修改优化器类型, 原版在solver.proto type. 您的caffe在哪里改, 还有我想添加自己的优化器能不能帮我指条明路

makefile commented 5 years ago

@SuperPowerLF2 优化器类型也是在solver.proto里边指定,优化器的自定义可以在sgd_solver.cpp里边改。

SuperPowerLF2 commented 5 years ago

@makefile 谢谢!

SuperPowerLF2 commented 5 years ago

@makefile 我发现训练的成品(caffemodel), BN层gamma, beta,mean 里有参数! 可是我明明设置了 param { lr_mult: 0 decay_mult: 0 } x3 三个参数都是设置了, 你觉得是不是这个原因导致的 我网上找不到使用BN的预训练模型, 只能问问你...

makefile commented 5 years ago

@SuperPowerLF2 设置为0表示固定初始参数不变,不进行学习。