Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
6d9ab576
Unverified
Commit
6d9ab576
authored
Oct 01, 2021
by
Alexander Soare
Committed by
GitHub
Oct 01, 2021
Browse files
Better description of spatial_scale parameter (#4522)
parent
4edabbc7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
torchvision/ops/ps_roi_align.py
torchvision/ops/ps_roi_align.py
+4
-2
torchvision/ops/ps_roi_pool.py
torchvision/ops/ps_roi_pool.py
+4
-2
torchvision/ops/roi_align.py
torchvision/ops/roi_align.py
+4
-2
torchvision/ops/roi_pool.py
torchvision/ops/roi_pool.py
+4
-2
No files found.
torchvision/ops/ps_roi_align.py
View file @
6d9ab576
...
...
@@ -30,8 +30,10 @@ def ps_roi_align(
in the batch.
output_size (int or Tuple[int, int]): the size of the output (in bins or pixels) after the pooling
is performed, as (height, width).
spatial_scale (float): a scaling factor that maps the input coordinates to
the box coordinates. Default: 1.0
spatial_scale (float): a scaling factor that maps the box coordinates to
the input coordinates. For example, if your boxes are defined on the scale
of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of
the original image), you'll want to set this to 0.5. Default: 1.0
sampling_ratio (int): number of sampling points in the interpolation grid
used to compute the output value of each pooled output bin. If > 0,
then exactly ``sampling_ratio x sampling_ratio`` sampling points per bin are used. If
...
...
torchvision/ops/ps_roi_pool.py
View file @
6d9ab576
...
...
@@ -29,8 +29,10 @@ def ps_roi_pool(
in the batch.
output_size (int or Tuple[int, int]): the size of the output (in bins or pixels) after the pooling
is performed, as (height, width).
spatial_scale (float): a scaling factor that maps the input coordinates to
the box coordinates. Default: 1.0
spatial_scale (float): a scaling factor that maps the box coordinates to
the input coordinates. For example, if your boxes are defined on the scale
of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of
the original image), you'll want to set this to 0.5. Default: 1.0
Returns:
Tensor[K, C / (output_size[0] * output_size[1]), output_size[0], output_size[1]]: The pooled RoIs.
...
...
torchvision/ops/roi_align.py
View file @
6d9ab576
...
...
@@ -33,8 +33,10 @@ def roi_align(
in the batch.
output_size (int or Tuple[int, int]): the size of the output (in bins or pixels) after the pooling
is performed, as (height, width).
spatial_scale (float): a scaling factor that maps the input coordinates to
the box coordinates. Default: 1.0
spatial_scale (float): a scaling factor that maps the box coordinates to
the input coordinates. For example, if your boxes are defined on the scale
of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of
the original image), you'll want to set this to 0.5. Default: 1.0
sampling_ratio (int): number of sampling points in the interpolation grid
used to compute the output value of each pooled output bin. If > 0,
then exactly ``sampling_ratio x sampling_ratio`` sampling points per bin are used. If
...
...
torchvision/ops/roi_pool.py
View file @
6d9ab576
...
...
@@ -30,8 +30,10 @@ def roi_pool(
in the batch.
output_size (int or Tuple[int, int]): the size of the output after the cropping
is performed, as (height, width)
spatial_scale (float): a scaling factor that maps the input coordinates to
the box coordinates. Default: 1.0
spatial_scale (float): a scaling factor that maps the box coordinates to
the input coordinates. For example, if your boxes are defined on the scale
of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of
the original image), you'll want to set this to 0.5. Default: 1.0
Returns:
Tensor[K, C, output_size[0], output_size[1]]: The pooled RoIs.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment