dmMaze / BallonsTranslator

深度学习辅助漫画翻译工具, 支持一键机翻和简单的图像/文本编辑 | Yet another computer-aided comic/manga translation tool powered by deeplearning
GNU General Public License v3.0
2.48k stars 172 forks source link

When using google lens, I just get empty, cleaned images, no text #554

Open notimp opened 2 weeks ago

notimp commented 2 weeks ago

Screenshot 2024-08-24 160058

Debug log shows "non empty source txt list"

OG comic language is Dutch (Netherlands).

Other OCR methods work well.

Python version is 3.9.13 torch version is: 2.1.0+cu121 torchvision version is: 0.16.0+cu121

Any idea what might be at fault here specifically?

Any help would be appreciated.

Other outdated libs in case you are wondering. ``` anthropic 0.33.0 cachetools 5.4.0 con-Figparser 7.0.0 google-ai-generativelanguage 0.6.6 qooqle-api-python-client 2.140.0 google-auth 2.33.0 grpcio 1.65.4 grpcio-status 1.48.2 huggingface-hub 0.24.5 idna 3.7 imageio 2.34.2 importlib_resources 6.4.0 matplotlib 3.9.1.postl numpy 1.26.4 openai 1.40.3 pikepdf 9.1.1 pip 22.0.4 protobu-F 3.20.2 pydantic.core 2.20.1 PyQt6 6.6.1 PyQt6-Qt6 6.6.3 rd-Flib 6.3.2 setuptools 58.1.0 shapely 2.0.5 soupsieve 2.5 tokenizers 0.19.1 torch 2.1.0+cul21 torchvision 0.16.0+cul21 traits 6.3.2 trans-Formers 4.44.0 ultralytics 8.2.76 ultralytics—thop 2.0.0 urllib3 1.25.11 ```
bropines commented 2 weeks ago

Screenshot 2024-08-24 160058

Debug log shows "non empty source txt list"

OG comic language is Dutch (Netherlands).

Other OCR methods work well.

Python version is 3.9.13 torch version is: 2.1.0+cu121 torchvision version is: 0.16.0+cu121

Any idea what might be at fault here specifically?

Any help would be appreciated.

Other outdated libs in case you are wondering. anthropic 0.33.0 cachetools 5.4.0 con-Figparser 7.0.0 google-ai-generativelanguage 0.6.6 qooqle-api-python-client 2.140.0 google-auth 2.33.0 grpcio 1.65.4 grpcio-status 1.48.2 huggingface-hub 0.24.5 idna 3.7 imageio 2.34.2 importlib_resources 6.4.0 matplotlib 3.9.1.postl numpy 1.26.4 openai 1.40.3 pikepdf 9.1.1 pip 22.0.4 protobu-F 3.20.2 pydantic.core 2.20.1 PyQt6 6.6.1 PyQt6-Qt6 6.6.3 rd-Flib 6.3.2 setuptools 58.1.0 shapely 2.0.5 soupsieve 2.5 tokenizers 0.19.1 torch 2.1.0+cul21 torchvision 0.16.0+cul21 traits 6.3.2 trans-Formers 4.44.0 ultralytics 8.2.76 ultralytics—thop 2.0.0 urllib3 1.25.11

try to select the text area manually and press OCR in the right-click menu.

notimp commented 2 weeks ago

Screenshot 2024-08-24 160058 Debug log shows "non empty source txt list" OG comic language is Dutch (Netherlands). Other OCR methods work well. Python version is 3.9.13 torch version is: 2.1.0+cu121 torchvision version is: 0.16.0+cu121 Any idea what might be at fault here specifically? Any help would be appreciated. Other outdated libs in case you are wondering. anthropic 0.33.0 cachetools 5.4.0 con-Figparser 7.0.0 google-ai-generativelanguage 0.6.6 qooqle-api-python-client 2.140.0 google-auth 2.33.0 grpcio 1.65.4 grpcio-status 1.48.2 huggingface-hub 0.24.5 idna 3.7 imageio 2.34.2 importlib_resources 6.4.0 matplotlib 3.9.1.postl numpy 1.26.4 openai 1.40.3 pikepdf 9.1.1 pip 22.0.4 protobu-F 3.20.2 pydantic.core 2.20.1 PyQt6 6.6.1 PyQt6-Qt6 6.6.3 rd-Flib 6.3.2 setuptools 58.1.0 shapely 2.0.5 soupsieve 2.5 tokenizers 0.19.1 torch 2.1.0+cul21 torchvision 0.16.0+cul21 traits 6.3.2 trans-Formers 4.44.0 ultralytics 8.2.76 ultralytics—thop 2.0.0 urllib3 1.25.11

try to select the text area manually and press OCR in the right-click menu.

Same result, nothing happens. Log shows nothing.

Thanks for trying to figure this out with me. :)

bropines commented 2 weeks ago

can you provide the original image? and also try to upload it on the website google.com to the search area (camera button). If it recognizes it, then we will think that it is not also provide me with a full screenshot of the application along with a side menu of text blocks

bropines commented 2 weeks ago

I am the developer of this plugin. It's my problem if something went wrong.

notimp commented 2 weeks ago

Sure, its not the testimage, tried with several ones. And on google images, I get an ocred result back.

004

Screenshot 2024-08-24 164929

Outdated python something - is my best guess. :)

As others dont report it broken.

edit: Source and translation boxes stay empty, btw.

notimp commented 2 weeks ago

(Full pip list, in case its needed - I marked the libraries you might be touching:

pip list ``` aiofiles 24.1.0 annotated-types 0.7.0 anthropic 0.33.0 anyio 4.4.0 astor 0.8.1 azure-ai-vision-imageanalysis 1.0.0b3 azure-core 1.30.2 beautifulsoup4 4.12.3 Brotli 1.1.0 brotlicffi 1.1.0.0 bs4 0.0.2 cachetools 5.4.0 catalogue 2.0.10 certifi 2024.7.4 cffi 1.17.0 charset-normalizer 3.3.2 ci-info 0.3.0 click 8.1.7 colorama 0.4.6 configobj 5.0.8 configparser 7.0.0 contourpy 1.2.1 cryptography 43.0.0 ctranslate2 4.3.1 cycler 0.12.1 Cython 3.0.11 dayu-path 0.5.2 decorator 5.1.1 deep-translator 1.11.4 deepl 1.18.0 Deprecated 1.2.14 dill 0.3.8 distro 1.9.0 docx2txt 0.8 easyocr 1.7.1 EbookLib 0.18 einops 0.8.0 emoji 2.12.1 etelemetry 0.3.1 exceptiongroup 1.2.2 filelock 3.15.4 fire 0.6.0 fonttools 4.53.1 frontend 0.0.3 fsspec 2024.6.1 fugashi 1.3.2 google-ai-generativelanguage 0.6.6 google-api-core 2.19.1 google-api-python-client 2.140.0 google-auth 2.33.0 google-auth-httplib2 0.2.0 google-generativeai 0.7.2 googleapis-common-protos 1.63.2 grpcio 1.65.4 grpcio-status 1.48.2 h11 0.14.0 httpcore 1.0.5 httplib2 0.22.0 httpx 0.27.0 huggingface-hub 0.24.5 idna 3.7 imageio 2.34.2 img2pdf 0.5.1 imgaug 0.4.0 importlib_resources 6.4.0 inflate64 1.0.0 isodate 0.6.1 itsdangerous 2.2.0 jaconv 0.4.0 Jinja2 3.1.4 jiter 0.5.0 **json5 0.9.25** keyboard 0.13.5 kiwisolver 1.4.5 langdetect 1.0.9 largestinteriorrectangle 0.2.1 lazy_loader 0.4 llvmlite 0.43.0 lmdb 1.5.1 loguru 0.7.2 looseversion 1.3.0 **lxml 5.3.0** MarkupSafe 2.1.5 matplotlib 3.9.1.post1 mpmath 1.3.0 multiprocess 0.70.16 multivolumefile 0.2.3 natsort 8.4.0 networkx 3.2.1 nibabel 5.2.1 ninja 1.11.1.1 nipype 1.8.6 numba 0.60.0 **numpy 1.26.4** openai 1.40.3 opencc-python-reimplemented 0.1.7 opencv-contrib-python 4.10.0.84 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 opt-einsum 3.3.0 ordered-set 4.1.0 packaging 24.1 paddleocr 2.8.1 paddlepaddle 2.6.1 pandas 2.2.2 pathlib 1.0.1 pathos 0.3.2 piexif 1.1.3 pikepdf 9.1.1 pillow 10.4.0 pip 22.0.4 pox 0.3.4 ppft 1.7.6.8 proto-plus 1.24.0 protobuf 3.20.2 prov 2.0.1 psutil 6.0.0 py-cpuinfo 9.0.0 py7zr 0.22.0 pyasn1 0.6.0 pyasn1_modules 0.4.0 pybcj 1.0.2 pyclipper 1.3.0.post5 pycparser 2.22 pycryptodomex 3.20.0 pydantic 2.8.2 pydantic_core 2.20.1 pydot 3.0.1 PyExecJS 1.5.1 PyMuPDF 1.24.9 PyMuPDFb 1.24.9 pyparsing 3.1.2 pyppmd 1.1.0 PyQt6 6.6.1 PyQt6-Qt6 6.6.3 PyQt6_sip 13.8.0 PySide6 6.7.2 PySide6_Addons 6.7.2 PySide6_Essentials 6.7.2 python-bidi 0.6.0 python-dateutil 2.9.0.post0 python-docx 1.1.2 pytils 0.4.1 pytz 2024.1 pywin32 306 pyxnat 1.6.2 PyYAML 6.0.2 pyzstd 0.16.1 QtPy 2.4.1 rapidfuzz 3.9.6 rarfile 4.2 rdflib 6.3.2 regex 2024.7.24 **requests 2.32.3** rsa 4.9 safetensors 0.4.4 scikit-image 0.24.0 scipy 1.13.1 seaborn 0.13.2 sentencepiece 0.2.0 setuptools 58.1.0 shapely 2.0.5 shiboken6 6.7.2 simplejson 3.19.3 six 1.16.0 sniffio 1.3.1 socksio 1.0.0 soupsieve 2.5 spacy-pkuseg 0.0.33 srsly 2.4.8 stanza 1.8.2 starlette 0.38.2 sympy 1.13.2 termcolor 2.4.0 texttable 1.7.0 tifffile 2024.8.10 tokenizers 0.19.1 toml 0.10.2 tools 0.1.9 torch 2.1.0+cu121 torchvision 0.16.0+cu121 tqdm 4.66.5 traits 6.3.2 transformers 4.44.0 translators 5.9.2 **typing_extensions 4.12.2** tzdata 2024.1 ultralytics 8.2.76 ultralytics-thop 2.0.0 unidic-lite 1.0.8 uritemplate 4.1.1 urllib3 1.25.11 uvicorn 0.30.6 wget 3.2 win32-setctime 1.1.0 winsdk 1.0.0b10 wrapt 1.16.0 zipp 3.20.0 ```
bropines commented 2 weeks ago

can I take a screenshot of the program after running RUN? I'm wondering is this a text detector or OCR problem

notimp commented 2 weeks ago

Sure:

Screenshot 2024-08-24 171403

Type settings all set to "decode by program" btw. In Ballon Translator settings.

In case you were wondering about the progression bars -- they all just progress... :) With lower than usual time to finish (lower than usual for OCR done on mashine on cuda.)

