Commit 1315c89
Fix rrpn proposal validation
Summary:
https://github.com/facebookresearch/detectron2/blob/08f617cc2c9276a48e7e7dc96ae946a5df23af3f/detectron2/modeling/proposal_generator/proposal_utils.py#L104
```python
if not valid_mask.all():
if training:
raise FloatingPointError(
"Predicted boxes or scores contain Inf/NaN. Training has diverged."
)
boxes = boxes[valid_mask]
scores_per_img = scores_per_img[valid_mask]
lvl = lvl[valid_mask]
```
Unlike function **find_top_rpn_proposals**, **find_top_rrpn_proposals** does not include valid masking for level indices.
When the program goes into if condition, it gives an undesirable error says that "shape does not match".
I add a handling code same with **find_top_rpn_proposals**.
Pull Request resolved: #3770
Reviewed By: sstsai-adl
Differential Revision: D33119548
Pulled By: zhanghang1989
fbshipit-source-id: fee677ad6b610deb713d2769901ab8d3d47539c31 parent 9176db6 commit 1315c89
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
103 | | - | |
104 | 110 | | |
105 | | - | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
0 commit comments