• Ross Girshick's avatar
    Avoid negatives areas found exception · 47e457a5
    Ross Girshick authored
    Summary:
    In some cases, eg training from scratch with a high LR or w/o activation normalization, we saw a "Negative Areas Found" exception. The RPN proposal generation code filters proposals that have a height or width that are too small. By default we use a `min_size` of 0. In a distant other part of the code, it computes the area of the proposals in order to determine FPN scale assignment. An issue arises because the `+ 1` in the `x2 - x1 + 1` width (and height) computation is not scale invariant. It turns out that the filter based on `min_size` was performed in the scaled input coordinates while the FPN scale assignment areas are computed using the unscaled, original image size. Thus a `min_size` of 0 can result in proposals with a negative area as measured wrt the original image. Uuuugh :P.
    
    This diff addresses the issue by filtering based on the area in the unscaled input image and also using a generous (though still small) margin of 1 pixel for `min_size`.
    
    Reviewed By: KaimingHe
    
    Differential Revision: D8773216
    
    fbshipit-source-id: b4ffbc5b6a831176b2656810edea3d3d4e52d687
    47e457a5
Name
Last commit
Last update
.github Loading commit data...
cmake Loading commit data...
configs Loading commit data...
demo Loading commit data...
detectron Loading commit data...
docker Loading commit data...
projects/GN Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
FAQ.md Loading commit data...
GETTING_STARTED.md Loading commit data...
INSTALL.md Loading commit data...
LICENSE Loading commit data...
MODEL_ZOO.md Loading commit data...
Makefile Loading commit data...
NOTICE Loading commit data...
README.md Loading commit data...
requirements.txt Loading commit data...
setup.py Loading commit data...