2
votes

I was reading the fast rcnn caffe code. Inside the SmoothL1LossLayer, I found that the implementation is not the same as the paper equation, is that what it should be ?

The paper equation:

enter image description here

For each labeled bounding box with class u, we calculate the sum error of tx, ty, tw, th, but in the code, we have:

enter image description here

There is no class label information used. Can anyone explain why?

And in the backpropagation step,

enter image description here

why there is an i here ?

1

1 Answers

0
votes
  1. In train.prototxt bbox_pred has output size 84 = 4(x,y,h,w) * 21(number of label). So does bbox_targets. So it is using all labels.
  2. As for loss layers it is looping over bottom blobs to find which on to propagate gradient through. Here only one of propagate_down[i] is true.