luoyetx / Joint-Face-Detection-and-Alignment

Caffe and Python implementation of Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
BSD 3-Clause "New" or "Revised" License
102 stars 50 forks source link

人脸检测正确率波动 #8

Open Tim5Tang opened 6 years ago

Tim5Tang commented 6 years ago

你好,非常感谢你的开源,这是我目前能跑完整的唯一一个mtcnn.... 可能是我比较菜,但是我看了你的网络结构和lossfunction应该是我看到的所有mtcnn里面最清晰明了的了 我在训练R层的时候,发现pos_acc有较强的波动性不知道是什么原因,如下训练部分打印 I0602 11:04:08.421706 55441 solver.cpp:239] Iteration 13500 (39.3993 iter/s, 12.6906s/500 iters), loss = 1.55104 I0602 11:04:08.421797 55441 solver.cpp:258] Train net output #0: face_cls_loss = 0.0894116 ( 1 = 0.0894116 loss) I0602 11:04:08.421815 55441 solver.cpp:258] Train net output #1: face_cls_neg_acc = 0.994792 ( 0.5 = 0.497396 loss) I0602 11:04:08.421825 55441 solver.cpp:258] Train net output #2: face_cls_pos_acc = 0.953125 ( 1 = 0.953125 loss) I0602 11:04:08.421844 55441 sgd_solver.cpp:112] Iteration 13500, lr = 0.005 I0602 11:04:21.311125 55441 solver.cpp:239] Iteration 14000 (38.7931 iter/s, 12.8889s/500 iters), loss = 1.55069 I0602 11:04:21.311210 55441 solver.cpp:258] Train net output #0: face_cls_loss = 0.153639 ( 1 = 0.153639 loss) I0602 11:04:21.311228 55441 solver.cpp:258] Train net output #1: face_cls_neg_acc = 0.981771 ( 0.5 = 0.490885 loss) I0602 11:04:21.311240 55441 solver.cpp:258] Train net output #2: face_cls_pos_acc = 0.882812 ( 1 = 0.882812 loss)

luoyetx commented 6 years ago

正常,mini-batch 训练就是这样的

liangheng commented 5 years ago

@Tim5Tang 你将layers文件夹下文件拷贝到caffe目录下编译出现的jfda_loss_param()未定义错误是怎么解决的?

Tim5Tang commented 5 years ago

这个的话应该是你没有将损失函数层jfda,放到caffe 对应的位置

liangheng commented 5 years ago

@Tim5Tang 谢谢你及时的回答,非常感谢。但我很确定按照作者提供的copy.sh将损失函数层jfda放到caffe对应的位置了 jfda_loss_param()确实未定义 因为根本搜索不到jfda_loss_param()的实现。可以在帮忙确定下吗

Tim5Tang commented 5 years ago

你那个proto文件中有没有jfda想关的参数,一般新加一个层需要几个部分,proto,头文件,layer都要看一下对不对

liangheng commented 5 years ago

proto文件中是有用jfda_loss_param的 如下: jfda_loss_param { drop_loss_rate: 0.3 } 但这不是关键 ,关键是layers/jfda_loss_layer.cpp中jfda_loss_param()函数未实现 会不会是作者故意删除掉了...

17759205390 commented 5 years ago

jfda_loss_param { drop_loss_rate: 0.3 } 把这个删了,在caffe的layer里面自己定为0.3就行了,我也看到这个问题了