From 1507044636a42255338ae81af7cb3c0cdc54ea52 Mon Sep 17 00:00:00 2001 From: tlpss Date: Wed, 7 Feb 2024 13:51:33 +0100 Subject: [PATCH] log as jpg images to reduce storage --- keypoint_detection/models/detector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keypoint_detection/models/detector.py b/keypoint_detection/models/detector.py index e14ff50..9dce633 100644 --- a/keypoint_detection/models/detector.py +++ b/keypoint_detection/models/detector.py @@ -304,7 +304,7 @@ def log_channel_predictions_grids(self, image_grids, mode: str): for channel_configuration, grid in zip(self.keypoint_channel_configuration, image_grids): label = get_logging_label_from_channel_configuration(channel_configuration, mode) image_caption = "top: predicted heatmaps, bottom: gt heatmaps" - self.logger.experiment.log({label: wandb.Image(grid, caption=image_caption)}) + self.logger.experiment.log({label: wandb.Image(grid, caption=image_caption,file_type="jpg")}) def visualize_predicted_keypoints(self, result_dict): images = result_dict["input_images"] @@ -458,7 +458,7 @@ def is_ap_epoch(self) -> bool: is_epch = is_epch or self.current_epoch == self.trainer.max_epochs - 1 # if user manually specified a validation frequency, we should always log the AP in that epoch - is_epch = is_epch or (self.current_epoch > 0 and self.trainer.check_val_every_n_epoch > 1) + # is_epch = is_epch or (self.current_epoch > 0 and self.trainer.check_val_every_n_epoch > 1) return is_epch def extract_detected_keypoints_from_heatmap(self, heatmap: torch.Tensor) -> List[DetectedKeypoint]: