From fa0c68ebd31818fb6cee8272f23cd6d83f7475d5 Mon Sep 17 00:00:00 2001 From: "Minkyu Choi (mc76728)" Date: Mon, 5 Feb 2024 21:44:23 -0600 Subject: [PATCH] fix: ruff --- ns_vfs/data/frame.py | 2 +- ns_vfs/model/vision/object_detection/clip_model.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ns_vfs/data/frame.py b/ns_vfs/data/frame.py index 2ff5f54..e5b1b04 100644 --- a/ns_vfs/data/frame.py +++ b/ns_vfs/data/frame.py @@ -128,5 +128,5 @@ def save_frames(self, path): Image.fromarray(self.annotated_images[idx]).save( f"{annotation_path}/{idx}_annotated.png" ) - except: + except: # noqa: E722 pass diff --git a/ns_vfs/model/vision/object_detection/clip_model.py b/ns_vfs/model/vision/object_detection/clip_model.py index 7132a35..3bec4d1 100644 --- a/ns_vfs/model/vision/object_detection/clip_model.py +++ b/ns_vfs/model/vision/object_detection/clip_model.py @@ -86,8 +86,8 @@ def detect(self, frame_img: np.ndarray, classes: list) -> any: .numpy() ) - logits_per_image, logits_per_text = self.model(image, text) - probs = logits_per_text.softmax(dim=-1).cpu().numpy() + # logits_per_image, logits_per_text = self.model(image, text) + # probs = logits_per_text.softmax(dim=-1).cpu().numpy() self._labels = [] if len(scores) > 0: