Skip to content

Commit

Permalink
log as jpg images to reduce storage
Browse files Browse the repository at this point in the history
  • Loading branch information
tlpss committed Feb 7, 2024
1 parent 94f60de commit 1507044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keypoint_detection/models/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit 1507044

Please sign in to comment.