bropines commented 2 weeks ago

image

Hmmmmm, try another OCR

notimp commented 2 weeks ago

Other OCR modules work, as stated before.

Could be a python version conflict. Could be a python libraries version conflict. Could be a language setting (so .com version of the site is loaded and then does a reload for the local version of the site? (although you are supplying language parameters))

Any way you could provide a version of the file I could run, that would help you debug more?

edit: Or the version numbers of the python (pip) libraries you are touching, so I could try to update those?

bropines commented 2 weeks ago

Other OCR modules work, as stated before.

Could be a python version conflict. Could be a python libraries version conflict. Could be a language setting (so .com version of the site is loaded and then does a reload for the local version of the site? (although you are supplying language parameters))

Any way you could provide a version of the file I could run, that would help you debug more?

edit: Or the version numbers of the python (pip) libraries you are touching, so I could try to update those?

Run the program like this

launch.py --debug
notimp commented 2 weeks ago

ah, thank you. will do.

bropines commented 2 weeks ago

ah, thank you. will do.

The question is, why don't you upgrade to Python 3.10.x? This can also be done so that you can store multiple versions at the same time, via pyenv win

notimp commented 2 weeks ago

Here is the log:

debug log ``` C:\Users\harlekin\Documents\ballons-translator>launch.py --debug py version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] py executable: C:\Users\harlekin\AppData\Local\Programs\Python\Python39\python.exe version: 1.4.0 branch: dev Commit hash: [INFO ] launch:main:184 - QT_API: pyqt6, QT Version: 6.6.1 [WARNING] launch:main:216 - target display language file C:\Users\harlekin\Documents\ballons-translator\translate\de_AT.qm doesnt exist. [INFO ] launch:main:217 - set display language to de_AT [INFO ] module_manager:on_finish_setocr:903 - OCR set to google_lens [INFO ] module_manager:on_finish_settranslator:918 - Translator set to google [INFO ] module_manager:on_finish_setinpainter:910 - Inpainter set to aot [INFO ] module_manager:on_finish_setdetector:897 - Text detector set to ctd [INFO ] ocr_google_lens:_ocr_blk_list:236 - Image size: 1987x2739 [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((91, 139, 1134, 193)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (54, 1043, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (54, 1043, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 1724527522.600818 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (54, 1043, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((1534, 133, 1996, 221)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (88, 462, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (88, 462, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.883927583694458 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.11607241630554199 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (88, 462, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((2401, 150, 2594, 212)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (62, 193, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (62, 193, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.22654247283935547 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7734575271606445 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (62, 193, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((808, 192, 1017, 279)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (87, 209, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (87, 209, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.21154141426086426 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7884585857391357 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (87, 209, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((461, 1007, 803, 1093)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (86, 342, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (86, 342, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.2110145092010498 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7889854907989502 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (86, 342, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((2054, 1054, 2281, 1144)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (90, 227, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (90, 227, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.2630937099456787 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7369062900543213 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (90, 227, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((549, 1243, 779, 1356)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (113, 230, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (113, 230, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.26643943786621094 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7335605621337891 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (113, 230, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((1494, 1302, 1660, 1417)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (115, 166, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (115, 166, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.22843623161315918 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7715637683868408 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (115, 166, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] [INFO ] ocr_google_lens:_ocr_blk_list:236 - Image size: 2020x2739 [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((245, 147, 485, 286)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (139, 240, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (139, 240, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 3.358163833618164 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (139, 240, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((723, 155, 1220, 219)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (64, 497, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (64, 497, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.29811596870422363 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7018840312957764 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (64, 497, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((1472, 1177, 1700, 1294)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (117, 228, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (117, 228, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.2240767478942871 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7759232521057129 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (117, 228, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] [INFO ] ocr_google_lens:_ocr_blk_list:236 - Image size: 1995x2714 [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((153, 115, 540, 168)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (53, 387, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (53, 387, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 1.5064787864685059 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (53, 387, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((747, 114, 931, 213)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (99, 184, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (99, 184, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.2289113998413086 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7710886001586914 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (99, 184, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((2041, 141, 2283, 200)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (59, 242, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (59, 242, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.2118227481842041 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7881772518157959 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (59, 242, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((670, 1001, 895, 1088)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (87, 225, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (87, 225, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.24344944953918457 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7565505504608154 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (87, 225, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((1793, 1010, 2015, 1122)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (112, 222, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (112, 222, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.21115946769714355 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7888405323028564 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (112, 222, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((2186, 1010, 2555, 1098)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (88, 369, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (88, 369, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.23981666564941406 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7601833343505859 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (88, 369, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:240 - Processing block: ((689, 1278, 911, 1363)) [INFO ] ocr_google_lens:_ocr_blk_list:244 - Cropped image size: (85, 222, 3) [INFO ] ocr_google_lens:ocr:258 - Starting OCR on image of shape: (85, 222, 3) [INFO ] ocr_google_lens:_respect_delay:319 - Time since last request: 0.2227632999420166 seconds [INFO ] ocr_google_lens:_respect_delay:324 - Sleeping for 0.7772367000579834 seconds [INFO ] ocr_google_lens:ocr:263 - Input image size: (85, 222, 3) [ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] ```

Will try a python 3.10 version install if you indicate that its the most likely culprit here, havent worked with pyenv win - might have a look at that also, but currently on this system I only have two projects running under python - so, trying to get both to run under 3.10.x without any form of version switching should be possible, although a bit of trial and error work on my part.

bropines commented 2 weeks ago

Here is the log:

pip list Will try a python 3.10 version install if you indicate that its the most likely culprit here, havent worked with pyenv win - might have a look at that also, but currently on this system I only have two projects running under python - so, trying to get both to run under 3.10.x without any form of version switching should be possible, although a bit of trial and error work on my part.

Above I threw pyenv win which allows you to globally and locally configure the version of Python used. That is, in the project folders it is 3.9, and in the translator folder it is 3.10. And so, I still think. Have you tested using other OCRs? Do they have the same result? image

bropines commented 2 weeks ago

[ERROR ] ocr_google_lens:ocr:293 - OCR error: list index out of range

I think the problem is that in python 3.9 the processing method I used does not work. I'll check now

notimp commented 2 weeks ago

I have tested mit48px using cuda and using CPU and both run fine, no errors.

Thank you for checking, and baring with me and my issue. :)

bropines commented 2 weeks ago

https://gist.githubusercontent.com/bropines/d24f3a8ffb14ef50d775139eb4c08da2/raw/e4c89afdb239811637ffd17ee24218dc5a403c97/ocr_google_lens.py

Try replacing this file in modules and check. Should give more information. Let's see if I'm crooked, or if the changes in Python are not very good)

notimp commented 2 weeks ago

Practically the same log, unless I'm missing something (I replaced the file in modules/ocr)

Here is the log:

debug log ``` C:\Users\harlekin\Documents\ballons-translator>python launch.py --debug py version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] py executable: C:\Users\harlekin\AppData\Local\Programs\Python\Python39\python.exe version: 1.4.0 branch: dev Commit hash: [INFO ] launch:main:184 - QT_API: pyqt6, QT Version: 6.6.1 [WARNING] launch:main:216 - target display language file C:\Users\harlekin\Documents\ballons-translator\translate\de_AT.qm doesnt exist. [INFO ] launch:main:217 - set display language to de_AT [INFO ] module_manager:on_finish_setocr:903 - OCR set to google_lens [INFO ] module_manager:on_finish_settranslator:918 - Translator set to google [INFO ] module_manager:on_finish_setinpainter:910 - Inpainter set to aot [INFO ] module_manager:on_finish_setdetector:897 - Text detector set to ctd [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 1987x2739 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((91, 139, 1134, 193)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (54, 1043, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (54, 1043, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 1724529223.3746674 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (54, 1043, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1534, 133, 1996, 221)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (88, 462, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (88, 462, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.6816964149475098 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.31830358505249023 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (88, 462, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2401, 150, 2594, 212)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (62, 193, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (62, 193, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.2441086769104004 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7558913230895996 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (62, 193, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((808, 192, 1017, 279)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (87, 209, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (87, 209, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22801947593688965 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7719805240631104 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (87, 209, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((461, 1007, 803, 1093)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (86, 342, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (86, 342, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.23925018310546875 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7607498168945312 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (86, 342, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2054, 1054, 2281, 1144)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (90, 227, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (90, 227, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.23169183731079102 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.768308162689209 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (90, 227, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((549, 1243, 779, 1356)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (113, 230, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (113, 230, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.23817753791809082 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7618224620819092 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (113, 230, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1494, 1302, 1660, 1417)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (115, 166, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (115, 166, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.224869966506958 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.775130033493042 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (115, 166, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 2020x2739 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((245, 147, 485, 286)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (139, 240, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (139, 240, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 2.030822277069092 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (139, 240, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((723, 155, 1220, 219)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (64, 497, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (64, 497, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.4676814079284668 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.5323185920715332 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (64, 497, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1472, 1177, 1700, 1294)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (117, 228, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (117, 228, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22962665557861328 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7703733444213867 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (117, 228, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 1995x2714 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((153, 115, 540, 168)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (53, 387, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (53, 387, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 1.0277748107910156 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (53, 387, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((747, 114, 931, 213)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (99, 184, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (99, 184, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.25110507011413574 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7488949298858643 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (99, 184, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2041, 141, 2283, 200)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (59, 242, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (59, 242, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22706007957458496 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.772939920425415 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (59, 242, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((670, 1001, 895, 1088)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (87, 225, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (87, 225, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22574567794799805 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.774254322052002 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (87, 225, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1793, 1010, 2015, 1122)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (112, 222, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (112, 222, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22442054748535156 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7755794525146484 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (112, 222, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2186, 1010, 2555, 1098)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (88, 369, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (88, 369, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.21843576431274414 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7815642356872559 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (88, 369, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((689, 1278, 911, 1363)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (85, 222, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (85, 222, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22429299354553223 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7757070064544678 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (85, 222, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] ```
bropines commented 2 weeks ago

Hmmm... It didn't help us at all. Maybe we'll install 3.10? Or I have an offer that absolutely nothing can stop you. I once made my own auto-installer with built-in python. Just in case you're interested: https://github.com/bropines/Ballon-translator-portable

bropines commented 2 weeks ago

Of course, it will install it for you again, but you won’t have to think that something is wrong (the update checking algorithm is built into it)

notimp commented 2 weeks ago

I'll try to bring projects im runnting to 3.10.x an then report back. If everything fails I'll try your installer. Thank you for your support so far. :)

bropines commented 2 weeks ago

Good luck

notimp commented 2 weeks ago

Now running python version 3.10.11 didnt help.

I'll now purge my pip installs once again and make sure that I install Balloons Translator dependencies first, and then the ones of my other program. I'll report back.

notimp commented 2 weeks ago

I deleted all my pip installs, I deleted the entire ballons translator folder and downloaded it again. I fresh installed everything. I went into ballons translators config and set translator to google translate netherlands > german, I set ocr to google lens, I opened the test image folder an pressed run --- and same result.

Empty cleaned images, no text.

I'll edit in a pip list in a few minutes.

Next wild guess: Language (as in google lens site does something based on some language settings/your ip that arent english, even though you feed it english in the fake browser parameters), or Windows (OS) issue?

edit: Here is the promised pip list

pip list ``` Package Version ----------------------------- ------------ aiofiles 24.1.0 annotated-types 0.7.0 anthropic 0.34.1 anyio 4.4.0 astor 0.8.1 azure-ai-vision-imageanalysis 1.0.0b3 azure-core 1.30.2 beautifulsoup4 4.12.3 Brotli 1.1.0 brotlicffi 1.1.0.0 bs4 0.0.2 cachetools 5.5.0 catalogue 2.0.10 certifi 2024.7.4 cffi 1.17.0 charset-normalizer 3.3.2 ci-info 0.3.0 click 8.1.7 colorama 0.4.6 configobj 5.0.8 configparser 7.1.0 contourpy 1.2.1 cryptography 43.0.0 ctranslate2 4.3.1 cycler 0.12.1 Cython 3.0.11 dayu-path 0.5.2 decorator 5.1.1 deep-translator 1.11.4 deepl 1.18.0 Deprecated 1.2.14 dill 0.3.8 distro 1.9.0 docx2txt 0.8 easyocr 1.7.1 EbookLib 0.18 einops 0.8.0 emoji 2.12.1 etelemetry 0.3.1 exceptiongroup 1.2.2 filelock 3.13.1 fire 0.6.0 fonttools 4.53.1 frontend 0.0.3 fsspec 2024.2.0 fugashi 1.3.2 google-ai-generativelanguage 0.6.6 google-api-core 2.19.1 google-api-python-client 2.142.0 google-auth 2.34.0 google-auth-httplib2 0.2.0 google-generativeai 0.7.2 googleapis-common-protos 1.63.2 grpcio 1.66.0 grpcio-status 1.48.2 h11 0.14.0 httpcore 1.0.5 httplib2 0.22.0 httpx 0.27.0 huggingface-hub 0.24.6 idna 3.8 imageio 2.35.1 img2pdf 0.5.1 imgaug 0.4.0 inflate64 1.0.0 isodate 0.6.1 itsdangerous 2.2.0 jaconv 0.4.0 Jinja2 3.1.3 jiter 0.5.0 json5 0.9.25 keyboard 0.13.5 kiwisolver 1.4.5 langdetect 1.0.9 largestinteriorrectangle 0.2.1 lazy_loader 0.4 llvmlite 0.43.0 lmdb 1.5.1 loguru 0.7.2 looseversion 1.3.0 lxml 5.3.0 MarkupSafe 2.1.5 matplotlib 3.9.2 mpmath 1.3.0 multiprocess 0.70.16 multivolumefile 0.2.3 natsort 8.4.0 networkx 3.2.1 nibabel 5.2.1 ninja 1.11.1.1 nipype 1.8.6 numba 0.60.0 numpy 1.26.3 openai 1.42.0 opencc-python-reimplemented 0.1.7 opencv-contrib-python 4.10.0.84 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 opt-einsum 3.3.0 ordered-set 4.1.0 packaging 24.1 paddleocr 2.8.1 paddlepaddle 2.6.1 pandas 2.2.2 pathlib 1.0.1 pathos 0.3.2 piexif 1.1.3 pikepdf 9.2.0 pillow 10.2.0 pip 23.0.1 pox 0.3.4 ppft 1.7.6.8 proto-plus 1.24.0 protobuf 3.20.2 prov 2.0.1 psutil 6.0.0 py-cpuinfo 9.0.0 py7zr 0.22.0 pyasn1 0.6.0 pyasn1_modules 0.4.0 pybcj 1.0.2 pyclipper 1.3.0.post5 pycparser 2.22 pycryptodomex 3.20.0 pydantic 2.8.2 pydantic_core 2.20.1 pydot 3.0.1 PyExecJS 1.5.1 PyMuPDF 1.24.9 PyMuPDFb 1.24.9 pyparsing 3.1.2 pyppmd 1.1.0 PyQt6 6.6.1 PyQt6-Qt6 6.6.3 PyQt6_sip 13.8.0 PySide6 6.7.2 PySide6_Addons 6.7.2 PySide6_Essentials 6.7.2 python-bidi 0.6.0 python-dateutil 2.9.0.post0 python-docx 1.1.2 pytils 0.4.1 pytz 2024.1 pywin32 306 pyxnat 1.6.2 PyYAML 6.0.2 pyzstd 0.16.1 QtPy 2.4.1 rapidfuzz 3.9.6 rarfile 4.2 rdflib 6.3.2 regex 2024.7.24 requests 2.32.3 rsa 4.9 safetensors 0.4.4 scikit-image 0.24.0 scipy 1.14.1 seaborn 0.13.2 sentencepiece 0.2.0 setuptools 65.5.0 shapely 2.0.6 shiboken6 6.7.2 simplejson 3.19.3 six 1.16.0 sniffio 1.3.1 socksio 1.0.0 soupsieve 2.6 spacy-pkuseg 0.0.33 srsly 2.4.8 stanza 1.8.2 starlette 0.38.2 sympy 1.12 termcolor 2.4.0 texttable 1.7.0 tifffile 2024.8.10 tokenizers 0.19.1 toml 0.10.2 tools 0.1.9 torch 2.2.2+cu121 torchaudio 2.2.2+cu121 torchvision 0.17.2+cu121 tqdm 4.66.5 traits 6.3.2 transformers 4.44.2 translators 5.9.2 typing_extensions 4.12.2 tzdata 2024.1 ultralytics 8.2.81 ultralytics-thop 2.0.5 unidic-lite 1.0.8 uritemplate 4.1.1 urllib3 1.25.11 uvicorn 0.30.6 wget 3.2 win32-setctime 1.1.0 winsdk 1.0.0b10 wrapt 1.16.0 ```
bropines commented 2 weeks ago

