Skip to content
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

[prototype] Rewrite the meta dimension methods #6722

Merged
merged 11 commits into from
Oct 7, 2022

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented Oct 7, 2022

Related to #6491

This PR:

  • Eliminates the get_chw utility in favour of get_dimensions
  • Favours the use of get_num_channels and get_spatial_size
  • Extends get_spatial_size to support bboxes, masks etc

This is in preparation of removing the overuse of query_chw from the transforms to support single bboxes/masks without images/videos. The renaming of image_size to spatial_size will happen on a follow up PR.

@datumbox datumbox marked this pull request as draft October 7, 2022 14:49
@datumbox datumbox requested review from pmeier and vfdev-5 October 7, 2022 15:18
@datumbox datumbox marked this pull request as ready for review October 7, 2022 15:18
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @datumbox !

@datumbox datumbox merged commit 6e203b4 into pytorch:main Oct 7, 2022
@datumbox datumbox deleted the prototype/meta_sizes branch October 7, 2022 16:26
facebook-github-bot pushed a commit that referenced this pull request Oct 17, 2022
Summary:
* Rewrite `get_dimensions`, `get_num_channels` and `get_spatial_size`

* Remove `get_chw`

* Remove comments

* Make `get_spatial_size` support non-image input

* Reduce the unnecessary use of `get_dimensions*`

* Fix linters

* Fix merge bug

* Linter

* Fix linter

Reviewed By: NicolasHug

Differential Revision: D40427457

fbshipit-source-id: 3bf165ee130216047c3dc1dc671454e211d73855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants