Open justme7678876788 opened 1 year ago
Btw . here's my problem in the windows version :
E:\Manga\Blade of the Immortal (1997-2015) (Digital) (danke-Empire)\Blade of the Immortal v01 - Blood of a Thousand (1997) (Digital) (danke-Empire)>pcleaner clean im6.jpg
Found 1 image.
Running text detection AI model...
Using device for text detection model: cpu
Using 1 processes for text detection.
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:18<00:00, 18.77s/it]
Running box data Pre-Processor...
2023-05-31 19:33:32.080 | INFO | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
2023-05-31 19:33:40.137 | INFO | manga_ocr.ocr:__init__:22 - Using CPU
2023-05-31 19:33:44.564 | INFO | manga_ocr.ocr:__init__:29 - OCR ready
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\Scripts\pcleaner.exe\__main__.py", line 7, in <module>
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\main.py", line 221, in main
run_cleaner(
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\main.py", line 350, in run_cleaner
ocr_analytic = pp.prep_json_file(
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\pre_processor.py", line 105, in prep_json_file
page_data.grow_boxes(scale_len(pre_processor_conf.box_padding_initial), st.BoxType.BOX)
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\structures.py", line 105, in grow_boxes
image_width, image_height = self.image_size
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\structures.py", line 78, in image_size
metadata = magic.from_file(self.image_path)
AttributeError: module 'magic' has no attribute 'from_file'. Did you mean: '_image_size'?
it looks like a mistake in the code it self
after downloading manually the libmagic it seems like the error changed
E:\Manga\Blade of the Immortal (1997-2015) (Digital) (danke-Empire)\Blade of the Immortal v01 - Blood of a Thousand (1997) (Digital) (danke-Empire)>pcleaner clean im6.jpg
Found 1 image.
Running text detection AI model...
Using device for text detection model: cpu
Using 1 processes for text detection.
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:17<00:00, 17.89s/it]
Running box data Pre-Processor...
2023-05-31 20:28:42.812 | INFO | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
2023-05-31 20:28:52.518 | INFO | manga_ocr.ocr:__init__:22 - Using CPU
2023-05-31 20:28:56.608 | INFO | manga_ocr.ocr:__init__:29 - OCR ready
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\Scripts\pcleaner.exe\__main__.py", line 7, in <module>
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\main.py", line 221, in main
run_cleaner(
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\main.py", line 350, in run_cleaner
ocr_analytic = pp.prep_json_file(
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\pre_processor.py", line 105, in prep_json_file
page_data.grow_boxes(scale_len(pre_processor_conf.box_padding_initial), st.BoxType.BOX)
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\structures.py", line 105, in grow_boxes
image_width, image_height = self.image_size
File "C:\Users\Harrou abderrahmane\AppData\Local\Programs\Python\Python310\lib\site-packages\pcleaner\structures.py", line 79, in image_size
size_str = re.search(r"(\d+) x (\d+)", metadata).groups()
AttributeError: 'NoneType' object has no attribute 'groups'. Did you mean: '_image_size'?
i followed this : https://github.com/hey-red/Mime/issues/9
Yeah, I haven't had the time to redo my windows vm and trying to get a build working there, so thanks for the tips on how I might be able to do that.
As for the denoiser, I personally have never run into that issue and wasn't able to reproduce it, but I can try catching whatever error that is and moving on, though I can't know for sure if it's fixed. Are you able to share one or more images with this problem (in a way that preserves the original file, so that it hopefully works the same)?
In the meantime, add the -D
flag (or --skip-denoising
) to your command or alternatively use a profile where denoising is explicitly disabled.
Thanks!
Unfortunately I still haven't been able to reproduce this issue, so I don't know to fix it. If you have images that cause issues, please email them to me at voxel.aur@gmail.com
Hi . after testing this on windows and not working i went to linux . after i installed it in linux i had some problems and they were all about the requirements versions which i found the right version and everything seems to go fine until the last step when it does this :
and here it is with another image :