I deleted all my pip installs, I deleted the entire ballons translator folder and downloaded it again. I fresh installed everything. I went into ballons translators config and set translator to google translate netherlands > german, I set ocr to google lens, I opened the test image folder an pressed run --- and same result.

Empty cleaned images, no text.

I'll edit in a pip list in a few minutes.

Next wild guess: Language (as in google lens site does something based on some language settings/your ip that arent english, even though you feed it english in the fake browser parameters), or Windows (OS) issue?

edit: Here is the promised pip list

pip list

I don't need the pip list. It is advisable to need a console log. ALSO tell me from which country you are launching. If from EU countries, then I need to release a fix with cookies. I'll try to connect to your country's VPN and test this theory.

notimp commented 2 weeks ago

Austria, next to germany, with many services, usually german service conditions/rules apply. I'll give you another console log with your special version of the module .py copied into the folder, before I go to bed for today. Will update this posting with it in 3 minutes or so.

edit:

debug log ``` Windows PowerShell PS C:\Users\harlekin> cd .\Documents\ PS C:\Users\harlekin\Documents> cd .\ballons-translator\ PS C:\Users\harlekin\Documents\ballons-translator> py -3 .\launch.py --debug py version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] py executable: C:\Users\harlekin\AppData\Local\Programs\Python\Python310\python.exe version: 1.4.0 branch: dev Commit hash: [INFO ] launch:main:184 - QT_API: pyqt6, QT Version: 6.6.1 [WARNING] launch:main:216 - target display language file C:\Users\harlekin\Documents\ballons-translator\translate\de_AT.qm doesnt exist. [INFO ] launch:main:217 - set display language to de_AT [INFO ] module_manager:on_finish_setocr:902 - OCR set to google_lens [INFO ] module_manager:on_finish_settranslator:917 - Translator set to google [INFO ] module_manager:on_finish_setinpainter:909 - Inpainter set to aot [INFO ] module_manager:on_finish_setdetector:896 - Text detector set to ctd [INFO ] config:save_config:213 - Config saved [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 1987x2739 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((91, 139, 1134, 193)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (54, 1043, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (54, 1043, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 1724537404.532538 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (54, 1043, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1534, 133, 1996, 221)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (88, 462, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (88, 462, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.6649606227874756 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.3350393772125244 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (88, 462, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2401, 150, 2594, 212)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (62, 193, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (62, 193, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22178053855895996 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.77821946144104 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (62, 193, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((808, 192, 1017, 279)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (87, 209, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (87, 209, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.20772242546081543 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7922775745391846 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (87, 209, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((461, 1007, 803, 1093)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (86, 342, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (86, 342, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.20782065391540527 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7921793460845947 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (86, 342, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2054, 1054, 2281, 1144)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (90, 227, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (90, 227, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.21737432479858398 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.782625675201416 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (90, 227, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((549, 1243, 779, 1356)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (113, 230, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (113, 230, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.21027207374572754 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7897279262542725 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (113, 230, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1494, 1302, 1660, 1417)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (115, 166, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (115, 166, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.21875691413879395 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.781243085861206 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (115, 166, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 2020x2739 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((245, 147, 485, 286)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (139, 240, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (139, 240, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 2.400218963623047 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (139, 240, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((723, 155, 1220, 219)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (64, 497, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (64, 497, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.5027782917022705 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.4972217082977295 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (64, 497, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1472, 1177, 1700, 1294)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (117, 228, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (117, 228, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22009563446044922 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7799043655395508 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (117, 228, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 1995x2714 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((153, 115, 540, 168)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (53, 387, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (53, 387, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 1.0534191131591797 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (53, 387, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((747, 114, 931, 213)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (99, 184, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (99, 184, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.21202492713928223 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7879750728607178 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (99, 184, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2041, 141, 2283, 200)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (59, 242, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (59, 242, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.22000908851623535 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7799909114837646 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (59, 242, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((670, 1001, 895, 1088)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (87, 225, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (87, 225, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.2187061309814453 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7812938690185547 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (87, 225, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1793, 1010, 2015, 1122)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (112, 222, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (112, 222, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.20996665954589844 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7900333404541016 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (112, 222, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2186, 1010, 2555, 1098)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (88, 369, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (88, 369, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.20806503295898438 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7919349670410156 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (88, 369, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((689, 1278, 911, 1363)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (85, 222, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (85, 222, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.21005678176879883 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.7899432182312012 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (85, 222, 3) [ERROR ] ocr_google_lens:ocr:348 - OCR error: list index out of range [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [] ```

Now going to sleep on my side. n8 :)

Also, if there is any other testing I can do on my part, tell me (if there is a way for me to confirm, that its ip related, f.e.).

bropines commented 2 weeks ago

So. I'm going to bed too. But if it's not difficult, check in the morning

  1. VPN is acceptable from Russia or the USA

I will add more logging to generally understand what we are receiving in the server response.

notimp commented 2 weeks ago

I will add more logging to generally understand what we are receiving in the server response.

thank you. :)

bropines commented 2 weeks ago

Listen. And you can check if you have this script. It's essentially the same thing, only in JS. If it works, then we’ll think about why our data isn’t being parsed

https://github.com/dimdenGD/chrome-lens-ocr

notimp commented 2 weeks ago

With a US VPN and your "special version of the ocr module" I finally got something new. :)

Debug Log:

