Skip to content

Commit 29939aa

Browse files
committed
Translate video examples to dynamic mode
Signed-off-by: Rostan Tabet <[email protected]>
1 parent 3da2db6 commit 29939aa

File tree

17 files changed

+2084
-76
lines changed

17 files changed

+2084
-76
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ docs/examples/image_processing/**/index.rst
3737
docs/examples/index.rst
3838
docs/examples/operations_index.rst
3939
docs/examples/other_index.rst
40-
docs/examples/sequence_processing/index.rst
40+
docs/examples/sequence_processing/**/index.rst
4141
docs/examples/use_cases/index.rst
4242
docs/examples/use_cases/paddle/index.rst
4343
.DS_Store

docs/examples/sequence_processing/index.py

Lines changed: 7 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -12,85 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from doc_index import doc, doc_entry, op_reference
15+
from doc_index import doc
1616

1717
doc(
1818
title="Video Processing",
1919
underline_char="=",
2020
entries=[
21-
doc_entry(
22-
"video/video_reader_simple_example.ipynb",
23-
op_reference(
24-
"fn.readers.video",
25-
"Tutorial describing how to use video reader",
26-
),
27-
),
28-
doc_entry(
29-
"video/video_reader_label_example.ipynb",
30-
op_reference(
31-
"fn.readers.video",
32-
"Tutorial describing how to use video reader to output frames with labels",
33-
),
34-
),
35-
doc_entry(
36-
"video/video_file_list_outputs.ipynb",
37-
op_reference(
38-
"fn.readers.video",
39-
"Tutorial describing how to output frames with \
40-
labels assigned to dedicated ranges of frame numbers/timestamps",
41-
),
42-
),
43-
doc_entry(
44-
"sequence_reader_simple_example.ipynb",
45-
op_reference(
46-
"fn.readers.sequence",
47-
"Tutorial describing how to read sequence of video frames stored as separate files",
48-
),
49-
),
50-
doc_entry(
51-
"video/video_processing_per_frame_arguments.ipynb",
52-
[
53-
op_reference(
54-
"fn.readers.video", "Examples of processing video in DALI"
55-
),
56-
op_reference(
57-
"fn.per_frame",
58-
"Using per-frame operator to specify arguments to video processing operators",
59-
),
60-
op_reference(
61-
"fn.gaussian_blur",
62-
"Specifying per-frame arguments when processing video",
63-
),
64-
op_reference(
65-
"fn.laplacian",
66-
"Specifying per-frame arguments when processing video",
67-
),
68-
op_reference(
69-
"fn.rotate",
70-
"Specifying per-frame arguments when processing video",
71-
),
72-
op_reference(
73-
"fn.warp_affine",
74-
"Specifying per-frame arguments when processing video",
75-
),
76-
op_reference(
77-
"fn.transforms",
78-
"Specifying per-frame arguments when processing video",
79-
),
80-
],
81-
),
82-
doc_entry(
83-
"optical_flow_example.ipynb",
84-
[
85-
op_reference(
86-
"fn.readers.video",
87-
"Tutorial describing how to calculate optical flow from video inputs",
88-
),
89-
op_reference(
90-
"fn.optical_flow",
91-
"Tutorial describing how to calculate optical flow from sequence inputs",
92-
),
93-
],
94-
),
21+
"video/video_reader_simple/index.py",
22+
"video/video_reader_label/index.py",
23+
"video/video_file_list_outputs/index.py",
24+
"video/video_per_frame_arguments/index.py",
25+
"sequence_reader_simple_example.ipynb",
26+
"optical_flow/index.py",
9527
],
9628
)

docs/examples/sequence_processing/optical_flow/dynamic_mode.ipynb

Lines changed: 329 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from doc_index import doc, doc_entry, op_reference
16+
17+
doc(
18+
title="Optical Flow",
19+
underline_char="=",
20+
options=":maxdepth: 1",
21+
entries=[
22+
doc_entry(
23+
"Pipeline Mode <pipeline_mode.ipynb>",
24+
[
25+
op_reference(
26+
"fn.readers.video", "Calculating optical flow from video"
27+
),
28+
op_reference("fn.optical_flow", "Optical flow operator"),
29+
],
30+
),
31+
doc_entry(
32+
"Dynamic Mode <dynamic_mode.ipynb>",
33+
[
34+
op_reference(
35+
"dynamic.readers.Video",
36+
"Calculating optical flow from video",
37+
),
38+
op_reference("dynamic.optical_flow", "Optical flow operator"),
39+
],
40+
),
41+
],
42+
)

docs/examples/sequence_processing/optical_flow_example.ipynb renamed to docs/examples/sequence_processing/optical_flow/pipeline_mode.ipynb

File renamed without changes.

docs/examples/sequence_processing/video/video_file_list_outputs/dynamic_mode.ipynb

Lines changed: 304 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from doc_index import doc, doc_entry, op_reference
16+
17+
doc(
18+
title="Video Pipeline Demonstrating Applying Labels Based on Timestamps or Frame Numbers",
19+
underline_char="=",
20+
options=":maxdepth: 1",
21+
entries=[
22+
doc_entry(
23+
"Pipeline Mode <pipeline_mode.ipynb>",
24+
op_reference(
25+
"fn.readers.video",
26+
"Tutorial for applying labels based on timestamps or frame numbers",
27+
),
28+
),
29+
doc_entry(
30+
"Dynamic Mode <dynamic_mode.ipynb>",
31+
op_reference(
32+
"dynamic.readers.Video",
33+
"Tutorial for applying labels based on timestamps or frame numbers",
34+
),
35+
),
36+
],
37+
)

docs/examples/sequence_processing/video/video_file_list_outputs.ipynb renamed to docs/examples/sequence_processing/video/video_file_list_outputs/pipeline_mode.ipynb

File renamed without changes.

docs/examples/sequence_processing/video/video_per_frame_arguments/dynamic_mode.ipynb

Lines changed: 603 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from doc_index import doc, doc_entry, op_reference
16+
17+
doc(
18+
title="Processing video with image processing operators",
19+
underline_char="=",
20+
options=":maxdepth: 1",
21+
entries=[
22+
doc_entry(
23+
"Pipeline Mode <pipeline_mode.ipynb>",
24+
[
25+
op_reference("fn.readers.video", "Processing video in DALI"),
26+
op_reference("fn.per_frame", "Using per-frame operator"),
27+
op_reference("fn.gaussian_blur", "Per-frame blur"),
28+
op_reference("fn.rotate", "Per-frame rotation"),
29+
op_reference("fn.warp_affine", "Per-frame affine transforms"),
30+
op_reference("fn.transforms", "Transform builders"),
31+
],
32+
),
33+
doc_entry(
34+
"Dynamic Mode <dynamic_mode.ipynb>",
35+
[
36+
op_reference(
37+
"dynamic.readers.Video", "Processing video in DALI"
38+
),
39+
op_reference("dynamic.per_frame", "Using per-frame operator"),
40+
op_reference("dynamic.gaussian_blur", "Per-frame blur"),
41+
op_reference("dynamic.rotate", "Per-frame rotation"),
42+
op_reference(
43+
"dynamic.warp_affine", "Per-frame affine transforms"
44+
),
45+
],
46+
),
47+
],
48+
)

0 commit comments

Comments
 (0)