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

Add tests for UCF101 #3411

Merged
merged 7 commits into from
Feb 23, 2021
Merged

Add tests for UCF101 #3411

merged 7 commits into from
Feb 23, 2021

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Feb 18, 2021

This makes use of the added dataset test case base class and supersedes older tests for UCF101. Since we now work with much (spatially) smaller videos, this significantly reduces the wall time.

In addition, this adds the capability to leave out the frames_per_clip argument, which is required in every video dataset. If no value is returned by inject_fake_data() we simply add 1 as default. With this we have a 1-to-1 correspondence of len(dataset) to videos generated by create_video_folder(). Since all video datasets use a VideoClips object internally that handles the clip generation, we don't need to test that here.

@pmeier pmeier requested review from fmassa and andfoy February 18, 2021 09:47
@pmeier pmeier mentioned this pull request Feb 18, 2021
@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #3411 (5b4e8f0) into master (5de19de) will decrease coverage by 0.88%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3411      +/-   ##
==========================================
- Coverage   76.01%   75.12%   -0.89%     
==========================================
  Files         105      105              
  Lines        9697     9722      +25     
  Branches     1556     1563       +7     
==========================================
- Hits         7371     7304      -67     
- Misses       1839     1932      +93     
+ Partials      487      486       -1     
Impacted Files Coverage Δ
torchvision/datasets/voc.py 50.49% <0.00%> (-41.82%) ⬇️
torchvision/datasets/caltech.py 42.52% <0.00%> (-36.79%) ⬇️
torchvision/datasets/coco.py 30.95% <0.00%> (-15.48%) ⬇️
torchvision/datasets/vision.py 65.51% <0.00%> (-3.45%) ⬇️
torchvision/datasets/video_utils.py 68.22% <0.00%> (-1.05%) ⬇️
torchvision/ops/boxes.py 87.77% <0.00%> (ø)
torchvision/ops/roi_pool.py 75.00% <0.00%> (ø)
torchvision/ops/roi_align.py 70.96% <0.00%> (ø)
torchvision/ops/ps_roi_pool.py 74.07% <0.00%> (ø)
torchvision/ops/ps_roi_align.py 72.41% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5de19de...8a3fd90. Read the comment docs.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Awesome, now tests for UCF101 runs much faster! Thanks a lot!

@fmassa fmassa merged commit a7b4bfd into pytorch:master Feb 23, 2021
@pmeier pmeier deleted the test-ucf101 branch February 23, 2021 14:41
facebook-github-bot pushed a commit that referenced this pull request Mar 4, 2021
Summary:
* enable default frames per clips for video test cases

* add tests for UCF101

* remove old tests as well as fake data generation

* better explain frames_per_clip overriding

* lint

Reviewed By: fmassa

Differential Revision: D26756269

fbshipit-source-id: c3a6ae69a0e3155864bd3d09556a99f7f6771953

Co-authored-by: Francisco Massa <fvsmassa@gmail.com>
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.

5 participants