debug log ``` C:\Users\harlekin\Documents\ballons-translator>py -3 launch.py --debug py version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] py executable: C:\Users\harlekin\AppData\Local\Programs\Python\Python310\python.exe version: 1.4.0 branch: dev Commit hash: [INFO ] launch:main:184 - QT_API: pyqt6, QT Version: 6.6.1 [WARNING] launch:main:216 - target display language file C:\Users\harlekin\Documents\ballons-translator\translate\de_AT.qm doesnt exist. [INFO ] launch:main:217 - set display language to de_AT [INFO ] module_manager:on_finish_setocr:902 - OCR set to google_lens [INFO ] module_manager:on_finish_settranslator:917 - Translator set to google [INFO ] module_manager:on_finish_setinpainter:909 - Inpainter set to aot [INFO ] module_manager:on_finish_setdetector:896 - Text detector set to ctd [INFO ] config:save_config:213 - Config saved [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 1987x2739 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((91, 139, 1134, 193)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (54, 1043, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (54, 1043, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 1724587817.0416589 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (54, 1043, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'HET', 'coordinates': [0.019204544, -0.003999416, 0.056, 0.46153846, 0, -0.0027923584]}, {'text': 'WAS', 'coordinates': [0.019203607, 0.06500056, 0.058, 0.44230768, 0, -0.0027923584]}, {'text': 'ELF', 'coordinates': [0.019211568, 0.14100057, 0.041, 0.44230768, 0, -0.0027923584]}, {'text': 'UUR', 'coordinates': [0.019205479, 0.19900057, 0.054, 0.44230768, 0, -0.0027923584]}, {'text': "'", 'coordinates': [0.01922796, 0.26700056, 0.006, 0.44230768, 0, -0.0027923584]}, {'text': 'S', 'coordinates': [0.019223744, 0.27400056, 0.015, 0.44230768, 0, -0.0027923584]}, {'text': 'AVONDS', 'coordinates': [0.019180657, 0.30300054, 0.107, 0.44230768, 0, -0.0027923584]}, {'text': '.', 'coordinates': [0.019227492, 0.41300055, 0.007, 0.44230768, 0, -0.0027923584]}, {'text': 'MARY', 'coordinates': [0.019196581, 0.44000056, 0.073, 0.44230768, 0, -0.0027923584]}, {'text': 'MOLESWORTH', 'coordinates': [0.019147875, 0.53000057, 0.177, 0.44230768, 0, -0.0027923584]}, {'text': 'ZOCHT', 'coordinates': [0.019187683, 0.7230005, 0.092, 0.44230768, 0, -0.0027923584]}, {'text': 'HAAR', 'coordinates': [0.019196581, 0.83100057, 0.073, 0.44230768, 0, -0.0027923584]}, {'text': 'KAMER', 'coordinates': [0.019190025, 0.91700053, 0.087, 0.44230768, 0, -0.0027923584]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1534, 133, 1996, 221)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (88, 462, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (88, 462, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 1.5527539253234863 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (88, 462, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'IK', 'coordinates': [0.09085633, 0.012994827, 0.058441557, 0.23863636, 0, -0.019699097]}, {'text': 'HEB', 'coordinates': [0.09081139, 0.099574536, 0.10822511, 0.22727273, 0, -0.019699097]}, {'text': 'JE', 'coordinates': [0.09086024, 0.24243169, 0.054112554, 0.22727273, 0, -0.019699097]}, {'text': 'TOCH', 'coordinates': [0.09075863, 0.32901177, 0.16666667, 0.22727273, 0, -0.019699097]}, {'text': 'GEZEGD', 'coordinates': [0.090696104, 0.53031045, 0.23593074, 0.22727273, 0, -0.019699097]}, {'text': 'MIJN', 'coordinates': [0.09078599, 0.79870874, 0.13636364, 0.22727273, 0, -0.019699097]}, {'text': 'SPULLEN', 'coordinates': [0.40915546, 0.010820186, 0.24025974, 0.23863636, 0, 0.005859375]}, {'text': 'STEEDS', 'coordinates': [0.4091473, 0.28571197, 0.2099567, 0.23863636, 0, 0.005859375]}, {'text': 'OP', 'coordinates': [0.40911123, 0.53030074, 0.07575758, 0.23863636, 0, 0.005859375]}, {'text': 'HUN', 'coordinates': [0.4091252, 0.6341968, 0.12770563, 0.23863636, 0, 0.005859375]}, {'text': 'VASTE', 'coordinates': [0.40914324, 0.7965345, 0.19480519, 0.23863636, 0, 0.005859375]}, {'text': 'PLAATS', 'coordinates': [0.7160178, 0.119043514, 0.21861471, 0.22727273, 0, 0.010848999]}, {'text': 'TE', 'coordinates': [0.7159446, 0.37229028, 0.071428575, 0.22727273, 0, 0.010848999]}, {'text': 'LEGGEN', 'coordinates': [0.71602, 0.47835088, 0.22294372, 0.22727273, 0, 0.010848999]}, {'text': '!', 'coordinates': [0.71591556, 0.7445846, 0.012987013, 0.22727273, 0, 0.010848999]}, {'text': '!', 'coordinates': [0.7159145, 0.7748877, 0.010822511, 0.22727273, 0, 0.010848999]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2401, 150, 2594, 212)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (62, 193, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (62, 193, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8473949432373047 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.1526050567626953 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (62, 193, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'ALSTUBLIEFT', 'coordinates': [0.1610909, 8.371963e-06, 0.9119171, 0.37096775, 0, -0.008056641]}, {'text': ',', 'coordinates': [0.16128466, 0.92746913, 0.025906736, 0.3548387, 0, -0.008056641]}, {'text': 'MEVROUW', 'coordinates': [0.61080915, 0.22808173, 0.7098446, 0.33870968, 0, -0.10858154]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((808, 192, 1017, 279)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (87, 209, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (87, 209, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8563551902770996 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.1436448097229004 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (87, 209, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'HET', 'coordinates': [0.09198266, 0.086120635, 0.27272728, 0.20689656, 0, 0.005004883]}, {'text': 'BED', 'coordinates': [0.09198016, 0.42583355, 0.24880382, 0.20689656, 0, 0.005004883]}, {'text': 'IS', 'coordinates': [0.3793095, -0.023923144, 0.12440191, 0.25287357, 0, -0.00032043457]}, {'text': 'OPGEMAAKT', 'coordinates': [0.37930468, 0.17703378, 0.8229665, 0.2413793, 0, -0.00032043457]}, {'text': 'MEVROUW', 'coordinates': [0.72418094, 0.1291841, 0.6507177, 0.21839081, 0, 0.0031585693]}, {'text': '!', 'coordinates': [0.7241401, 0.885165, 0.033492822, 0.21839081, 0, 0.0031585693]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((461, 1007, 803, 1093)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (86, 342, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (86, 342, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8837532997131348 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.11624670028686523 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (86, 342, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'WAAR', 'coordinates': [0.058824096, 0.052586813, 0.23684211, 0.24418604, 0, 0.08329773]}, {'text': 'IS', 'coordinates': [0.058409903, 0.3040489, 0.09356725, 0.24418604, 0, 0.08329773]}, {'text': 'HET', 'coordinates': [0.058587413, 0.43855178, 0.15497077, 0.24418604, 0, 0.08329773]}, {'text': 'BOEK', 'coordinates': [0.05870575, 0.6461541, 0.19590643, 0.24418604, 0, 0.08329773]}, {'text': 'GE', 'coordinates': [0.05851979, 0.8596044, 0.13157895, 0.24418604, 0, 0.08329773]}, {'text': 'BLEVEN', 'coordinates': [0.3723515, 0.008756657, 0.28654972, 0.26744187, 0, 0.026000977]}, {'text': ',', 'coordinates': [0.37211147, 0.30115435, 0.020467836, 0.26744187, 0, 0.026000977]}, {'text': 'DAT', 'coordinates': [0.372246, 0.38594964, 0.16959064, 0.26744187, 0, 0.026000977]}, {'text': 'IK', 'coordinates': [0.37217215, 0.60232395, 0.0877193, 0.26744187, 0, 0.026000977]}, {'text': 'HIER', 'coordinates': [0.3722513, 0.72805494, 0.1754386, 0.26744187, 0, 0.026000977]}, {'text': 'NEERGELEGD', 'coordinates': [0.7110105, 0.12275038, 0.49122807, 0.25581396, 0, 0.10021973]}, {'text': 'HAD', 'coordinates': [0.70992243, 0.6519904, 0.17836258, 0.25581396, 0, 0.10021973]}, {'text': '?', 'coordinates': [0.7093937, 0.88883257, 0.02631579, 0.25581396, 0, 0.10021973]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2054, 1054, 2281, 1144)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (90, 227, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (90, 227, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.901320219039917 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.09867978096008301 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (90, 227, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'HEBT', 'coordinates': [0.08848081, 0.25995836, 0.3215859, 0.23333333, 0, -0.057647705]}, {'text': 'U', 'coordinates': [0.088788226, 0.64321613, 0.07929515, 0.22222222, 0, -0.057647705]}, {'text': 'ΜΕ', 'coordinates': [0.08867085, 0.7929958, 0.17180617, 0.22222222, 0, -0.057647705]}, {'text': 'NOG', 'coordinates': [0.41036424, 0.013336837, 0.26872247, 0.2777778, 0, -0.1262207]}, {'text': 'NODIG', 'coordinates': [0.4100338, 0.33932304, 0.3876652, 0.26666668, 0, -0.1262207]}, {'text': ',', 'coordinates': [0.4110251, 0.73139393, 0.030837005, 0.26666668, 0, -0.1262207]}, {'text': 'MEVROUW', 'coordinates': [0.6995279, 0.101350434, 0.59911895, 0.23333333, 0, -0.03579712]}, {'text': '?', 'coordinates': [0.69997567, 0.79297906, 0.030837005, 0.22222222, 0, -0.03579712]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((549, 1243, 779, 1356)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (113, 230, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (113, 230, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8213503360748291 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.1786496639251709 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (113, 230, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'IK', 'coordinates': [0.079721, 0.21301796, 0.11304348, 0.15929204, 0, 0.037353516]}, {'text': 'HEB', 'coordinates': [0.07978445, 0.3912788, 0.20869565, 0.15929204, 0, 0.037353516]}, {'text': 'HET', 'coordinates': [0.07979599, 0.6738875, 0.22608696, 0.15929204, 0, 0.037353516]}, {'text': 'OP', 'coordinates': [0.31908664, 0.043337625, 0.16086957, 0.18584071, 0, 0.17604065]}, {'text': 'UW', 'coordinates': [0.3191954, 0.256381, 0.19565217, 0.18584071, 0, 0.17604065]}, {'text': 'HOOFD', 'coordinates': [0.31988874, 0.51290226, 0.4173913, 0.18584071, 0, 0.17604065]}, {'text': '-', 'coordinates': [0.31874675, 0.93464226, 0.052173913, 0.18584071, 0, 0.17604065]}, {'text': 'KUSSEN', 'coordinates': [0.55140376, -0.00025968085, 0.45652175, 0.17699115, 0, 0.33700562]}, {'text': 'GELEGD', 'coordinates': [0.5513777, 0.5171189, 0.45217392, 0.18584071, 0, 0.33700562]}, {'text': 'MEVROUW', 'coordinates': [0.7911443, 0.19103695, 0.6043478, 0.18584071, 0, 0.32933044]}, {'text': '.', 'coordinates': [0.79661137, 0.8040977, 0.026086956, 0.17699115, 0, 0.32933044]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1494, 1302, 1660, 1417)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (115, 166, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (115, 166, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8819191455841064 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.11808085441589355 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (115, 166, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'NEE', 'coordinates': [0.06792507, -0.011543269, 0.3493976, 0.22608696, 0, -0.3721161]}, {'text': ',', 'coordinates': [0.06919584, 0.31976533, 0.078313254, 0.2173913, 0, -0.3721161]}, {'text': 'DANK', 'coordinates': [0.06710629, 0.4884353, 0.52409637, 0.2173913, 0, -0.3721161]}, {'text': 'JE', 'coordinates': [0.304139, -0.023989212, 0.18674698, 0.2, 0, -0.08872986]}, {'text': ',', 'coordinates': [0.30426693, 0.1386568, 0.072289154, 0.19130434, 0, -0.08872986]}, {'text': 'JULY', 'coordinates': [0.30388987, 0.3073313, 0.40963855, 0.19130434, 0, -0.08872986]}, {'text': '.', 'coordinates': [0.30430058, 0.71697, 0.042168673, 0.19130434, 0, -0.08872986]}, {'text': 'TOT', 'coordinates': [0.5390059, 0.066293806, 0.3433735, 0.16521738, 0, -0.028793335]}, {'text': 'MOR', 'coordinates': [0.53899497, 0.5060513, 0.37349397, 0.15652174, 0, -0.028793335]}, {'text': '-', 'coordinates': [0.5391042, 0.8795453, 0.072289154, 0.15652174, 0, -0.028793335]}, {'text': 'GEN', 'coordinates': [0.7913092, 0.22289039, 0.3433735, 0.17391305, 0, 0.0011138916]}, {'text': '.', 'coordinates': [0.791305, 0.57228804, 0.04819277, 0.17391305, 0, 0.0011138916]}]} [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found] [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 2020x2739 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((245, 147, 485, 286)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (139, 240, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (139, 240, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 3.1258485317230225 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (139, 240, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'ZE', 'coordinates': [0.038355343, 0.028366445, 0.15416667, 0.15107913, 0, 1.0316772]}, {'text': 'MAG', 'coordinates': [0.040232994, 0.2324858, 0.275, 0.15827338, 0, 1.0316772]}, {'text': 'DAN', 'coordinates': [0.054039165, 0.574193, 0.2375, 0.15107913, 0, 1.0316772]}, {'text': 'OUD', 'coordinates': [0.23447034, 0.044789128, 0.2625, 0.18705036, 0, 1.0799255]}, {'text': 'WORDEN', 'coordinates': [0.25231707, 0.35730952, 0.475, 0.17985612, 0, 1.0799255]}, {'text': ',', 'coordinates': [0.25938362, 0.8406828, 0.025, 0.17985612, 0, 1.0799255]}, {'text': 'HAAR', 'coordinates': [0.42271304, 0.007514318, 0.35, 0.15107913, 0, 1.0352325]}, {'text': 'KARAKTER', 'coordinates': [0.44113094, 0.39499325, 0.60833335, 0.15107913, 0, 1.0352325]}, {'text': 'VERANDERT', 'coordinates': [0.64495635, 0.09547292, 0.6458333, 0.1438849, 0, 0.48002625]}, {'text': 'NIET', 'coordinates': [0.84278566, 0.22066458, 0.275, 0.1294964, 0, 0.25575256]}, {'text': '!', 'coordinates': [0.8418544, 0.57899916, 0.033333335, 0.1294964, 0, 0.25575256]}, {'text': '!', 'coordinates': [0.84183836, 0.6373325, 0.029166667, 0.1294964, 0, 0.25575256]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((723, 155, 1220, 219)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (64, 497, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (64, 497, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8211019039154053 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.17889809608459473 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (64, 497, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'DE', 'coordinates': [0.06794505, -0.0024697233, 0.072434604, 0.359375, 0, 1.116272]}, {'text': 'OUDE', 'coordinates': [0.07403152, 0.096094586, 0.1529175, 0.375, 0, 1.116272]}, {'text': 'DAME', 'coordinates': [0.10543372, 0.27919298, 0.15492958, 0.375, 0, 1.116272]}, {'text': 'WAS', 'coordinates': [0.13409634, 0.4643069, 0.12072434, 0.375, 0, 1.116272]}, {'text': 'MAAR', 'coordinates': [0.15261312, 0.6152087, 0.15895373, 0.375, 0, 1.116272]}, {'text': 'NET', 'coordinates': [0.17990595, 0.79831225, 0.10663984, 0.375, 0, 1.116272]}, {'text': 'IN', 'coordinates': [0.20704806, 0.9411942, 0.052313883, 0.359375, 0, 1.116272]}, {'text': 'HAAR', 'coordinates': [0.51128674, 0.003549494, 0.15895373, 0.390625, 0, 1.0509033]}, {'text': 'LEKTUUR', 'coordinates': [0.5492725, 0.18464652, 0.2535211, 0.375, 0, 1.0509033]}, {'text': 'VERDIEPT', 'coordinates': [0.5802346, 0.46631855, 0.24949698, 0.390625, 0, 1.0509033]}, {'text': ',', 'coordinates': [0.6102032, 0.72189015, 0.012072435, 0.375, 0, 1.0509033]}, {'text': 'OF', 'coordinates': [0.6295536, 0.7802359, 0.064386316, 0.375, 0, 1.0509033]}, {'text': '...', 'coordinates': [0.6298389, 0.85265166, 0.06841046, 0.390625, 0, 1.0509033]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1472, 1177, 1700, 1294)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (117, 228, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (117, 228, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8687214851379395 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.13127851486206055 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (117, 228, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'ZE', 'coordinates': [0.08545181, 0.013162985, 0.15350877, 0.16239317, 0, -0.007003784]}, {'text': 'HEEFT', 'coordinates': [0.08542623, 0.2149171, 0.36842105, 0.15384616, 0, -0.007003784]}, {'text': 'ZELFS', 'coordinates': [0.08543093, 0.65789956, 0.32894737, 0.15384616, 0, -0.007003784]}, {'text': 'GEEN', 'coordinates': [0.325073, 0.074515894, 0.2982456, 0.17948718, 0, 0.056533813]}, {'text': 'TIJD', 'coordinates': [0.32503927, 0.43855098, 0.2631579, 0.17948718, 0, 0.056533813]}, {'text': 'GE', 'coordinates': [0.32498866, 0.6973229, 0.21052632, 0.17948718, 0, 0.056533813]}, {'text': '-', 'coordinates': [0.32486215, 0.91223526, 0.078947365, 0.17948718, 0, 0.056533813]}, {'text': 'HAD', 'coordinates': [0.5557977, -0.008807751, 0.28947368, 0.16239317, 0, 0.049194336]}, {'text': 'OM', 'coordinates': [0.55572796, 0.32013965, 0.20614035, 0.16239317, 0, 0.049194336]}, {'text': 'HULP', 'coordinates': [0.5558087, 0.60522735, 0.3026316, 0.16239317, 0, 0.049194336]}, {'text': 'TE', 'coordinates': [0.7949544, 0.021903314, 0.14035088, 0.17094018, 0, 0.034622192]}, {'text': 'ROEPEN', 'coordinates': [0.7951248, 0.2192717, 0.42982456, 0.17094018, 0, 0.034622192]}, {'text': '.', 'coordinates': [0.79488987, 0.6578682, 0.030701755, 0.17094018, 0, 0.034622192]}]} [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found] [INFO ] ocr_google_lens:_ocr_blk_list:291 - Image size: 1995x2714 [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((153, 115, 540, 168)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (53, 387, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (53, 387, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 2.022705316543579 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (53, 387, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'DE', 'coordinates': [0.41733995, 0.028198402, 0.08527132, 0.4528302, 0, 0.41438293]}, {'text': 'VOLGENDE', 'coordinates': [0.4059086, 0.15480037, 0.36692506, 0.4716981, 0, 0.41438293]}, {'text': 'MORGEN', 'coordinates': [0.4413932, 0.5682475, 0.28165373, 0.4528302, 0, 0.41438293]}, {'text': '....', 'coordinates': [0.4563039, 0.8602391, 0.13178295, 0.4528302, 0, 0.41438293]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((747, 114, 931, 213)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (99, 184, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (99, 184, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.825824499130249 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.17417550086975098 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (99, 184, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'en', 'text_with_coordinates': [{'text': 'AH', 'coordinates': [0.124831006, 0.047715575, 0.61413044, 0.6969697, 0, 0.36402893]}, {'text': '!', 'coordinates': [0.12290574, 0.6075015, 0.28804347, 0.6969697, 0, 0.36402893]}, {'text': '!', 'coordinates': [0.122552775, 0.80858904, 0.22826087, 0.6969697, 0, 0.36402893]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2041, 141, 2283, 200)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (59, 242, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (59, 242, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.9648208618164062 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.03517913818359375 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (59, 242, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'ZE', 'coordinates': [0.11846694, 0.020687312, 0.13636364, 0.33898306, 0, -0.0362854]}, {'text': 'HEEFT', 'coordinates': [0.118209355, 0.21076863, 0.33471075, 0.3220339, 0, -0.0362854]}, {'text': 'ZICH', 'coordinates': [0.118284486, 0.6157273, 0.2768595, 0.3220339, 0, -0.0362854]}, {'text': 'OPGEHANGEN', 'coordinates': [0.5904832, 0.053792965, 0.73966944, 0.33898306, 0, -0.103378296]}, {'text': '!', 'coordinates': [0.5931283, 0.8802361, 0.024793388, 0.3220339, 0, -0.103378296]}, {'text': '!', 'coordinates': [0.59314364, 0.93395513, 0.020661157, 0.3220339, 0, -0.103378296]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((670, 1001, 895, 1088)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (87, 225, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (87, 225, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8695347309112549 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.13046526908874512 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (87, 225, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'JULY', 'coordinates': [0.08324035, 0.10624854, 0.2888889, 0.28735632, 0, 0.4270935]}, {'text': ',', 'coordinates': [0.08062714, 0.40403008, 0.017777778, 0.28735632, 0, 0.4270935]}, {'text': 'WAT', 'coordinates': [0.08311168, 0.53289884, 0.27555555, 0.29885057, 0, 0.4270935]}, {'text': 'IS', 'coordinates': [0.092935346, 0.8840289, 0.10222222, 0.28735632, 0, 0.4270935]}, {'text': 'ER', 'coordinates': [0.4153768, 0.021835804, 0.14222223, 0.22988506, 0, 0.49473572]}, {'text': 'AAN', 'coordinates': [0.41676635, 0.2129446, 0.26666668, 0.22988506, 0, 0.49473572]}, {'text': 'DE', 'coordinates': [0.42697033, 0.5507245, 0.15111111, 0.22988506, 0, 0.49473572]}, {'text': 'HAND', 'coordinates': [0.7254584, 0.102102764, 0.38222224, 0.22988506, 0, 0.15312195]}, {'text': '?', 'coordinates': [0.72422963, 0.70654786, 0.026666667, 0.22988506, 0, 0.15312195]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((1793, 1010, 2015, 1122)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (112, 222, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (112, 222, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.8414702415466309 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.15852975845336914 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (112, 222, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'IK', 'coordinates': [0.053623293, 0.040519975, 0.12612613, 0.19642857, 0, 0.023773193]}, {'text': 'GA', 'coordinates': [0.05364182, 0.23421367, 0.17117117, 0.19642857, 0, 0.023773193]}, {'text': 'ONMID', 'coordinates': [0.05374556, 0.4729524, 0.4234234, 0.19642857, 0, 0.023773193]}, {'text': '-', 'coordinates': [0.053608473, 0.89637583, 0.09009009, 0.19642857, 0, 0.023773193]}, {'text': 'DELLIJK', 'coordinates': [0.30464634, 0.013401191, 0.45945945, 0.1875, 0, 0.13528442]}, {'text': 'DE', 'coordinates': [0.30391902, 0.54493314, 0.14864865, 0.1875, 0, 0.13528442]}, {'text': 'POLITIE', 'coordinates': [0.5535867, 0.036034588, 0.45495495, 0.16964285, 0, 0.0019378662]}, {'text': 'WAAR', 'coordinates': [0.55358326, 0.5675661, 0.35135135, 0.16964285, 0, 0.0019378662]}, {'text': '-', 'coordinates': [0.55357325, 0.9189175, 0.054054055, 0.16964285, 0, 0.0019378662]}, {'text': 'SCHUWEN', 'coordinates': [0.79604965, 0.16656752, 0.5855856, 0.16071428, 0, 0.13891602]}, {'text': '!', 'coordinates': [0.7947184, 0.84224397, 0.03153153, 0.16071428, 0, 0.13891602]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((2186, 1010, 2555, 1098)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (88, 369, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (88, 369, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.89044189453125 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.10955810546875 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (88, 369, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'ANDREWS', 'coordinates': [0.07177109, 0.016067693, 0.34146342, 0.3181818, 0, 0.28741455]}, {'text': ',', 'coordinates': [0.07971454, 0.36295998, 0.016260162, 0.3068182, 0, 0.28741455]}, {'text': 'LAAT', 'coordinates': [0.08156711, 0.43883285, 0.19241193, 0.3181818, 0, 0.28741455]}, {'text': 'ME', 'coordinates': [0.092018746, 0.67190254, 0.10569106, 0.3068182, 0, 0.28741455]}, {'text': 'NIET', 'coordinates': [0.092645794, 0.81824356, 0.16531165, 0.3068182, 0, 0.28741455]}, {'text': 'ALLEEN', 'coordinates': [0.42228583, 0.13267587, 0.2682927, 0.29545453, 0, 0.18661499]}, {'text': ',', 'coordinates': [0.42058328, 0.4009692, 0.01897019, 0.29545453, 0, 0.18661499]}, {'text': 'IK', 'coordinates': [0.4209719, 0.48226985, 0.07588076, 0.29545453, 0, 0.18661499]}, {'text': 'GA', 'coordinates': [0.42117548, 0.59338087, 0.10569106, 0.29545453, 0, 0.18661499]}, {'text': 'MET', 'coordinates': [0.4215271, 0.7343022, 0.15718158, 0.29545453, 0, 0.18661499]}, {'text': 'JE', 'coordinates': [0.4209349, 0.9267143, 0.07046071, 0.29545453, 0, 0.18661499]}, {'text': 'MEE', 'coordinates': [0.73937184, 0.46877387, 0.14905149, 0.2159091, 0, 0.1348877]}, {'text': '!', 'coordinates': [0.7387297, 0.6720261, 0.01897019, 0.2159091, 0, 0.1348877]}, {'text': '!', 'coordinates': [0.7387297, 0.7506169, 0.01897019, 0.2159091, 0, 0.1348877]}]} [INFO ] ocr_google_lens:_ocr_blk_list:295 - Processing block: ((689, 1278, 911, 1363)) [INFO ] ocr_google_lens:_ocr_blk_list:299 - Cropped image size: (85, 222, 3) [INFO ] ocr_google_lens:ocr:313 - Starting OCR on image of shape: (85, 222, 3) [INFO ] ocr_google_lens:_respect_delay:374 - Time since last request: 0.855644941329956 seconds [INFO ] ocr_google_lens:_respect_delay:379 - Sleeping for 0.14435505867004395 seconds [INFO ] ocr_google_lens:ocr:318 - Input image size: (85, 222, 3) [INFO ] ocr_google_lens:ocr:322 - OCR result: {'full_text': 'Error extracting full text: sequence item 0: expected str instance, list found', 'language': 'nl', 'text_with_coordinates': [{'text': 'MIJN', 'coordinates': [0.06398687, 0.1974413, 0.2882883, 0.28235295, 0, 0.7878723]}, {'text': 'GOD', 'coordinates': [0.07550892, 0.55329776, 0.27477476, 0.28235295, 0, 0.7878723]}, {'text': '!', 'coordinates': [0.09475194, 0.9091959, 0.036036037, 0.27058825, 0, 0.7878723]}, {'text': 'MIJN', 'coordinates': [0.4136826, 0.022287307, 0.2837838, 0.23529412, 0, 0.2967682]}, {'text': 'ARME', 'coordinates': [0.41392633, 0.38264742, 0.3198198, 0.23529412, 0, 0.2967682]}, {'text': 'MEVROUW', 'coordinates': [0.7185847, 0.12607089, 0.6171171, 0.24705882, 0, 0.06666565]}, {'text': '!', 'coordinates': [0.7176949, 0.8377828, 0.03153153, 0.24705882, 0, 0.06666565]}]} [DEBUG ] base:translate_textblk_lst:202 - non empty src text list: [Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found, Error extracting full text: sequence item 0: expected str instance, list found] [INFO ] config:save_config:213 - Config saved [INFO ] utils:dump_compile_times:302 - TorchDynamo compilation metrics: Function, Runtimes (s) [INFO ] utils:dump_compile_times:302 - TorchDynamo compilation metrics: Function, Runtimes (s) [2024-08-25 14:11:10,298] torch._dynamo.utils: [INFO] TorchDynamo compilation metrics: [2024-08-25 14:11:10,298] torch._dynamo.utils: [INFO] Function, Runtimes (s) ```

