minivision-ai / photo2cartoon

人像卡通化探索项目 (photo-to-cartoon translation project)
MIT License
3.94k stars 763 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 103: invalid continuation byte #71

Closed kalvinGit closed 1 year ago

kalvinGit commented 2 years ago

执行test.py: python test.py --photo_path D:\Downloads\test07.png --save_path D:\Downloads\test07_1.png 报错: Traceback (most recent call last): File "D:\Kalvin\python\photo2cartoon\test.py", line 59, in <module> c2p = Photo2Cartoon() File "D:\Kalvin\python\photo2cartoon\test.py", line 19, in __init__ self.pre = Preprocess() File "D:\Kalvin\python\photo2cartoon\utils\preprocess.py", line 9, in __init__ self.segment = FaceSeg() File "D:\Kalvin\python\photo2cartoon\utils\face_seg.py", line 19, in __init__ self._restore_from_pb() File "D:\Kalvin\python\photo2cartoon\utils\face_seg.py", line 28, in _restore_from_pb graph_def.ParseFromString(f.read()) File "D:\Kalvin\python\photo2cartoon\python3\cartoon\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 114, in read self._preread_check() File "D:\Kalvin\python\photo2cartoon\python3\cartoon\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 76, in _preread_check self._read_buf = _pywrap_file_io.BufferedInputStream( UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 103: invalid continuation byte

hao-qiang commented 2 years ago

看起来似乎是加载人像分割模型时出错了,请检查tensorflow版本是否与项目要求的相符。