forked from nv-tlabs/vipe
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.py
More file actions
28 lines (21 loc) · 850 Bytes
/
run.py
File metadata and controls
28 lines (21 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import hydra
from omegaconf import DictConfig
@hydra.main(version_base=None, config_path="configs", config_name="default")
def run(args: DictConfig) -> None:
from vipe.streams.base import StreamList
# Gather all video streams
stream_list = StreamList.make(args.streams)
from vipe.pipeline import make_pipeline
from vipe.utils.logging import configure_logging
# Process each video stream
logger = configure_logging()
for stream_idx in range(len(stream_list)):
video_stream = stream_list[stream_idx]
logger.info(
f"Processing {video_stream.name()} ({stream_idx + 1} / {len(stream_list)})"
)
pipeline = make_pipeline(args.pipeline)
pipeline.run(video_stream)
logger.info(f"Finished processing {video_stream.name()}")
if __name__ == "__main__":
run()