-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix encoder depth & output stride on DeeplabV3 & DeeplabV3+ #991
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0455936
fix encoder depth & output stride
brianhou0208 79d5568
fix ruff style
brianhou0208 c97d43a
Revert "fix ruff style"
brianhou0208 14dc2a9
fix encoder depth & output stride
brianhou0208 bafd4fb
fix ruff style
brianhou0208 f96dbda
update deeplabv3+ doc
brianhou0208 34df157
Merge branch 'fix_deeplab' of https://github.com/brianhou0208/segment…
brianhou0208 9fc8a4b
restored aux_params
brianhou0208 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 only concern here is speed, cause the higher resolution feature we take, the more we need to process
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 think there might have been some misunderstanding.
Currently, regardless of the
encoder_depth
,high_res_features
is always fixed at 1/4 of the input resolution, which improves speed.Before #986 and #991, the resolution of
high_res_features
varied depending on theencoder_depth
:encoder_depth=5
:high_res_features
was 1/4 of the input resolution.encoder_depth=4
:high_res_features
was 1/2 of the input resolution.encoder_depth=3
:high_res_features
matched the input resolution.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.
For your reference, in PR #986, I updated the
high_res_features
logic as follows:encoder_depth
=5:encoder_channels[-4]
, which corresponds to index 2 (1/4 of the input resolution).encoder_depth
=4:encoder_channels[-3]
, which corresponds to index 2 (1/4 of the input resolution).encoder_depth
=3:encoder_output_stride
=8:encoder_channels[-2]
, which corresponds to index 3 (1/2 of the input resolution).encoder_output_stride
=16:encoder_channels[-3]
, which corresponds to index 2 (1/4 of the input resolution).The only difference in
high_res_features
is whenencoder_depth
=3 andencoder_output_stride
=8.I think PR #991 is preferable because it allows you to consistently set
upsampling
to 4 to preserve the input/output tensor sizes. In contrast, PR #986 requires settingupsampling
to 2 to maintain sizes whenencoder_depth
=3 andencoder_output_stride
=8.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.
Thanks for explanations! It's clearer now 🙏