doubleheadsrcnn
doubleheadsrcnn copied to clipboard
I found you did not use the self.cls_nonlocal() and self.reg_nonlocal in roi_box_feature_extractors.py.The number of blocks "self.cls_num_stack" and "self.reg_num_stack" are zero
codes are here:https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_feature_extractors.py. And another question:I found no difference between the reg and cls operations. All the network structure parameters are the same except some details.
@yangmin666 You are right, cls_nonloca and reg_nonlocal is not used. Instead, self.shared_nonlocal is used.
The code is at: https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/cmd_train.sh#L35 https://github.com/wuyuebupt/doubleheadsrcnn/blob/a744b4121d52935741f49d845bae7878270ea291/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_feature_extractors.py#L186
There are four losses in total: conv reg, conv cls, fc reg and fc cls. Conv cls and conv cls will share one head, e.g. https://github.com/wuyuebupt/doubleheadsrcnn/blob/a744b4121d52935741f49d845bae7878270ea291/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_feature_extractors.py#L227 Fc reg and fc cls will shared the other head, e.g. https://github.com/wuyuebupt/doubleheadsrcnn/blob/a744b4121d52935741f49d845bae7878270ea291/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_feature_extractors.py#L245
The corresponding predictor is at https://github.com/wuyuebupt/doubleheadsrcnn/blob/master/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_predictors.py#L122
The reg and cls losses are also different, e.g. reg uses L1 loss, cls uses cross-entropy loss. I am not sure if those answered your question. But let me know if you need more info.