-
Notifications
You must be signed in to change notification settings - Fork 304
use scales (tuple of floats) in region_proposal_network #729
Conversation
@@ -82,8 +82,8 @@ def __call__(self, x, img_size, scale=1.): | |||
Its shape is :math:`(N, C, H, W)`. | |||
img_size (tuple of ints): A tuple :obj:`height, width`, | |||
which contains image size after scaling. | |||
scale (float): The amount of scaling done to the input images after | |||
reading them from files. | |||
scales (tuple of float): The amount of scaling done to the input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tuple of floats
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is better to make the definition clear that scaling parameter can be different for each image.
Perhaps:
The amount of scaling done to each input image during preprocessing
?
Similarly, please change the rest of the definition for scales
(they are currently not consistent, but it would be better to use the same wording for all of them).
@@ -132,7 +132,7 @@ def __call__(self, x, scale=1.): | |||
|
|||
Args: | |||
x (~chainer.Variable): 4D image variable. | |||
scale (float): Amount of scaling applied to the raw image | |||
scales (tuple of float): Amount of scaling applied to the raw image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -79,7 +79,7 @@ def __call__(self, imgs, bboxes, labels, scale): | |||
the definition, which means that the range of the value | |||
is :math:`[0, L - 1]`. :math:`L` is the number of foreground | |||
classes. | |||
scale (float or ~chainer.Variable): Amount of scaling applied to | |||
scale (~chainer.Variable): Amount of scaling applied to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scales
Thx for the review. I updated. |
@@ -112,10 +112,10 @@ def n_class(self): | |||
# Total number of classes including the background. | |||
return self.head.n_class | |||
|
|||
def __call__(self, x, scale=1.): | |||
def __call__(self, x, scales): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value should be set in order to prevent this from becoming no-compat
@@ -67,7 +67,7 @@ def __init__( | |||
self.loc = L.Convolution2D( | |||
mid_channels, n_anchor * 4, 1, 1, 0, initialW=initialW) | |||
|
|||
def __call__(self, x, img_size, scale=1.): | |||
def __call__(self, x, img_size, scales): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Thanks, updated :) |
x
is(N, C, H, W)
andscale
is scalar value.I modify to use
scales: (N, )
.