VDIGPKU / M2Det

M2Det: A Single-Shot Object Detector based on Multi-Level Feature Pyramid Network
MIT License
1.45k stars 318 forks source link

Hard Negative Mining problem #121

Open shinji-ohkubo opened 3 years ago

shinji-ohkubo commented 3 years ago

multibox_loss.py -->num_neg = torch.clamp(self.negpos_ratio * num_pos, max=pos.size(1) - 1)

If positive is 0, negative is also 0, which hinders negative learning and causes over-detection. I think it is correct to set a fixed minimum value.