Screenshot 2024-08-25 140253

Also, please dont make me install the java tool, I've got no experience with npm - and to get that working I would need some serious help... So I'm not using the java tool for now.

But its very interesting to see, that with a US VPN, or a JP VPN I get those new error messages (the message in the image (comic bubbles), is just the error message in the src (ocr) field repeated over and over and over again, but translated into german.. :) - but when I disconnect from said VPN, I get blank fields again.)

VPN used was proton vpn (free vpn), so the IP address is known to google, just fyi if that matters.

bropines commented 2 weeks ago

This is already interesting. Then (for some reason I only guessed now) could you install this library and make requests through it (that is, stupidly give it an image as an input)? Here I will find out what the problem is at a more simple level than through BT

https://github.com/bropines/chrome-lens-py

bropines commented 2 weeks ago

And it would be even better if you wrote to me in telegram, if not difficult, so that I can help you more effectively

notimp commented 2 weeks ago

No to telegram, yes to the other stuff. :)

Here is the result of chrome lens py:

First three are with a US VPN

Last one (fourth one) without the VPN:

cmd Log:

log ``` C:\Users\harlekin>lens_scan C:\Users\harlekin\Desktop\test\004.jpg full_text_default Sending data to https://lens.google.com/v3/upload Response code: 200 "4\nHET WAS ELF UUR 'S AVONDS, MARY MOLESWORTH ZOCHT HAAR KAMER\nHET BED IS OPGEMAAKT MEVROUW !\nIK HEB JE TOCH GEZEGD MUN SPULLEN STEEDS OP HUN VASTE PLAATS TE LEGGEN !!\nALSTUBLIEFT,MEVROUW !\nWAAR IS HET BOEK GE BLEVEN, DAT IK HIER NEERGELEGD HAD?\nIK HEB HET OP UW HOOFD-KUSSEN GELEGD,MEVROUW,\nHEBT L ME OG NODIG NOG NODIG,MEVROUW\nNEE, DANK JE, JULY.TOT MOR-GEN," C:\Users\harlekin>lens_scan C:\Users\harlekin\Desktop\test\004.jpg full_text_new_method Sending data to https://lens.google.com/v3/upload Response code: 200 "4 HET WAS ELF UUR ' S AVONDS, MARY MOLESWORTH ZOCHT HAAR KAMER IK HEB JE TOCH GEZEGD MUN SPULLEN STEEDS OP HUN VASTE ALSTUBLIEFT, MEVROUW! HET BED PLAATS TE LEGGEN!!\nIS OPGEMAAKT MEVROUW!\nWAAR IS HET BOEK GE BLEVEN, DAT IK HIER NEERGELEGD HAD? HEBT L ME OG NODIG NOG NODIG,\nMEVROUW\nIK HEB HET OP UW HOOFD - KUSSEN GELEGD, NEE, DANK MEVROUW, JE, JULY.\nTOT MOR - GEN," C:\Users\harlekin>lens_scan C:\Users\harlekin\Desktop\test\004.jpg full_text_old_method Sending data to https://lens.google.com/v3/upload Response code: 200 "4 HET WAS ELF UUR ' S AVONDS, MARY MOLESWORTH ZOCHT HAAR KAMER HET BED IS OPGEMAAKT MEVROUW! IK HEB JE TOCH GEZEGD MUN SPULLEN STEEDS OP HUN VASTE PLAATS TE LEGGEN!! ALSTUBLIEFT, MEVROUW! WAAR IS HET BOEK GE BLEVEN, DAT IK HIER NEERGELEGD HAD? IK HEB HET OP UW HOOFD - KUSSEN GELEGD, MEVROUW, HEBT L ME OG NODIG NOG NODIG, MEVROUW NEE, DANK JE, JULY. TOT MOR - GEN," C:\Users\harlekin>lens_scan C:\Users\harlekin\Desktop\test\004.jpg full_text_default Sending data to https://lens.google.com/v3/upload Response code: 200 Error: list index out of range ```

