From 8fc95a85b7865f802fe3c5c5b8e56969f3c47d4f Mon Sep 17 00:00:00 2001 From: Github Actions Bot Date: Tue, 16 Apr 2024 20:35:13 +0000 Subject: [PATCH] style: [CI] format --- .../video_processor/stages/depth_estimation.py | 4 +++- .../stages/detection_2d/ground_truth.py | 12 +++++++----- .../stages/detection_3d/ground_truth.py | 12 +++++++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/spatialyze/video_processor/stages/depth_estimation.py b/spatialyze/video_processor/stages/depth_estimation.py index 8379986..36ec041 100644 --- a/spatialyze/video_processor/stages/depth_estimation.py +++ b/spatialyze/video_processor/stages/depth_estimation.py @@ -113,7 +113,9 @@ def eval_all(self, input_images: "list[npt.NDArray | None]"): # Load image and preprocess input_image = pil.fromarray(im[:, :, [2, 1, 0]]) original_width, original_height = input_image.size - input_image = input_image.resize((self.feed_width, self.feed_height), pil.Resampling.LANCZOS) + input_image = input_image.resize( + (self.feed_width, self.feed_height), pil.Resampling.LANCZOS + ) input_image = transforms.ToTensor()(input_image).unsqueeze(0) # PREDICTION diff --git a/spatialyze/video_processor/stages/detection_2d/ground_truth.py b/spatialyze/video_processor/stages/detection_2d/ground_truth.py index b153eca..3ddeaa3 100644 --- a/spatialyze/video_processor/stages/detection_2d/ground_truth.py +++ b/spatialyze/video_processor/stages/detection_2d/ground_truth.py @@ -222,10 +222,12 @@ def _run(self, payload: "Payload"): if len(tensor) == 0: metadata.append(Metadatum(torch.Tensor([]), yolo_classes, [])) else: - metadata.append(Metadatum( - torch.Tensor(tensor), - yolo_classes, - [DetectionId(i, _id) for _id in ids], - )) + metadata.append( + Metadatum( + torch.Tensor(tensor), + yolo_classes, + [DetectionId(i, _id) for _id in ids], + ) + ) return None, {self.classname(): metadata} diff --git a/spatialyze/video_processor/stages/detection_3d/ground_truth.py b/spatialyze/video_processor/stages/detection_3d/ground_truth.py index f58770a..cc15645 100644 --- a/spatialyze/video_processor/stages/detection_3d/ground_truth.py +++ b/spatialyze/video_processor/stages/detection_3d/ground_truth.py @@ -79,10 +79,12 @@ def _run(self, payload: "Payload"): if len(tensor) == 0: metadata.append(Metadatum(torch.Tensor([]), yolo_classes, [])) else: - metadata.append(Metadatum( - torch.Tensor(tensor), - yolo_classes, - [DetectionId(i, _id) for _id in ids], - )) + metadata.append( + Metadatum( + torch.Tensor(tensor), + yolo_classes, + [DetectionId(i, _id) for _id in ids], + ) + ) return None, {self.classname(): metadata}