zhaoweicai / cascade-rcnn

Caffe implementation of multiple popular object detection frameworks
1.04k stars 293 forks source link

questions on the fg/bg resampling mechanism. #38

Open Cogito2012 opened 6 years ago

Cogito2012 commented 6 years ago

In the proposal_target_layer.cpp at line 169 to line 256, the fg and bg box indexes are sampled with different way compared with faster rcnn.
It seems that the fg/bg samples in cascade rcnn are not allowed repeated sampling, and if the sampled bg boxes are not adequate enough, some boxes are picked up from discarded pool.
This is very different from faster rcnn. I was wondering whether this mechanism is important for cascade rcnn.

By the way, I'm also trying to reimplement cascade rcnn with tensorflow api, and still use the resampling method in faster rcnn, but the bbox regression loss curves in the three stages look strange (loss_box_stage1 > loss_box_stage2 > loss_box_stage3). Does this result relate to the sampling method, or simply the normalization statistics (stds and means) are not set well?

zhaoweicai commented 6 years ago

Thanks for the visualization. The upper figures look weird. The colors mean training/testing? Maybe you did something wrong. But I am pretty sure that the idea of Cascade R-CNN has nothing to do with my sampling. Our re-implementation on Detectron (using exact the Faster R-CNN sampling) works very well. And for the normalization statistics, using mine should be fine.

Cogito2012 commented 6 years ago

@zhaoweicai Well, thanks for your confirmation on the sampling method. The colors in the upper figures mean training/testing. I'll check my re-implementation in detail.