From 92a2f7ec83f136274ea2a194baac8a4318bf9506 Mon Sep 17 00:00:00 2001 From: lastrei Date: Fri, 10 May 2024 18:25:10 +0800 Subject: [PATCH] fix bugs for using camera --- deploy/pipeline/pipeline.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy/pipeline/pipeline.py b/deploy/pipeline/pipeline.py index eb82a4f5aba..75742a76490 100644 --- a/deploy/pipeline/pipeline.py +++ b/deploy/pipeline/pipeline.py @@ -515,14 +515,14 @@ def __init__(self, args, cfg, is_video=True, multi_camera=False): args, video_action_cfg) def set_file_name(self, path): - 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] + if path is not None: + if isinstance(path, int): + self.file_name = None + else: + self.file_name = os.path.split(path)[-1] + if "." in self.file_name: + self.file_name = self.file_name.split(".")[-2] else: - # use camera id self.file_name = None def get_result(self):