diff --git a/.gitignore b/.gitignore index 70464b6..780165e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,67 +1,31 @@ -# Created by https://www.toptal.com/developers/gitignore/api/python,visualstudiocode,macos -# Edit at https://www.toptal.com/developers/gitignore?templates=python,visualstudiocode,macos - -### macOS ### -# General +.vscode/ +__pycache__/ +*.py[cod] +*.pyo +*.pyd +.Python +env/ +venv/ +ENV/ +ENV*/ +*.egg +*.egg-info/ +dist/ +build/ +*.so +*.log .DS_Store -.AppleDouble -.LSOverride - -.venv311/ - -#Folders to test -Spy_x_Family_076/ -Dandadan_059/ -Lv999/ -marmalade_boy_01_06/ -Lv999_001/ -Dandadan_v01_2022_Digital_1r0n/ - -# Icon must end with two \r -Icon - -*.png - -# Thumbnails -._* - -*.txt -*.csv -*.pdf -*.jpg -*.jpeg -*.json -*.webp - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -### macOS Patch ### -# iCloud generated files -*.icloud - -### Python ### +.idea/ +Thumbs.db # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class - # C extensions -*.so - +*.so +Dandadan_059/ +Dandadan_v01_2022_Digital_1r0n/ +Lv999_001/ # Distribution / packaging .Python build/ @@ -76,172 +40,50 @@ parts/ sdist/ var/ wheels/ -share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST - # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec - # Installer logs pip-log.txt pip-delete-this-directory.txt - # Unit test / coverage reports htmlcov/ .tox/ -.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover -*.py,cover .hypothesis/ .pytest_cache/ -cover/ - # Translations *.mo *.pot - # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal - # Flask stuff: instance/ .webassets-cache - # Scrapy stuff: .scrapy - # Sphinx documentation docs/_build/ - # PyBuilder -.pybuilder/ target/ - # Jupyter Notebook .ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - # pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff +.python-version +# celery beat schedule file celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -### Python Patch ### -# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration -poetry.toml - -# ruff -.ruff_cache/ - -# LSP config files -pyrightconfig.json - -### VisualStudioCode ### -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -!.vscode/*.code-snippets - -# Local History for Visual Studio Code -.history/ - -# Built Visual Studio Code Extensions -*.vsix - -### VisualStudioCode Patch ### -# Ignore all local history of files -.history -.ionide - -# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode,macos +Spy_x_Family_076/ \ No newline at end of file diff --git a/pages-for-tests/001.jpg b/pages-for-tests/001.jpg new file mode 100755 index 0000000..f648ed6 Binary files /dev/null and b/pages-for-tests/001.jpg differ diff --git a/pages-for-tests/002.jpg b/pages-for-tests/002.jpg new file mode 100755 index 0000000..96e0011 Binary files /dev/null and b/pages-for-tests/002.jpg differ diff --git a/pages-for-tests/003.jpg b/pages-for-tests/003.jpg new file mode 100755 index 0000000..af3ec40 Binary files /dev/null and b/pages-for-tests/003.jpg differ diff --git a/pages-for-tests/004.jpg b/pages-for-tests/004.jpg new file mode 100755 index 0000000..f0dd3db Binary files /dev/null and b/pages-for-tests/004.jpg differ diff --git a/pages-for-tests/005.png b/pages-for-tests/005.png new file mode 100755 index 0000000..16d28da Binary files /dev/null and b/pages-for-tests/005.png differ diff --git a/pages-for-tests/006.jpg b/pages-for-tests/006.jpg new file mode 100755 index 0000000..c01a492 Binary files /dev/null and b/pages-for-tests/006.jpg differ diff --git a/pages-for-tests/007.jpg b/pages-for-tests/007.jpg new file mode 100755 index 0000000..e406e97 Binary files /dev/null and b/pages-for-tests/007.jpg differ diff --git a/pages-for-tests/008.png b/pages-for-tests/008.png new file mode 100755 index 0000000..bf8095e Binary files /dev/null and b/pages-for-tests/008.png differ diff --git a/pages-for-tests/translated/001/001_cleaned.png b/pages-for-tests/translated/001/001_cleaned.png new file mode 100644 index 0000000..2402fdb Binary files /dev/null and b/pages-for-tests/translated/001/001_cleaned.png differ diff --git a/pages-for-tests/translated/001/001_translated.png b/pages-for-tests/translated/001/001_translated.png new file mode 100644 index 0000000..87deeee Binary files /dev/null and b/pages-for-tests/translated/001/001_translated.png differ diff --git a/pages-for-tests/translated/001/bubbles.json b/pages-for-tests/translated/001/bubbles.json new file mode 100644 index 0000000..28f7fb6 --- /dev/null +++ b/pages-for-tests/translated/001/bubbles.json @@ -0,0 +1,372 @@ +{ + "1": { + "order": 1, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.523, + "ocr_source": "vision-base", + "raw_ocr": "PON PAY ANY ATTEN- TION TO", + "corrected_ocr": "DON'T PAY ANY ATTENTION TO THEM!", + "translation_input": "DON'T PAY ANY ATTENTION TO THEM!", + "translated": "NO ELS PREGUIS CAP ATENCIÓ!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "PON", + "PAY ANY", + "ATTEN-", + "TION TO" + ], + "box": { + "x": 78, + "y": 94, + "w": 75, + "h": 94 + }, + "lines": [ + "PON", + "PAY ANY", + "ATTEN-", + "TION TO" + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5066, + "ocr_source": "vision-base", + "raw_ocr": "WHAT AKF THEY?!", + "corrected_ocr": "WHAT AKF THEY?!", + "translation_input": "WHAT AKF THEY?!", + "translated": "QUÈ AKF ELLS?!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "WHAT", + "AKF", + "THEY?!" + ], + "box": { + "x": 284, + "y": 107, + "w": 61, + "h": 56 + }, + "lines": [ + "WHAT", + "AKF", + "THEY?!" + ] + }, + "3": { + "order": 3, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5238, + "ocr_source": "vision-base", + "raw_ocr": "THEY'RE ILLU- SION&I", + "corrected_ocr": "THEY'RE ILLUSION&I", + "translation_input": "THEY'RE ILLUSION&I", + "translated": "SÓN IL·LUSIÓ I JO", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "THEY'RE", + "ILLU-", + "SION&I" + ], + "box": { + "x": 158, + "y": 112, + "w": 80, + "h": 56 + }, + "lines": [ + "THEY'RE", + "ILLU-", + "SION&I" + ] + }, + "4": { + "order": 4, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.3516, + "ocr_source": "vision-base", + "raw_ocr": "II", + "corrected_ocr": "I!", + "translation_input": "I!", + "translated": "JO!", + "flags": [ + "LOW_CONF", + "HEAVY_CORRECTION" + ], + "bubble_groups": [ + "II" + ], + "box": { + "x": 666, + "y": 208, + "w": 15, + "h": 18 + }, + "lines": [ + "II" + ] + }, + "5": { + "order": 5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4902, + "ocr_source": "vision-base", + "raw_ocr": "WHERE ARE THEY?1", + "corrected_ocr": "WHERE ARE THEY?1", + "translation_input": "WHERE ARE THEY?1", + "translated": "ON ESTAN?1", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "WHERE", + "ARE", + "THEY?1" + ], + "box": { + "x": 230, + "y": 578, + "w": 60, + "h": 52 + }, + "lines": [ + "WHERE", + "ARE", + "THEY?1" + ] + }, + "6": { + "order": 6, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5151, + "ocr_source": "vision-base", + "raw_ocr": "TAKP POWN THP MUSI- IANGI", + "corrected_ocr": "TAKE DOWN THE MUSIIANG!", + "translation_input": "TAKE DOWN THE MUSIIANG!", + "translated": "DESCARREGA EL MUSIIANG!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "TAKP", + "POWN", + "THP", + "MUSI-", + "IANGI" + ], + "box": { + "x": 644, + "y": 618, + "w": 58, + "h": 94 + }, + "lines": [ + "TAKP", + "POWN", + "THP", + "MUSI-", + "IANGI" + ] + }, + "7": { + "order": 7, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5349, + "ocr_source": "vision-base", + "raw_ocr": "ICAN SEE THEM THROUOH THIS ROWP!", + "corrected_ocr": "I CAN SEE THEM THROUGH THIS ROWP!", + "translation_input": "I CAN SEE THEM THROUGH THIS ROWP!", + "translated": "ELS PUC VEURE A TRAVÉS D'AQUESTA FILA!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "ICAN", + "SEE THEM", + "THROUOH", + "THIS", + "ROWP!" + ], + "box": { + "x": 103, + "y": 624, + "w": 89, + "h": 100 + }, + "lines": [ + "ICAN", + "SEE THEM", + "THROUOH", + "THIS", + "ROWP!" + ] + }, + "8": { + "order": 8, + "region_type": "reaction", + "background_type": "complex", + "confidence": 0.3096, + "ocr_source": "vision-base", + "raw_ocr": ">'I", + "corrected_ocr": ">'I", + "translation_input": ">'I", + "translated": "> 'JO", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + ">'I" + ], + "box": { + "x": 693, + "y": 842, + "w": 15, + "h": 13 + }, + "lines": [ + ">'I" + ] + }, + "9": { + "order": 9, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5188, + "ocr_source": "vision-base", + "raw_ocr": "USE THAT HAIR OF YOUR9 TO RAISF ME UP!", + "corrected_ocr": "USE THAT HAIR OF YOUR9 TO RAISF ME UP!", + "translation_input": "USE THAT HAIR OF YOUR9 TO RAISF ME UP!", + "translated": "UTILITZA AQUEST CABELL DEL TEU 9 PER LLEVARME!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "USE THAT", + "HAIR OF", + "YOUR9", + "TO RAISF", + "ME UP!" + ], + "box": { + "x": 183, + "y": 800, + "w": 102, + "h": 116 + }, + "lines": [ + "USE THAT", + "HAIR OF", + "YOUR9", + "TO RAISF", + "ME UP!" + ] + }, + "10": { + "order": 10, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4492, + "ocr_source": "vision-base", + "raw_ocr": "IPNA FJ'LJ G. '¢IA¢I", + "corrected_ocr": "IPNA FJ'LJ G. '¢IA¢I", + "translation_input": "IPNA FJ'LJ G. '¢IA¢I", + "translated": "IPNA FJ'LJ G. '¢IA¢I", + "flags": [ + "LOW_CONF", + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "IPNA FJ'LJ", + "G. '¢IA¢I" + ], + "box": { + "x": 431, + "y": 996, + "w": 179, + "h": 62 + }, + "lines": [ + "IPNA FJ'LJ", + "G. '¢IA¢I" + ] + }, + "11": { + "order": 11, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4109, + "ocr_source": "vision-base", + "raw_ocr": "IIV,:2 'A• IFAA}", + "corrected_ocr": "IIV,:2 'A• IFAA}", + "translation_input": "IIV,:2 'A• IFAA}", + "translated": "IIV,:2 'A• IFAA}", + "flags": [ + "LOW_CONF", + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "IIV,:2 'A•", + "IFAA}" + ], + "box": { + "x": 338, + "y": 1019, + "w": 93, + "h": 67 + }, + "lines": [ + "IIV,:2 'A•", + "IFAA}" + ] + }, + "12": { + "order": 12, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.3196, + "ocr_source": "vision-base", + "raw_ocr": "I, JJI,,,", + "corrected_ocr": "I, JJ!,,,", + "translation_input": "I, JJ!,,,", + "translated": "JO, JJ!,,,", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + "I, JJI,,," + ], + "box": { + "x": 237, + "y": 1086, + "w": 41, + "h": 56 + }, + "lines": [ + "I, JJI,,," + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/001/debug_clusters.png b/pages-for-tests/translated/001/debug_clusters.png new file mode 100644 index 0000000..d90a97a Binary files /dev/null and b/pages-for-tests/translated/001/debug_clusters.png differ diff --git a/pages-for-tests/translated/001/output.txt b/pages-for-tests/translated/001/output.txt new file mode 100644 index 0000000..4125b61 --- /dev/null +++ b/pages-for-tests/translated/001/output.txt @@ -0,0 +1,14 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|dialogue|0.52|vision-base|PON PAY ANY ATTEN- TION TO|DON'T PAY ANY ATTENTION TO THEM!|PON || PAY ANY || ATTEN- || TION TO|NO ELS PREGUIS CAP ATENCIÓ!|BUBBLE,SEGMENTED +#2|2|dialogue|0.51|vision-base|WHAT AKF THEY?!|WHAT AKF THEY?!|WHAT || AKF || THEY?!|QUÈ AKF ELLS?!|BUBBLE,SEGMENTED +#3|3|dialogue|0.52|vision-base|THEY'RE ILLU- SION&I|THEY'RE ILLUSION&I|THEY'RE || ILLU- || SION&I|SÓN IL·LUSIÓ I JO|BUBBLE,SEGMENTED +#4|4|dialogue|0.35|vision-base|II|I!|II|JO!|LOW_CONF,HEAVY_CORRECTION +#5|5|dialogue|0.49|vision-base|WHERE ARE THEY?1|WHERE ARE THEY?1|WHERE || ARE || THEY?1|ON ESTAN?1|BUBBLE,SEGMENTED +#6|6|dialogue|0.52|vision-base|TAKP POWN THP MUSI- IANGI|TAKE DOWN THE MUSIIANG!|TAKP || POWN || THP || MUSI- || IANGI|DESCARREGA EL MUSIIANG!|BUBBLE,SEGMENTED +#7|7|dialogue|0.53|vision-base|ICAN SEE THEM THROUOH THIS ROWP!|I CAN SEE THEM THROUGH THIS ROWP!|ICAN || SEE THEM || THROUOH || THIS || ROWP!|ELS PUC VEURE A TRAVÉS D'AQUESTA FILA!|BUBBLE,SEGMENTED +#8|8|reaction|0.31|vision-base|>'I|>'I|>'I|> 'JO|LOW_CONF +#9|9|dialogue|0.52|vision-base|USE THAT HAIR OF YOUR9 TO RAISF ME UP!|USE THAT HAIR OF YOUR9 TO RAISF ME UP!|USE THAT || HAIR OF || YOUR9 || TO RAISF || ME UP!|UTILITZA AQUEST CABELL DEL TEU 9 PER LLEVARME!|BUBBLE,SEGMENTED +#10|10|dialogue|0.45|vision-base|IPNA FJ'LJ G. '¢IA¢I|IPNA FJ'LJ G. '¢IA¢I|IPNA FJ'LJ || G. '¢IA¢I|IPNA FJ'LJ G. '¢IA¢I|LOW_CONF,BUBBLE,SEGMENTED +#11|11|dialogue|0.41|vision-base|IIV,:2 'A• IFAA}|IIV,:2 'A• IFAA}|IIV,:2 'A• || IFAA}|IIV,:2 'A• IFAA}|LOW_CONF,BUBBLE,SEGMENTED +#12|12|dialogue|0.32|vision-base|I, JJI,,,|I, JJ!,,,|I, JJI,,,|JO, JJ!,,,|LOW_CONF diff --git a/pages-for-tests/translated/002/002_cleaned.png b/pages-for-tests/translated/002/002_cleaned.png new file mode 100644 index 0000000..212e448 Binary files /dev/null and b/pages-for-tests/translated/002/002_cleaned.png differ diff --git a/pages-for-tests/translated/002/002_translated.png b/pages-for-tests/translated/002/002_translated.png new file mode 100644 index 0000000..e4f83f4 Binary files /dev/null and b/pages-for-tests/translated/002/002_translated.png differ diff --git a/pages-for-tests/translated/002/bubbles.json b/pages-for-tests/translated/002/bubbles.json new file mode 100644 index 0000000..b7f5b5b --- /dev/null +++ b/pages-for-tests/translated/002/bubbles.json @@ -0,0 +1,310 @@ +{ + "1": { + "order": 1, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.4705, + "ocr_source": "vision-base", + "raw_ocr": ".QR", + "corrected_ocr": ".QR", + "translation_input": ".QR", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + ".QR" + ], + "box": { + "x": 766, + "y": 193, + "w": 17, + "h": 14 + }, + "lines": [ + ".QR" + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5114, + "ocr_source": "vision-base", + "raw_ocr": "THEY'RE HIDING BEHIND THE @IA", + "corrected_ocr": "THEY'RE HIDING BEHIND THE @IA", + "translation_input": "THEY'RE HIDING BEHIND THE @IA", + "translated": "S'AMAGUEN DARRERE DE LA @IA", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "THEY'RE", + "HIDING", + "BEHIND", + "THE", + "@IA" + ], + "box": { + "x": 232, + "y": 310, + "w": 86, + "h": 112 + }, + "lines": [ + "THEY'RE", + "HIDING", + "BEHIND", + "THE", + "@IA" + ] + }, + "3": { + "order": 3, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.551, + "ocr_source": "vision-base", + "raw_ocr": "IJ", + "corrected_ocr": "IJ", + "translation_input": "IJ", + "translated": "IJ", + "flags": [], + "bubble_groups": [ + "IJ" + ], + "box": { + "x": 377, + "y": 462, + "w": 13, + "h": 15 + }, + "lines": [ + "IJ" + ] + }, + "4": { + "order": 4, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5314, + "ocr_source": "vision-base", + "raw_ocr": "HEY! WATCH WHPIZP, YOU'RE TOUCHING ME!", + "corrected_ocr": "HEY! WATCH WHPIZP, YOU'RE TOUCHING ME!", + "translation_input": "HEY! WATCH WHPIZP, YOU'RE TOUCHING ME!", + "translated": "HEI! MIRA WHPIZP, M'ESTÀS TOCAT!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "HEY!", + "WATCH", + "WHPIZP,", + "YOU'RE", + "TOUCHING", + "ME!" + ], + "box": { + "x": 607, + "y": 595, + "w": 88, + "h": 120 + }, + "lines": [ + "HEY!", + "WATCH", + "WHPIZP,", + "YOU'RE", + "TOUCHING", + "ME!" + ] + }, + "5": { + "order": 5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5235, + "ocr_source": "vision-reread", + "raw_ocr": "MR. TAKA- KURA", + "corrected_ocr": "MR. TAKAKURA", + "translation_input": "MR. TAKAKURA", + "translated": "SR. TAKAKURA", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "MR.", + "TAKA-", + "KURA" + ], + "box": { + "x": 311, + "y": 636, + "w": 53, + "h": 82 + }, + "lines": [ + "MR.", + "TAKA-", + "KURA" + ] + }, + "6": { + "order": 6, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.387, + "ocr_source": "vision-base", + "raw_ocr": ", III, IU", + "corrected_ocr": ", II!, IU", + "translation_input": ", II!, IU", + "translated": ", II!, IU", + "flags": [ + "LOW_CONF", + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + ", III,", + "IU" + ], + "box": { + "x": 112, + "y": 728, + "w": 62, + "h": 44 + }, + "lines": [ + ", III,", + "IU" + ] + }, + "8": { + "order": 7, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5176, + "ocr_source": "vision-base", + "raw_ocr": "I'M STUCK AND HELPLESS LIKE THISI", + "corrected_ocr": "I'M STUCK AND HELPLESS LIKE THIS!", + "translation_input": "I'M STUCK AND HELPLESS LIKE THIS!", + "translated": "ESTIC ENTRABALLAT I IMIMPUTA COM AQUEST!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "I'M", + "STUCK AND", + "HELPLESS", + "LIKE THISI" + ], + "box": { + "x": 382, + "y": 787, + "w": 81, + "h": 65 + }, + "lines": [ + "I'M", + "STUCK AND", + "HELPLESS", + "LIKE THISI" + ] + }, + "7": { + "order": 8, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4891, + "ocr_source": "vision-base", + "raw_ocr": "YOUR HAND!", + "corrected_ocr": "YOUR HAND!", + "translation_input": "YOUR HAND!", + "translated": "LA TEVA MÀ!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YOUR", + "HAND!" + ], + "box": { + "x": 287, + "y": 809, + "w": 60, + "h": 41 + }, + "lines": [ + "YOUR", + "HAND!" + ] + }, + "9": { + "order": 9, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.505, + "ocr_source": "vision-base", + "raw_ocr": "IF WE DON'T HURRY UP, WE'LL BE CRUSHEP TO DEATH!", + "corrected_ocr": "IF WE DON'T HURRY UP, WE'LL BE CRUSHED TO DEATH!", + "translation_input": "IF WE DON'T HURRY UP, WE'LL BE CRUSHED TO DEATH!", + "translated": "SI NO ENS APUREM, SEREM ACLATS A MOR!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "IF WE", + "DON'T", + "HURRY UP,", + "WE'LL BE", + "CRUSHEP", + "TO DEATH!" + ], + "box": { + "x": 386, + "y": 919, + "w": 90, + "h": 113 + }, + "lines": [ + "IF WE", + "DON'T", + "HURRY UP,", + "WE'LL BE", + "CRUSHEP", + "TO DEATH!" + ] + }, + "10": { + "order": 10, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.4549, + "ocr_source": "vision-base", + "raw_ocr": "YB", + "corrected_ocr": "YB", + "translation_input": "YB", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + "YB" + ], + "box": { + "x": 590, + "y": 1094, + "w": 15, + "h": 12 + }, + "lines": [ + "YB" + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/002/debug_clusters.png b/pages-for-tests/translated/002/debug_clusters.png new file mode 100644 index 0000000..3b2fe03 Binary files /dev/null and b/pages-for-tests/translated/002/debug_clusters.png differ diff --git a/pages-for-tests/translated/002/output.txt b/pages-for-tests/translated/002/output.txt new file mode 100644 index 0000000..b812365 --- /dev/null +++ b/pages-for-tests/translated/002/output.txt @@ -0,0 +1,12 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|sfx|0.47|vision-base|.QR|.QR|.QR||SFX +#2|2|dialogue|0.51|vision-base|THEY'RE HIDING BEHIND THE @IA|THEY'RE HIDING BEHIND THE @IA|THEY'RE || HIDING || BEHIND || THE || @IA|S'AMAGUEN DARRERE DE LA @IA|BUBBLE,SEGMENTED +#3|3|dialogue|0.55|vision-base|IJ|IJ|IJ|IJ| +#4|4|dialogue|0.53|vision-base|HEY! WATCH WHPIZP, YOU'RE TOUCHING ME!|HEY! WATCH WHPIZP, YOU'RE TOUCHING ME!|HEY! || WATCH || WHPIZP, || YOU'RE || TOUCHING || ME!|HEI! MIRA WHPIZP, M'ESTÀS TOCAT!|BUBBLE,SEGMENTED +#5|5|dialogue|0.52|vision-reread|MR. TAKA- KURA|MR. TAKAKURA|MR. || TAKA- || KURA|SR. TAKAKURA|BUBBLE,SEGMENTED +#6|6|dialogue|0.39|vision-base|, III, IU|, II!, IU|, III, || IU|, II!, IU|LOW_CONF,BUBBLE,SEGMENTED +#8|7|dialogue|0.52|vision-base|I'M STUCK AND HELPLESS LIKE THISI|I'M STUCK AND HELPLESS LIKE THIS!|I'M || STUCK AND || HELPLESS || LIKE THISI|ESTIC ENTRABALLAT I IMIMPUTA COM AQUEST!|BUBBLE,SEGMENTED +#7|8|dialogue|0.49|vision-base|YOUR HAND!|YOUR HAND!|YOUR || HAND!|LA TEVA MÀ!|BUBBLE,SEGMENTED +#9|9|dialogue|0.51|vision-base|IF WE DON'T HURRY UP, WE'LL BE CRUSHEP TO DEATH!|IF WE DON'T HURRY UP, WE'LL BE CRUSHED TO DEATH!|IF WE || DON'T || HURRY UP, || WE'LL BE || CRUSHEP || TO DEATH!|SI NO ENS APUREM, SEREM ACLATS A MOR!|BUBBLE,SEGMENTED +#10|10|sfx|0.45|vision-base|YB|YB|YB||SFX diff --git a/pages-for-tests/translated/003/003_cleaned.png b/pages-for-tests/translated/003/003_cleaned.png new file mode 100644 index 0000000..d2cbd55 Binary files /dev/null and b/pages-for-tests/translated/003/003_cleaned.png differ diff --git a/pages-for-tests/translated/003/003_translated.png b/pages-for-tests/translated/003/003_translated.png new file mode 100644 index 0000000..90342ca Binary files /dev/null and b/pages-for-tests/translated/003/003_translated.png differ diff --git a/pages-for-tests/translated/003/bubbles.json b/pages-for-tests/translated/003/bubbles.json new file mode 100644 index 0000000..3caf198 --- /dev/null +++ b/pages-for-tests/translated/003/bubbles.json @@ -0,0 +1,152 @@ +{ + "1": { + "order": 1, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5339, + "ocr_source": "vision-reread", + "raw_ocr": "AIRA- HAN!", + "corrected_ocr": "AIRAHAN!", + "translation_input": "AIRAHAN!", + "translated": "AIRAHAN!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "AIRA-", + "HAN!" + ], + "box": { + "x": 198, + "y": 121, + "w": 72, + "h": 45 + }, + "lines": [ + "AIRA-", + "HAN!" + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5286, + "ocr_source": "vision-base", + "raw_ocr": "LFAVE THESF ONES TO ME!", + "corrected_ocr": "LFAVE THESF ONES TO ME!", + "translation_input": "LFAVE THESF ONES TO ME!", + "translated": "FES-ME ELS SF!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "LFAVE", + "THESF", + "ONES TO", + "ME!" + ], + "box": { + "x": 179, + "y": 306, + "w": 85, + "h": 77 + }, + "lines": [ + "LFAVE", + "THESF", + "ONES TO", + "ME!" + ] + }, + "4": { + "order": 3, + "region_type": "reaction", + "background_type": "complex", + "confidence": 0.3464, + "ocr_source": "vision-base", + "raw_ocr": "LI.", + "corrected_ocr": "L!.", + "translation_input": "L!.", + "translated": "", + "flags": [ + "LOW_CONF", + "HEAVY_CORRECTION" + ], + "bubble_groups": [ + "LI." + ], + "box": { + "x": 125, + "y": 439, + "w": 17, + "h": 14 + }, + "lines": [ + "LI." + ] + }, + "5": { + "order": 4, + "region_type": "reaction", + "background_type": "complex", + "confidence": 0.3849, + "ocr_source": "vision-base", + "raw_ocr": "IL.", + "corrected_ocr": "IL.", + "translation_input": "IL.", + "translated": "IL.", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + "IL." + ], + "box": { + "x": 670, + "y": 459, + "w": 18, + "h": 16 + }, + "lines": [ + "IL." + ] + }, + "3": { + "order": 5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5287, + "ocr_source": "vision-base", + "raw_ocr": "YOU TAKF THP MUSI- IANS!", + "corrected_ocr": "YOU TAKF THE MUSIIANS!", + "translation_input": "YOU TAKF THE MUSIIANS!", + "translated": "TAKF ELS MUSIANS!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YOU", + "TAKF", + "THP", + "MUSI-", + "IANS!" + ], + "box": { + "x": 229, + "y": 437, + "w": 54, + "h": 92 + }, + "lines": [ + "YOU", + "TAKF", + "THP", + "MUSI-", + "IANS!" + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/003/debug_clusters.png b/pages-for-tests/translated/003/debug_clusters.png new file mode 100644 index 0000000..36549a3 Binary files /dev/null and b/pages-for-tests/translated/003/debug_clusters.png differ diff --git a/pages-for-tests/translated/003/output.txt b/pages-for-tests/translated/003/output.txt new file mode 100644 index 0000000..2f234fe --- /dev/null +++ b/pages-for-tests/translated/003/output.txt @@ -0,0 +1,7 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|dialogue|0.53|vision-reread|AIRA- HAN!|AIRAHAN!|AIRA- || HAN!|AIRAHAN!|BUBBLE,SEGMENTED +#2|2|dialogue|0.53|vision-base|LFAVE THESF ONES TO ME!|LFAVE THESF ONES TO ME!|LFAVE || THESF || ONES TO || ME!|FES-ME ELS SF!|BUBBLE,SEGMENTED +#4|3|reaction|0.35|vision-base|LI.|L!.|LI.||LOW_CONF,HEAVY_CORRECTION +#5|4|reaction|0.38|vision-base|IL.|IL.|IL.|IL.|LOW_CONF +#3|5|dialogue|0.53|vision-base|YOU TAKF THP MUSI- IANS!|YOU TAKF THE MUSIIANS!|YOU || TAKF || THP || MUSI- || IANS!|TAKF ELS MUSIANS!|BUBBLE,SEGMENTED diff --git a/pages-for-tests/translated/004/004_cleaned.png b/pages-for-tests/translated/004/004_cleaned.png new file mode 100644 index 0000000..79c3891 Binary files /dev/null and b/pages-for-tests/translated/004/004_cleaned.png differ diff --git a/pages-for-tests/translated/004/004_translated.png b/pages-for-tests/translated/004/004_translated.png new file mode 100644 index 0000000..9806733 Binary files /dev/null and b/pages-for-tests/translated/004/004_translated.png differ diff --git a/pages-for-tests/translated/004/bubbles.json b/pages-for-tests/translated/004/bubbles.json new file mode 100644 index 0000000..b9a60a6 --- /dev/null +++ b/pages-for-tests/translated/004/bubbles.json @@ -0,0 +1,148 @@ +{ + "1": { + "order": 1, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5051, + "ocr_source": "vision-base", + "raw_ocr": "ITIS FINE TO SINO AND FPPL @OOP ABOLRR IT...", + "corrected_ocr": "ITIS FINE TO SINO AND FPPL @OOP ABOLRR IT...", + "translation_input": "ITIS FINE TO SINO AND FPPL @OOP ABOLRR IT...", + "translated": "ESTÀ BÉ PER SINO I FPPL @OOP ABOLRR IT...", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "ITIS FINE", + "TO SINO AND", + "FPPL @OOP", + "ABOLRR IT..." + ], + "box": { + "x": 190, + "y": 101, + "w": 103, + "h": 72 + }, + "lines": [ + "ITIS FINE", + "TO SINO AND", + "FPPL @OOP", + "ABOLRR IT..." + ] + }, + "2": { + "order": 2, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.5112, + "ocr_source": "vision-base", + "raw_ocr": "RL", + "corrected_ocr": "RL", + "translation_input": "RL", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + "RL" + ], + "box": { + "x": 636, + "y": 174, + "w": 13, + "h": 11 + }, + "lines": [ + "RL" + ] + }, + "3": { + "order": 3, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5143, + "ocr_source": "vision-base", + "raw_ocr": "..BUT PO BE CAIZEFUL NOT TO PASS OUT PUP TO LACK OF OXYOFN.", + "corrected_ocr": "..BUT PO BE CAIZEFUL NOT TO PASS OUT PUP TO LACK OF OXYOFN.", + "translation_input": "..BUT PO BE CAIZEFUL NOT TO PASS OUT PUP TO LACK OF OXYOFN.", + "translated": "..PERÒ TENIU OBSERVACIÓ DE NO PASSAR EL CADEL PER LA FALTA D'OXYOFN.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "..BUT PO", + "BE CAIZEFUL", + "NOT TO PASS", + "OUT PUP TO", + "LACK OF", + "OXYOFN." + ], + "box": { + "x": 88, + "y": 206, + "w": 113, + "h": 109 + }, + "lines": [ + "..BUT PO", + "BE CAIZEFUL", + "NOT TO PASS", + "OUT PUP TO", + "LACK OF", + "OXYOFN." + ] + }, + "4": { + "order": 4, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.2942, + "ocr_source": "vision-base", + "raw_ocr": "/,/:IIII,I, 2'II,1, LI", + "corrected_ocr": "/,/:III!,I, 2'I!,1, L!", + "translation_input": "/,/:III!,I, 2'I!,1, L!", + "translated": "", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + "/,/:IIII,I, 2'II,1, LI" + ], + "box": { + "x": 551, + "y": 249, + "w": 89, + "h": 91 + }, + "lines": [ + "/,/:IIII,I, 2'II,1, LI" + ] + }, + "5": { + "order": 5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4506, + "ocr_source": "vision-base", + "raw_ocr": "ILDIII.", + "corrected_ocr": "ILDII!.", + "translation_input": "ILDII!.", + "translated": "ILDII!.", + "flags": [], + "bubble_groups": [ + "ILDIII." + ], + "box": { + "x": 449, + "y": 333, + "w": 46, + "h": 45 + }, + "lines": [ + "ILDIII." + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/004/debug_clusters.png b/pages-for-tests/translated/004/debug_clusters.png new file mode 100644 index 0000000..bcdc9f2 Binary files /dev/null and b/pages-for-tests/translated/004/debug_clusters.png differ diff --git a/pages-for-tests/translated/004/output.txt b/pages-for-tests/translated/004/output.txt new file mode 100644 index 0000000..b95cc16 --- /dev/null +++ b/pages-for-tests/translated/004/output.txt @@ -0,0 +1,7 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|dialogue|0.51|vision-base|ITIS FINE TO SINO AND FPPL @OOP ABOLRR IT...|ITIS FINE TO SINO AND FPPL @OOP ABOLRR IT...|ITIS FINE || TO SINO AND || FPPL @OOP || ABOLRR IT...|ESTÀ BÉ PER SINO I FPPL @OOP ABOLRR IT...|BUBBLE,SEGMENTED +#2|2|sfx|0.51|vision-base|RL|RL|RL||SFX +#3|3|dialogue|0.51|vision-base|..BUT PO BE CAIZEFUL NOT TO PASS OUT PUP TO LACK OF OXYOFN.|..BUT PO BE CAIZEFUL NOT TO PASS OUT PUP TO LACK OF OXYOFN.|..BUT PO || BE CAIZEFUL || NOT TO PASS || OUT PUP TO || LACK OF || OXYOFN.|..PERÒ TENIU OBSERVACIÓ DE NO PASSAR EL CADEL PER LA FALTA D'OXYOFN.|BUBBLE,SEGMENTED +#4|4|dialogue|0.29|vision-base|/,/:IIII,I, 2'II,1, LI|/,/:III!,I, 2'I!,1, L!|/,/:IIII,I, 2'II,1, LI||LOW_CONF +#5|5|dialogue|0.45|vision-base|ILDIII.|ILDII!.|ILDIII.|ILDII!.| diff --git a/pages-for-tests/translated/005/005_cleaned.png b/pages-for-tests/translated/005/005_cleaned.png new file mode 100644 index 0000000..5611840 Binary files /dev/null and b/pages-for-tests/translated/005/005_cleaned.png differ diff --git a/pages-for-tests/translated/005/005_translated.png b/pages-for-tests/translated/005/005_translated.png new file mode 100644 index 0000000..1795282 Binary files /dev/null and b/pages-for-tests/translated/005/005_translated.png differ diff --git a/pages-for-tests/translated/005/bubbles.json b/pages-for-tests/translated/005/bubbles.json new file mode 100644 index 0000000..fe6aa35 --- /dev/null +++ b/pages-for-tests/translated/005/bubbles.json @@ -0,0 +1,530 @@ +{ + "1": { + "order": 1, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5029, + "ocr_source": "vision-base", + "raw_ocr": "ARE YOU", + "corrected_ocr": "ARE YOU", + "translation_input": "ARE YOU", + "translated": "ÉS TU", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "ARE", + "YOU" + ], + "box": { + "x": 956, + "y": 165, + "w": 51, + "h": 51 + }, + "lines": [ + "ARE", + "YOU" + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5396, + "ocr_source": "vision-base", + "raw_ocr": "THE, REPHEAP OVER THERE", + "corrected_ocr": "THE, REPHEAP OVER THERE", + "translation_input": "THE, REPHEAP OVER THERE", + "translated": "EL, REPHEAP ALLÀ", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "THE,", + "REPHEAP", + "OVER", + "THERE" + ], + "box": { + "x": 1063, + "y": 161, + "w": 116, + "h": 109 + }, + "lines": [ + "THE,", + "REPHEAP", + "OVER", + "THERE" + ] + }, + "3": { + "order": 3, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5012, + "ocr_source": "vision-base", + "raw_ocr": "FIRST, YEAR7", + "corrected_ocr": "FIRST, YEAR7", + "translation_input": "FIRST, YEAR7", + "translated": "PRIMERA, ANY7", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "FIRST", + ", YEAR7" + ], + "box": { + "x": 928, + "y": 250, + "w": 96, + "h": 53 + }, + "lines": [ + "FIRST", + ", YEAR7" + ] + }, + "4": { + "order": 4, + "region_type": "reaction", + "background_type": "complex", + "confidence": 0.461, + "ocr_source": "vision-base", + "raw_ocr": "UH7", + "corrected_ocr": "UH7", + "translation_input": "UH7", + "translated": "UH7", + "flags": [], + "bubble_groups": [ + "UH7" + ], + "box": { + "x": 787, + "y": 365, + "w": 62, + "h": 33 + }, + "lines": [ + "UH7" + ] + }, + "5": { + "order": 5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5116, + "ocr_source": "vision-base", + "raw_ocr": "THE THL SAKU", + "corrected_ocr": "THE THL SAKU", + "translation_input": "THE THL SAKU", + "translated": "EL THL SAKU", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "THE", + "THL", + "SAKU" + ], + "box": { + "x": 784, + "y": 554, + "w": 60, + "h": 67 + }, + "lines": [ + "THE", + "THL", + "SAKU" + ] + }, + "6": { + "order": 6, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5076, + "ocr_source": "vision-base", + "raw_ocr": "WHARS YOUR WAE7", + "corrected_ocr": "WHARS YOUR WAE7", + "translation_input": "WHARS YOUR WAE7", + "translated": "WHARS EL TEU WAE7", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "WHARS", + "YOUR", + "WAE7" + ], + "box": { + "x": 1069, + "y": 571, + "w": 95, + "h": 83 + }, + "lines": [ + "WHARS", + "YOUR", + "WAE7" + ] + }, + "7": { + "order": 7, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4391, + "ocr_source": "vision-base", + "raw_ocr": "FILLLLLII.IL)ILLLLI RC:", + "corrected_ocr": "FILLLLLI!.IL)ILLLL! RC:", + "translation_input": "FILLLLLI!.IL)ILLLL! RC:", + "translated": "FILLLLLI!.IL)ILLLL! RC:", + "flags": [ + "LOW_CONF", + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "FILLLLLII", + ".IL)ILLLLI RC:" + ], + "box": { + "x": 996, + "y": 585, + "w": 57, + "h": 72 + }, + "lines": [ + "FILLLLLII", + ".IL)ILLLLI RC:" + ] + }, + "8": { + "order": 8, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.564, + "ocr_source": "vision-base", + "raw_ocr": "IIILL", + "corrected_ocr": "IIILL", + "translation_input": "IIILL", + "translated": "IIIILL", + "flags": [], + "bubble_groups": [ + "IIILL" + ], + "box": { + "x": 716, + "y": 621, + "w": 45, + "h": 40 + }, + "lines": [ + "IIILL" + ] + }, + "9": { + "order": 9, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5177, + "ocr_source": "vision-base", + "raw_ocr": "AND PON EVEN", + "corrected_ocr": "AND DON'T EVEN", + "translation_input": "AND DON'T EVEN", + "translated": "I NI TAN SOLS", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "AND PON", + "EVEN" + ], + "box": { + "x": 101, + "y": 897, + "w": 114, + "h": 43 + }, + "lines": [ + "AND PON", + "EVEN" + ] + }, + "10": { + "order": 10, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4978, + "ocr_source": "vision-base", + "raw_ocr": "OME TO THE ROOF AFTER 6GHOOL!", + "corrected_ocr": "OME TO THE ROOF AFTER 6GHOOL!", + "translation_input": "OME TO THE ROOF AFTER 6GHOOL!", + "translated": "OME AL TOUT DESPRÉS DE 6GHOOL!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "OME TO", + "THE ROOF", + "AFTER", + "6GHOOL!" + ], + "box": { + "x": 1042, + "y": 928, + "w": 106, + "h": 91 + }, + "lines": [ + "OME TO", + "THE ROOF", + "AFTER", + "6GHOOL!" + ] + }, + "11": { + "order": 11, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5313, + "ocr_source": "vision-base", + "raw_ocr": "TO ESGAPE!", + "corrected_ocr": "TO ESGAPE!", + "translation_input": "TO ESGAPE!", + "translated": "A ESGAPE!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "TO", + "ESGAPE!" + ], + "box": { + "x": 112, + "y": 968, + "w": 90, + "h": 44 + }, + "lines": [ + "TO", + "ESGAPE!" + ] + }, + "12": { + "order": 12, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.5325, + "ocr_source": "vision-base", + "raw_ocr": "HEY!", + "corrected_ocr": "HEY!", + "translation_input": "HEY!", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + "HEY!" + ], + "box": { + "x": 1082, + "y": 1167, + "w": 59, + "h": 32 + }, + "lines": [ + "HEY!" + ] + }, + "13": { + "order": 13, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.5226, + "ocr_source": "vision-base", + "raw_ocr": "RRI", + "corrected_ocr": "RR!", + "translation_input": "RR!", + "translated": "", + "flags": [ + "SFX", + "HEAVY_CORRECTION" + ], + "bubble_groups": [ + "RRI" + ], + "box": { + "x": 1094, + "y": 1216, + "w": 36, + "h": 29 + }, + "lines": [ + "RRI" + ] + }, + "14": { + "order": 14, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4693, + "ocr_source": "vision-base", + "raw_ocr": "YOUI", + "corrected_ocr": "YOU!", + "translation_input": "YOU!", + "translated": "TU!", + "flags": [], + "bubble_groups": [ + "YOUI" + ], + "box": { + "x": 41, + "y": 1225, + "w": 91, + "h": 39 + }, + "lines": [ + "YOUI" + ] + }, + "15": { + "order": 15, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.438, + "ocr_source": "vision-base", + "raw_ocr": ")SILIIIR", + "corrected_ocr": ")SILIIIR", + "translation_input": ")SILIIIR", + "translated": ")SILIIIR", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + ")SILIIIR" + ], + "box": { + "x": 910, + "y": 1277, + "w": 40, + "h": 28 + }, + "lines": [ + ")SILIIIR" + ] + }, + "16": { + "order": 16, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4074, + "ocr_source": "vision-base", + "raw_ocr": "R-II_I,I(I", + "corrected_ocr": "R-II_I,I(I", + "translation_input": "R-II_I,I(I", + "translated": "R-II_I,I(I", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + "R-II_I,I(I" + ], + "box": { + "x": 759, + "y": 1281, + "w": 44, + "h": 37 + }, + "lines": [ + "R-II_I,I(I" + ] + }, + "17": { + "order": 17, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4922, + "ocr_source": "vision-base", + "raw_ocr": "COUGH, QUAA", + "corrected_ocr": "COUGH, QUAA", + "translation_input": "COUGH, QUAA", + "translated": "TOS, QUAA", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "COUGH,", + "QUAA" + ], + "box": { + "x": 1074, + "y": 1448, + "w": 78, + "h": 43 + }, + "lines": [ + "COUGH,", + "QUAA" + ] + }, + "18": { + "order": 18, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5533, + "ocr_source": "vision-base", + "raw_ocr": "SU FFOCATFP", + "corrected_ocr": "SU FFOCATFP", + "translation_input": "SU FFOCATFP", + "translated": "SU FFOCATFP", + "flags": [], + "bubble_groups": [ + "SU FFOCATFP" + ], + "box": { + "x": 713, + "y": 1492, + "w": 146, + "h": 29 + }, + "lines": [ + "SU FFOCATFP" + ] + }, + "19": { + "order": 19, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5805, + "ocr_source": "vision-base", + "raw_ocr": "HUUU", + "corrected_ocr": "HUUU", + "translation_input": "HUUU", + "translated": "HUUU", + "flags": [], + "bubble_groups": [ + "HUUU" + ], + "box": { + "x": 707, + "y": 1766, + "w": 67, + "h": 29 + }, + "lines": [ + "HUUU" + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/005/debug_clusters.png b/pages-for-tests/translated/005/debug_clusters.png new file mode 100644 index 0000000..c77ce45 Binary files /dev/null and b/pages-for-tests/translated/005/debug_clusters.png differ diff --git a/pages-for-tests/translated/005/output.txt b/pages-for-tests/translated/005/output.txt new file mode 100644 index 0000000..9d5e59b --- /dev/null +++ b/pages-for-tests/translated/005/output.txt @@ -0,0 +1,21 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|dialogue|0.50|vision-base|ARE YOU|ARE YOU|ARE || YOU|ÉS TU|BUBBLE,SEGMENTED +#2|2|dialogue|0.54|vision-base|THE, REPHEAP OVER THERE|THE, REPHEAP OVER THERE|THE, || REPHEAP || OVER || THERE|EL, REPHEAP ALLÀ|BUBBLE,SEGMENTED +#3|3|dialogue|0.50|vision-base|FIRST, YEAR7|FIRST, YEAR7|FIRST || , YEAR7|PRIMERA, ANY7|BUBBLE,SEGMENTED +#4|4|reaction|0.46|vision-base|UH7|UH7|UH7|UH7| +#5|5|dialogue|0.51|vision-base|THE THL SAKU|THE THL SAKU|THE || THL || SAKU|EL THL SAKU|BUBBLE,SEGMENTED +#6|6|dialogue|0.51|vision-base|WHARS YOUR WAE7|WHARS YOUR WAE7|WHARS || YOUR || WAE7|WHARS EL TEU WAE7|BUBBLE,SEGMENTED +#7|7|dialogue|0.44|vision-base|FILLLLLII.IL)ILLLLI RC:|FILLLLLI!.IL)ILLLL! RC:|FILLLLLII || .IL)ILLLLI RC:|FILLLLLI!.IL)ILLLL! RC:|LOW_CONF,BUBBLE,SEGMENTED +#8|8|dialogue|0.56|vision-base|IIILL|IIILL|IIILL|IIIILL| +#9|9|dialogue|0.52|vision-base|AND PON EVEN|AND DON'T EVEN|AND PON || EVEN|I NI TAN SOLS|BUBBLE,SEGMENTED +#10|10|dialogue|0.50|vision-base|OME TO THE ROOF AFTER 6GHOOL!|OME TO THE ROOF AFTER 6GHOOL!|OME TO || THE ROOF || AFTER || 6GHOOL!|OME AL TOUT DESPRÉS DE 6GHOOL!|BUBBLE,SEGMENTED +#11|11|dialogue|0.53|vision-base|TO ESGAPE!|TO ESGAPE!|TO || ESGAPE!|A ESGAPE!|BUBBLE,SEGMENTED +#12|12|sfx|0.53|vision-base|HEY!|HEY!|HEY!||SFX +#13|13|sfx|0.52|vision-base|RRI|RR!|RRI||SFX,HEAVY_CORRECTION +#14|14|dialogue|0.47|vision-base|YOUI|YOU!|YOUI|TU!| +#15|15|dialogue|0.44|vision-base|)SILIIIR|)SILIIIR|)SILIIIR|)SILIIIR|LOW_CONF +#16|16|dialogue|0.41|vision-base|R-II_I,I(I|R-II_I,I(I|R-II_I,I(I|R-II_I,I(I|LOW_CONF +#17|17|dialogue|0.49|vision-base|COUGH, QUAA|COUGH, QUAA|COUGH, || QUAA|TOS, QUAA|BUBBLE,SEGMENTED +#18|18|dialogue|0.55|vision-base|SU FFOCATFP|SU FFOCATFP|SU FFOCATFP|SU FFOCATFP| +#19|19|dialogue|0.58|vision-base|HUUU|HUUU|HUUU|HUUU| diff --git a/pages-for-tests/translated/006/006_cleaned.png b/pages-for-tests/translated/006/006_cleaned.png new file mode 100644 index 0000000..50d06cf Binary files /dev/null and b/pages-for-tests/translated/006/006_cleaned.png differ diff --git a/pages-for-tests/translated/006/006_translated.png b/pages-for-tests/translated/006/006_translated.png new file mode 100644 index 0000000..b28ab94 Binary files /dev/null and b/pages-for-tests/translated/006/006_translated.png differ diff --git a/pages-for-tests/translated/006/bubbles.json b/pages-for-tests/translated/006/bubbles.json new file mode 100644 index 0000000..ceed680 --- /dev/null +++ b/pages-for-tests/translated/006/bubbles.json @@ -0,0 +1,706 @@ +{ + "1": { + "order": 1, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.547, + "ocr_source": "vision-base", + "raw_ocr": "LIKE THIS", + "corrected_ocr": "LIKE THIS", + "translation_input": "LIKE THIS", + "translated": "COM AQUEST", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "LIKE", + "THIS" + ], + "box": { + "x": 468, + "y": 63, + "w": 31, + "h": 45 + }, + "lines": [ + "LIKE", + "THIS" + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5307, + "ocr_source": "vision-base", + "raw_ocr": "I'LL TRAIN YOU IN HER PLACE.", + "corrected_ocr": "I'LL TRAIN YOU IN HER PLACE.", + "translation_input": "I'LL TRAIN YOU IN HER PLACE.", + "translated": "T'ENTRENARÉ AL SEU LLOC.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "I'LL", + "TRAIN YOU", + "IN HER", + "PLACE." + ], + "box": { + "x": 643, + "y": 48, + "w": 78, + "h": 71 + }, + "lines": [ + "I'LL", + "TRAIN YOU", + "IN HER", + "PLACE." + ] + }, + "3": { + "order": 3, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5395, + "ocr_source": "vision-base", + "raw_ocr": "YOU PUNCH LIKE THIS.", + "corrected_ocr": "YOU PUNCH LIKE THIS.", + "translation_input": "YOU PUNCH LIKE THIS.", + "translated": "PUNTEU AQUEST.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YOU", + "PUNCH", + "LIKE THIS." + ], + "box": { + "x": 548, + "y": 70, + "w": 75, + "h": 53 + }, + "lines": [ + "YOU", + "PUNCH", + "LIKE THIS." + ] + }, + "4": { + "order": 4, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5082, + "ocr_source": "vision-base", + "raw_ocr": "I'M LEARN- ING A LOT FROM YOU, FORGER!", + "corrected_ocr": "I'M LEARNING A LOT FROM YOU, FORGER!", + "translation_input": "I'M LEARNING A LOT FROM YOU, FORGER!", + "translated": "ESTIC APRENENT MOLT DE TU, FORGER!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "I'M LEARN-", + "ING A LOT", + "FROM YOU,", + "FORGER!" + ], + "box": { + "x": 349, + "y": 64, + "w": 85, + "h": 73 + }, + "lines": [ + "I'M LEARN-", + "ING A LOT", + "FROM YOU,", + "FORGER!" + ] + }, + "5": { + "order": 5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4667, + "ocr_source": "vision-base", + "raw_ocr": "TCH! 61VE IT UP ALREAPY. YOU LOOK LIKE A BUNCH OF IPIOTS!", + "corrected_ocr": "TCH! 61VE IT UP ALREAPY. YOU LOOK LIKE A BUNCH OF IPIOTS!", + "translation_input": "TCH! 61VE IT UP ALREAPY. YOU LOOK LIKE A BUNCH OF IPIOTS!", + "translated": "TCH! 61 JA HO TENIU. SEMBLA UNA COLLA D'IPIOTS!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "TCH! 61VE IT", + "UP ALREAPY.", + "YOU LOOK", + "LIKE A BUNCH", + "OF IPIOTS!" + ], + "box": { + "x": 147, + "y": 61, + "w": 109, + "h": 95 + }, + "lines": [ + "TCH! 61VE IT", + "UP ALREAPY.", + "YOU LOOK", + "LIKE A BUNCH", + "OF IPIOTS!" + ] + }, + "7": { + "order": 7, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4105, + "ocr_source": "vision-base", + "raw_ocr": "RF_I TSJ,", + "corrected_ocr": "RF_I TSJ,", + "translation_input": "RF_I TSJ,", + "translated": "RF_I TSJ,", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + "RF_I TSJ," + ], + "box": { + "x": 658, + "y": 261, + "w": 56, + "h": 19 + }, + "lines": [ + "RF_I TSJ," + ] + }, + "9": { + "order": 8, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4955, + "ocr_source": "vision-base", + "raw_ocr": "YEAH! THAT'S RIGHT!", + "corrected_ocr": "YEAH! THAT'S RIGHT!", + "translation_input": "YEAH! THAT'S RIGHT!", + "translated": "SÍ! AIXÒ ÉS!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YEAH!", + "THAT'S", + "RIGHT!" + ], + "box": { + "x": 544, + "y": 348, + "w": 55, + "h": 55 + }, + "lines": [ + "YEAH!", + "THAT'S", + "RIGHT!" + ] + }, + "8": { + "order": 9, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5267, + "ocr_source": "vision-base", + "raw_ocr": "TRY TO BE FRIENPS WITH THAT GIRL, AND YOU'RE JUST GONNA PISGPACE YOUR FAMILY!", + "corrected_ocr": "TRY TO BE FRIENPS WITH THAT GIRL, AND YOU'RE JUST GONNA PISGPACE YOUR FAMILY!", + "translation_input": "TRY TO BE FRIENPS WITH THAT GIRL, AND YOU'RE JUST GONNA PISGPACE YOUR FAMILY!", + "translated": "INTENTA DE SER AMICS AMB AQUELLA NOIA, I NOMÉS PASSARÀS A LA TEVA FAMÍLIA!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "TRY TO BE", + "FRIENPS WITH", + "THAT GIRL, AND", + "YOU'RE JUST", + "GONNA PISGPACE", + "YOUR FAMILY!" + ], + "box": { + "x": 640, + "y": 332, + "w": 135, + "h": 113 + }, + "lines": [ + "TRY TO BE", + "FRIENPS WITH", + "THAT GIRL, AND", + "YOU'RE JUST", + "GONNA PISGPACE", + "YOUR FAMILY!" + ] + }, + "10": { + "order": 10, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4917, + "ocr_source": "vision-base", + "raw_ocr": "OH, YOU HAFFHFE7 WFU, IHA YOU/", + "corrected_ocr": "OH, YOU HAFFHFE7 WFU, IHA YOU/", + "translation_input": "OH, YOU HAFFHFE7 WFU, IHA YOU/", + "translated": "OH, TU HAFFHFE7 WFU, IHA TU/", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "OH, YOU", + "HAFFHFE7", + "WFU,", + "IHA", + "YOU/" + ], + "box": { + "x": 139, + "y": 367, + "w": 85, + "h": 90 + }, + "lines": [ + "OH, YOU", + "HAFFHFE7", + "WFU,", + "IHA", + "YOU/" + ] + }, + "11_1": { + "order": 11, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "I HATE YOU, SY-ON BOY.", + "corrected_ocr": "I HATE YOU, SY-ON BOY.", + "translation_input": "I HATE YOU, SY-ON BOY.", + "translated": "ET ODIO, NEN SY-ON.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "I HATE", + "YOU,", + "SY-ON", + "BOY." + ], + "box": { + "x": 347, + "y": 372, + "w": 42, + "h": 58 + }, + "lines": [ + "I HATE", + "YOU,", + "SY-ON", + "BOY." + ] + }, + "11_2": { + "order": 11.5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "YOU'RE A BIG MEAN JERK.", + "corrected_ocr": "YOU'RE A BIG MEAN JERK.", + "translation_input": "YOU'RE A BIG MEAN JERK.", + "translated": "ETS UN GRAN I MALVAT IMBÈCIL.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YOU'RE", + "A BIG", + "MEAN", + "JERK." + ], + "box": { + "x": 296, + "y": 419, + "w": 48, + "h": 59 + }, + "lines": [ + "YOU'RE", + "A BIG", + "MEAN", + "JERK." + ] + }, + "14_1": { + "order": 14, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "WELL, YOU'RE NOT WRONG ABOUT THAT.", + "corrected_ocr": "WELL, YOU'RE NOT WRONG ABOUT THAT.", + "translation_input": "WELL, YOU'RE NOT WRONG ABOUT THAT.", + "translated": "BÉ, NO T'EQUIVOQUES EN AIXÒ.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "WELL, YOU'RE", + "NOT WRONG", + "ABOUT THAT." + ], + "box": { + "x": 417, + "y": 522, + "w": 105, + "h": 55 + }, + "lines": [ + "WELL, YOU'RE", + "NOT WRONG", + "ABOUT THAT." + ] + }, + "14_2": { + "order": 14.5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "He's jealous. You're saying \"now,\" but don't include me.", + "corrected_ocr": "He's jealous. You're saying \"now,\" but don't include me.", + "translation_input": "He's jealous. You're saying \"now,\" but don't include me.", + "translated": "Està gelós. Dius \"ara\", però no m'hi incloguis.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "He's", + "jealous.", + "You're", + "saying \"now,\"", + "but don't", + "include me." + ], + "box": { + "x": 417, + "y": 645, + "w": 75, + "h": 60 + }, + "lines": [ + "He's", + "jealous.", + "You're", + "saying \"now,\"", + "but don't", + "include me." + ] + }, + "14_3": { + "order": 14.3, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "He's jealous.", + "corrected_ocr": "He's jealous.", + "translation_input": "He's jealous.", + "translated": "Està gelós.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "He's", + "jealous." + ], + "box": { + "x": 436, + "y": 580, + "w": 50, + "h": 36 + }, + "lines": [ + "He's", + "jealous." + ] + }, + "15": { + "order": 15, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5054, + "ocr_source": "vision-base", + "raw_ocr": "NOW SY-ON BOY'S THE ONE TRYING TO STOP ME FPDM BEING POPULAR!", + "corrected_ocr": "NOW SY-ON BOY'S THE ONE TRYING TO STOP ME FPDM BEING POPULAR!", + "translation_input": "NOW SY-ON BOY'S THE ONE TRYING TO STOP ME FPDM BEING POPULAR!", + "translated": "ARA SY-ON BOY ÉS EL QUE INTENTA QUE EM FPDM SIGUI POPULAR!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "NOW SY-ON", + "BOY'S THE", + "ONE TRYING", + "TO STOP ME", + "FPDM BEING", + "POPULAR!" + ], + "box": { + "x": 641, + "y": 592, + "w": 92, + "h": 107 + }, + "lines": [ + "NOW SY-ON", + "BOY'S THE", + "ONE TRYING", + "TO STOP ME", + "FPDM BEING", + "POPULAR!" + ] + }, + "16": { + "order": 16, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5086, + "ocr_source": "vision-base", + "raw_ocr": "IITYAJ", + "corrected_ocr": "IITYAJ", + "translation_input": "IITYAJ", + "translated": "IITYAJ", + "flags": [], + "bubble_groups": [ + "IITYAJ" + ], + "box": { + "x": 524, + "y": 668, + "w": 31, + "h": 24 + }, + "lines": [ + "IITYAJ" + ] + }, + "17": { + "order": 17, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4818, + "ocr_source": "vision-base", + "raw_ocr": "HAS COMPLETELY LOST S16HT", + "corrected_ocr": "HAS COMPLETELY LOST S16HT", + "translation_input": "HAS COMPLETELY LOST S16HT", + "translated": "HA PERD TOTALMENT S16HT", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "HAS COMPLETELY", + "LOST S16HT" + ], + "box": { + "x": 253, + "y": 663, + "w": 138, + "h": 35 + }, + "lines": [ + "HAS COMPLETELY", + "LOST S16HT" + ] + }, + "18": { + "order": 18, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5199, + "ocr_source": "vision-base", + "raw_ocr": "@RUTAL STUFF, @OS.S MAN! YOUR TRASH- TALKING SKILLS HAVE 6(7RREN EVEN BERRER!", + "corrected_ocr": "@RUTAL STUFF, @OS.S MAN! YOUR TRASHTALKING SKILLS HAVE 6(7RREN EVEN BERRER!", + "translation_input": "@RUTAL STUFF, @OS.S MAN! YOUR TRASHTALKING SKILLS HAVE 6(7RREN EVEN BERRER!", + "translated": "@RUTAL STUFF, @OS.S MAN! LES TEVES HABILITATS PER A PARLAR D'ESCOMBRARIES TENEN 6 (7RREN FINS I TOT BERRER!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "@RUTAL", + "STUFF,", + "@OS.S", + "MAN! YOUR", + "TRASH-", + "TALKING", + "SKILLS", + "HAVE", + "6(7RREN", + "EVEN", + "BERRER!" + ], + "box": { + "x": 101, + "y": 770, + "w": 85, + "h": 202 + }, + "lines": [ + "@RUTAL", + "STUFF,", + "@OS.S", + "MAN! YOUR", + "TRASH-", + "TALKING", + "SKILLS", + "HAVE", + "6(7RREN", + "EVEN", + "BERRER!" + ] + }, + "19": { + "order": 19, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4312, + "ocr_source": "vision-base", + "raw_ocr": "YOU'RE AB/G PUMB STUBBY- IFG6FP UG60 RUNRI RU/VR/", + "corrected_ocr": "YOU'RE AB/G PUMB STUBBY- IFG6FP UG60 RUNR! RU/VR/", + "translation_input": "YOU'RE AB/G PUMB STUBBY- IFG6FP UG60 RUNR! RU/VR/", + "translated": "ETS AB/G PUMB STUBBY- IFG6FP UG60 RUNR! RU/VR/", + "flags": [ + "LOW_CONF", + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YOU'RE", + "AB/G", + "PUMB", + "STUBBY-", + "IFG6FP", + "UG60", + "RUNRI RU/VR/" + ], + "box": { + "x": 640, + "y": 839, + "w": 97, + "h": 158 + }, + "lines": [ + "YOU'RE", + "AB/G", + "PUMB", + "STUBBY-", + "IFG6FP", + "UG60", + "RUNRI RU/VR/" + ] + }, + "20_1": { + "order": 20, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "YOUR MOM'S A GORILLA, AND YOUR DAD'S A FRAUD!", + "corrected_ocr": "YOUR MOM'S A GORILLA, AND YOUR DAD'S A FRAUD!", + "translation_input": "YOUR MOM'S A GORILLA, AND YOUR DAD'S A FRAUD!", + "translated": "LA TEVA MARE ÉS UN GORIL·LA, I EL TEU PARE UN FRAU!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "YOUR", + "MOM'S A", + "GORILLA,", + "AND YOUR", + "DAD'S A", + "FRAUD!" + ], + "box": { + "x": 432, + "y": 846, + "w": 110, + "h": 134 + }, + "lines": [ + "YOUR", + "MOM'S A", + "GORILLA,", + "AND YOUR", + "DAD'S A", + "FRAUD!" + ] + }, + "20_2": { + "order": 20.5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "A MEAL-GRUBBING SHE-BEAST!", + "corrected_ocr": "A MEAL-GRUBBING SHE-BEAST!", + "translation_input": "A MEAL-GRUBBING SHE-BEAST!", + "translated": "UNA BÈSTIA GOLAFRE!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "A", + "MEAL-", + "GRUB-", + "BING", + "SHE-", + "BEAST!" + ], + "box": { + "x": 554, + "y": 880, + "w": 78, + "h": 132 + }, + "lines": [ + "A", + "MEAL-", + "GRUB-", + "BING", + "SHE-", + "BEAST!" + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/006/debug_clusters.png b/pages-for-tests/translated/006/debug_clusters.png new file mode 100644 index 0000000..9633e25 Binary files /dev/null and b/pages-for-tests/translated/006/debug_clusters.png differ diff --git a/pages-for-tests/translated/006/output.txt b/pages-for-tests/translated/006/output.txt new file mode 100644 index 0000000..d5e63dc --- /dev/null +++ b/pages-for-tests/translated/006/output.txt @@ -0,0 +1,22 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|dialogue|0.55|vision-base|LIKE THIS|LIKE THIS|LIKE || THIS|COM AQUEST|BUBBLE,SEGMENTED +#2|2|dialogue|0.53|vision-base|I'LL TRAIN YOU IN HER PLACE.|I'LL TRAIN YOU IN HER PLACE.|I'LL || TRAIN YOU || IN HER || PLACE.|T'ENTRENARÉ AL SEU LLOC.|BUBBLE,SEGMENTED +#3|3|dialogue|0.54|vision-base|YOU PUNCH LIKE THIS.|YOU PUNCH LIKE THIS.|YOU || PUNCH || LIKE THIS.|PUNTEU AQUEST.|BUBBLE,SEGMENTED +#4|4|dialogue|0.51|vision-base|I'M LEARN- ING A LOT FROM YOU, FORGER!|I'M LEARNING A LOT FROM YOU, FORGER!|I'M LEARN- || ING A LOT || FROM YOU, || FORGER!|ESTIC APRENENT MOLT DE TU, FORGER!|BUBBLE,SEGMENTED +#5|5|dialogue|0.47|vision-base|TCH! 61VE IT UP ALREAPY. YOU LOOK LIKE A BUNCH OF IPIOTS!|TCH! 61VE IT UP ALREAPY. YOU LOOK LIKE A BUNCH OF IPIOTS!|TCH! 61VE IT || UP ALREAPY. || YOU LOOK || LIKE A BUNCH || OF IPIOTS!|TCH! 61 JA HO TENIU. SEMBLA UNA COLLA D'IPIOTS!|BUBBLE,SEGMENTED +#6|6|sfx|0.61|vision-base|FFJHOO|FFJHOO|FFJHOO||SFX +#7|7|dialogue|0.41|vision-base|RF_I TSJ,|RF_I TSJ,|RF_I TSJ,|RF_I TSJ,|LOW_CONF +#9|8|dialogue|0.50|vision-base|YEAH! THAT'S RIGHT!|YEAH! THAT'S RIGHT!|YEAH! || THAT'S || RIGHT!|SÍ! AIXÒ ÉS!|BUBBLE,SEGMENTED +#8|9|dialogue|0.53|vision-base|TRY TO BE FRIENPS WITH THAT GIRL, AND YOU'RE JUST GONNA PISGPACE YOUR FAMILY!|TRY TO BE FRIENPS WITH THAT GIRL, AND YOU'RE JUST GONNA PISGPACE YOUR FAMILY!|TRY TO BE || FRIENPS WITH || THAT GIRL, AND || YOU'RE JUST || GONNA PISGPACE || YOUR FAMILY!|INTENTA DE SER AMICS AMB AQUELLA NOIA, I NOMÉS PASSARÀS A LA TEVA FAMÍLIA!|BUBBLE,SEGMENTED +#10|10|dialogue|0.49|vision-base|OH, YOU HAFFHFE7 WFU, IHA YOU/|OH, YOU HAFFHFE7 WFU, IHA YOU/|OH, YOU || HAFFHFE7 || WFU, || IHA || YOU/|OH, TU HAFFHFE7 WFU, IHA TU/|BUBBLE,SEGMENTED +#11|11|dialogue|0.53|vision-base|I KIATE YOU, SY-ON YOU'RE BOY. ABIG MEAN JERK.|I KIATE YOU, SY-ON YOU'RE BOY. ABIG MEAN JERK.|I KIATE || YOU, || SY-ON || YOU'RE BOY. || ABIG || MEAN || JERK.|ET KIATE, SY-ON TU ET NEN. ABIG MEAN JERK.|BUBBLE,SEGMENTED +#12|12|sfx|0.61|vision-base|JL|JL|JL||SFX +#13|13|sfx|0.52|vision-base|RR.|RR.|RR.||SFX +#14|14|dialogue|0.49|vision-base|WELL, YOU'RE NOT WTUNG ABOUT THAT. HE'S JEALOUS. YOU'FE AYIFTE 'TTOV),:' BU* AON'*.IN6LUD&. MB.|WELL, YOU'RE NOT WTUNG ABOUT THAT. HE'S JEALOUS. YOU'FE AYIFTE 'TTOV),:' BU* AON'*.IN6LUD&. MB.|WELL, YOU'RE || NOT WTUNG || ABOUT THAT. || HE'S || JEALOUS. || YOU'FE || AYIFTE 'TTOV),:' || BU* AON'* || .IN6LUD&. MB.|BÉ, AIXÒ NO ESTÀ IMPORTANT. ESTÀ GELOSOS. JA ESTEU 'TTOV),:' BU* AON'*.IN6LUD&. MB.|BUBBLE,SEGMENTED +#15|15|dialogue|0.51|vision-base|NOW SY-ON BOY'S THE ONE TRYING TO STOP ME FPDM BEING POPULAR!|NOW SY-ON BOY'S THE ONE TRYING TO STOP ME FPDM BEING POPULAR!|NOW SY-ON || BOY'S THE || ONE TRYING || TO STOP ME || FPDM BEING || POPULAR!|ARA SY-ON BOY ÉS EL QUE INTENTA QUE EM FPDM SIGUI POPULAR!|BUBBLE,SEGMENTED +#16|16|dialogue|0.51|vision-base|IITYAJ|IITYAJ|IITYAJ|IITYAJ| +#17|17|dialogue|0.48|vision-base|HAS COMPLETELY LOST S16HT|HAS COMPLETELY LOST S16HT|HAS COMPLETELY || LOST S16HT|HA PERD TOTALMENT S16HT|BUBBLE,SEGMENTED +#18|18|dialogue|0.52|vision-base|@RUTAL STUFF, @OS.S MAN! YOUR TRASH- TALKING SKILLS HAVE 6(7RREN EVEN BERRER!|@RUTAL STUFF, @OS.S MAN! YOUR TRASHTALKING SKILLS HAVE 6(7RREN EVEN BERRER!|@RUTAL || STUFF, || @OS.S || MAN! YOUR || TRASH- || TALKING || SKILLS || HAVE || 6(7RREN || EVEN || BERRER!|@RUTAL STUFF, @OS.S MAN! LES TEVES HABILITATS PER A PARLAR D'ESCOMBRARIES TENEN 6 (7RREN FINS I TOT BERRER!|BUBBLE,SEGMENTED +#19|19|dialogue|0.43|vision-base|YOU'RE AB/G PUMB STUBBY- IFG6FP UG60 RUNRI RU/VR/|YOU'RE AB/G PUMB STUBBY- IFG6FP UG60 RUNR! RU/VR/|YOU'RE || AB/G || PUMB || STUBBY- || IFG6FP || UG60 || RUNRI RU/VR/|ETS AB/G PUMB STUBBY- IFG6FP UG60 RUNR! RU/VR/|LOW_CONF,BUBBLE,SEGMENTED +#20|20|dialogue|0.52|vision-base|YOUR MOM'SA GORIUA, AND YOUR AN? YOUR MEAL-?A?'S A GRIIB- FRA￿/ 8/NG SHE- BFASRI|YOUR MOM'SA GORIUA, AND YOUR AN? YOUR MEAL-?A?'S A GRIIBFRA￿/ 8/NG SHEBFASR!|YOUR || MOM'SA || GORIUA, || AND YOUR AN? YOUR MEAL- || ?A?'S A GRIIB- || FRA￿/ 8/NG || SHE- || BFASRI|LA GORIUA DE LA TEVA MARE, I LA TEVA AN? EL TEU ÀPAT-?A?'S A GRIBFRA/ 8/NG SHEBFASR!|BUBBLE,SEGMENTED diff --git a/pages-for-tests/translated/007/007_cleaned.png b/pages-for-tests/translated/007/007_cleaned.png new file mode 100644 index 0000000..e205bd4 Binary files /dev/null and b/pages-for-tests/translated/007/007_cleaned.png differ diff --git a/pages-for-tests/translated/007/007_translated.png b/pages-for-tests/translated/007/007_translated.png new file mode 100644 index 0000000..4cb1225 Binary files /dev/null and b/pages-for-tests/translated/007/007_translated.png differ diff --git a/pages-for-tests/translated/007/bubbles.json b/pages-for-tests/translated/007/bubbles.json new file mode 100644 index 0000000..b39735c --- /dev/null +++ b/pages-for-tests/translated/007/bubbles.json @@ -0,0 +1,347 @@ +{ + "1": { + "order": 1, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.486, + "ocr_source": "vision-base", + "raw_ocr": "I-I'M SORRY.", + "corrected_ocr": "I-I'M SORRY.", + "translation_input": "I-I'M SORRY.", + "translated": "I-HO SENT.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "I-I'M", + "SORRY." + ], + "box": { + "x": 644, + "y": 160, + "w": 64, + "h": 42 + }, + "lines": [ + "I-I'M", + "SORRY." + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5209, + "ocr_source": "vision-base", + "raw_ocr": "LOOK, I'LL BRING YOU SOME CANPY TO MAKE UP FOR IT, ALL RIGH", + "corrected_ocr": "LOOK, I'LL BRING YOU SOME CANPY TO MAKE UP FOR IT, ALL RIGH", + "translation_input": "LOOK, I'LL BRING YOU SOME CANPY TO MAKE UP FOR IT, ALL RIGH", + "translated": "MIRA, ET PORTARÉ UN CANPY PER COMPRAR-HO, TOT BÉ", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "LOOK, I'LL", + "BRING", + "YOU SOME", + "CANPY TO", + "MAKE UP", + "FOR IT, ALL", + "RIGH" + ], + "box": { + "x": 124, + "y": 107, + "w": 102, + "h": 153 + }, + "lines": [ + "LOOK, I'LL", + "BRING", + "YOU SOME", + "CANPY TO", + "MAKE UP", + "FOR IT, ALL", + "RIGH" + ] + }, + "5": { + "order": 4, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.5124, + "ocr_source": "vision-base", + "raw_ocr": "JUST", + "corrected_ocr": "JUST", + "translation_input": "JUST", + "translated": "", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "JUST" + ], + "box": { + "x": 196, + "y": 320, + "w": 33, + "h": 55 + }, + "lines": [ + "JUST" + ] + }, + "6": { + "order": 6, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5106, + "ocr_source": "vision-base", + "raw_ocr": "PON'T RY. OKAY", + "corrected_ocr": "DON'T'T RY. OKAY", + "translation_input": "DON'T'T RY. OKAY", + "translated": "NO RY. D'ACORD", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "PON'T", + "RY.", + "OKAY" + ], + "box": { + "x": 153, + "y": 374, + "w": 38, + "h": 71 + }, + "lines": [ + "PON'T", + "RY.", + "OKAY" + ] + }, + "8": { + "order": 8, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4778, + "ocr_source": "vision-base", + "raw_ocr": "FUT YOU PRPI", + "corrected_ocr": "FUT YOU PRP!", + "translation_input": "FUT YOU PRP!", + "translated": "FUT TU PRP!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "FUT", + "YOU", + "PRPI" + ], + "box": { + "x": 111, + "y": 823, + "w": 27, + "h": 46 + }, + "lines": [ + "FUT", + "YOU", + "PRPI" + ] + }, + "9": { + "order": 9, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4996, + "ocr_source": "vision-base", + "raw_ocr": "UH, MAN? PIP YOU JUST", + "corrected_ocr": "UH, MAN? PIP YOU JUST", + "translation_input": "UH, MAN? PIP YOU JUST", + "translated": "UH, HOME? PIP NOMÉS", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "UH,", + "MAN?", + "PIP", + "YOU", + "JUST" + ], + "box": { + "x": 647, + "y": 820, + "w": 42, + "h": 127 + }, + "lines": [ + "UH,", + "MAN?", + "PIP", + "YOU", + "JUST" + ] + }, + "10_1": { + "order": 10, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "N-NO! IT'S NOT LIKE THAT!", + "corrected_ocr": "N-NO! IT'S NOT LIKE THAT!", + "translation_input": "N-NO! IT'S NOT LIKE THAT!", + "translated": "N-NO! NO ÉS AIXÍ!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "N-NO!", + "IT'S", + "NOT", + "LIKE", + "THAT!" + ], + "box": { + "x": 206, + "y": 835, + "w": 59, + "h": 125 + }, + "lines": [ + "N-NO!", + "IT'S", + "NOT", + "LIKE", + "THAT!" + ] + }, + "10_2": { + "order": 10.5, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.95, + "ocr_source": "manual_correction", + "raw_ocr": "WE GOTTA GET TO CLASS!", + "corrected_ocr": "WE GOTTA GET TO CLASS!", + "translation_input": "WE GOTTA GET TO CLASS!", + "translated": "HEM D'ANAR A CLASSE!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "WE", + "GOTTA", + "GET TO", + "CLASS!" + ], + "box": { + "x": 267, + "y": 790, + "w": 54, + "h": 105 + }, + "lines": [ + "WE", + "GOTTA", + "GET TO", + "CLASS!" + ] + }, + "12": { + "order": 12, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5758, + "ocr_source": "vision-base", + "raw_ocr": "OGIZE", + "corrected_ocr": "OGIZE", + "translation_input": "OGIZE", + "translated": "OGIZE", + "flags": [], + "bubble_groups": [ + "OGIZE" + ], + "box": { + "x": 509, + "y": 880, + "w": 49, + "h": 70 + }, + "lines": [ + "OGIZE" + ] + }, + "14": { + "order": 14, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4725, + "ocr_source": "vision-base", + "raw_ocr": "SH UP, AU R/GHRI I ROLP YOU, IRS RHARI", + "corrected_ocr": "SH UP, AU R/GHR! I ROLP YOU, IRS RHAR!", + "translation_input": "SH UP, AU R/GHR! I ROLP YOU, IRS RHAR!", + "translated": "SH UP, AU R/GHR! T'ENROLO, IRS RHAR!", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "SH", + "UP, AU", + "R/GHRI", + "I ROLP", + "YOU, IRS", + "RHARI" + ], + "box": { + "x": 89, + "y": 988, + "w": 71, + "h": 115 + }, + "lines": [ + "SH", + "UP, AU", + "R/GHRI", + "I ROLP", + "YOU, IRS", + "RHARI" + ] + }, + "15": { + "order": 15, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5315, + "ocr_source": "vision-base", + "raw_ocr": "IV", + "corrected_ocr": "IV", + "translation_input": "IV", + "translated": "IV", + "flags": [], + "bubble_groups": [ + "IV" + ], + "box": { + "x": 654, + "y": 1065, + "w": 15, + "h": 13 + }, + "lines": [ + "IV" + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/007/debug_clusters.png b/pages-for-tests/translated/007/debug_clusters.png new file mode 100644 index 0000000..a50b9be Binary files /dev/null and b/pages-for-tests/translated/007/debug_clusters.png differ diff --git a/pages-for-tests/translated/007/output.txt b/pages-for-tests/translated/007/output.txt new file mode 100644 index 0000000..69645ba --- /dev/null +++ b/pages-for-tests/translated/007/output.txt @@ -0,0 +1,13 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|dialogue|0.49|vision-base|I-I'M SORRY.|I-I'M SORRY.|I-I'M || SORRY.|I-HO SENT.|BUBBLE,SEGMENTED +#2|2|dialogue|0.52|vision-base|LOOK, I'LL BRING YOU SOME CANPY TO MAKE UP FOR IT, ALL RIGH|LOOK, I'LL BRING YOU SOME CANPY TO MAKE UP FOR IT, ALL RIGH|LOOK, I'LL || BRING || YOU SOME || CANPY TO || MAKE UP || FOR IT, ALL || RIGH|MIRA, ET PORTARÉ UN CANPY PER COMPRAR-HO, TOT BÉ|BUBBLE,SEGMENTED +#6|6|dialogue|0.51|vision-base|PON'T RY. OKAY|DON'T'T RY. OKAY|PON'T || RY. || OKAY|NO RY. D'ACORD|BUBBLE,SEGMENTED +#8|8|dialogue|0.48|vision-base|FUT YOU PRPI|FUT YOU PRP!|FUT || YOU || PRPI|FUT TU PRP!|BUBBLE,SEGMENTED +#9|9|dialogue|0.50|vision-base|UH, MAN? PIP YOU JUST|UH, MAN? PIP YOU JUST|UH, || MAN? || PIP || YOU || JUST|UH, HOME? PIP NOMÉS|BUBBLE,SEGMENTED +#10|10|dialogue|0.50|vision-base|-NOI RHAR'S NOR THE UXF BFUI FHAR/ WS GOTTA GET RO SSL|-NO! RHAR'S NOR THE UXF BFU! FHAR/ WS GOTTA GET RO SSL|-NOI || RHAR'S NOR || THE UXF || BFUI FHAR/ || WS || GOTTA || GET RO || SSL|-NO! RHAR NI EL BFU UXF! FHAR/ WS HAGO GET RO SSL|BUBBLE,SEGMENTED +#11|11|reaction|0.43|vision-base|IW-AI|IW-A!|IW-AI|IW-A!|LOW_CONF +#12|12|dialogue|0.58|vision-base|OGIZE|OGIZE|OGIZE|OGIZE| +#13|13|dialogue|0.32|vision-base|I/=Y|I/=Y|I/=Y|I/=Y|LOW_CONF +#14|14|dialogue|0.47|vision-base|SH UP, AU R/GHRI I ROLP YOU, IRS RHARI|SH UP, AU R/GHR! I ROLP YOU, IRS RHAR!|SH || UP, AU || R/GHRI || I ROLP || YOU, IRS || RHARI|SH UP, AU R/GHR! T'ENROLO, IRS RHAR!|BUBBLE,SEGMENTED +#15|15|dialogue|0.53|vision-base|IV|IV|IV|IV| diff --git a/pages-for-tests/translated/008/008_cleaned.png b/pages-for-tests/translated/008/008_cleaned.png new file mode 100644 index 0000000..1e98f6f Binary files /dev/null and b/pages-for-tests/translated/008/008_cleaned.png differ diff --git a/pages-for-tests/translated/008/008_translated.png b/pages-for-tests/translated/008/008_translated.png new file mode 100644 index 0000000..22b556d Binary files /dev/null and b/pages-for-tests/translated/008/008_translated.png differ diff --git a/pages-for-tests/translated/008/bubbles.json b/pages-for-tests/translated/008/bubbles.json new file mode 100644 index 0000000..5bd21cf --- /dev/null +++ b/pages-for-tests/translated/008/bubbles.json @@ -0,0 +1,516 @@ +{ + "1": { + "order": 1, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.4573, + "ocr_source": "vision-base", + "raw_ocr": "TK4F6", + "corrected_ocr": "TK4F6", + "translation_input": "TK4F6", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + "TK4F6" + ], + "box": { + "x": 1066, + "y": 169, + "w": 100, + "h": 35 + }, + "lines": [ + "TK4F6" + ] + }, + "2": { + "order": 2, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.499, + "ocr_source": "vision-base", + "raw_ocr": "UNK• IS ALL'S MQST PAMQUG... O.'O\"O", + "corrected_ocr": "UNK• IS ALL'S MQST PAMQUG... O.'O\"O", + "translation_input": "UNK• IS ALL'S MQST PAMQUG... O.'O\"O", + "translated": "UNK• ÉS EL MQST PAMQUG DE TOTS... O.'O\"O", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "UNK•", + "IS", + "ALL'S", + "MQST", + "PAMQUG... O.'O\"O" + ], + "box": { + "x": 414, + "y": 149, + "w": 173, + "h": 140 + }, + "lines": [ + "UNK•", + "IS", + "ALL'S", + "MQST", + "PAMQUG... O.'O\"O" + ] + }, + "3": { + "order": 3, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.5057, + "ocr_source": "vision-base", + "raw_ocr": "TANK...", + "corrected_ocr": "TANK...", + "translation_input": "TANK...", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + "TANK..." + ], + "box": { + "x": 1079, + "y": 228, + "w": 96, + "h": 32 + }, + "lines": [ + "TANK..." + ] + }, + "4": { + "order": 4, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.3799, + "ocr_source": "vision-base", + "raw_ocr": "'I,CCY.", + "corrected_ocr": "'I,CCY.", + "translation_input": "'I,CCY.", + "translated": "", + "flags": [ + "SFX", + "LOW_CONF" + ], + "bubble_groups": [ + "'I,CCY." + ], + "box": { + "x": 323, + "y": 351, + "w": 61, + "h": 43 + }, + "lines": [ + "'I,CCY." + ] + }, + "5": { + "order": 5, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.5179, + "ocr_source": "vision-base", + "raw_ocr": "THAR6", + "corrected_ocr": "THAR6", + "translation_input": "THAR6", + "translated": "", + "flags": [ + "SFX" + ], + "bubble_groups": [ + "THAR6" + ], + "box": { + "x": 1066, + "y": 477, + "w": 85, + "h": 28 + }, + "lines": [ + "THAR6" + ] + }, + "6": { + "order": 6, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5321, + "ocr_source": "vision-base", + "raw_ocr": "VQST ILA PXHTLARAFTN&", + "corrected_ocr": "VQST ILA PXHTLARAFTN&", + "translation_input": "VQST ILA PXHTLARAFTN&", + "translated": "VQST ILA PXHTLARAFTN&", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "VQST", + "ILA PXHTLARAFTN&" + ], + "box": { + "x": 29, + "y": 507, + "w": 176, + "h": 51 + }, + "lines": [ + "VQST", + "ILA PXHTLARAFTN&" + ] + }, + "7": { + "order": 7, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4246, + "ocr_source": "vision-base", + "raw_ocr": "PQU61NFR OLL!", + "corrected_ocr": "PQU61NFR OLL!", + "translation_input": "PQU61NFR OLL!", + "translated": "PQU61NFR OLL!", + "flags": [ + "LOW_CONF", + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "PQU61NFR", + "OLL!" + ], + "box": { + "x": 58, + "y": 594, + "w": 116, + "h": 51 + }, + "lines": [ + "PQU61NFR", + "OLL!" + ] + }, + "8": { + "order": 8, + "region_type": "sfx", + "background_type": "complex", + "confidence": 0.3996, + "ocr_source": "vision-base", + "raw_ocr": "THIN66.", + "corrected_ocr": "THIN66.", + "translation_input": "THIN66.", + "translated": "", + "flags": [ + "SFX", + "LOW_CONF" + ], + "bubble_groups": [ + "THIN66." + ], + "box": { + "x": 649, + "y": 705, + "w": 95, + "h": 30 + }, + "lines": [ + "THIN66." + ] + }, + "10": { + "order": 9, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.353, + "ocr_source": "vision-base", + "raw_ocr": "JI", + "corrected_ocr": "J!", + "translation_input": "J!", + "translated": "", + "flags": [ + "LOW_CONF", + "HEAVY_CORRECTION" + ], + "bubble_groups": [ + "JI" + ], + "box": { + "x": 1056, + "y": 744, + "w": 8, + "h": 10 + }, + "lines": [ + "JI" + ] + }, + "9": { + "order": 10, + "region_type": "reaction", + "background_type": "complex", + "confidence": 0.4044, + "ocr_source": "vision-base", + "raw_ocr": "I'RI", + "corrected_ocr": "I'R!", + "translation_input": "I'R!", + "translated": "JO!", + "flags": [ + "LOW_CONF" + ], + "bubble_groups": [ + "I'RI" + ], + "box": { + "x": 156, + "y": 790, + "w": 61, + "h": 70 + }, + "lines": [ + "I'RI" + ] + }, + "12": { + "order": 11, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4957, + "ocr_source": "vision-base", + "raw_ocr": "SPMS LIK$ GRFAK THO", + "corrected_ocr": "SPMS LIK$ GRFAK THO", + "translation_input": "SPMS LIK$ GRFAK THO", + "translated": "SPMS LIK$ GRFAK THO", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "SPMS", + "LIK$", + "GRFAK", + "THO" + ], + "box": { + "x": 623, + "y": 832, + "w": 92, + "h": 139 + }, + "lines": [ + "SPMS", + "LIK$", + "GRFAK", + "THO" + ] + }, + "11": { + "order": 12, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5007, + "ocr_source": "vision-base", + "raw_ocr": "FSPECIALLY WHEN PLAYERS •SLALA PUNK• AGRFSSIVELY PURR£NA TH$ PALL INRO TH¢ MOOP", + "corrected_ocr": "FSPECIALLY WHEN PLAYERS •SLALA PUNK• AGRFSSIVELY PURR£NA TH$ PALL INRO TH¢ MOOP", + "translation_input": "FSPECIALLY WHEN PLAYERS •SLALA PUNK• AGRFSSIVELY PURR£NA TH$ PALL INRO TH¢ MOOP", + "translated": "ESPECIALMENT QUAN ELS JUGADORS •SLALA PUNK• AGRFSSIVAMENT PURR£NA TH$ PALL INRO TH¢ MOOP", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "FSPECIALLY", + "WHEN PLAYERS", + "•SLALA PUNK•", + "AGRFSSIVELY", + "PURR£NA TH$", + "PALL INRO", + "TH¢ MOOP" + ], + "box": { + "x": 962, + "y": 812, + "w": 198, + "h": 197 + }, + "lines": [ + "FSPECIALLY", + "WHEN PLAYERS", + "•SLALA PUNK•", + "AGRFSSIVELY", + "PURR£NA TH$", + "PALL INRO", + "TH¢ MOOP" + ] + }, + "13": { + "order": 13, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4589, + "ocr_source": "vision-base", + "raw_ocr": "'SLAM PUNK.", + "corrected_ocr": "'SLAM PUNK.", + "translation_input": "'SLAM PUNK.", + "translated": "'SLAM PUNK.", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "'SLAM", + "PUNK." + ], + "box": { + "x": 23, + "y": 925, + "w": 104, + "h": 68 + }, + "lines": [ + "'SLAM", + "PUNK." + ] + }, + "14": { + "order": 14, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5096, + "ocr_source": "vision-base", + "raw_ocr": "PLUS, RUKAVIA KUWS SLOA PUNKS ARE ￿SO", + "corrected_ocr": "PLUS, RUKAVIA KUWS SLOA PUNKS ARE ￿SO", + "translation_input": "PLUS, RUKAVIA KUWS SLOA PUNKS ARE ￿SO", + "translated": "A MÉS, RUKAVIA KUWS SLOA PUNKS SÓN SO", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "PLUS,", + "RUKAVIA KUWS", + "SLOA PUNKS", + "ARE ￿SO" + ], + "box": { + "x": 394, + "y": 1407, + "w": 162, + "h": 91 + }, + "lines": [ + "PLUS,", + "RUKAVIA KUWS", + "SLOA PUNKS", + "ARE ￿SO" + ] + }, + "15": { + "order": 15, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5154, + "ocr_source": "vision-base", + "raw_ocr": "PURINA JUNIOR", + "corrected_ocr": "PURINA JUNIOR", + "translation_input": "PURINA JUNIOR", + "translated": "PURINA JUNIOR", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "PURINA", + "JUNIOR" + ], + "box": { + "x": 1018, + "y": 1428, + "w": 104, + "h": 51 + }, + "lines": [ + "PURINA", + "JUNIOR" + ] + }, + "16": { + "order": 16, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.4819, + "ocr_source": "vision-base", + "raw_ocr": "ONLY PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOOP IT VIAS", + "corrected_ocr": "ONLY PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOOP IT VIAS", + "translation_input": "ONLY PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOOP IT VIAS", + "translated": "NOMÉS PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOP IT VIAS", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "ONLY PTP", + "H¢ ¢N¢R•IZ¢", + "SOWN", + "SCHOOL'S", + "TH$ THS ' WIRS...,OPPONPMRS", + "•YM STOOP", + "IT VIAS" + ], + "box": { + "x": 594, + "y": 1433, + "w": 248, + "h": 273 + }, + "lines": [ + "ONLY PTP", + "H¢ ¢N¢R•IZ¢", + "SOWN", + "SCHOOL'S", + "TH$ THS ' WIRS...,OPPONPMRS", + "•YM STOOP", + "IT VIAS" + ] + }, + "17": { + "order": 17, + "region_type": "dialogue", + "background_type": "complex", + "confidence": 0.5012, + "ocr_source": "vision-base", + "raw_ocr": "ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;", + "corrected_ocr": "ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;", + "translation_input": "ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;", + "translated": "ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;", + "flags": [ + "BUBBLE", + "SEGMENTED" + ], + "bubble_groups": [ + "ISAN ONC$", + "SLAM PUNKSP", + "PIIRINA A", + "AAAA$;" + ], + "box": { + "x": 971, + "y": 1514, + "w": 195, + "h": 112 + }, + "lines": [ + "ISAN ONC$", + "SLAM PUNKSP", + "PIIRINA A", + "AAAA$;" + ] + } +} \ No newline at end of file diff --git a/pages-for-tests/translated/008/debug_clusters.png b/pages-for-tests/translated/008/debug_clusters.png new file mode 100644 index 0000000..51a5fe2 Binary files /dev/null and b/pages-for-tests/translated/008/debug_clusters.png differ diff --git a/pages-for-tests/translated/008/output.txt b/pages-for-tests/translated/008/output.txt new file mode 100644 index 0000000..d1345ca --- /dev/null +++ b/pages-for-tests/translated/008/output.txt @@ -0,0 +1,19 @@ +BUBBLE|ORDER|TYPE|CONF|OCR_SOURCE|ORIGINAL|CORRECTED|BUBBLE_GROUPS|TRANSLATED|FLAGS +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +#1|1|sfx|0.46|vision-base|TK4F6|TK4F6|TK4F6||SFX +#2|2|dialogue|0.50|vision-base|UNK• IS ALL'S MQST PAMQUG... O.'O"O|UNK• IS ALL'S MQST PAMQUG... O.'O"O|UNK• || IS || ALL'S || MQST || PAMQUG... O.'O"O|UNK• ÉS EL MQST PAMQUG DE TOTS... O.'O"O|BUBBLE,SEGMENTED +#3|3|sfx|0.51|vision-base|TANK...|TANK...|TANK...||SFX +#4|4|sfx|0.38|vision-base|'I,CCY.|'I,CCY.|'I,CCY.||SFX,LOW_CONF +#5|5|sfx|0.52|vision-base|THAR6|THAR6|THAR6||SFX +#6|6|dialogue|0.53|vision-base|VQST ILA PXHTLARAFTN&|VQST ILA PXHTLARAFTN&|VQST || ILA PXHTLARAFTN&|VQST ILA PXHTLARAFTN&|BUBBLE,SEGMENTED +#7|7|dialogue|0.42|vision-base|PQU61NFR OLL!|PQU61NFR OLL!|PQU61NFR || OLL!|PQU61NFR OLL!|LOW_CONF,BUBBLE,SEGMENTED +#8|8|sfx|0.40|vision-base|THIN66.|THIN66.|THIN66.||SFX,LOW_CONF +#10|9|dialogue|0.35|vision-base|JI|J!|JI||LOW_CONF,HEAVY_CORRECTION +#9|10|reaction|0.40|vision-base|I'RI|I'R!|I'RI|JO!|LOW_CONF +#12|11|dialogue|0.50|vision-base|SPMS LIK$ GRFAK THO|SPMS LIK$ GRFAK THO|SPMS || LIK$ || GRFAK || THO|SPMS LIK$ GRFAK THO|BUBBLE,SEGMENTED +#11|12|dialogue|0.50|vision-base|FSPECIALLY WHEN PLAYERS •SLALA PUNK• AGRFSSIVELY PURR£NA TH$ PALL INRO TH¢ MOOP|FSPECIALLY WHEN PLAYERS •SLALA PUNK• AGRFSSIVELY PURR£NA TH$ PALL INRO TH¢ MOOP|FSPECIALLY || WHEN PLAYERS || •SLALA PUNK• || AGRFSSIVELY || PURR£NA TH$ || PALL INRO || TH¢ MOOP|ESPECIALMENT QUAN ELS JUGADORS •SLALA PUNK• AGRFSSIVAMENT PURR£NA TH$ PALL INRO TH¢ MOOP|BUBBLE,SEGMENTED +#13|13|dialogue|0.46|vision-base|'SLAM PUNK.|'SLAM PUNK.|'SLAM || PUNK.|'SLAM PUNK.|BUBBLE,SEGMENTED +#14|14|dialogue|0.51|vision-base|PLUS, RUKAVIA KUWS SLOA PUNKS ARE ￿SO|PLUS, RUKAVIA KUWS SLOA PUNKS ARE ￿SO|PLUS, || RUKAVIA KUWS || SLOA PUNKS || ARE ￿SO|A MÉS, RUKAVIA KUWS SLOA PUNKS SÓN SO|BUBBLE,SEGMENTED +#15|15|dialogue|0.52|vision-base|PURINA JUNIOR|PURINA JUNIOR|PURINA || JUNIOR|PURINA JUNIOR|BUBBLE,SEGMENTED +#16|16|dialogue|0.48|vision-base|ONLY PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOOP IT VIAS|ONLY PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOOP IT VIAS|ONLY PTP || H¢ ¢N¢R•IZ¢ || SOWN || SCHOOL'S || TH$ THS ' WIRS...,OPPONPMRS || •YM STOOP || IT VIAS|NOMÉS PTP H¢ ¢N¢R•IZ¢ SOWN SCHOOL'S TH$ THS ' WIRS...,OPPONPMRS •YM STOP IT VIAS|BUBBLE,SEGMENTED +#17|17|dialogue|0.50|vision-base|ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;|ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;|ISAN ONC$ || SLAM PUNKSP || PIIRINA A || AAAA$;|ISAN ONC$ SLAM PUNKSP PIIRINA A AAAA$;|BUBBLE,SEGMENTED diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..62d7a7d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,12 @@ +numpy<2.0 +opencv-python>=4.8 +easyocr>=1.7.1 +deep-translator>=1.11.4 +manga-ocr>=0.1.14 +torch +torchvision +Pillow +transformers +fugashi +unidic-lite +