windows系统推理生成的图片保存路径下有中文 ,cv.imwrite无法保存图片
cv2.imwrite(os.path.join(save_dir, 'single', str(num) + '.png'), img) save_dir路径中有中文 ,保存不了图片;但无报错或提示;
for img in outputs: # count the number of images in the folder num = len(os.listdir(os.path.join(save_dir, 'single'))) cv2.imwrite(os.path.join(save_dir, 'single', str(num) + '.png'), img)
因此后续“查看历史生成结果”无返回值
将cv2.imwrite换成cv2.imencode就能保存图片了 for img in outputs: # count the number of images in the folder num = len(os.listdir(os.path.join(save_dir, 'single'))) cv2.imencode('.png', img)[1].tofile(os.path.join(save_dir, "single", str(num) + '.png'))
please try out the newest train-free, 10s inference version facechain-fact.