EnlightenGAN
EnlightenGAN copied to clipboard
请问在哪里修改生成图像的名称
请问在哪里修改生成图像的名称 想用NIQE进行图像质量评价 但是源文件图像和生成器保存图像的名称不一样 求指教
EnlightenGAN/util/visualizer.py 中修改为 def save_images(self, webpage, visuals, image_path): image_dir = webpage.get_image_dir() short_path = ntpath.basename(image_path[0]) name = os.path.splitext(short_path)[0]
webpage.add_header(name)
ims = []
txts = []
links = []
for label, image_numpy in visuals.items():
if label == 'fake_B':
# image_name = '%s_%s.png' % (name, label)
image_name = '%s.png' % name
save_path = os.path.join(image_dir, image_name)
util.save_image(image_numpy, save_path)
ims.append(image_name)
txts.append(label)
links.append(image_name)
webpage.add_images(ims, txts, links, width=self.win_size)