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

fix test_detection_preset for ssd data augmentation #7447

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Mar 22, 2023

#7442 broke this test. However, this is not a bug in the PR, but rather me forgetting to fix the test setup. #7442 changed the random sampling strategy (see #7442 (comment)), which ultimately leads to a different number of boxes in the final output. As expected, only keeping RandomPhotometricDistort in the pipeline yields exactly the same results prior and after #7442.

cc @vfdev-5

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 22, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7447

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@@ -1875,7 +1875,7 @@ def test_detection_preset(image_type, data_augmentation, to_tensor, sanitize):
elif data_augmentation == "ssd":
t = [
transforms.RandomPhotometricDistort(p=1),
transforms.RandomZoomOut(fill=defaultdict(lambda: (123.0, 117.0, 104.0), {datapoints.Mask: 0})),
transforms.RandomZoomOut(fill=defaultdict(lambda: (123.0, 117.0, 104.0), {datapoints.Mask: 0}), p=1),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Driveby. All other transforms already use p=1. Prior to #7442, by chance this transform was not applied.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks Philip

@NicolasHug NicolasHug merged commit 995f9b9 into pytorch:main Mar 23, 2023
@github-actions
Copy link

Hey @NicolasHug!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@pmeier pmeier deleted the fix-detection-preset-test branch March 23, 2023 09:27
NicolasHug pushed a commit to NicolasHug/vision that referenced this pull request Mar 23, 2023
facebook-github-bot pushed a commit that referenced this pull request Mar 30, 2023
Reviewed By: vmoens

Differential Revision: D44416577

fbshipit-source-id: 3951020abaf72e0634fc96159bd860c0a17aa8e9
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