== the commands when connected to a US VPN went through and returned the desired text. only without the vpn I get the "list index out of range" error.

notimp commented 2 weeks ago

I just replaced the debug google lens module in balloon translator, with the default one again, connected to a US vpn, tested if lens_scan would give text (it did), then tried to run BallonsTranslator again with the test images - and this time translation went through.

So here it is.

All I had to do was (maybe an install of python 3.10.11) and use a VPN, and the module works.

Thank you for your help in trouble shooting this. If you need anything else, I will monitor this issue for the next couple of days.

TLDR; People in Europe might need a US VPN for this to work. (Or use python 3.10.x, or install https://github.com/bropines/chrome-lens-py - which also did install some dependencies I dindt have so far.)

After that, while connected to a US VPN the google lens module will work for OCR.

bropines commented 2 weeks ago

I just replaced the test google lens module, with the default one again, connected to a US vpn, tested if lens_scan would give text (it did), then tried to run BallonsTranslator again with the test images - and this time translation went through.

So here it is.

All I had to do was (maybe an install of python 3.10.11) and use a VPN, and the module works.

Thank you for your help in trouble shooting this. If you need anything else, I will monitor this issue for the next couple of days.

TLDR; People in Europe might need a US VPN for this to work. (Or use python 3.10.x, or install bropines/chrome-lens-py - which also did install some dependencies I dindt have so far.)

After that, while connected to a US VPN the google lens module will work for OC

This is a temporary solution. Tell me your Internet service provider. I'll see what can be done to ensure that it produces a normal result. I assume that Google is introducing some kind of verification in your region. I will rewrite the module taking into account cookies for vpn, and after without vpn, it will use these cookies for the future so that you do not get an error.

bropines commented 2 weeks ago

I will finish my python module and embed it into the program as a library after I fix your problem. And you can even write to me on Facebook)

