youyuge34 / PI-REC

:fire: PI-REC: Progressive Image Reconstruction Network With Edge and Color Domain. :fire: 图像翻译,条件GAN,AI绘画

Home Page:https://arxiv.org/abs/1903.10146

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cv.imread不支持中文路径

fk1995 opened this issue · comments

改成英文路径以后能正确读取 中文文件夹名读取出来是None但是不报错 之后resize时报错

It is the problem of OpenCV instead of PI-REC, who does not accept non-ascii path.
You can add the following line by yourself, which could probably cause other bugs. I believe it is always a good habit to keep the file path containing ASCII words only.

cv2.imdecode(np.fromfile(path_file,dtype=np.uint8),-1)