thangvubk / Cascade-RPN

Code for NeurIPS 2019 paper: "Cascade RPN: Delving into High-Quality Region Proposal Network with Adaptive Convolution"
Apache License 2.0
180 stars 19 forks source link

A question about the loss function #4

Closed LostStars3 closed 4 years ago

LostStars3 commented 5 years ago

Hi, It is mentioned in the paper that the use of anchor-free and sample discrimination in stage 1, an anchor is a positive sample if its center is inside the center region of an object. And then, I found the classification loss function that you use at this stage is CrossEntropyLoss. I wonder why you didn't use focal loss like the other anchor-free methods. Wouldn't you encounter the problem of unbalanced positive and negative samples. Looking forward to your reply, thank you!

thangvubk commented 5 years ago

The class head is used for only the last stage. (See Figure 2.e in the paper and check here). It is for two reasons:

  1. Reduce overhead
  2. Avoid imbalance at the first stage because the stage 2 has more good proposals than stage 1 to some extent.

You can also try to use focal loss as classification loss of stage 2. It is expected that you may get some gain. Here, we just follow standard RPN that use CrossEntropy for classification loss.

LostStars3 commented 5 years ago

The class head is used for only the last stage. (See Figure 2.e in the paper and check here). It is for two reasons:

  1. Reduce overhead
  2. Avoid imbalance at the first stage because the stage 2 has more good proposals than stage 1 to some extent.

You can also try to use focal loss as classification loss of stage 2. It is expected that you may get some gain. Here, we just follow standard RPN that use CrossEntropy for classification loss.

I see, thank you for your reply!