notimp commented 2 weeks ago

ISP is Magenta (== Deutsche Telekom, so the big honcho, Magenta is their ISP and Cell Provider brand.).

So that my issue is "fixed" if I use a VPN is thanks to your bropines/chrome-lens-py, module? (seems unlikely. :) )

Or thanks to the VPN? :)

I also dont use facebook (damn sure I dont... ;) ).

notimp commented 2 weeks ago

I also have another small request, I'd very much want you to implement. If possible please add a text parsing option that filters out all \s* (spaces, including soft line linebreaks I think...), and replaces them with one space.

Google lens often enters soft linebreaks into a text, where you dont want to be any -- if you do another quality control pass (re-edit the text bubbles basically) in Ballon Translator.

If there would be an option for the text of every blob, just being an endless line of text without linebreaks (per comic speech bubble), Ballon translator would do its auto formating purely based on textbox size, and you could format that further as a user during your quality control pass.

In my test edit using google lens ocr, taking out the linebreaks, that google lens put in there, by far was the most time consuming step.

So if you could add an option that parses the text first, removes all \s (thats spaces, soft line breaks, and even hard linebreaks (although \n arent included in \s), and replaces them with exactly one space), that would reduce the amount of time you have to put into removing all those false line breaks, google lens recognized. If google lens sets those line breaks using \n (so newline), you would have to replace \n with one space as well. (wouldnt be caught by \s)).

Still keep the separation of different text boxes recognized, so dont merge text, just remove all new line breaks on each and ever text bubble in a comic.

I'll put this in as a seperate request (issue) if you dont mind. But before I do I though I give you the chance to quickly react. If you cant or dont want to do that for reasons that aren immediately clear - say so and I wont create another ticket. :)

Make it an optional setting though.

By default google lense tries to format text using linebreaks so it fits the original text on paper in shape, I think. Some people still might like that. But if you do a quality control pass on your comic, removing all the line breaks that Google has put into the text is by far the most timeconsuming step (and you do it over an entire comic, and practically with every text bubble).

Thank you for considering it.

Now back to topic.

(I dont want to derail this issue posting in its final hours... :) )

Cheers, notimp

edit: Also, if adding those linebreaks is something Ballons Translator does during the resizing of a textbox, please ignore my request -- im not entirely familiar with the program yet, as I just started using it. (After I got google lens OCR running I did my first manual editing pass on a full comic, so I'm still learning.)

bropines commented 2 weeks ago

ISP is Magenta (== Deutsche Telekom, so the big honcho, Magenta is their ISP and Cell Provider brand.).

So that my issue is "fixed" if I use a VPN is thanks to your bropines/chrome-lens-py, module? (seems unlikely. :) )

Or thanks to the VPN? :)

I also dont use facebook (damn sure I dont... ;) ).

VPN solved your problem.

bropines commented 2 weeks ago

About line breaks. There's a handling newline setting in google ocr. Turn it on to remove and even if I messed up somewhere, it will remove all the hyphenation of the text. Try it.

notimp commented 2 weeks ago

dling newline setting in google ocr. Turn it on to remove and even if I messed up somew

Thank you, I will. Also thank you for the "VPN did it" answer. :)

My problem isnt with hypenated text though - but with text formated like this:

A man and his dog go home and sit on a couch.

The first four lines in that fashion is something I get like that as the text I'm working with more than a few times in a comic.

And its not just that, its also.

A man and\linebreak (aka newline) his dog go\newline home and sit\newline on a couch.\newline

that becomes a problem, if you resize textboxes during quality control (for example make it small and thin) and the linebreaks above still are honored - and the text cant reflow freely (I'm unsure if thats a source formating issue (as in googlelens spits it out that way -- it seems so, as I see some method in the madness (tries to place text roughly where it was placed on the original scan)), or that is the way that Ballon Translator handles reflow, after resizing textboxes (Ballon Translator itself puts those linebreaks in there, when you resize textboxes. Havent pinned down the issue yet. :) )

But I'll look into the feature you mentioned tomorrow. :)

bropines commented 2 weeks ago

it's better to record a gif or video with how it works for you. I'll try to help.

notimp commented 2 weeks ago

Off topic:

There's a handling newline setting in google ocr. Turn it on to remove

That didnt fix the issue, I'll open a new issue report on it (with images as illustration) and will link it in here afterwards.

edit: Here is the newly created issue ticket with illustrations: https://github.com/dmMaze/BallonsTranslator/issues/558

On second thought, its probably not google lens, but google translate or BallonsTransltor itself thats creating those newline characters. If you know which one of those it is, that alone as a feedback would be helpful as well.

edit: Off topic issue fixed in the linked issue thread. :)

bropines commented 1 week ago

~https://github.com/bropines/chrome-lens-py/releases/tag/v1.0.5~

~In the latest version, I added proxy support. And I tried to fix the cookie. I don't really want to break the code that is currently written. I think DmMaze will just transfer everything to the library as soon as it finishes. In fact, you can buy any proxy server from non-EU countries and everything will work. Someday I will fix this bug completely, but I don't know when yet.~

I've done) f253d2104f5bf3f03d406f77af73522f161563f2 @notimp

notimp commented 1 week ago

Noted, thank you.

Installing https://github.com/bropines/chrome-lens-py via pip now fails, because of apparaently a malformed script.

But you can still install it if you'd like to by using

pip install chrome-lens-py==1.0.2

I still use it

lens_scan drag image in all

as a check if the server I get connected to is good to use for google lens. :)

bropines commented 1 week ago

Noted, thank you.

Installing bropines/chrome-lens-py via pip now fails, because of apparaently a malformed script.

But you can still install it if you'd like to by using

pip install chrome-lens-py==1.0.2

I still use it

lens_scan drag image in all

as a check if the server I get connected to is good to use for google lens. :)

You just install the package, without updating. I will take this point into account in the readme. Here is the correct command

pip install -U chrome-lens-py
bropines commented 7 hours ago

@notimp is your problem solved for now?