Skip to content

Commit

Permalink
chore: deactivate aim images
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Dec 3, 2024
1 parent c56fa2d commit 9d90f29
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions util/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,15 @@ def __init__(self, opt):
if "aim" in self.display_type:
import aim

self.aim_run = aim.Run(
experiment=opt.name,
repo="aim://"
repo = (
"aim://"
+ self.opt.output_display_aim_server
+ ":"
+ str(self.opt.output_display_aim_port),
+ str(self.opt.output_display_aim_port)
)
self.aim_run = aim.Run(
experiment=opt.name,
repo=repo,
)

if (
Expand Down Expand Up @@ -457,18 +460,18 @@ def display_current_results_aim(
self.aim_run["params"] = params # hyper parameters

# images
import aim

aim_images = []
for visual_group in visuals:
for label, image in visual_group.items():
image_numpy = util.tensor2im(image)
aim_images.append(
aim.Image(Image.fromarray(image_numpy), caption=label)
)
self.aim_run.track(
aim_images, name="generated", epoch=epoch, context={"train": True}
)
# import aim

# aim_images = []
# for visual_group in visuals:
# for label, image in visual_group.items():
# image_numpy = util.tensor2im(image)
# aim_images.append(
# aim.Image(Image.fromarray(image_numpy), caption=label)
# )
# self.aim_run.track(
# aim_images, name="generated", epoch=epoch, context={"train": True}
# )

def display_img(self, img_path):
im = Image.open(img_path)
Expand Down

0 comments on commit 9d90f29

Please sign in to comment.