mtcnn icon indicating copy to clipboard operation
mtcnn copied to clipboard

P_net only do not use negative dataset

Open CongWeilin opened this issue 8 years ago • 6 comments

When i read your code 'train_P_net.py', I found that you use function 'gt_imdb()'in function 'train_P_net'. This only returns positive + part face, but without negative dataset. However, in Pnet, it have to distinguish face or noface, neg+pos should be both in train data...

I am a bit confused, wish your early reply

CongWeilin avatar Jan 15 '17 12:01 CongWeilin

The fuction 'gt_imdb()' will return negative dataset as long as the imglist file in .data/mtcnn/imglists/ contains negative images

Seanlinx avatar Jan 16 '17 03:01 Seanlinx

Another question: if you send a negative data into the net, since neg_data do not have roi information, how could the net process in 'bbpx_pred Loss Layer'?

CongWeilin avatar Jan 16 '17 04:01 CongWeilin

Negative image's gt_bbox is set to 0,0,0,0, so the gradient can be computed normally. And I block the gradient of negative images in the customOp named 'negativemining'.

Seanlinx avatar Jan 16 '17 04:01 Seanlinx

Really thanks a lot, you really helped me a lot. In conclusion: with both positive and negative images, we calculate 'cls_prob' and 'bbox_pred' loss, however, do not backward update the bbow_pred weigh for negative images? Am i right?

CongWeilin avatar Jan 16 '17 04:01 CongWeilin

That's it

Seanlinx avatar Jan 16 '17 05:01 Seanlinx

wechatimg1 i couldn't find anything about do not backward update the bbow_pred weigh for negative images, wechatimg2 forward either... T.T

CongWeilin avatar Jan 16 '17 05:01 CongWeilin