Closed AdeelH closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.14%. Comparing base (
adac1a2
) to head (4389af7
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Overview
This PR introduces a new
calculate_required_padding()
function that calculates the appropriate padding size--based onsize
,stride
,pad_direction
, andcrop_sz
--which is now used byBox.get_windows()
andpredict_scene_ss()
. It also adds more discussion about padding to the Sampling training data tutorial notebook.The main motivation is to make it easier to determine the right padding when making semantic segmentation predictions with a
crop_sz
such that no pixels are left out. The padding value calculated bycalculate_required_padding()
ensures this.Additionally, when
crop_sz
is not specified,calculate_required_padding()
returns the minimum padding required to generate enough windows to cover the entire extent. This is a change from the previous behavior of always usingsize / 2
.Checklist
needs-backport
label if the change should be back-ported to the previous releaseNotes
N/A
Testing Instructions
See new/updated unit tests.