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

(WIP) Initial implementation of the new videoReader API #2683

Merged
merged 143 commits into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
a1ad68b
adding base files
bjuncek Aug 13, 2020
0abcfed
setup modification to actually build the thing
bjuncek Aug 14, 2020
ecbec59
video api constructor registration
bjuncek Aug 17, 2020
33d10bf
FAIL metadata
bjuncek Aug 19, 2020
57763cf
FAIL update for QS
bjuncek Aug 19, 2020
9ded798
revert
bjuncek Aug 20, 2020
ac7f1e5
debugging with Victor
bjuncek Aug 20, 2020
24718de
adding base files
bjuncek Aug 13, 2020
6800811
setup modification to actually build the thing
bjuncek Aug 14, 2020
2cf981c
video api constructor registration
bjuncek Aug 17, 2020
30263e4
FAIL metadata
bjuncek Aug 19, 2020
d58e8b7
FAIL update for QS
bjuncek Aug 19, 2020
f5657ec
revert
bjuncek Aug 20, 2020
f5284ec
debugging with Victor
bjuncek Aug 20, 2020
1398dd6
metadata registration works
bjuncek Aug 21, 2020
c124bb1
API build next
bjuncek Aug 26, 2020
c43c729
test
bjuncek Aug 27, 2020
1d5600d
Merge branch 'bjuncek/base_api' of github.com:bjuncek/vision into bju…
bjuncek Aug 27, 2020
d4452d9
Merge change
bjuncek Aug 27, 2020
56a84c9
formatting parameters to avoid the segfault
bjuncek Aug 28, 2020
36cc8f1
next now works on a video
bjuncek Aug 31, 2020
780bef9
make size of the output tensor format dependent
bjuncek Aug 31, 2020
4716512
Make next work on audio stream only as well
bjuncek Aug 31, 2020
2a0c73f
refactoring the _setCurrentStream param
bjuncek Sep 2, 2020
aa775c2
Fixing the last frame return and sensor
bjuncek Sep 3, 2020
bdb62bf
todo docs
bjuncek Sep 3, 2020
632842c
Formatting
bjuncek Sep 8, 2020
8b7644d
cleanup and comments
bjuncek Sep 16, 2020
cddc92e
introducing new tests for the API
bjuncek Sep 17, 2020
6411cf9
cleanup
bjuncek Sep 17, 2020
3edd9f4
Comment out unnecesary format (will add following FFMPEG fix)
bjuncek Sep 23, 2020
1b6df65
Reformat parsing function
bjuncek Sep 23, 2020
c245c4f
removing the seek bug `get_decoder_params`
bjuncek Sep 23, 2020
e779779
Removing unnecessary code/variables
bjuncek Sep 23, 2020
62b6aa8
enforce RGB24 as a reading format (will crash before ffmpeg fix)
bjuncek Sep 23, 2020
d4aca28
permute the dimensions to return (RGB x H x W)
bjuncek Sep 23, 2020
b9c8d5c
Changing the return type to std::tuple<torch::Tensor, double> as oppo…
bjuncek Sep 23, 2020
430ed5c
Adjusting tests for the new return type
bjuncek Sep 23, 2020
80bda0e
remove unnecessary jitter
bjuncek Sep 23, 2020
7d1dc1f
clangangangang
bjuncek Sep 23, 2020
c624266
Metadata return changes (#1)
bjuncek Sep 24, 2020
0cd8ee5
remove implicit calls to set a current stream (#2)
bjuncek Sep 24, 2020
5de29d0
Adding new tests to check the accuracy of the seek
bjuncek Sep 25, 2020
b541943
cleanup debugging statements
bjuncek Sep 25, 2020
fcc8cd7
Merge branch 'master' into bjuncek/base_api
fmassa Sep 29, 2020
73103f5
adding base files
bjuncek Aug 13, 2020
41efdad
setup modification to actually build the thing
bjuncek Aug 14, 2020
d3d7f43
video api constructor registration
bjuncek Aug 17, 2020
c6ea6da
FAIL metadata
bjuncek Aug 19, 2020
bd2d78e
FAIL update for QS
bjuncek Aug 19, 2020
f96ecff
revert
bjuncek Aug 20, 2020
fd6d0dd
debugging with Victor
bjuncek Aug 20, 2020
4f04fc8
adding base files
bjuncek Aug 13, 2020
399d0e5
video api constructor registration
bjuncek Aug 17, 2020
8f6c7f9
FAIL metadata
bjuncek Aug 19, 2020
68bc32b
FAIL update for QS
bjuncek Aug 19, 2020
4cc2895
revert
bjuncek Aug 20, 2020
720c327
debugging with Victor
bjuncek Aug 20, 2020
9a5aa7c
metadata registration works
bjuncek Aug 21, 2020
e002dfb
API build next
bjuncek Aug 26, 2020
86c57ef
test
bjuncek Aug 27, 2020
8d26b22
Merge change
bjuncek Aug 27, 2020
b801654
formatting parameters to avoid the segfault
bjuncek Aug 28, 2020
ec26d89
next now works on a video
bjuncek Aug 31, 2020
8f32236
make size of the output tensor format dependent
bjuncek Aug 31, 2020
d0b3ee1
Make next work on audio stream only as well
bjuncek Aug 31, 2020
be00ba7
refactoring the _setCurrentStream param
bjuncek Sep 2, 2020
e79b4fb
Fixing the last frame return and sensor
bjuncek Sep 3, 2020
8f031ad
todo docs
bjuncek Sep 3, 2020
7d0e5f6
Formatting
bjuncek Sep 8, 2020
7c56040
cleanup and comments
bjuncek Sep 16, 2020
262a647
introducing new tests for the API
bjuncek Sep 17, 2020
a7c531c
cleanup
bjuncek Sep 17, 2020
ce8665c
Comment out unnecesary format (will add following FFMPEG fix)
bjuncek Sep 23, 2020
ad65f13
Reformat parsing function
bjuncek Sep 23, 2020
fd29585
removing the seek bug `get_decoder_params`
bjuncek Sep 23, 2020
21e73a8
Removing unnecessary code/variables
bjuncek Sep 23, 2020
9cb8af5
enforce RGB24 as a reading format (will crash before ffmpeg fix)
bjuncek Sep 23, 2020
e6c8ccc
permute the dimensions to return (RGB x H x W)
bjuncek Sep 23, 2020
20edb6c
Changing the return type to std::tuple<torch::Tensor, double> as oppo…
bjuncek Sep 23, 2020
23f9a4f
Adjusting tests for the new return type
bjuncek Sep 23, 2020
5e21664
remove unnecessary jitter
bjuncek Sep 23, 2020
5d7a0df
clangangangang
bjuncek Sep 23, 2020
0720b2a
Metadata return changes (#1)
bjuncek Sep 24, 2020
79e42bc
remove implicit calls to set a current stream (#2)
bjuncek Sep 24, 2020
fb32beb
Adding new tests to check the accuracy of the seek
bjuncek Sep 25, 2020
57b8776
cleanup debugging statements
bjuncek Sep 25, 2020
9127bf3
Merge branches 'bjuncek/base_api' and 'bjuncek/base_api' of github.co…
bjuncek Sep 29, 2020
921a747
Addressing PR comments
bjuncek Sep 29, 2020
54f5416
addressing Francisco's comments
bjuncek Sep 30, 2020
88e2741
CLANG build formatting
bjuncek Sep 30, 2020
033f07c
Merge branch 'master' into bjuncek/base_api
bjuncek Sep 30, 2020
703c12b
Updated testing to test against pyav for the video tensor reads
bjuncek Oct 2, 2020
ca9cc25
Formatting
bjuncek Oct 2, 2020
d58ab72
Merge branch 'bjuncek/base_api' of github.com:bjuncek/vision into bju…
bjuncek Oct 2, 2020
8991a5c
remove pyav from pip deps and add it to conda build
bjuncek Oct 2, 2020
f8ce24a
add pyav and ffmeped to conda builds
bjuncek Oct 2, 2020
dfa2696
Formatting?
bjuncek Oct 2, 2020
d85eab1
Setting up linter once and for all hopefully
bjuncek Oct 2, 2020
62d5453
Merge branch 'master' into bjuncek/base_api
bjuncek Oct 2, 2020
a33b5a4
Testing pyav
fmassa Oct 2, 2020
1a6c9b2
Fix to 8.0.0
fmassa Oct 2, 2020
6701c76
Try 6.2.0
fmassa Oct 2, 2020
e9feda2
See what happens with av from pip
fmassa Oct 2, 2020
b5fad6a
Remove FFMPEG blocker
bjuncek Oct 2, 2020
b92edc2
Merge branch 'bjuncek/base_api' of github.com:bjuncek/vision into bju…
bjuncek Oct 2, 2020
f983d10
What is going on?
fmassa Oct 2, 2020
e4f8974
More tests
fmassa Oct 2, 2020
77822d1
Forgot something
fmassa Oct 2, 2020
e884adf
unblocker
bjuncek Oct 2, 2020
8aaa906
Check if cache is messing up with things
fmassa Oct 3, 2020
7e2d0ea
Now try with different ffmpeg
fmassa Oct 3, 2020
ffa47b9
Now try with different ffmpeg
fmassa Oct 3, 2020
d47c589
Testing pyav
fmassa Oct 2, 2020
5ee2fc1
Fix to 8.0.0
fmassa Oct 2, 2020
1f6a3a3
Try 6.2.0
fmassa Oct 2, 2020
ce2b071
See what happens with av from pip
fmassa Oct 2, 2020
d17408f
What is going on?
fmassa Oct 2, 2020
b9f7dd6
More tests
fmassa Oct 2, 2020
df91c8d
Forgot something
fmassa Oct 2, 2020
95d8677
Check if cache is messing up with things
fmassa Oct 3, 2020
8b2f637
Now try with different ffmpeg
fmassa Oct 3, 2020
37122bc
Now try with different ffmpeg
fmassa Oct 3, 2020
b09ba66
Merge branch 'test-av' of github.com:fmassa/vision-1 into test-av
andfoy Oct 5, 2020
5885f28
Do not install av
andfoy Oct 5, 2020
94832b2
Merge branch 'master' into test-av
andfoy Oct 5, 2020
10095e1
Test with ffmpeg 4.2
andfoy Oct 5, 2020
30232de
Merge branch 'test-av' of github.com:fmassa/vision-1 into test-av
andfoy Oct 5, 2020
d128d72
Merge remote-tracking branch 'fmassa/test-av' into bjuncek/base_api
bjuncek Oct 6, 2020
825d2ec
clean up video tests
bjuncek Oct 6, 2020
fd510c8
cleaning up the tests a bit to better test partial reading
bjuncek Oct 6, 2020
c0aeb54
arrgh linter
bjuncek Oct 6, 2020
df6a612
Forgot the av test
bjuncek Oct 6, 2020
d910214
forgot av test
bjuncek Oct 6, 2020
d7dd2ba
Merge branch 'master' into bjuncek/base_api
bjuncek Oct 6, 2020
bdd3b08
checkout build files from master
bjuncek Oct 6, 2020
18d54f1
Merge branch 'master' into bjuncek/base_api
bjuncek Oct 6, 2020
413dcc9
Merge remote-tracking branch 'upstream/master' into bjuncek/base_api
bjuncek Oct 6, 2020
36fcaf2
revert circleci
bjuncek Oct 6, 2020
ea3a8f2
Merge branch 'bjuncek/base_api' of github.com:bjuncek/vision into bju…
bjuncek Oct 6, 2020
03bd6f4
addressing Franciscos comments
bjuncek Oct 6, 2020
e4e3765
addressing Franciscos comments
bjuncek Oct 6, 2020
aae1d4f
Ignore ffmpeg in travis
bjuncek Oct 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ before_install:
fi
- conda install av -c conda-forge


install:
# Using pip instead of setup.py ensures we install a non-compressed version of the package
# (as opposed to an egg), which is necessary to collect coverage.
Expand All @@ -55,7 +54,7 @@ install:
cd -

script:
- pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideoReader and not TestVideoTransforms and not TestIO' test --ignore=test/test_datasets_download.py
- pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideo and not TestVideoReader and not TestVideoTransforms and not TestIO' test --ignore=test/test_datasets_download.py
- pytest test/test_hub.py

after_success:
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,13 @@ def get_extensions():
base_decoder_src_dir = os.path.join(this_dir, 'torchvision', 'csrc', 'cpu', 'decoder')
base_decoder_src = glob.glob(
os.path.join(base_decoder_src_dir, "*.cpp"))
# Torchvision video API
videoapi_src_dir = os.path.join(this_dir, 'torchvision', 'csrc', 'cpu', 'video')
videoapi_src = glob.glob(os.path.join(videoapi_src_dir, "*.cpp"))
# exclude tests
base_decoder_src = [x for x in base_decoder_src if '_test.cpp' not in x]

combined_src = video_reader_src + base_decoder_src
combined_src = video_reader_src + base_decoder_src + videoapi_src

ext_modules.append(
CppExtension(
Expand All @@ -359,6 +362,7 @@ def get_extensions():
include_dirs=[
base_decoder_src_dir,
video_reader_src_dir,
videoapi_src_dir,
ffmpeg_include_dir,
extensions_dir,
],
Expand Down
Loading