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
cd174844
"docs/git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "9e4b2ff58eee5172c3ebaf8ca8cc1f1bcd49978d"
Commit
cd174844
authored
Nov 04, 2019
by
Rahul Somani
Committed by
Francisco Massa
Nov 04, 2019
Browse files
Removed code redundancy/refactored (#1549)
parent
bb261c5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
references/video_classification/train.py
references/video_classification/train.py
+4
-4
No files found.
references/video_classification/train.py
View file @
cd174844
...
@@ -144,13 +144,13 @@ def main(args):
...
@@ -144,13 +144,13 @@ def main(args):
traindir
,
traindir
,
frames_per_clip
=
args
.
clip_len
,
frames_per_clip
=
args
.
clip_len
,
step_between_clips
=
1
,
step_between_clips
=
1
,
transform
=
transform_train
transform
=
transform_train
,
frame_rate
=
15
)
)
if
args
.
cache_dataset
:
if
args
.
cache_dataset
:
print
(
"Saving dataset_train to {}"
.
format
(
cache_path
))
print
(
"Saving dataset_train to {}"
.
format
(
cache_path
))
utils
.
mkdir
(
os
.
path
.
dirname
(
cache_path
))
utils
.
mkdir
(
os
.
path
.
dirname
(
cache_path
))
utils
.
save_on_master
((
dataset
,
traindir
),
cache_path
)
utils
.
save_on_master
((
dataset
,
traindir
),
cache_path
)
dataset
.
video_clips
.
compute_clips
(
args
.
clip_len
,
1
,
frame_rate
=
15
)
print
(
"Took"
,
time
.
time
()
-
st
)
print
(
"Took"
,
time
.
time
()
-
st
)
...
@@ -176,13 +176,13 @@ def main(args):
...
@@ -176,13 +176,13 @@ def main(args):
valdir
,
valdir
,
frames_per_clip
=
args
.
clip_len
,
frames_per_clip
=
args
.
clip_len
,
step_between_clips
=
1
,
step_between_clips
=
1
,
transform
=
transform_test
transform
=
transform_test
,
frame_rate
=
15
)
)
if
args
.
cache_dataset
:
if
args
.
cache_dataset
:
print
(
"Saving dataset_test to {}"
.
format
(
cache_path
))
print
(
"Saving dataset_test to {}"
.
format
(
cache_path
))
utils
.
mkdir
(
os
.
path
.
dirname
(
cache_path
))
utils
.
mkdir
(
os
.
path
.
dirname
(
cache_path
))
utils
.
save_on_master
((
dataset_test
,
valdir
),
cache_path
)
utils
.
save_on_master
((
dataset_test
,
valdir
),
cache_path
)
dataset_test
.
video_clips
.
compute_clips
(
args
.
clip_len
,
1
,
frame_rate
=
15
)
print
(
"Creating data loaders"
)
print
(
"Creating data loaders"
)
train_sampler
=
RandomClipSampler
(
dataset
.
video_clips
,
args
.
clips_per_video
)
train_sampler
=
RandomClipSampler
(
dataset
.
video_clips
,
args
.
clips_per_video
)
...
...
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