KichangKim / DeepDanbooru

AI based multi-label girl image classification system, implemented by using TensorFlow.
MIT License
2.58k stars 258 forks source link

UnicodeDecodeError, unable to start #57

Closed lazycatx64 closed 2 years ago

lazycatx64 commented 2 years ago

I prepared everything that are needed, but tensor won't run and says utf-8 can't decode, but I don't have any non-english character in path, I thought it was the slash so I tried both / // \ \, none of them worked.

image: E:\f00\ project: E:\dd\pre\


PS E:\DeepDanbooru-master> deepdanbooru evaluate E:/f00 --project-path E:/dd/pre 2022-05-05 03:47:55.638755: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2022-05-05 03:47:55.638946: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2022-05-05 03:48:00.590199: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found 2022-05-05 03:48:00.590325: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303) 2022-05-05 03:48:00.594967: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: lazycat-home 2022-05-05 03:48:00.595210: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: lazycat-home 2022-05-05 03:48:00.595576: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. Tags of E:\f00: 2022-05-05 03:48:07.041494: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at whole_file_read_ops.cc:116 : UNKNOWN: NewRandomAccessFile failed to Create/Open: E:\f00 : 存取被拒。 ; Input/output error Traceback (most recent call last): File "D:\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\Python\Python310\Scripts\deepdanbooru.exe__main.py", line 7, in return self.main(*args, kwargs) File "D:\Python\Python310\lib\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "D:\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "D:\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "D:\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke return callback(*args, **kwargs) File "D:\Python\Python310\lib\site-packages\deepdanbooru__main__.py", line 186, in evaluate dd.commands.evaluate( File "D:\Python\Python310\lib\site-packages\deepdanbooru\commands\evaluate.py", line 87, in evaluate for tag, score in evaluate_image(image_path, model, tags, threshold): File "D:\Python\Python310\lib\site-packages\deepdanbooru\commands\evaluate.py", line 16, in evaluate_image image = dd.data.load_image_for_evaluate(image_input, width=width, height=height) File "D:\Python\Python310\lib\site-packages\deepdanbooru\data__init__.py", line 19, in load_image_for_evaluate image_raw = tf.io.readfile(input) File "D:\Python\Python310\lib\site-packages\tensorflow\python\ops\io_ops.py", line 133, in read_file return gen_io_ops.read_file(filename, name) File "D:\Python\Python310\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 565, in read_file return read_file_eager_fallback( File "D:\Python\Python310\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 588, in read_file_eager_fallback _result = _execute.execute(b"ReadFile", 1, inputs=_inputs_flat, File "D:\Python\Python310\lib\site-packages\tensorflow\python\eager\execute.py", line 54, in quick_execute tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa6 in position 52: invalid start byte

KichangKim commented 2 years ago

If you want to evaluate all images in the folder, add --allow-folder option to command.