We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bf015c commit e128a7bCopy full SHA for e128a7b
layers/functions/prior_box.py
@@ -2,6 +2,7 @@
2
from math import sqrt as sqrt
3
from itertools import product as product
4
import torch
5
+from layers.box_utils import point_form, center_size
6
7
8
class PriorBox(object):
@@ -51,5 +52,7 @@ def forward(self):
51
52
# back to torch land
53
output = torch.Tensor(mean).view(-1, 4)
54
if self.clip:
55
+ output = point_form(output)
56
output.clamp_(max=1, min=0)
57
+ output = center_size(output)
58
return output
0 commit comments