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

RandomResizedCrop: add tests + enable channel-first and video support #2430

Merged
merged 2 commits into from
Nov 4, 2020

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Nov 3, 2020

Signed-off-by: Michał Zientkiewicz mzient@gmail.com

Why we need this PR?

Pick one, remove the rest

  • It adds new feature needed for more complete video use case coverage
  • It adds missing tests for RandomResizedCrop

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    • Handle index of the first spatial dimension
    • Add more allowed layouts
    • Remove the check for the number of dimensions (it's implicitly handled by layout check).
  • Affected modules and functionalities:
    • RandomResizedCrop
  • Key points relevant for the review:
    • N/A
  • Validation and testing:
    • Python tests: that's the major part of this PR
  • Documentation (including examples):
    • Added AllowSequences to schema

JIRA TASK: DALI-1720

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@mzient mzient requested a review from a team November 3, 2020 11:31
Copy link
Contributor

@JanuszL JanuszL left a comment

Choose a reason for hiding this comment

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

Please add a relevant test.

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@mzient
Copy link
Contributor Author

mzient commented Nov 3, 2020

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1758438]: BUILD STARTED

@mzient mzient requested a review from JanuszL November 3, 2020 17:01
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1758438]: BUILD PASSED

@mzient mzient changed the title Enable channel-first and video support in RandomResizedCrop. RandomResizedCrop: add tests + enable channel-first and video support Nov 4, 2020
check_frame(output, 0, 1, channel_dim, None, w, h, aspect_ratio_range, area_range)
else:
hidx = 1 if channel_dim == -1 else 2
h, w = input_shape[hidx:hidx+2]
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick:
inconsistent with line 50? Maybe unify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants