From 256f779b41a69b2237532cbde31af4f8f313cae5 Mon Sep 17 00:00:00 2001 From: zhiboniu <31800336+zhiboniu@users.noreply.github.com> Date: Thu, 27 Oct 2022 15:22:35 +0800 Subject: [PATCH] fix camera_id input (#7198) --- deploy/pipeline/pipeline.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deploy/pipeline/pipeline.py b/deploy/pipeline/pipeline.py index da2556655..378458d17 100644 --- a/deploy/pipeline/pipeline.py +++ b/deploy/pipeline/pipeline.py @@ -474,7 +474,9 @@ class PipePredictor(object): args, video_action_cfg) def set_file_name(self, path): - if path is not None: + if type(path)==int: + self.file_name = path + elif path is not None: self.file_name = os.path.split(path)[-1] if "." in self.file_name: self.file_name = self.file_name.split(".")[-2] @@ -606,8 +608,8 @@ class PipePredictor(object): pushstream = PushStream(pushurl) pushstream.initcmd(fps, width, height) elif self.cfg['visual']: - video_out_name = 'output' if self.file_name is None else self.file_name - if "rtsp" in video_file: + video_out_name = 'output' if (self.file_name is None or type(self.file_name)==int) else self.file_name + if type(video_file)==str and "rtsp" in video_file: video_out_name = video_out_name + "_t" + str(thread_idx).zfill( 2) + "_rtsp" if not os.path.exists(self.output_dir): -- GitLab