Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
63251809
Unverified
Commit
63251809
authored
Dec 04, 2020
by
Francisco Massa
Committed by
GitHub
Dec 04, 2020
Browse files
Remove video download and instead move it to repo (#3116)
Makes it appease fbcode internal tests
parent
2d80e99b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
test/assets/videos/hmdb51_Turnk_r_Pippi_Michel_cartwheel_f_cm_np2_le_med_6.avi
...db51_Turnk_r_Pippi_Michel_cartwheel_f_cm_np2_le_med_6.avi
+0
-0
test/test_io.py
test/test_io.py
+6
-15
No files found.
test/assets/videos/hmdb51_Turnk_r_Pippi_Michel_cartwheel_f_cm_np2_le_med_6.avi
0 → 100644
View file @
63251809
File added
test/test_io.py
View file @
63251809
...
...
@@ -3,7 +3,6 @@ import contextlib
import
sys
import
tempfile
import
torch
import
torchvision.datasets.utils
as
utils
import
torchvision.io
as
io
from
torchvision
import
get_video_backend
import
unittest
...
...
@@ -148,20 +147,12 @@ class TestIO(unittest.TestCase):
self
.
assertTrue
((
data
[
5
:
8
].
float
()
-
lv
.
float
()).
abs
().
max
()
<
self
.
TOLERANCE
)
def
test_read_packed_b_frames_divx_file
(
self
):
with
get_tmp_dir
()
as
temp_dir
:
name
=
"hmdb51_Turnk_r_Pippi_Michel_cartwheel_f_cm_np2_le_med_6.avi"
f_name
=
os
.
path
.
join
(
temp_dir
,
name
)
url
=
"https://download.pytorch.org/vision_tests/io/"
+
name
try
:
utils
.
download_url
(
url
,
temp_dir
)
f_name
=
os
.
path
.
join
(
VIDEO_DIR
,
name
)
pts
,
fps
=
io
.
read_video_timestamps
(
f_name
)
self
.
assertEqual
(
pts
,
sorted
(
pts
))
self
.
assertEqual
(
fps
,
30
)
except
URLError
:
msg
=
"could not download test file '{}'"
.
format
(
url
)
warnings
.
warn
(
msg
,
RuntimeWarning
)
raise
unittest
.
SkipTest
(
msg
)
def
test_read_timestamps_from_packet
(
self
):
with
temp_video
(
10
,
300
,
300
,
5
,
video_codec
=
'mpeg4'
)
as
(
f_name
,
data
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment