xingyizhou / CenterNet2

Two-stage CenterNet
Apache License 2.0
1.2k stars 188 forks source link

fix potential wrong reg_target assignment #52

Open xmyqsh opened 3 years ago

xmyqsh commented 3 years ago

Fix potential wrong reg_target assignment on the center point collision problem as Objects as Points 6.1.1 said. Though we cannot forbid the center point collision problem, we can guarantee that the reg_target assignment behavior is deterministic, assigning to the nearest one.

I'm not sure about the effect of this change, I have no enough machines to test it. But I think this change is reasonable, especially for large epochs training.

By the way, I also wonder it is reasonable or not to remove this line dist2[is_peak] = 0 and believe the probability totally.

Wonderful work! CenterNet2 tells us the power of probabilistic on two-stage detection. But the CenterNet* could be further optimized, such as ground truth auto-assignment on feature pyramid instead of configuring scale range manually.